Commit Graph

3472 Commits

Author SHA1 Message Date
Yaowu Xu
bcd102c523 Merge "Fix bad speed settings interaction." 2014-03-21 12:13:44 -07:00
Dmitry Kovalev
4cb37bff96 Removing redundant {above, left}_seg_context manipulation code.
Change-Id: Ib3c1746e61220c629cbd971b2458aa686b5c9e36
2014-03-21 12:12:55 -07:00
Dmitry Kovalev
a57de9da03 Merge "Reusing {above, left}_seg_context vars in both encoder and decoder." 2014-03-21 12:02:42 -07:00
Dmitry Kovalev
50bbd8a583 Tiny vp9_picklpf.c cleanup.
Change-Id: I1804c3629c3df2b67438e87196ab35fafaddaa24
2014-03-21 12:00:26 -07:00
Yaowu Xu
d070aa5de0 Merge "changed to use correct pred_mv" 2014-03-21 11:13:48 -07:00
Yaowu Xu
2d70e16595 Merge "Fix a valgrind error" 2014-03-21 11:13:43 -07:00
Yaowu Xu
0e53d52088 changed to use correct pred_mv
The third pred_mv is stored in x->pred_mv[ref_frame]. This commit make
sure the correct mv is read.

Change-Id: Ibed24daf36703a63f0394c87b2381ee1d2eb7910
2014-03-21 09:16:06 -07:00
Yunqing Wang
49b2330d8b Add prediction mode skipping in non-rd situation
In non-rd pick_mode code, added mode skipping according to
thresholds. Used rd thresholds now, but we can modified them
later for real-time case.

RTC set borg test showed a 0.095% PSNR gain. For different rtc
clips, the real-time(speed 7) encoder speedup is 2% - 10%.

Change-Id: Ic72535c96b891092c662453be32d3168f7e34dcc
2014-03-21 09:15:36 -07:00
Yaowu Xu
46c71e5eba Merge "Remove duplicate declaration" 2014-03-21 08:44:04 -07:00
Yaowu Xu
e993fb5e24 Fix a valgrind error
Valgrind was complaining uninitialzed values are being used.

Change-Id: Ia9eb619f4e67d1fb7af1057d50304f15adc02aab
2014-03-21 08:36:40 -07:00
Paul Wilkins
2e05341ab4 Fix bad speed settings interaction.
The flag x->skip_recode interacts badly with
the cpi->sf.use_nonrd_pick_mode and
cpi->sf.skip_encode_sb speed settings.

Restricting the use of the skip_decode flag when
these other speed choices are in use helps quality
for speeds 3 and 4 by a large amount with only a
small impact on speed.

Average improvmentes for 2 pass speed 4:
Derf +8.8%
Yt + 10.53%
Std-Hd +6.95%
yt-hd + 22.95%

Change-Id: I8010876d8012042a11077c92e69d813c3dfa58eb
2014-03-21 10:10:50 +00:00
Marco Paniconi
1231638d33 Merge "Some code cleanup for cyclic refresh." 2014-03-20 21:15:40 -07:00
Yaowu Xu
98ed74d942 Change the min/max q validation in lossless mode
This commit changed how q is validated in lossless mode. With this
commit, when --lossless=1 is specificed at commandline, --min-q and
--max-q are now ignored. This is to make the option non-ambiguious.

Change-Id: I33e85690460537509d33be75d6a3597be4affc09
2014-03-20 19:22:27 -07:00
Yaowu Xu
0de216a995 Use local vairable in rd_auto_partition_range()
In addition to a few cleanups.

Change-Id: Ice5938ef494513921a47e7c64ba9928f2202e24e
2014-03-20 19:22:26 -07:00
Marco Paniconi
21be5ca042 Some code cleanup for cyclic refresh.
Change-Id: I0e4e2462ee27640f9bf4091431241ede6fc97267
2014-03-20 16:44:31 -07:00
Dmitry Kovalev
7ad40117f1 Reusing {above, left}_seg_context vars in both encoder and decoder.
Change-Id: Id1fa36c92cb007b73a450cc8552e810cedad38b9
2014-03-20 16:15:57 -07:00
Minghai Shang
03d75182f7 Merge "[svc] Finalize spatial svc first pass rate control" 2014-03-20 15:12:14 -07:00
Yunqing Wang
cf07d3e332 Remove unused mode_sad
Removed mode_sad.

Change-Id: I230b42ac9b617ae2c375e297057aa0756bd355fe
2014-03-20 09:28:16 -07:00
Jingning Han
b64d58c773 Merge "Enable variable block size test in non-RD mode decision" 2014-03-19 18:54:42 -07:00
Dmitry Kovalev
4c0cede2bc Merge "Cleaning up vp9_onyx_if.c and vp9_onyx_int.h." 2014-03-19 18:36:09 -07:00
Jingning Han
60f9ebc3f1 Enable variable block size test in non-RD mode decision
This is an initial attempt to allow variable block size partition
in non-RD coding flow. It tests 8x8, 16x16 and 32x32 block size per
64x64 block, all using non-RD mode decision and the associated rate
distortion costs from modeling, then selects the best block size to
encode the entire 64x64 block. Such operations are triggered every
other 3 frames. The blocks of intermediate frames will reuse the
collocated block's partition type.

It improves the compression performance by 13.2%. Note that the gains
are not evenly distributed. For many hard clips, the compression
performance is improved by 20% to 28%. Local speed test shows that
it will also increase runtime by 50%, as compared to speed -7. It is
now enabled in speed -6 setting.

Change-Id: Ib4fb8659d21621c9075b3c369ddaa9ecb0a4b204
2014-03-19 16:10:29 -07:00
Dmitry Kovalev
c9ec26f1d8 Moving common code into vp9_update_mv_count().
Change-Id: I512482853bdf2695fbdf1c705a2ada354ccf76cf
2014-03-19 14:26:11 -07:00
Yaowu Xu
7ef16efca1 Remove duplicate declaration
Change-Id: Ic8e52a89e0df816c38cd8ff1b7c53862b9a6dff2
2014-03-19 12:23:32 -07:00
Jingning Han
4d903f47b6 Merge "Fix the use of uninitialized skip flag" 2014-03-19 11:21:41 -07:00
Dmitry Kovalev
981c5f2e03 Merge "Rearranging and removing unused defines." 2014-03-19 11:18:47 -07:00
Minghai Shang
d205335060 [svc] Finalize spatial svc first pass rate control
1. Save stats for each spatial layer
      2. Add frame buffer management for svc first pass rc
      3. Set default spatial layer to 1
      4. Flush encoder at the end of stream in test app
This only supports spatial svc.
Change-Id: Ia89cfa87bb6394e6c0405b921d86c426d0a0c9ae
2014-03-19 11:06:20 -07:00
Yaowu Xu
39f95de83d Merge "Removed several unused functions." 2014-03-19 09:04:44 -07:00
Yaowu Xu
9aa88c476b Merge "Remove an unused function" 2014-03-19 09:04:35 -07:00
Jingning Han
98fd11c567 Fix the use of uninitialized skip flag
The use of uninitialized skip flag will trigger inconsistency in
coding statistics, when alternate RD and non-RD coding modes are
enabled. This commit fixes this issue and removes unnecessary if
statements from update_state_rt.

Change-Id: I7d549dcb0e3ef48b999e5bbc78174ba84502cfcf
2014-03-18 15:03:45 -07:00
Marco Paniconi
d1d2ef5166 Merge "In-frame q adjustment for cyclic background refresh." 2014-03-18 14:12:48 -07:00
Dmitry Kovalev
d3df2086c9 Merge "Cleaning up calc_active_worst_quality_one_pass_vbr()." 2014-03-18 13:10:10 -07:00
Dmitry Kovalev
8dfbda6d4e Cleaning up vp9_onyx_if.c and vp9_onyx_int.h.
Change-Id: I5136c45d3f5f435005a88d04652addcd835f4bfe
2014-03-18 11:49:23 -07:00
Dmitry Kovalev
66bf94965e Rearranging and removing unused defines.
Change-Id: I03049f89565ce19a297e65e2d53db127dc6f77d9
2014-03-18 11:20:06 -07:00
Marco Paniconi
6b83884ba9 In-frame q adjustment for cyclic background refresh.
Activated using aq_mode=3.

Change-Id: Ied628b9e7bd0e88b0c75790276bca75b19eb5c07
2014-03-18 10:59:21 -07:00
Dmitry Kovalev
645cb98e90 Cleaning up calc_active_worst_quality_one_pass_vbr().
Change-Id: Ibfccee5e35c235c02843e1c1fbd3c39034619cf5
2014-03-18 10:41:22 -07:00
Jingning Han
5e33fd200c Merge "Add bit-stream write flag to nonrd_use_partition" 2014-03-17 14:17:58 -07:00
Dmitry Kovalev
40a4a3dd89 Merge "Cleaning up enums in vp9_onyx_int.h" 2014-03-17 14:13:56 -07:00
Dmitry Kovalev
b93deb6251 Merge "Moving defines from vp9_onyx_int.h to suitable *.c files." 2014-03-17 14:12:13 -07:00
Yaowu Xu
5511968f21 Removed several unused functions.
Change-Id: Ib9e27298c575afc02a98b593bc6ad60762064d9b
2014-03-17 14:09:29 -07:00
Yunqing Wang
c8e84dd2cc Merge "Calculate rate_mv after sub-pixel search in non-rd mode" 2014-03-17 14:04:47 -07:00
Yaowu Xu
aec5e1ed65 Remove an unused function
Change-Id: Iaaea882e59dfec38c0a9a24deaf8525a0fb62515
2014-03-17 14:03:14 -07:00
Dmitry Kovalev
7bc241632c Cleaning up enums in vp9_onyx_int.h
Change-Id: Ib5cbf77052bc03495ae135b3cdcd39c2452c2b34
2014-03-17 12:56:21 -07:00
Dmitry Kovalev
8228ead7df Moving defines from vp9_onyx_int.h to suitable *.c files.
Change-Id: I0d39bdbb8166ee44561f1008d1a2e76e70b36f30
2014-03-17 12:54:51 -07:00
Dmitry Kovalev
cac2cf886c Cleaning up vp9_mcomp.c.
Change-Id: I24a3f0f215d04fb8888c303642dd5663cc593317
2014-03-17 11:41:20 -07:00
Yaowu Xu
1ced9764bb Merge "Remove unused functions" 2014-03-17 11:25:39 -07:00
Dmitry Kovalev
65dc919103 Merge "Cleaning up vp9_diamond_search_sad_c & vp9_diamond_search_sadx4." 2014-03-17 11:23:49 -07:00
Jingning Han
6affef728b Add bit-stream write flag to nonrd_use_partition
This is for the purpose to test variable partition choices for the
same 64x64 block.

Change-Id: I0fab7351a62e7d3dfccd667e908bccb996ee677e
2014-03-14 17:13:02 -07:00
Yunqing Wang
587cca4505 Calculate rate_mv after sub-pixel search in non-rd mode
Modified the non-rd rate_mv calculation and moved it after sub-pixel
motion search is done.

Change-Id: I6a5cbd3d67ff0a86b3693e25ecf1fd77b16d708c
2014-03-14 15:55:02 -07:00
Yaowu Xu
04b7f14ad5 Remove unused functions
Change-Id: Iec885af58c95e65814fcb6ab528ce4e0874eb573
2014-03-14 15:47:41 -07:00
Jingning Han
5aa56f7c48 Merge "Properly reset the block coding skip flag array in non-RD mode" 2014-03-14 14:31:25 -07:00
Yaowu Xu
e6058ea061 Merge "change to save rdmult value correctly" 2014-03-14 13:27:32 -07:00
Jingning Han
a2e711ce38 Properly reset the block coding skip flag array in non-RD mode
The block coding skip flags are assigned in the normal RD mode
decision loop. They are then used in the final encoding stage.
In the non-RD mode decision, the forward transform and quantization
stages are replaced by modeling based on SSE and variance of
prediction residues. This commit applies reset to this array in
the non-RD coding mode.

Change-Id: I66584669b035e9c8ac23e95047849ff277472742
2014-03-14 12:14:06 -07:00
Yaowu Xu
28f947359d Merge "Use of inline instead of INLINE." 2014-03-14 11:48:09 -07:00
Yaowu Xu
2a03d0d22b change to save rdmult value correctly
This commit moves the position where rdmult is saved to make sure it
is the correct value. Prior, an uninitialized value may be saved and
restored.

This addresses issue:
https://code.google.com/p/webm/issues/detail?id=733

Change-Id: I436407f289169bc63da3c5a6bf609bed16cb71b5
2014-03-14 11:18:27 -07:00
Jingning Han
5806e70ee3 Merge "Remove deprecated function nonrd_use_fixed_partition" 2014-03-14 09:06:11 -07:00
Jingning Han
0428f349d4 Merge "Remove unused comment" 2014-03-14 09:06:03 -07:00
Jingning Han
6be7120ecf Merge "Refactor the non-RD partition decision process" 2014-03-14 09:05:54 -07:00
Jingning Han
47460af1aa Merge "Unify non-RD partition use cases" 2014-03-14 09:05:41 -07:00
Jingning Han
a66b68c7b2 Merge "Return rate and distortion cost values from non-RD mode decision" 2014-03-14 09:05:32 -07:00
Paul Wilkins
0fa768704b Use of inline instead of INLINE.
This causes a build failure in VS 2008.

Change-Id: I03b0c0c006589b56d92a238d7b794711eb62575e
2014-03-14 11:36:06 +00:00
Dmitry Kovalev
7c6337ba9e Merge "Adding vp9_swap_mi_and_prev_mi() function." 2014-03-13 17:47:27 -07:00
Jingning Han
9efe0b25c5 Remove deprecated function nonrd_use_fixed_partition
This function was subsumed by nonrd_use_partition, hence removed.

Change-Id: Id36757bc600ce6cf6ca03ad5df80268c4786d386
2014-03-13 16:15:14 -07:00
Jingning Han
73df20e97d Remove unused comment
Change-Id: I12ce22c036b12073a45b762d4dd38f6ec4960e56
2014-03-13 16:04:16 -07:00
Jingning Han
0d39429914 Refactor the non-RD partition decision process
Combine the common variables and functions used by different
speed features.

Change-Id: Ifd1fa86200edbcc9e50b3fc3b1ba8a275bc3c17f
2014-03-13 15:53:40 -07:00
Jingning Han
3d6286c73d Unify non-RD partition use cases
This commit unifies the non-RD partition use cases for both fixed
and variable block sizes. Deprecate and remove the separate function
for fixed partition type only.

Change-Id: I2b6cb945e90c1566f985adcebc4d0757480a8004
2014-03-13 15:41:15 -07:00
Marco Paniconi
07fbd70e38 Merge "Move svc layer_context to separate file." 2014-03-13 14:49:15 -07:00
Marco Paniconi
78664081d1 Move svc layer_context to separate file.
Change-Id: Ie47c139d48cb18409d71f98f6a5b9eeb9f9437a9
2014-03-13 14:39:45 -07:00
Dmitry Kovalev
e65c564c78 Adding vp9_swap_mi_and_prev_mi() function.
Change-Id: I18b3939f0b51085cdd25c9182c3a9c7536ca7e3e
2014-03-13 13:55:33 -07:00
Dmitry Kovalev
069e2458a6 Merge "Removing unused select_cq_level() function." 2014-03-13 13:45:45 -07:00
Jingning Han
ca0625ff31 Return rate and distortion cost values from non-RD mode decision
This commit allows the non-RD mode decision process to return the
rate and distortion costs associated with the selected mode.

Change-Id: Ibe0f67d323f65839fd9cb0a726c1219bf7b55da9
2014-03-13 12:52:59 -07:00
Jingning Han
1ff4a5b3a2 Merge "Tune rate-distortion modeling for non-RD mode decision" 2014-03-13 09:14:13 -07:00
Jingning Han
b25e4061e8 Merge "Explicitly assign interp_kernel value in non-RD coding mode" 2014-03-13 09:14:00 -07:00
Deb Mukherjee
954dbb282b Merge "Preliminary code for variance based paritioning" 2014-03-13 04:09:13 -07:00
Dmitry Kovalev
06b7b575c1 Moving declaration of vp9_encode_frame() to vp9_encodeframe.h.
Change-Id: I14adfd32622152abdc22c16429db38f6724628a4
2014-03-12 17:29:37 -07:00
Deb Mukherjee
e39ecfaa98 Preliminary code for variance based paritioning
Brings back most of Jim's previous patch for choosing
partitioning based on variance while making it compatible
with the current state of the code. Also adds a
nonrd_use_partition() function to recursively encode  for any
arbitrary sb_type decisions within a 64x64 block; and
includes some refactoring.

Currently, when the VAR_BASED_PARTITIONING mode is turned on
for speed 7, there is a 10+% speed-up observed.

Experiments/improvements with this new partitioning method
will be conducted subsequently.

Change-Id: Ie6f43bfbde30583e941f450bf07c3b48828c9571
2014-03-12 15:06:20 -07:00
Dmitry Kovalev
af9ca7d5be Fixing typo in cal_nmvjointsadcost().
Change-Id: I7be6675c68db330d69c541bd9341a7b8e91351d9
2014-03-12 14:44:14 -07:00
Jingning Han
7686c950b5 Tune rate-distortion modeling for non-RD mode decision
This commit adjusts the rate-distortion modeling for non-RD mode
decision. It puts more weights on energy from AC coefficients when
estimating the cost. The coding performance for rtc testset is
improved by 0.72%.

Change-Id: Ifa6ff11311a513ec2b10586589e82a9a21f6c61c
2014-03-12 14:31:59 -07:00
Jingning Han
4e9b0d6cef Explicitly assign interp_kernel value in non-RD coding mode
Assign interp_kernel value in MACROBLOCKD. This will be used to
select prediction filter coefficient sets and generate motion
compensated prediction.

Change-Id: I28c8dfb2dae6566f6939bb328aca5875c94bee65
2014-03-12 14:30:54 -07:00
Dmitry Kovalev
fec0d4bc7d Merge "Removing last_mi from MACROBLOCKD struct." 2014-03-12 12:19:43 -07:00
Dmitry Kovalev
c1486f0efa Merge "Removing unused last_skip_{probs_q, false_probs} arrays." 2014-03-12 10:33:36 -07:00
Jim Bankoski
0ce2d6577c Merge "cut down calls to get_block_context" 2014-03-12 10:30:20 -07:00
Dmitry Kovalev
4435c1e240 Merge "Cleaning up vp9_firstpass.c." 2014-03-12 00:21:06 -07:00
Dmitry Kovalev
189b4315ca Removing unused last_skip_{probs_q, false_probs} arrays.
Change-Id: Id84a43583af57889e87462ce8b76e5a552f44826
2014-03-12 00:20:25 -07:00
Yaowu Xu
1a935e69ea Merge "Increase redo_frequency to 4 and cleanups" 2014-03-11 20:13:35 -07:00
Yaowu Xu
6f5a1e033f Increase redo_frequency to 4 and cleanups
Clean-ups include
a. redundant code in rt -5 speed feature settings
b. code that guarantees square block availability in
rd_auto_partition_range()

Change-Id: Ic7b04d45b6dc15c461e0edbbb4e78aec20348291
2014-03-11 17:33:24 -07:00
Alex Converse
59853f8fdf Fix some active_map corner cases.
These were discovered by ActiveMapTest.

Change-Id: Ifcd305ae2d954b6ec7edcaed0f80baf18c769e01
2014-03-11 16:39:42 -07:00
Alex Converse
75272c97cb Merge "Add a conservative RD based active map in vp9." 2014-03-11 13:39:33 -07:00
Jim Bankoski
8bdc1f25e5 cut down calls to get_block_context
Change-Id: I894977e6655630823145c60c8258551bd3c8c76b
2014-03-11 11:18:43 -07:00
Dmitry Kovalev
1f08824d6d Merge "Using enums instead of integers." 2014-03-10 20:50:58 -07:00
Dmitry Kovalev
e3e1b49331 Merge "Moving static_scene_max_gf_interval to RATE_CONTROL struct." 2014-03-10 20:50:09 -07:00
Dmitry Kovalev
a0ed5541e6 Merge "Using MAX_REF_FRAMES constant instead of number 4." 2014-03-10 20:49:31 -07:00
Jingning Han
486db59cb1 Merge "Fix use of uninitialized bsize in non-RD mode" 2014-03-10 19:03:09 -07:00
Dmitry Kovalev
2b9c581393 Using MAX_REF_FRAMES constant instead of number 4.
Change-Id: I6e2fec2814fd366a1ce1321208d3b0e8aa0d98b0
2014-03-10 18:50:28 -07:00
Dmitry Kovalev
b2c34d5539 Using enums instead of integers.
Change-Id: Ic0d74ab3a4c0c854fbcf59d9df5212c218bc68f9
2014-03-10 18:33:08 -07:00
Dmitry Kovalev
c2d7f5e3c5 Cleaning up vp9_firstpass.c.
Change-Id: Ie68eefddf9b0120021668cf21dc2c6fc837c50ac
2014-03-10 18:03:05 -07:00
Dmitry Kovalev
d6b8709eb0 Moving static_scene_max_gf_interval to RATE_CONTROL struct.
Change-Id: Id63e114a8f0615dbafd6a816019cdebffb983d2c
2014-03-10 17:29:15 -07:00
Dmitry Kovalev
d548de69cb Removing unused select_cq_level() function.
Change-Id: I612a5d2b3ab1f9202d5b0421a82a80849603c40d
2014-03-10 16:24:38 -07:00
Dmitry Kovalev
ff935ff781 Removing last_mi from MACROBLOCKD struct.
Change-Id: Ied12b39c55667b26fd3bf90eb331e601c53a10f6
2014-03-10 16:02:03 -07:00
Jingning Han
29af074fb5 Fix use of uninitialized bsize in non-RD mode
The block size used for non-RD mode decision in FIXED_PARTITION
setting was uninitialized. This commit fixes it by setting block
size to be BLOCK_16X16.

Change-Id: Ief04c9f1ab668de69297d9ab3dc15e2fa0bc4e95
2014-03-10 15:50:13 -07:00
Alex Converse
29a487c77f Add a conservative RD based active map in vp9.
Change-Id: I47b3c38aadfd8f3ea08515a18a5948aa1375c650
2014-03-10 15:48:43 -07:00
Dmitry Kovalev
bbfa9f6959 Cleaning up vp9_rdopt.c.
Change-Id: I8f06d03689ee90a19c9067840b24748bfe2d741f
2014-03-10 15:21:30 -07:00
Dmitry Kovalev
29beeff11d Merge "Cleaning up select_tx_mode() function." 2014-03-10 12:29:28 -07:00
Dmitry Kovalev
cb13d0f3e4 Merge "Cleaning up rd_pick_sb_modes() function." 2014-03-10 12:07:26 -07:00
Dmitry Kovalev
d8c9288465 Cleaning up select_tx_mode() function.
Change-Id: Ib105db0f3deeedf6a8402a292db3df1d77a3d7c1
2014-03-10 11:35:40 -07:00
Dmitry Kovalev
ab1f905438 Cleaning up rd_pick_sb_modes() function.
Changing aq_mode type from int to AQ_MODE enum.

Change-Id: Ib7b5f0b70d02ded58a31dfade9c05a347f73beca
2014-03-10 10:58:32 -07:00
Dmitry Kovalev
f8f8c6d44c Adding reusable get_y_mode_prob() function.
Change-Id: Iebd182d7aeebc0f8964b6fd35057449bb25b00c1
2014-03-10 10:50:16 -07:00
Dmitry Kovalev
924dc81e74 Merge "General cleanup in vp9_encodeframe.c." 2014-03-10 10:43:47 -07:00
Dmitry Kovalev
99ef2f75e9 Merge "Cleaning up optimize_b() function." 2014-03-10 10:40:44 -07:00
Deb Mukherjee
44a203f5cd Merge "Support for a fast diamond search" 2014-03-10 09:53:21 -07:00
Jim Bankoski
622f06eb59 Merge "vp9_reconinter.h static functions in header converted to global" 2014-03-10 07:36:05 -07:00
Dmitry Kovalev
eece45fe23 Merge "Cleaning up vp9_get_mvpred_var()." 2014-03-09 10:26:39 -07:00
Dmitry Kovalev
62e1d37eb4 Merge "Adding const to FIRSTPASS_STATS pointers." 2014-03-09 10:25:48 -07:00
Dmitry Kovalev
3facd6c392 Merge "Cleaning up pack_inter_mode_mvs() function." 2014-03-08 10:57:14 -08:00
Jingning Han
4712be97fe Merge "Skip mode check when mv has been tested" 2014-03-08 07:57:17 -08:00
Jingning Han
a58d0e85d7 Merge "Clearn up model_rd in non-RD coding mode" 2014-03-08 07:57:11 -08:00
Deb Mukherjee
bead2e8fb4 Support for a fast diamond search
Adds a fast diamond search which is about 5% faster than FAST_HEX
with only a 0.1% drop in psnr when turned on for both speeds 5 and 7.
This search is turned on for speed 7.

Change-Id: I497630aa88a5148926086bb3038e7975e5f4eb98
2014-03-07 17:15:09 -08:00
Dmitry Kovalev
ba4bcee616 Cleaning up pack_inter_mode_mvs() function.
Change-Id: Ia60352c7173b59f3f08920ba86096864d4e8250b
2014-03-07 16:00:23 -08:00
Jingning Han
d2059b0d2d Skip mode check when mv has been tested
This commit allows the non-RD mode decision to skip mode RD modelling
check, if the motion vector associated with the current mode is
same as that of NEARESTMV mode. This makes speed -7 about 2% faster.
Previous change that converts cost metric from SAD to model based RD
value makes the codec 6% slower at speed -7.

Change-Id: I30cfec5452f606a671b8432a2f7f0c94fbb49fc8
2014-03-07 14:06:20 -08:00
Dmitry Kovalev
72ba322060 Removing unused active_section global variable.
Change-Id: Ib8c41829a4b5a618b6bda24d9b7df2d491d0fca0
2014-03-07 14:05:51 -08:00
Dmitry Kovalev
51a0e9825b General cleanup in vp9_encodeframe.c.
Change-Id: I446fca8aa11a4d4fc2b23d4b32348b74d74d0202
2014-03-07 10:56:20 -08:00
Jingning Han
0250902475 Clearn up model_rd in non-RD coding mode
The rate-distortion model in non-RD coding mode is only applied to
luma component. This commit removed a few redundant addition steps.

Change-Id: Id8edc0a47c2dbef8deba43debe2c95db39454de3
2014-03-07 10:34:34 -08:00
Jingning Han
6849cde893 Merge "Use modeled rate distortion costs for non-RD mode" 2014-03-07 09:06:24 -08:00
Jingning Han
539c961ed4 Use modeled rate distortion costs for non-RD mode
This commit replaces SAD cost with modeled rate-distortion cost
for non-RD mode decision. It translates the prediction residual
SSE into estimate rate and reconstruction distorion costs, hence
capturing the quantization setting effect. The compression
performance of speed -7 for rtc set is improved by 14.79%.

Change-Id: Ifda014eb0501d13109fe7f92680bf1410b463632
2014-03-06 23:00:48 -08:00
Dmitry Kovalev
cca347ed4e Adding const to FIRSTPASS_STATS pointers.
Change-Id: Ia94d757de1d1b24609128cd40e68558078f50a38
2014-03-06 18:58:17 -08:00
Dmitry Kovalev
ee7d26d50c Cleaning up vp9_get_mvpred_var().
Change-Id: Ic535f0a1c2501c1af143237af3b2b51b4b4980f4
2014-03-06 16:27:15 -08:00
Dmitry Kovalev
a2d846cac4 Cleaning up vp9_diamond_search_sad_c & vp9_diamond_search_sadx4.
Change-Id: I4639cdc29d17ef13cabb774b455295454f1d02ae
2014-03-06 15:00:01 -08:00
Dmitry Kovalev
6e328037c7 Merge "Cleaning up labels2mode() function." 2014-03-06 13:15:32 -08:00
Dmitry Kovalev
b07ae88ec4 Cleaning up optimize_b() function.
Change-Id: Id4c5b73ad747a8851969e9daf5bac40b4b9beefc
2014-03-06 12:47:55 -08:00
Dmitry Kovalev
1b47977b7e Merge "Removing unused mv_ref_stats[] array." 2014-03-06 12:33:38 -08:00
Deb Mukherjee
b28727e693 Merge "Fixes static analysis issues" 2014-03-06 12:07:53 -08:00
Dmitry Kovalev
daf18d6d6c Cleaning up labels2mode() function.
Change-Id: I76e39f7c5545ba4e0cd537f530c574531356e94a
2014-03-06 11:43:53 -08:00
Deb Mukherjee
26fa8cad01 Fixes static analysis issues
Removes some unused variables and assignments

Change-Id: I228f43d658ce50237d65ce8dc8ab2ccf0a0b21ca
2014-03-06 11:07:06 -08:00
Dmitry Kovalev
3f1ab25812 Removing vp9_onyx.h and moving its content to the encoder.
Change-Id: I03451c88536bc498edddbe0cd9773ff79da085c2
2014-03-05 23:33:22 -08:00
Dmitry Kovalev
7a7db0f060 Merge "Combining mode_mv[] and second_mode_mv[]." 2014-03-05 22:29:56 -08:00
Dmitry Kovalev
eb63569d5e Merge "Cleaning up mode cost manipulations." 2014-03-05 22:28:05 -08:00
Dmitry Kovalev
bd1d7c9c81 Merge "Adding vp9_cost.{h, c} files." 2014-03-05 22:26:28 -08:00
Dmitry Kovalev
89c3da568f Merge "Inlining and removing vp9_set_mbmode_and_mvs()." 2014-03-05 21:45:48 -08:00
Dmitry Kovalev
191e2e8455 Merge "Replacing int_mv with MV in full_pixel_motion_search()." 2014-03-05 21:44:54 -08:00
Dmitry Kovalev
08a7d7e405 Merge "Renaming NMV_UPDATE_PROB to MV_UPDATE_PROB." 2014-03-05 21:39:09 -08:00
Yaowu Xu
4fd6ba9da0 Adjust some speed features for --rt (-5)
Change-Id: Ibabd8440ff5c9dd7f300f317e2c9d50e8e84aab9
2014-03-05 16:08:58 -08:00
Jingning Han
99cd4c7679 Merge "Fix set_mode_info settings" 2014-03-05 16:01:06 -08:00
Jingning Han
97ffad507a Merge "Remove repeated tx_mode_select calls" 2014-03-05 16:00:58 -08:00
Jingning Han
3dfa93b058 Merge "Move set_speed_feature out of frame encoding" 2014-03-05 16:00:50 -08:00
Yaowu Xu
bdb1e7e05f Merge "vp9_picklpf.c: remove unused functions and params" 2014-03-05 15:39:44 -08:00
Andrew Russell
e337322e63 Merge "improved speed of 4x4 sse2 fdct." 2014-03-05 14:35:44 -08:00
Dmitry Kovalev
c9f79ca85c Inlining and removing vp9_set_mbmode_and_mvs().
Change-Id: I9717ef611ef9c39b109b2358c9771bf7fae2dd50
2014-03-05 14:22:31 -08:00
Yaowu Xu
023d2a21aa vp9_picklpf.c: remove unused functions and params
Change-Id: Ib4d850227cef35694c663feb157765a2cbf84699
2014-03-05 14:07:36 -08:00
Dmitry Kovalev
413da97bb6 Merge "Cleaning up vp9_refining_search_sadx4()." 2014-03-05 13:57:23 -08:00
Dmitry Kovalev
627720fa81 Cleaning up mode cost manipulations.
Change-Id: If175d97990454b171b6abeddb76d142497484487
2014-03-05 12:29:44 -08:00
Dmitry Kovalev
021073fd5f Adding vp9_cost.{h, c} files.
Change-Id: If90c1bc822873156d4e38fca1938e4907f6c95f0
2014-03-05 11:57:57 -08:00
Alex Converse
e609ab46a1 Merge "Prune RT mode decisions for BLOCK_32x32 and up" 2014-03-05 11:57:04 -08:00
Dmitry Kovalev
a16f1a9bb4 Combining mode_mv[] and second_mode_mv[].
Change-Id: Ie5f69d39b49a4169cc731d4487e4668fb5af4b4f
2014-03-05 11:12:00 -08:00
Dmitry Kovalev
791751015f Merge "Removing VP9_PTR." 2014-03-05 10:57:10 -08:00
Dmitry Kovalev
0b6440ce02 Cleaning up vp9_refining_search_sadx4().
Change-Id: I3ed0a95645a66be069ce92a1fad8083a87d01001
2014-03-05 10:46:46 -08:00
Dmitry Kovalev
d31fc628a7 Renaming NMV_UPDATE_PROB to MV_UPDATE_PROB.
Change-Id: I7f3bcca103f0b1f6b3c064b61472543de9a8288a
2014-03-05 10:37:52 -08:00
Jingning Han
90a8dad162 Fix set_mode_info settings
Properly set intra mode information entries.

Change-Id: Ie3a8992e415dcdd9087a55993bbca06087a0107a
2014-03-05 09:13:36 -08:00
Jingning Han
2702e3c8cf Remove repeated tx_mode_select calls
The frame level transform size selection is done inside
encode_frame_internal().

Change-Id: Id7e5e417a3a3f88f875bf12b21bb8029bc6d0d82
2014-03-05 09:12:18 -08:00
Jingning Han
a57cff2132 Move set_speed_feature out of frame encoding
Set speed features before running frame encoding. This avoids
redundant RD threshold calculation in key frame coding.

Change-Id: If8e3cf2c02976baa59b310c1c23af9eea0c46e36
2014-03-04 18:49:56 -08:00
Alex Converse
bbc8c9d29a Prune RT mode decisions for BLOCK_32x32 and up
* Remove all non-DC intra modes for BLOCK_32x32 and up
* Remove all intra modes for blocks bigger than BLOCK_32x32
* Remove ZEROMV for BLOCK_32x32 and up
* Only consider NEARESTMV for blocks bigger than BLOCK_32x32

Change-Id: Ia18351a238213e2f072f9e481d622949346a245f
2014-03-04 09:48:31 -08:00
Marco Paniconi
02b8baf35e Avoid gf/altref boost in pick_q under svc cbr mode.
Change-Id: Ib719a9f74924718715592e0238bc391ae239d026
2014-03-03 19:11:02 -08:00
Dmitry Kovalev
91e5e5a680 Merge "Cleaning up vp9_init_dsmotion_compensation()." 2014-03-03 17:27:51 -08:00
Dmitry Kovalev
fe7b1d0a8d Removing VP9_PTR.
Change-Id: Ib49d8dbc67c590f22a1a70251ff607c9f38febd7
2014-03-03 16:50:16 -08:00
Deb Mukherjee
b80020d4db Refactoring motion search libs
The core motion estimation fucntions all return sad now consistently.
The only exception is vp9_full_pixel_diamond(), however the core diamond
and refining search routines called from vp9_full_pixel_diamond() also
return SAD. If variance of pred error + mv cost is desired it must be
calculated explicitly outside these functions. For very fast encoding,
hopefully this will eliminate some redundant computations.

Also suggests reimplementing FAST_HEX with the vp9_pattern_search
framework. It is not exactly the same as the existing FAST_HEX, but
performance is slightly better and speed is very similar. Enables
removing a lot of duplicate code.

Change-Id: I152736393438c25bdf7e96b37cbb8ce330f4f94a
2014-03-03 15:13:59 -08:00
Jim Bankoski
e5e9b05d68 vp9_reconinter.h static functions in header converted to global
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-03-03 14:58:43 -08:00
Dmitry Kovalev
686b480ad1 Replacing int_mv with MV in full_pixel_motion_search().
Change-Id: I16dd4d4aaae8ce6a482da3c9d142f41fe9155e82
2014-03-03 14:43:06 -08:00
Andrew Russell
a46f5459c3 improved speed of 4x4 sse2 fdct.
* speed improvment of 30 percent achieved
* multiplies and adds remain the same
* non-arithmetic instructions minimized by hand, by:
   -expanding 2 pass loop
   -removing irrelivant "shuffles"
   -combining last two rounding steps
* further improvments may be possible

Change-Id: Idec2c3f52910c48e6a0e0f9aefed5cae31b0b8c0
2014-03-03 14:25:42 -08:00
Dmitry Kovalev
be647f7b83 Merge "Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}." 2014-03-03 14:24:28 -08:00
Dmitry Kovalev
f084af5ca7 Merge "Adding consts and cleaning up vp9_rdopt." 2014-03-03 14:17:31 -08:00
Jim Bankoski
b247c14c07 Merge "cost_coefs approximation speed up" 2014-03-03 14:08:24 -08:00
Alex Converse
0873dc3ab4 Merge "Enforce intra_y_mode_mask for inter rd." 2014-03-03 12:55:25 -08:00
Alex Converse
9e99e10642 Merge "Refactor ZEROMV equivalence" 2014-03-03 12:30:22 -08:00
Dmitry Kovalev
46af01d719 Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}.
Change-Id: I4a54b12e5229705222c5a101258b9d1f81e2948d
2014-03-03 12:20:51 -08:00
Dmitry Kovalev
c288367678 Adding consts and cleaning up vp9_rdopt.
Change-Id: I9423b543e1be414e5c9e10480b813f06e6b88f8a
2014-03-03 12:19:51 -08:00
Jim Bankoski
9c63e887e6 cost_coefs approximation speed up
This patch adds a new speed feature which doesn't do the rather
expensive entropy context lookup or save to the table,  while
doing costing.

The speed up on desktop36p.y4m is around 10% other clips much less.

On the RTC test set this was + 1% in overall datarate.

Change-Id: Ia5144bbf45270671e7be9c8e4055369909e2f738
2014-03-03 11:49:13 -08:00
Alex Converse
f466fc8bfa Refactor ZEROMV equivalence
This gets more accurate mode hit stats. It's also the first step to
handling ZEROMV not being allowed more intelligently.

Change-Id: I5de6734507b5177bf73e9ddbad923f218c39f3e4
2014-03-03 11:32:24 -08:00
Yunqing Wang
5b2190b2bf Reset search_method for non-rd pick mode
Reset FAST_HEX search_method, which was lost because of code merging.

Change-Id: Ic2b2cb9ec2f1751e96f7db0f9226310f605fcc83
2014-03-03 11:12:11 -08:00
Alex Converse
0fa1e7ee09 Enforce intra_y_mode_mask for inter rd.
intra_y_mode_mask is already enforced for the sub8x8 case.
intra_uv_mode_mask is already enforced for all sizes.

Change-Id: Ia9dd14701cb49873c2e8f24eb5f8b255eaf76a1f
2014-03-03 10:50:17 -08:00
Alex Converse
07c4d2252b Merge "Cleanup conditions in vp9_rd_pick_inter_mode_sb()." 2014-03-03 10:23:51 -08:00
Paul Wilkins
34ad6d00d2 Merge "Clear implied conversion to int64_t warning." 2014-03-03 09:28:12 -08:00
Yunqing Wang
d4648d93f4 Merge "AVX2 SubPixel AVG Variance Optimization" 2014-03-03 09:01:36 -08:00
Yaowu Xu
a9288e297f Merge "vp9_lookahead_push(): remove unused parameters" 2014-03-03 08:36:06 -08:00
Yaowu Xu
e2f663c37f Merge "vp9_mbgraph.c: remove unused parameters" 2014-03-03 08:24:49 -08:00
Yaowu Xu
386265fd2b Merge "temporal_filter_find_matching_mb_c(): remove a param" 2014-03-03 08:24:39 -08:00
Yaowu Xu
c703400bd4 Merge "vp9_prob_diff_update_savings_search_model(): remove params" 2014-03-03 08:24:30 -08:00
Paul Wilkins
74558bc582 Clear implied conversion to int64_t warning.
Clear warning caused by implied conversion from int32 to int64.

Change-Id: I473b37a54984cbfb22702eb3f712465881ff86e8
2014-03-03 15:41:21 +00:00
Yaowu Xu
5ee16cc075 Merge "vp9_firstpass.c: remove unused functions & params" 2014-03-03 06:53:35 -08:00
Dmitry Kovalev
9f17ff452b Merge "Sorting includes in vp9_firstpass.c." 2014-03-03 01:03:21 -08:00
Yaowu Xu
b791c6006b vp9_mbgraph.c: remove unused parameters
Change-Id: I5a01d0dccc9afc87e2adbb5ddc7d44379fe1f125
2014-03-02 20:48:54 -08:00
Yaowu Xu
c0205ebfb4 temporal_filter_find_matching_mb_c(): remove a param
There is one parameter that is never used, therefore is removed.

Change-Id: I595722e7c5731534c72831315359e4dce9c21763
2014-03-02 20:43:42 -08:00
Yaowu Xu
b9d28e715f vp9_prob_diff_update_savings_search_model(): remove params
Two paramemters are not in use, therefore are removed.

Change-Id: I41eb601b7b4bf2feedb13b3f240315656d8694f9
2014-03-02 20:36:32 -08:00
Yaowu Xu
dac3d0cebd vp9_lookahead_push(): remove unused parameters
Change-Id: Ia319bd924401677b5c30b0f46d1ab2be6a1f446e
2014-03-02 14:34:59 -08:00
Yaowu Xu
673621c8ba vp9_firstpass.c: remove unused functions & params
Change-Id: I111c5bd0dd47db7b1f6952c18056bee548bb42e9
2014-03-02 13:46:03 -08:00
Yaowu Xu
b12f5fc748 vp9_encodeframe.c: remove unused function params
Change-Id: I6d47618e8aee6e6c2fe1cf0b8bb4da0b2a0bab66
2014-03-01 14:58:42 -08:00
Yaowu Xu
9bcd361617 Remove unused parameters from update_state_rt()
In addition, a local variable was renamed to avoid confusion.

Change-Id: Id4c497f9cfa219e8a414aa9fee9a85af5f147249
2014-03-01 11:08:52 -08:00
Yaowu Xu
2f4eb5f096 Remove vp9_create_common()
The function has evolved over time, now only calls vp9_rtcd(), so this
commit removes the function and changes to call vp9_rtcd() directly.

Change-Id: I8cfa6190daa4b28f6f3d1e11bb3a07f9c95322bf
2014-03-01 10:59:24 -08:00
Yaowu Xu
3678ed36b9 Remove a parameter from write_selected_tx_size()
The parameter was never used.

Change-Id: I99fd9aad697917ddbe3d10c71cae344228fafc31
2014-03-01 10:40:39 -08:00
levytamar82
ea14909687 AVX2 SubPixel AVG Variance Optimization
Optimizing 2 functions to process 32 elements in parallel instead of 16:
1. vp9_sub_pixel_avg_variance64x64
2. vp9_sub_pixel_avg_variance32x32
both of those function were calling vp9_sub_pixel_avg_variance16xh_ssse3
instead of calling that function, it calls vp9_sub_pixel_avg_variance32xh_avx2
that is written in avx2 and process 32 elements in parallel.
This Optimization gave 80% function level gain and 2% user level gain

Change-Id: Iea694654e1b7612dc6ed11e2626208c2179502c8
2014-02-28 22:51:04 -07:00
Yaowu Xu
a257058aa3 Merge "Fix unused parameters in vp9_extend_frame_borders" 2014-02-28 17:34:38 -08:00
Dmitry Kovalev
4aacfb0f85 Merge "Replacing int_mv with MV." 2014-02-28 16:09:17 -08:00
Dmitry Kovalev
37bb11f5cb Merge "Removing unnecessary casts from quantization code." 2014-02-28 16:08:24 -08:00
Dmitry Kovalev
f97afbc8ea Merge "Using ref_mv[2] instead of two separate variables." 2014-02-28 16:07:45 -08:00
Yaowu Xu
0fa4d89042 Fix unused parameters in vp9_extend_frame_borders
Change-Id: I7255b3bc47d760333f58ac4878becbcc8ad30967
2014-02-28 15:50:32 -08:00
Dmitry Kovalev
3557dfc20f Merge "Sorting includes in vp9_rdopt.c." 2014-02-28 15:37:51 -08:00
Deb Mukherjee
dc8a2c07b3 Merge "Adds speed 8 to vp9 as reference" 2014-02-28 14:17:24 -08:00
Dmitry Kovalev
aed826b065 Using ref_mv[2] instead of two separate variables.
Change-Id: I909a81991aa0cc18afe6526542c7513837445213
2014-02-28 14:10:51 -08:00
Dmitry Kovalev
d89bdd3674 Sorting includes in vp9_rdopt.c.
Change-Id: I7e2591b4b54e0eac8521e128c7d97f62d2057ed8
2014-02-28 14:00:15 -08:00
Dmitry Kovalev
dac630bb22 Merge "Sorting and eliminating includes in vp9_pickmode.c." 2014-02-28 13:57:31 -08:00
Dmitry Kovalev
3c4a57bb4f Merge "Fixing include order in vp9_quantize.c" 2014-02-28 13:18:38 -08:00
Jingning Han
fa9e6e8890 Merge "Fix potential invalid partition size use" 2014-02-28 13:02:58 -08:00
Deb Mukherjee
f872a98b1b Adds speed 8 to vp9 as reference
Adds a speed 8 to VP9 where only the nearestmv (0 mv) is searched.
This seems to be about the same speed as vp8 speed 5.

Adds a new speed feature to disable inter modes based on a mask for
each blocksize.

Adds code for having lower complexity motion search methods
in nonrd pick mode function, even though speed 7 still uses DIAMOND
search for now.

Also uses HEX search for speed 6 rather than FAST_HEX which improves
psnr by 0.56% without any noticeable speed drop (tested on gipsmotion).

Change-Id: Ic13176572dbd3aed5884a26786940a4b1bbd8a75
2014-02-28 12:29:23 -08:00
Jingning Han
da798043c5 Merge "Skip some mode SAD calculation in non-RD mode" 2014-02-28 12:14:10 -08:00
Dmitry Kovalev
ce404e898c Replacing int_mv with MV.
Change-Id: Ib68d4a2de838254a66272324b909292048cbe60d
2014-02-28 12:11:46 -08:00
Dmitry Kovalev
e869869d22 Removing unnecessary casts from quantization code.
Change-Id: I64172710654e95a90ee754d14d7104337d28010f
2014-02-28 11:59:50 -08:00
Dmitry Kovalev
c9513e1dfb Fixing include order in vp9_quantize.c
Change-Id: Ic32eb103d0d7f98c0a16c4e7bdec117faf05df02
2014-02-28 11:30:51 -08:00
Dmitry Kovalev
fc179b3eda Merge "Cleaning up vp9_quantize.c." 2014-02-28 11:29:39 -08:00
Dmitry Kovalev
b68e0a0c38 Sorting and eliminating includes in vp9_pickmode.c.
Change-Id: Icc057b819d80c608a6003fd7ef58aefed7a15824
2014-02-28 11:28:34 -08:00
Dmitry Kovalev
1cd34d3f3b Sorting includes in vp9_firstpass.c.
Change-Id: Iee4f8443971fe2b21762d87f0be5751329768b5a
2014-02-28 11:15:32 -08:00
Dmitry Kovalev
e4159100bc Merge "Adding get_y_mode() function." 2014-02-28 11:12:22 -08:00
Dmitry Kovalev
65e2e78602 Removing unused mv_ref_stats[] array.
Change-Id: Icd4d495ed32dec215d2157cd8fbebd0648ec5954
2014-02-28 11:07:08 -08:00
Dmitry Kovalev
d5e6f09585 Merge "Cleaning up vp9_bitstream.{c, h} files." 2014-02-28 11:01:55 -08:00
Dmitry Kovalev
28bd1dd15e Merge "Adding consts to arguments of vp9_block_error()." 2014-02-28 10:51:43 -08:00
Dmitry Kovalev
51e0e0c0a7 Merge "Cleaning up encode_ref_frame() to match read_ref_frames()." 2014-02-28 10:51:21 -08:00
Jingning Han
bf5e9221d6 Fix potential invalid partition size use
For blocks at frame boundary, the selected block size sometimes needs
to be smaller than that was first given. This commit forces such block
size change only between square blocks, so as to avoid the potential
use case containing 32x16 + 16x8 + 16x8, for 1080p sequences.

Local test suggested no visible coding speed difference. Borg test
reveals no difference in terms of compression performance.

Change-Id: Ie8de87f3c6febc3acf11b4cbfdf2077f9f6def52
2014-02-28 10:50:34 -08:00
Dmitry Kovalev
3a83d08a08 Merge "Moving get_tx_eob() from common to encoder." 2014-02-28 10:49:47 -08:00
Dmitry Kovalev
0429c08823 Merge "Removing unnecessary clamp() call." 2014-02-28 10:49:35 -08:00
Dmitry Kovalev
9d0d6d1945 Merge "Explicit lossless handling in rd_pick_intra4x4block()." 2014-02-28 10:49:11 -08:00
Dmitry Kovalev
f1a6cdbf8d Cleaning up vp9_init_dsmotion_compensation().
Change-Id: Id5b56c7bc5671859f54ae69693064804d3fadd98
2014-02-28 10:39:31 -08:00
Dmitry Kovalev
761eef0310 Merge "Replacing int_mv with MV and adding const qualifiers." 2014-02-28 10:38:42 -08:00
Dmitry Kovalev
f527c46f20 Cleaning up vp9_quantize.c.
Change-Id: I9a38af32f16f196b83dd69755eafb9543edf5691
2014-02-28 10:11:31 -08:00
Jingning Han
24c7ee78c5 Skip some mode SAD calculation in non-RD mode
This commit checks if the motion vector associated with the current
mode has been computed in previous mode tests. If possible, skip the
redundant reference block generation and SAD calculation in the
non-RD mode decision process.

For test sequence pedestrian_area 1080p, the runtime goes from
24261 ms to 23770 ms. This does not change compression performance.
The speed-up is mostly around places with consistent motion.

Change-Id: I97be63c6a2d07c57be26b3c600fbda3803adddda
2014-02-28 09:44:53 -08:00
Yunqing Wang
17b1e92d6c Merge "Enable using fast HEX search in non-rd pick mode" 2014-02-28 08:29:02 -08:00
Alex Converse
4c8d70d771 Cleanup conditions in vp9_rd_pick_inter_mode_sb().
Change-Id: I4e5ca10f7aef2d37fda835b369828d0bbff7c8a0
2014-02-27 19:16:50 -08:00
Alex Converse
d54b316f54 Merge "Precompute vp9_rd_pick_inter_mode_sb loop escape conditions." 2014-02-27 19:12:49 -08:00
Dmitry Kovalev
1643b2d250 Merge "Reusing existing mem_{get, put}_be32() functions." 2014-02-27 19:10:21 -08:00
Dmitry Kovalev
9004091e8c Removing unnecessary clamp() call.
Change-Id: Iaaa16b4b2c581eaeb9e4ecfcfe60f98b8a0fa40b
2014-02-27 18:48:29 -08:00
Dmitry Kovalev
3b2cd9137a Moving get_tx_eob() from common to encoder.
Change-Id: I7d11c6ae259aff6560710d16fea3032c661e5b02
2014-02-27 18:26:44 -08:00
Dmitry Kovalev
92a8beab1f Cleaning up encode_ref_frame() to match read_ref_frames().
Change-Id: Ie9c66a93d45271e54b84bea6a38f07db6c4fd1ca
2014-02-27 18:24:16 -08:00
Dmitry Kovalev
e4e25ac965 Merge "Inlining optimize_init_b() function." 2014-02-27 18:23:18 -08:00
Dmitry Kovalev
791e9bdac9 Adding consts to arguments of vp9_block_error().
Change-Id: Id145da99259866109cfee8b47a1d8f309944b937
2014-02-27 18:17:08 -08:00
Dmitry Kovalev
bb65be98bb Reusing existing mem_{get, put}_be32() functions.
Change-Id: Iba128039534e16a6e0a8cfe7e58306c4655e9f0d
2014-02-27 17:40:30 -08:00
Alex Converse
a70ae5d9ed Precompute vp9_rd_pick_inter_mode_sb loop escape conditions.
All escape conditions that remain require knowledge of best_rd or
best_mode_index.

Change-Id: I6f77e4e629cacd54c8149ad0a98d54c8ee4ae249
2014-02-27 17:05:52 -08:00
Dmitry Kovalev
1ae91f7784 Adding get_y_mode() function.
Change-Id: Iaac57b24f79cd205a8c62bc1177412d22f5787a8
2014-02-27 16:05:50 -08:00
Dmitry Kovalev
6c7b5e38a9 Inlining optimize_init_b() function.
Change-Id: If41459f8ba186bb47d977b76e2f4bab97078462d
2014-02-27 15:48:22 -08:00
Dmitry Kovalev
4b7addcc10 Fixing include order in vp9_ratectrl.c.
Change-Id: Id1ec41275cc35565e522a1b2ac252ea3ec05638f
2014-02-27 15:35:38 -08:00
Dmitry Kovalev
c63e27b6d8 Cleaning up vp9_bitstream.{c, h} files.
Change-Id: Ida712a91694e89e318181f93afee2d0ee4f4ad94
2014-02-27 15:32:11 -08:00
Deb Mukherjee
746538c2c0 Merge "Turns variance based partitioning on in Speed 7" 2014-02-27 14:02:53 -08:00
Dmitry Kovalev
c57fc4f38c Merge "Removing redefinition of ROUND_POWER_OF_TWO." 2014-02-27 13:43:31 -08:00
Dmitry Kovalev
5295c2a78c Merge "Cleaning up vp9_xform_quant() function." 2014-02-27 13:43:09 -08:00
Deb Mukherjee
ed5755445c Turns variance based partitioning on in Speed 7
Improves coding efficiency by about 1%, increases speed by
about 15-20% over exsiting speed 7.

Change-Id: Ibf5b9b5a5c8548e863ce19047c42b579aac21d19
2014-02-27 12:09:12 -08:00
Dmitry Kovalev
5a3d1a88ea Cleaning up vp9_xform_quant() function.
Change-Id: Id56089107b7458aa59f345edc1b49e62eac41035
2014-02-27 12:02:09 -08:00
Jingning Han
23a82ef5e4 Remove arguments not in use in non-RD decision
This commit removes a few arguments that are not used in the
non-RD mode decision.

Change-Id: I0d878bb5a7dba1b34fe0b64afe55bf11b1a9a2d7
2014-02-27 12:00:24 -08:00
Dmitry Kovalev
5df43a73de Removing redefinition of ROUND_POWER_OF_TWO.
Change-Id: Ic0220f6f3ecdc1c15ba3f93f3ef2b435c0f99b98
2014-02-27 11:57:00 -08:00
Yunqing Wang
e6fd071243 Enable using fast HEX search in non-rd pick mode
Added fast HEX search while doing non-rd partition picking to
speed up the encoder.

Borg test(speed 7) on rtc set showed 1.8% overall PSNR loss.
Encoder speedup was 5% - 15% for different rtc clips.

Change-Id: I9c83026eabc70b69fcc747c90369ec60bfa3ca24
2014-02-27 11:48:07 -08:00
Jingning Han
2c6ddcc606 Cosmetic change mbmi->ref_frame to refs
In handle_inter_mode, the reference frames are set in refs buffer.
One can use refs buffer directly to avoid redundant fetch.

Change-Id: I811d408cae52dcd5e053dd4bfe69550eb6a2ff56
2014-02-27 11:43:03 -08:00
Jingning Han
08053edb80 Assign motion vector invalid value in intra mode
In non-RD mode decision, assign motion vector INVALID_MV when intra
prediction mode is selected.

Change-Id: I8f6ec39b71e755758f0f698074a2c17d934622ea
2014-02-27 11:26:39 -08:00
Jingning Han
bac4113c42 Merge "Run sub-pixel motion search for NEWMV mode test" 2014-02-27 11:04:15 -08:00
Dmitry Kovalev
f81822a568 Merge "Moving common code into vp9_get_entropy_contexts()." 2014-02-27 09:55:46 -08:00
Dmitry Kovalev
129c994f3a Merge "Replacing int_mv with MV in single_motion_search()." 2014-02-27 09:55:18 -08:00
Deb Mukherjee
01906b53f8 Merge "Refines variance based partitioning search" 2014-02-27 09:52:01 -08:00
Deb Mukherjee
90d13337da Refines variance based partitioning search
Instead of using source variance, this patch uses variance of the
frame difference between the source and the current frame to make
fixed size partition decisions. Also disables adjusting partitioning
if variance based or fixed size partitioning is used.

The latter change improves the speed substantially for speed 6, so
that speed 7 is now less than 3x the speed of speed 6. But speed
6 is 48% better in psnr on the rtc set compared to speed 7.

As compared to speed 5,
speed 6 is -37% in psnr at about 2.5x the speed,
speed 7 is -55% in psnr at about 7x the speed.

Change-Id: If61d80431d3e04ed304ac05832e773cdb2c0a578
2014-02-27 09:37:15 -08:00
Yaowu Xu
962c3bbe11 Merge "vp9_encodemv.h: fix function prototype" 2014-02-27 08:56:32 -08:00
James Zern
cac037635c vp9_encodemv.h: fix function prototype
mismatch was introduced here:
abe21e4 Removing redundant vp9_clear_system_state() call.

Change-Id: I66f945c1ce385dddfdefa9f517f295dbdd01d286
2014-02-26 23:53:24 -08:00
James Zern
af7d99796e Merge "remove ioc problem with rdcost calculation" 2014-02-26 23:45:09 -08:00
Alex Converse
104d8ec034 Merge "Don't let GOLDEN_FRAME turn off LAST_FRAME as a reference when GOLDEN_FRAME is disabled." 2014-02-26 18:50:00 -08:00
Dmitry Kovalev
e4118e253a Merge "Adding vpx_sse_to_psnr() function." 2014-02-26 18:38:26 -08:00
Dmitry Kovalev
b83b159e04 Merge "Cleaning up cost_coeffs()." 2014-02-26 18:37:21 -08:00
Dmitry Kovalev
a05faf74d4 Replacing int_mv with MV in single_motion_search().
Change-Id: I527c42fa776c772c26c027a47f3dada129f5c33e
2014-02-26 17:07:06 -08:00
Alex Converse
801f136be2 Don't let GOLDEN_FRAME turn off LAST_FRAME as a reference when GOLDEN_FRAME is disabled.
There was a bug in the previous code that if GOLDEN was better than
LAST neither would be used. LAST would get turned off due to superior
GOLDEN quality then all GOLDEN modes would get skipped.

Change-Id: I173f3720451707dab7b2cbbe8b8e6a047089bde7
2014-02-26 16:46:21 -08:00
Yaowu Xu
2bf9ef4b94 Merge "Reduce the frequency of partition size adjsutment" 2014-02-26 16:23:49 -08:00
Dmitry Kovalev
7d5bffc452 Adding vpx_sse_to_psnr() function.
Removing all copies of identical vp8_mse2psnr/vp9_mse2psnr functions.
Using vpx_sse_to_psnr() instead in all places.

Change-Id: I15beef9834d43d8fc8a8a7a2d1fc5de3d658fed8
2014-02-26 16:21:12 -08:00
Dmitry Kovalev
9349b82bd2 Moving common code into vp9_get_entropy_contexts().
Change-Id: I197670a405f7c2e7796424faa187a61081db8567
2014-02-26 16:20:17 -08:00
Dmitry Kovalev
6232917608 Merge "Cleaning up vp9_encodemb.c file." 2014-02-26 16:03:19 -08:00
Dmitry Kovalev
c313c54835 Cleaning up cost_coeffs().
Change-Id: I02f097fd7c4c787035f03114ddde5b04b2640b39
2014-02-26 14:56:00 -08:00
Dmitry Kovalev
fc7b7a93aa Replacing int_mv with MV and adding const qualifiers.
Change-Id: I89c37b739493c79044f8c70ae2424aa074eb56c8
2014-02-26 14:13:23 -08:00
Dmitry Kovalev
9774962a24 Cleaning up vp9_encodemb.c file.
Usage of encode_b_args is unnecessary because encode_block_pass1() doesn't
use them. That's why optimize_init_b() call is also not required.

Change-Id: Ib6cfe4916c2ca85749c90bb0adcba6fea592f9ac
2014-02-26 13:51:12 -08:00
Dmitry Kovalev
40a65cd1e5 Explicit lossless handling in rd_pick_intra4x4block().
Change-Id: I86cb0be468ade9d891ffd3ed47eceaefac8dd0c4
2014-02-26 13:43:46 -08:00
Dmitry Kovalev
28cd972810 Merge "Cleaning up vp9_rdopt.c." 2014-02-26 13:25:10 -08:00
Jingning Han
c30d5703e5 Run sub-pixel motion search for NEWMV mode test
As Yunqing suggested, this commit makes non-RD mode decision always run
sub-pixel motion search in NEWMV mode. The compression performance
gains becomes fairly significant after we enabled sub-pixel accuracy
motion compensated prediction to calculate SAD cost.

For test sequences pedestrian_area at 1080p and vidyo1 at 720p, the
runtime goes slower by 5%. For rtc test set, the compression performance
is improved by 21.20%.

Change-Id: I38cbfdd5c53d79423e1fafb3154f8ddeed63bbf0
2014-02-26 11:17:51 -08:00
Yaowu Xu
fe0c09c2aa Reduce the frequency of partition size adjsutment
The commit change to use partitions sizes directly from last frame
for frames directly where last frame selects partitions sizes based
on coding efficiency.

On --rt --cpu-used=-5, the change hurts compression by 4% but reduces
encoding time by ~20%

Change-Id: Ia68665e5c8489b7bfcf5fac7768332fba88928e6
2014-02-26 09:52:38 -08:00
Yaowu Xu
d66ecf0dc1 Separate super_block_yrd() into two functions
for inter and intra respectively

Change-Id: I7764d3af780072f7bd7bde201f454dcdd2816e76
2014-02-26 09:52:05 -08:00
Jingning Han
1cc769a561 Merge "Use sub-pixel accuracy prediction non-RD mode" 2014-02-26 09:20:24 -08:00
Dmitry Kovalev
8b33c64162 Merge "Using clamp() for active_{best, worst}_quality." 2014-02-26 09:20:14 -08:00
Jingning Han
e211244b02 Merge "Use dedicated variables to store the best mode" 2014-02-26 09:20:13 -08:00
Dmitry Kovalev
55a1269bd9 Merge "Removing redundant vp9_clear_system_state() call." 2014-02-26 09:19:54 -08:00
Dmitry Kovalev
b13ee81d18 Merge "Removing vp9_optimize_b() function." 2014-02-26 09:19:28 -08:00
Jim Bankoski
d496cd3074 remove ioc problem with rdcost calculation
Change-Id: Idd800fae21508699e9d973134817493763a65042
2014-02-26 07:46:56 -08:00
Dmitry Kovalev
abe21e42e7 Removing redundant vp9_clear_system_state() call.
This function is already called in vp9_initialize_rd_consts().

Change-Id: I88c0484a7274660287fa25fdf5cdb721d3284e01
2014-02-25 18:11:42 -08:00
Dmitry Kovalev
8d80c262d1 Using clamp() for active_{best, worst}_quality.
Change-Id: Ia79f975f54829b8ae6b568ca5c05f4f1f541706f
2014-02-25 18:01:49 -08:00
Dmitry Kovalev
7d121ea86e Cleaning up vp9_rdopt.c.
Change-Id: Ic7553a037493107c33cfb9815178a54095a289ec
2014-02-25 17:46:27 -08:00
Dmitry Kovalev
0444deb8d1 Removing vp9_optimize_b() function.
Change-Id: If859c9d58a8fe3f478d409b9e9ca59bcee8fd35d
2014-02-25 17:23:01 -08:00
Jingning Han
c0e99f84f9 Use sub-pixel accuracy prediction non-RD mode
This commit builds the actual prediction block in sub-pixel accuracy
and uses which to calculate SAD for non-RD mode decision. In the trail
run on pedestrian_area at 1080p, rtc speed -7 runtime goes from
23495 ms -> 25107 ms (7% slower). The compression performance is
improved by 20.57% for rtc test set.

Change-Id: I438589cd103fe99f1b50c2d1939ac6ca43fa0157
2014-02-25 16:29:20 -08:00
Alex Converse
cfd0eeeebb Merge "Shrink dct_value_cost[] to int16_t." 2014-02-25 14:30:33 -08:00
Jingning Han
fd49e9678e Use dedicated variables to store the best mode
Use a set of dedicated variables to buffer the current best mode
in non-RD mode decision. This allows to use mode_info for more
complicated test in the non-RD process.

Change-Id: I6024c9feb0662afd3eb29f7017f7b5a5446f303f
2014-02-25 13:56:12 -08:00
Deb Mukherjee
276e568997 Merge "Adds variance based fixed size partitioning" 2014-02-25 13:46:21 -08:00
Alex Converse
1075c49a3f Shrink dct_value_cost[] to int16_t.
The largest value is 13358.

Change-Id: I7a6b024a92b6250933d9ebc0cad066b966c96bd4
2014-02-25 13:07:18 -08:00
Deb Mukherjee
10bae82510 Adds variance based fixed size partitioning
Adds a method for determining a fixed size partition based on
variance of a 64x64 SB. This method is added to rtc speed 6.
Also fixes a bug in rtc_use_partition() and includes some
refactoring related to partitioning search, and some cosmetics.

Currently compared to speed 5, the coding efficiency of speed 6
is -19% and that of speed 7 is -55%, in cbr mode.

Change-Id: I057e04125a8b765906bb7d4bf7a36d1e575de7c6
2014-02-25 12:20:59 -08:00
Dmitry Kovalev
4632a96d97 Merge "Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}." 2014-02-25 11:06:05 -08:00
Dmitry Kovalev
7bca32a6a3 Merge "Changing vp9_full_search_sad{, x3, x8} signatures." 2014-02-25 10:51:17 -08:00
Dmitry Kovalev
55214924ac Merge "Cleaning up vp9_refining_search_sad() function." 2014-02-25 10:44:19 -08:00
Yunqing Wang
da47b3415b Merge "Disable adaptive pred filter for non-split mode" 2014-02-25 08:28:03 -08:00
Yaowu Xu
b67bd637e0 Merge changes I7e96d619,I9a7631d5
* changes:
  normalize int64_t high value to INT64_MAX
  resolve issue with arm code failing unit test
2014-02-25 08:22:49 -08:00
Jim Bankoski
ec55dd1007 normalize int64_t high value to INT64_MAX
Change-Id: I7e96d6199f882d35357f6a9a08c04ad0af5dc26e
2014-02-25 07:29:48 -08:00
Jim Bankoski
df9c8d5bd9 resolve issue with arm code failing unit test
The optimizer did something funny with the code around
line 1412.  Before the call to encode_sb split_dist was
set properly but after it was adjusted and converted to
a negative.

https://code.google.com/p/webm/issues/detail?id=714

Change-Id: I9a7631d5325ade2dc28c1030653a23eecec8721b
2014-02-24 17:34:27 -08:00
Yunqing Wang
fee045d13a Disable adaptive pred filter for non-split mode
If sf->disable_split_mask is DISABLE_ALL_SPLIT, disable
sf->adaptive_pred_interp_filter to avoid unnecessary operations.

Change-Id: Icb59174b2f4e9a3c3c16a696deb8018e5bd999eb
2014-02-24 14:05:06 -08:00
Deb Mukherjee
5f542408b4 Adds an intermediate speed level for rtc
Moves the existing speed 6 to speed 7 and adds an
intermediate level 6 which is roughly in between
speeds 6 and 7 in both speed and coding efficiency.
Also includes some minor fixes/adjustments.

Change-Id: I98befc4d82d750e79fe426c457c4a2571f6b6cc7
2014-02-24 12:15:33 -08:00
Dmitry Kovalev
092f32cf78 Merge "Combining if-else branches from different conditions." 2014-02-23 08:28:43 -08:00
Jingning Han
4b3e44f91d Merge "Periodically update mode and mv costs" 2014-02-22 11:54:20 -08:00
Yaowu Xu
5a7ac03b9e Changed a constant array to static const type
Change-Id: I5b3918441f63ceb7889dcf546e9a2d781be4a3cb
2014-02-21 22:44:13 -08:00
Yaowu Xu
f1633e5844 Merge "Remove an unused variable" 2014-02-21 22:44:05 -08:00
Jingning Han
836252bfa6 Periodically update mode and mv costs
Skip coefficient cost update in non-RD mode decision setting. Allow
periodical mode and motion vector cost update. Currently every other
8 frames. The increment runtime is a constant number. Hence more
visible for CIF resolution, while negligible for 1080p.

Speed -6 compression performance for rtc set is improved by 4.5%.

Change-Id: I27e0ad7c521fcc2af1d825582cbdd1a27ac4c323
2014-02-21 18:25:43 -08:00
Jingning Han
ba9b4b81be Merge "Refactor selected partition size coding for rtc" 2014-02-21 17:41:32 -08:00
Jingning Han
1fc0bde675 Refactor selected partition size coding for rtc
This commit makes a refactoring of the rtc_use_partition. It allows
the encoder to take a preferred block size for non-RD mode decision.
The boundary blocks are handled such that smaller block sizes that
fit in the boundary size will be used instread.

In rtc mode, the coding performance of speed -6 for pedestrian_1080p
goes from
158980 b/f, 38.934 dB, 22721 ms to
159008 b/f, 40.064 dB, 23721 ms.

For rtc set, the speed -6 compression performance is improved by
26%. Still about 2dB behind speed -5 at this point.

Change-Id: If0944f0880eaf1ad340bc325d97cea8d0f9dd53f
2014-02-21 14:49:57 -08:00
Yaowu Xu
67a1bff91d Merge "vp9_rd_pick_inter_mode_sb() reorganization" 2014-02-21 12:06:31 -08:00
Alex Converse
463ba70581 vp9_rd_pick_inter_mode_sb() reorganization
* Reduce the number of short cirtcuit checks by pre-computing and combining like checks.
* Postpone non-trivial initializations until after the shortcircuits are evaluated.
* Add some consts and const pointers.

No change to the actual results of the call or output of the encoder.

Change-Id: Ie44c4702aec6e08cfe0b8b0ba3cd6b57206478d1
2014-02-20 18:06:25 -08:00
Jingning Han
d66a63f02b Enable reduced set of intra modes in rtc coding
This commit enables the use of DC, vertical, and horizontal intra
prediction mode in rtc non-RD mode decision. When the best cost value
of inter modes is above a given threshold, the encoder runs the
above three intra modes and selects the one that has minimum
prediction residual in terms of SAD.

This together with recent changes on non-RD mode decision and coding
control improves compression performance of speed -6 by
derf  91%
yt    61%
hd    46%
stdhd 52%

In terms of encoding speed, it is about 3 times faster than speed -5.

Change-Id: I6b483bfd0307e6482bb22a6676ae4e25a52b1310
2014-02-20 18:03:23 -08:00
Jingning Han
a134527bdc Merge "Force alt reference frame off in rtc mode" 2014-02-20 18:03:12 -08:00
James Zern
e36cfc91a4 Merge "vp9_subpel_variance_impl_intrin_avx2.c: make some tables static" 2014-02-20 16:03:23 -08:00
Jingning Han
abf5b8d5eb Force alt reference frame off in rtc mode
When non-RD coding decision is used in rtc mode, the alt reference
is not used for inter frame prediction. This commit disabled alt ref
option whenever speed -6 is used.

Change-Id: I0b33ca03661de1db2d9bef1bcbff848cd4c9396f
2014-02-20 15:27:16 -08:00
Yaowu Xu
c58e1c7be9 Remove an unused variable
Change-Id: I8eeec70a7d4403243762f14d0b560792801645e8
2014-02-20 14:49:44 -08:00
Jingning Han
65bcabbe8c Merge "Use MI_BLOCK_SIZE in block coding loop" 2014-02-20 14:29:30 -08:00
Jingning Han
2aac18a4a6 Merge "Rework non-RD mode decision coding flow" 2014-02-20 14:28:57 -08:00
Yunqing Wang
cde6b50cb1 Merge "Use fast HEX search in real time mode" 2014-02-20 12:07:10 -08:00
Alex Converse
1d34991139 Merge "Only track mode_chosen_counts if CONFIG_INTERNAL_STATS." 2014-02-20 12:03:48 -08:00
Tom Finegan
595985334e vp9_encodeframe.c: Silence rdmult assignment warning with a cast.
Cast result of round() to int.

Change-Id: Ib708fddfadde4c765001ce9723fda113fd0f4bf6
2014-02-20 12:01:47 -08:00
Tom Finegan
6224516235 Merge "vp9_vaq.c: Cast result of round() to int to silence warning caused by clamp() call." 2014-02-20 11:57:36 -08:00
Tom Finegan
15e95086e2 vp9_encodeframe.c: Silence totalrate assignment warning with a cast.
Cast result of round() to int.

Change-Id: I4982886ad4e7657b4c40d21bd850d31690a68c28
2014-02-20 11:53:11 -08:00
Marco Paniconi
fd402e1374 Condition alt-ref entropy context setting on svc.
Avoid special context setting for alt-ref in svc mode.

Change-Id: I5337d0739abe16aab7854bcaa3c8537191c4b60c
2014-02-20 09:55:29 -08:00
Paul Wilkins
bb61327b98 Merge "vp9_rdopt.c: Use int64_t for dist_sum and rate_sum in model_rd_for_sb()." 2014-02-20 02:03:49 -08:00
Alex Converse
657519192e Only track mode_chosen_counts if CONFIG_INTERNAL_STATS.
Change-Id: Ia9252ad0caa4d2bda529a3fe93efcb31e7eb2da0
2014-02-19 18:52:04 -08:00
Alex Converse
43b7959dbc Merge "Do not use the value of 'rate_mv' if uninitialized." 2014-02-19 12:41:14 -08:00
Jingning Han
93ba687499 Use MI_BLOCK_SIZE in block coding loop
Change-Id: Ia70057e11c9b3d9d4bea6fbdd08839334ed02dce
2014-02-19 11:17:12 -08:00
Jingning Han
b99ed1ec5a Rework non-RD mode decision coding flow
In the first coding run of a 64x64 block, check the coding mode
for each 8x8 block. Will need a second annealing stage to decide
the partition size to be encoded.

Change-Id: Ida9417805ff3358979b0c0429d4099c023c88866
2014-02-19 11:13:05 -08:00
Paul Wilkins
98bf47df16 Merge "Remove comment from calls to vp9_clear_system_state." 2014-02-19 05:14:51 -08:00
Dmitry Kovalev
a7f8624458 Cleaning up vp9_onyx_if.c.
Change-Id: I389790f1ad0dd40816a7ae1ddad4a5c46278cff3
2014-02-19 10:59:53 +01:00
Dmitry Kovalev
35bd886864 Merge "Cleaning up pack_inter_mode_mvs() function." 2014-02-19 01:04:36 -08:00
Dmitry Kovalev
4e06ee39b0 Merge "Removing unused tree_update_hist[] array." 2014-02-19 01:02:51 -08:00
Dmitry Kovalev
54164c0e07 Merge "Cleaning up vp9_encodemb.c." 2014-02-19 01:02:30 -08:00
Tom Finegan
a0e495579e vp9_rdopt.c: Use int64_t for dist_sum and rate_sum in model_rd_for_sb().
Removes unnecessary casts and silences warnings.

Change-Id: Ic516a909a2b3748831be6717f02d86ca60190af3
2014-02-18 22:31:11 -08:00
Yaowu Xu
f4ce20c530 Removed unnecessary type cast
Change-Id: I0f2d5155ec042e9b5cbe9a9d6b186b121ed7737f
2014-02-18 21:03:47 -08:00
James Zern
d12b39daab vp9_subpel_variance_impl_intrin_avx2.c: make some tables static
+ fix formatting

Change-Id: I7b4ec11b7b46d8926750e0b69f7a606f3ab80895
2014-02-18 20:42:49 -08:00
Tom Finegan
76c1896fda vp9_vaq.c: Cast result of round() to int to silence warning caused by clamp() call.
clamp() wants an int, round returns a double, warning! Too bad we can't just use lrint.

Change-Id: I9c08289dde742fac0d673df8559a1892edcd1bc7
2014-02-18 18:26:42 -08:00
Alex Converse
2ceaf10e07 Do not use the value of 'rate_mv' if uninitialized.
This happens when exiting single_motion_search() early due to adaptive_motion_search.

Change-Id: Ic396e7e31e59ff219bb66a459c873c9e5b17400d
2014-02-18 17:04:42 -08:00
Adrian Grange
9b9c33a2b8 Remove comment from calls to vp9_clear_system_state.
Removed the comment "// __asm emms;" from all calls
to vp9_clear_system_state.

Change-Id: Ib4dae69c1cdf3f185b04184a870cd70c4d703f10
2014-02-18 15:43:42 -08:00
Jingning Han
e3178d0c1c Merge "Enable sub-pixel motion search for rtc mode" 2014-02-18 14:52:13 -08:00
Jingning Han
f11a85127b Merge "Initialize internal buffer pointers in rtc mode" 2014-02-18 14:51:38 -08:00
Yunqing Wang
360c80cfb9 Use fast HEX search in real time mode
In good quality mode motion search, the best matches are normally
found after searching in a large area. In real time mode, to make
encoding fast, a center-biased fast HEX search is used, which
converges quickly most of the time. A 4-point diamond search is
also carried out as the following refining search, which gives more
precise results, and maintains good motion search quality.

At speed 5, the borg test on rtc set showed an overall PSNR loss of
0.936%. The encoding speed gain is 4% - 5%.

Change-Id: I42cd68bb56a09ca1b86293c99d5f7312225ca7ae
2014-02-18 14:35:16 -08:00
Yunqing Wang
ad8d4454f0 Merge "AVX2 SubPixel Variance Optimization" 2014-02-18 12:18:13 -08:00
Jingning Han
6478673933 Enable sub-pixel motion search for rtc mode
Run sub-pixel motion search when NEWMV gives lower rate-distortion
cost. This improves coding performance of derf set by 8%, std-hd by
2.2%.

Change-Id: Ife50f7fda8463927784fe59a41cc439c833e941a
2014-02-18 12:07:55 -08:00
Yaowu Xu
671514ebee Merge "vp9_onyx_if.c resolve vs warnings" 2014-02-17 08:37:25 -08:00
Adrian Grange
bed0be5b22 Merge "Change post- to pre-increment." 2014-02-17 07:27:32 -08:00
Dmitry Kovalev
35092585d8 Cleaning up vp9_refining_search_sad() function.
Change-Id: Ife6131d31882177953a22a69d25adc35940429ed
2014-02-17 14:51:58 +01:00
Dmitry Kovalev
36420009ea Changing vp9_full_search_sad{, x3, x8} signatures.
Passing block MV pointer instead of block index into
vp9_full_search_sad{, x3, x8} functions.

Change-Id: Ica07356633471c2c8f81b583a7aeba85a436bafb
2014-02-17 14:24:57 +01:00
Dmitry Kovalev
f6fd5b2704 Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}.
Change-Id: I67a82a347245076b6c3b0bc41b587f9961a29943
2014-02-17 13:57:40 +01:00
Dmitry Kovalev
9141272235 Cleaning up vp9_encodemb.c.
Change-Id: Ia5b35494e4e18758f9f6c172526db83a87fdaa26
2014-02-17 12:34:02 +01:00
Jim Bankoski
6c5f6b306b vp9_onyx_if.c resolve vs warnings
Change-Id: I02cc50648b62768e20d2f465b5ad09648b1abe93
2014-02-15 21:02:18 -08:00
James Zern
cca8a54cdd Merge "A couple more V.S. warnings silenced." 2014-02-15 10:32:57 -08:00
Tom Finegan
6a6c427710 vp9/encoder/vp9_onyx_if: Fix compute_qdelta_by_rate() warnings
- Rename and make static
  s/vp9_compute_qdelta_by_rate/compute_qdelta_by_rate/
- Make base_q_index an integer.
- Add a cast.

Change-Id: Iea8d1397fd2717e7373b182ec51f5db960ef2cca
2014-02-14 21:14:33 -08:00
Paul Wilkins
8618c70683 A couple more V.S. warnings silenced.
Change-Id: Ica1b583d69810182f621de757d2543b2a3b35566
2014-02-14 20:34:14 -08:00
Dmitry Kovalev
a6bd65080f Removing unused tree_update_hist[] array.
Change-Id: If2e8e06c74d065323523904ff1771590fd48cabc
2014-02-14 17:22:34 -08:00
Adrian Grange
120f2144d2 Change post- to pre-increment.
Change-Id: I29e4d3a3c8cceb18825371bb78c83c0e7dd86e0f
2014-02-14 16:15:13 -08:00
Adrian Grange
d2095e0c6d Merge "Cleanup some comments." 2014-02-14 16:14:58 -08:00
levytamar82
52dac5d1cb AVX2 SubPixel Variance Optimization
Optimizing 2 functions to process 32 elements in parallel instead of 16:
1. vp9_sub_pixel_variance64x64
2. vp9_sub_pixel_variance32x32
both of those function were calling vp9_sub_pixel_variance16xh_ssse3
instead of calling that function, it calls vp9_sub_pixel_variance32xh_avx2
that is written in avx2 and process 32 elements in parallel.
This Optimization gave 70% function level gain and 2% user level gain

Change-Id: I4f5cb386b346ff6c878a094e1c3b37e418e50bde
2014-02-14 16:59:11 -07:00
Deb Mukherjee
0876302e4e Merge "Make cpi->speed always positive" 2014-02-14 15:53:30 -08:00
Deb Mukherjee
5306eda9da Merge "Enforce max-intra-pct in one-pass cbr mode" 2014-02-14 15:53:19 -08:00
Adrian Grange
b7be30eb36 Cleanup some comments.
Change-Id: I568861ba1d43620865ad9a98a97eef37a51fd856
2014-02-14 15:05:30 -08:00
Yaowu Xu
ecf392a155 Merge "minor spelling cleanup in comments" 2014-02-14 14:29:35 -08:00
Deb Mukherjee
56835f1bdd Make cpi->speed always positive
Minor fix to ensure that positive and negative cpu_used
values produce the same output.

Change-Id: I9157d05cb9a7c0bd57a4d8a9f268205a825b9b0b
2014-02-14 14:28:58 -08:00
Deb Mukherjee
12ae6eaf21 Enforce max-intra-pct in one-pass cbr mode
This was inadvertently left out in a previous refactoring step.

Change-Id: Idf3350e95152f876a1a1a4591dd30c8981856c96
2014-02-14 14:27:02 -08:00
Jim Bankoski
323a7120b9 Merge "vp9_rdopt.c : Silence more V.S. compiler warnings." 2014-02-14 14:23:51 -08:00
Jim Bankoski
f25dec89b8 Merge "vp9_bitstream.c resolve warnings in vs" 2014-02-14 14:17:39 -08:00
Jim Bankoski
57704bff94 Merge "vp9_pickmode.c resolve vs issue" 2014-02-14 14:16:18 -08:00
Jim Bankoski
8dc39a7540 Merge "vp9_vaq.c resolve vs warnings" 2014-02-14 14:15:38 -08:00
Paul Wilkins
40e374bbae vp9_rdopt.c : Silence more V.S. compiler warnings.
Change-Id: I151c6c9396b8ea1ce2e05b80359f60f0d38af138
2014-02-14 11:28:37 -08:00
Jim Bankoski
00717e804c vp9_bitstream.c resolve warnings in vs
Change-Id: I65677b7822204dc7344c67b8080e90633afc13dc
2014-02-14 11:19:39 -08:00
Jim Bankoski
524bac612a vp9_pickmode.c resolve vs issue
Change-Id: Ibe4276fa9ffeb2ef30871d6db8ac75c4648f1e58
2014-02-14 11:19:31 -08:00
Jim Bankoski
a60b76bd09 vp9_vaq.c resolve vs warnings
Change-Id: I8f1107a33f0ec51010fb00eae3d28ee8b4d748c2
2014-02-14 11:18:59 -08:00
Alex Converse
bb07de7cce Remove some unused and non-persistant variables from VP9_COMP.
Change-Id: I4deb1b97eec6b1244e3460a1162b41fa5312654a
2014-02-14 10:17:31 -08:00
Jim Bankoski
80ccb45c9e Merge "vp9_ratectrl - convert buffers to int64 to avoid casting" 2014-02-14 09:42:21 -08:00
Jim Bankoski
e63b78a4bb Merge "vp9_write_bit_buffer.h add consts to suppress warnings in vs" 2014-02-14 09:42:12 -08:00
Jim Bankoski
cd6b9936a6 Merge "vp9_ratectrl.h resolve visual studio warnings" 2014-02-14 09:09:16 -08:00
Jim Bankoski
5cc0de90d2 Merge "vp9_onyx_int.h resolve visual studio warning errors" 2014-02-14 09:09:06 -08:00
Jim Bankoski
5750f78d61 Merge "fast approximate model_rd_from_var_lapndz" 2014-02-14 09:08:52 -08:00
Jim Bankoski
e727bcf7ce Merge "vp9_mcomp.c visual studio warnings resolved" 2014-02-14 09:08:34 -08:00
Jim Bankoski
0c7fbe0057 Merge "vp9_firstpass.c visual studio warnings addressed" 2014-02-14 09:08:27 -08:00
Jim Bankoski
fb4f10a26e vp9_ratectrl - convert buffers to int64 to avoid casting
Change-Id: Ifd6b2d36d91237b5f38853a3a8a529d8be38ba09
2014-02-14 07:36:47 -08:00
Jim Bankoski
0abb06571b vp9_write_bit_buffer.h add consts to suppress warnings in vs
Change-Id: Iacda473090ae84c798f1d93df8284f34bdf646a5
2014-02-14 07:30:33 -08:00
Jim Bankoski
e5dda3b677 vp9_ratectrl.h resolve visual studio warnings
Change-Id: If3a2edd744eb76337fa78f34d0e059cda2c6da54
2014-02-14 06:36:44 -08:00
Jim Bankoski
27f4b14c65 vp9_onyx_int.h resolve visual studio warning errors
Change-Id: Iec8a51bdea6d6c916051d3bc5bbc6d00754d0cc8
2014-02-14 06:36:29 -08:00
Jim Bankoski
6025ec7901 vp9_mcomp.c visual studio warnings resolved
Change-Id: I7546cc8db4decbcd094ad76c64385b97666331b0
2014-02-14 06:35:36 -08:00
Jim Bankoski
bf5f2e7f90 vp9_firstpass.c visual studio warnings addressed
Change-Id: I6fe9ec50f937b12fd9c9321465270e289dbbc59d
2014-02-14 06:10:36 -08:00
Dmitry Kovalev
e9cefd1b20 Cleanup: removing "ptr" suffix from var names.
Change-Id: If8e340dd6823323025a12f851e78fffdbcaaf6f8
2014-02-13 19:23:24 -08:00
Dmitry Kovalev
19a8eee1f0 Cleaning up pack_inter_mode_mvs() function.
Change-Id: I48ad06e3e1ae9720a0683022621f4504e3bebce6
2014-02-13 19:21:10 -08:00
Dmitry Kovalev
bdd8966439 Merge "Removing reference to non-existing context_counters array." 2014-02-13 17:35:19 -08:00
Yaowu Xu
8d646becb6 Merge "Removed the reset of mode_info from previous frame" 2014-02-13 17:03:50 -08:00
Alex Converse
27f809db91 Merge "Disable using golden frame modes if golden frames are not being used" 2014-02-13 16:39:32 -08:00
Marco Paniconi
e590e087d5 Fix target frame size setting, for 1pass cbr.
Only use layered average size if number_temporal_layers > 1.

Also removed unneeded commented-out line, and change some parameter
setting in vpx_temporal_scalable_patterns.c

Change-Id: Ic86e43e7daf0313e8c5a4aba1497299158111955
2014-02-13 15:21:09 -08:00
Dmitry Kovalev
40af118a41 Removing reference to non-existing context_counters array.
Change-Id: I84668fa7b9487102e9bde5aea10f5f42efcd042c
2014-02-13 15:08:07 -08:00
Alex Converse
edec808787 Disable using golden frame modes if golden frames are not being used
Change-Id: I662c480ad49a242e10f1edb0c339ddbe2c6bccf4
2014-02-13 13:38:59 -08:00
Dmitry Kovalev
56f2752231 Merge "Using MV instead of int_mv inside vp9_full_pixel_diamond()." 2014-02-13 12:55:10 -08:00
Yaowu Xu
896d79a57e Removed the reset of mode_info from previous frame
Prior to this commit, both encoder and decoder reset mode/mv info from
previous frame in error resilient mode to ensure bitstreams are able to
decode when there is loss of frame in decoder side. However, this is
not necessary. This commit changed to remove the reset, so encoder can
continue to use mode/mv/partition information from previously encoded
frame without affecting decodeablilty under loss of frame.

Change-Id: I0279f862900dc647fb471ae3389770bb1b9f454f
2014-02-13 12:48:08 -08:00
Jingning Han
95abad9169 Merge "Remove redundant set_offsets in rtc coding mode" 2014-02-13 12:10:45 -08:00
Jingning Han
cc10ee0add Initialize internal buffer pointers in rtc mode
In rtc coding mode, the encoder is running non-RD mode decision. It
does not need dual buffer swap as was the case in the RD mode. This
commit initializes the internal buffer pointers outside the block
coding loop for rtc mode.

Change-Id: Ie076705c60d6b7919217e3f1dfd49e7db5064ac2
2014-02-13 11:41:08 -08:00
Dmitry Kovalev
ea53d6c15f Combining if-else branches from different conditions.
Change-Id: Ie51cf58de4f872d2261022558b6afe780bbc470b
2014-02-13 11:29:45 -08:00
Dmitry Kovalev
fde1b6d7f2 Using MV instead of int_mv inside vp9_full_pixel_diamond().
Change-Id: If33a5a12c4025d9b5ec863dfccea7ee70f800665
2014-02-13 11:23:05 -08:00
Dmitry Kovalev
df6c523fed Merge "Renaming skip_coeff to skip for consistency." 2014-02-13 11:04:34 -08:00
Jingning Han
4712877ef6 Remove redundant set_offsets in rtc coding mode
The functionalities of set_offsets() are subsumed in later
set_partitioning() and rtc_use_partition() functions, hence removed.

Change-Id: Ie514b13cb66c2379f13d0be9b1da4c12ca4581e5
2014-02-13 09:41:58 -08:00
Paul Wilkins
d84978b84f Merge changes I121fe66c,I94f57f8a
* changes:
  Remove some cases for turning off arf.
  Modified Aq1 and Aq2
2014-02-13 09:31:53 -08:00
Jim Bankoski
32d07c626e Merge "vp9_mbgraph.c static analysis issues resolved." 2014-02-13 08:32:12 -08:00
Jim Bankoski
4f34df4bf2 Merge "vp9_temporal_filter.c static analysis issue resolution" 2014-02-13 08:32:01 -08:00
Jim Bankoski
6a6797f5c9 Merge "vp9_pickmode.c static analysis issues resolved" 2014-02-13 08:31:49 -08:00
Paul Wilkins
c30a9cd97d Remove some cases for turning off arf.
Flipping arf on and off too often is hurting some clips.
This change makes no difference for 50-75% of our test
clips but helps some by a big margin. (eg. std-hd crew
by 6% and one of the YT and YT-hd clips by 14%)

Average improvements for 2 pass, speed 2 (psnr,ssim)
are as follows:-

derf  0.165%, 0.210%
yt  1.210%, 1.464%
yt-hd 1.189%, 1.471%
std-hd 1.031%, 0.886%

Change-Id: I121fe66cfb4a62d384b23b484a7d648789641969
2014-02-13 14:51:38 +00:00
Jim Bankoski
72c97b103e vp9_mbgraph.c static analysis issues resolved.
Change-Id: I6ec6e072fcd59f9b5fac4ce221a86f9078103ae3
2014-02-13 06:43:44 -08:00
Jim Bankoski
677b5375aa vp9_temporal_filter.c static analysis issue resolution
Change-Id: I08a4364672cf8171932e8e85fb74fcbfa4b27d2d
2014-02-13 06:22:23 -08:00
Jim Bankoski
d7be0fd5ea Merge "vp9_rdopt.c static analysis issues resolved" 2014-02-13 06:22:08 -08:00
Jim Bankoski
c6eaf5f9f9 vp9_pickmode.c static analysis issues resolved
Change-Id: I716ea2967c6771d7adea571406f315a3197eab93
2014-02-13 06:20:57 -08:00
Jim Bankoski
7336dfe2ae Merge "static analysis warning in vp9_ratectrl.c" 2014-02-13 06:20:35 -08:00
Jim Bankoski
d2cd088cb7 Merge "vp9_mcomp.c static analysis issues" 2014-02-13 06:20:16 -08:00
Jim Bankoski
35e24e33d3 Merge "clear out static analysis warning" 2014-02-13 06:20:05 -08:00
Jim Bankoski
75ac2913de Merge "clean out static analyzer warnings vp9_encodeframe.c" 2014-02-13 06:19:26 -08:00
Dmitry Kovalev
c00d88cdae Merge "Removing init_rdcost_stack() + cleanup." 2014-02-12 18:24:03 -08:00
Dmitry Kovalev
8c3ca45dfb Merge "Converting int_mv to MV." 2014-02-12 17:53:50 -08:00
Jingning Han
dea1604ed2 Merge "Remove unnecessary vp9_setup_buffer_inter use" 2014-02-12 17:51:39 -08:00
Jingning Han
3818132a4b Merge "Remove inactive control parameters" 2014-02-12 17:51:30 -08:00
Jingning Han
91b5145673 Merge "Remove unused using_small_partition_info functions" 2014-02-12 17:51:18 -08:00
Jingning Han
ce79e8a114 Merge "Remove unused function in vp9_encodeframe" 2014-02-12 17:51:11 -08:00
Dmitry Kovalev
004c8c636e Renaming skip_coeff to skip for consistency.
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-02-12 17:44:12 -08:00
Dmitry Kovalev
8dd9ca4c32 Merge "Adding consts to mv search function arguments." 2014-02-12 17:31:52 -08:00
Jim Bankoski
bb2d683c26 vp9_rdopt.c static analysis issues resolved
Change-Id: Id53b574a4ecb5c8749383b3758c46b6bc1b275d5
2014-02-12 17:00:57 -08:00
Andrew Russell
549c31f8ae minor spelling cleanup in comments
Change-Id: Ia91c6c406273345b08505097ffe1af3896980f06
2014-02-12 16:32:51 -08:00
Dmitry Kovalev
733a17d253 Converting int_mv to MV.
Change-Id: Id15285aa48ac6d8fec19a1946e6391412d84f5be
2014-02-12 15:40:43 -08:00
Alex Converse
02c063797b Merge "Cleanup tokenize_b and hoist some invarients out of the loop." 2014-02-12 15:35:55 -08:00
Jingning Han
3c3dd1d5a3 Remove unnecessary vp9_setup_buffer_inter use
This function initializes the predictor buffer pointers and
calculates reference motion vectors. It is only needed in the settings
of inter frame coding. Hence removing it from the key frame coding
branch in rtc_use_partition.

Change-Id: Ic4e16c7467a5f32be4e0bf619ef9d57afb4a7075
2014-02-12 15:10:23 -08:00
Dmitry Kovalev
50712fcaa9 Adding consts to mv search function arguments.
Change-Id: Ie79114bba4f0cea55d9f701e20d2be2017630f3b
2014-02-12 14:28:23 -08:00
Jim Bankoski
9e190dfbfe fast approximate model_rd_from_var_lapndz
Change-Id: Ieceaa16312941992d4a57455e336d625dfe4e094
2014-02-12 14:16:55 -08:00
Jingning Han
0eecccc51e Remove inactive control parameters
Change-Id: Ic5692af975fe6bd2d8ec82bbae103c6f7c2fc13e
2014-02-12 12:48:15 -08:00
Jingning Han
25479e94a4 Remove unused using_small_partition_info functions
This function is deprecated after the re-design of partition search
that runs big block size, then four-way split, followed by
rectangular block sizes. This commit removes the related functions.

Change-Id: I417549c8e0fa3cf35bd29816b805dd4e7c3660c6
2014-02-12 12:24:10 -08:00
Jingning Han
2e86d2de85 Remove unused function in vp9_encodeframe
The function rd_pick_reference_frame can be deprecated. Its use was
subsumed by the adaptive motion search control.

Change-Id: Icb0c2fa335f0f06fa7b79a71f972d9fa54d750db
2014-02-12 12:23:29 -08:00
Dmitry Kovalev
fffb3be765 Merge "Cleaning up vp9_full_search_sad_c() function." 2014-02-12 12:14:34 -08:00
Dmitry Kovalev
0109d757ee Merge "Removing vp9_foreach_transformed_block_uv() function." 2014-02-12 12:11:14 -08:00
Jim Bankoski
eb5889f882 static analysis warning in vp9_ratectrl.c
Change-Id: I8aa3dd068d9a7225b3e8b24392a7b4a54b9435dd
2014-02-12 11:54:53 -08:00
Jim Bankoski
f324f0c54e vp9_mcomp.c static analysis issues
Change-Id: I8c0023e3f03297993431e21158ee3821af75f82d
2014-02-12 11:54:47 -08:00
Jim Bankoski
4c2074f969 clear out static analysis warning
Change-Id: Ic8708bb8a56ab30617c8ef47072b53928a53a1a3
2014-02-12 11:54:38 -08:00
Jim Bankoski
df86c4497a clean out static analyzer warnings vp9_encodeframe.c
Change-Id: If14d2fc8cf4202d24f7d87ea74b8ce88a6a816d9
2014-02-12 11:54:04 -08:00
Adrian Grange
4618952a59 Merge "Minor cleanup." 2014-02-12 11:14:10 -08:00
Jingning Han
3602c4312d Merge "Use INTER_OFFSET in vp9_pick_inter_mode" 2014-02-12 10:26:06 -08:00
Yaowu Xu
56d0b36092 Merge "Fixed a bug where no valid partition is allowed" 2014-02-12 10:13:49 -08:00
Deb Mukherjee
cf479baa03 Merge "Removes active_worst_quality feedback" 2014-02-12 09:20:31 -08:00
Adrian Grange
896a9ab934 Minor cleanup.
Change-Id: I6ef0ce5371ed9e2a415dd8c08c93ad603f0ad7b2
2014-02-12 09:18:00 -08:00
Jingning Han
e8b7610e8f Use INTER_OFFSET in vp9_pick_inter_mode
Cosmetic change to use pre-defined macros.

Change-Id: I93e9fa90113d0242599048940b39694660385a6f
2014-02-12 09:14:29 -08:00
Yaowu Xu
69a6871904 Fixed a bug where no valid partition is allowed
Change-Id: I4d2729dc5c46db2847700256941a66b0957c105d
2014-02-12 09:00:34 -08:00