Commit Graph

707 Commits

Author SHA1 Message Date
Jingning Han
6bdfc8cd0b Merge "Motion referenced partition search for non-RD coding flow" 2014-03-26 16:06:01 -07:00
Dmitry Kovalev
0437575848 Merge "Removing prev_mi_8x8 from MACROBLOCKD." 2014-03-26 15:45:11 -07:00
Jingning Han
abdb0650b4 Motion referenced partition search for non-RD coding flow
This commit enables the non-RD mode decision coding flow to
adaptively apply partition search in non-refresh frame, when the
collocated block in previous frame suggests there might be a motion
activity. It refactors the update_state_rt() function to support
buffer swap of mode_info struct, thereby unifying the encoding
stage across various non-RD coding modes.

It provides 5% compression performance gains in speed -6 for rtc
test set, at about 12% speed slow down.

Change-Id: Iefa374aed5a11c4b7ff9a3ed36a98ea8bd184edb
2014-03-26 13:09:04 -07:00
Dmitry Kovalev
fc25e4dc52 Encapsulating CYCLIC_REFRESH struct into .c file.
Change-Id: I32695ad703dcbbbbf5f122b403f3d3120a0be366
2014-03-26 11:00:35 -07:00
Dmitry Kovalev
63f86c149a Removing prev_mi_8x8 from MACROBLOCKD.
Change-Id: I32beb5f18c10b5771146c55933b5555487f53633
2014-03-26 10:50:34 -07:00
Yaowu Xu
2ec04d1f84 Merge "Added a speed feature "allow_skip_recode"" 2014-03-26 09:53:42 -07:00
Jingning Han
3b8d00449c Merge "Apply early termination in non-RD partition search" 2014-03-26 09:28:55 -07:00
Marco Paniconi
79ec9a26d1 Merge "Fix to cylcic refresh: use correct/chosen mode for update_segment." 2014-03-26 09:15:15 -07:00
Marco Paniconi
eeed7e2953 Fix to cylcic refresh: use correct/chosen mode for update_segment.
Fix so that vp9_update_segment_aq() will use the correct (i..e, chosen)
encoding mode (from ctx struct) in update_state.

Change-Id: Icc4b66f3935fad5ec4516a4d57e843d12c365e64
2014-03-25 16:40:48 -07:00
Jingning Han
0d78687583 Apply early termination in non-RD partition search
This commit allows the recursive non-RD partition search to early
terminate sub search tree when the cumulative rate-distortion is
already above the best available.

Change-Id: Ifdbcbb4bee229f47fde3033200829577c9f1fc1d
2014-03-25 15:51:36 -07:00
Yaowu Xu
6eb2cacf0d Added a speed feature "allow_skip_recode"
This commit added a speed feature to make the logic of calculating
skip_recode on a block level more explicit. This also enable the
feature to be enabled at speed 5 where the previous logic is too
conservative, help gain back the lost speed for --rt(-5).

Change-Id: Ieb37ca3e85c2e7bda343486edf13d5f5395f2233
2014-03-25 14:27:45 -07:00
Dmitry Kovalev
ed39c40a2e Moving above_context to VP9_COMMON.
Change-Id: I713af99d1e17e05a20eab20df51d74ebfd1a68d2
2014-03-25 10:40:08 -07:00
Jingning Han
c4e807ae2f Fix compiling errors due to git merge
There were a few conflicts between the new non-RD partition search
and recent clean-up patches, which were not caught by git control.
This commit fixed these issues.

Change-Id: Ieebefbd6c19d81d0d13e3c568877d5cce2ab7797
2014-03-25 10:25:16 -07:00
Jingning Han
17e9df1441 Merge "Always use adaptive motion search in non-RD coding mode" 2014-03-25 09:27:03 -07:00
Jingning Han
c270ce662b Merge "Enable recursive partition selection for non-RD coding mode" 2014-03-25 09:26:49 -07:00
Jingning Han
1b46f315f6 Always use adaptive motion search in non-RD coding mode
This commit takes out the if statements on using adaptive motion
search flag. This feature is automatically enabled in non-RD mode
decision flow for variable partition types search.

Change-Id: I5a25cf9109d84d07aa61b3e02c8d32dda1e90cb0
2014-03-24 22:33:00 -07:00
Alex Converse
64c766bb08 Merge "Don't subpartion inactive area in rd_use_partition." 2014-03-24 17:04:45 -07:00
Alex Converse
98fde54685 Merge "Deduplicate and rename mode info step." 2014-03-24 17:04:30 -07:00
Jingning Han
6b6d3886fc Enable recursive partition selection for non-RD coding mode
This commit enables a recursive partition type search for non-RD
mode decisions. It allows the encoder to choose variable block
sizes in a 64x64 block based on rate-distortion modeling.

It improves speed -6 coding efficiency for rtc set by 2.4%. Most
of the gains come from 32-40dB range, where many sequences gain
about 5% to 20%. Local tests suggest there is no speed change.

Change-Id: I06300016e500a21652812b7b3b081db39a783d66
2014-03-24 14:40:29 -07:00
Alex Converse
5182a35004 Don't subpartion inactive area in rd_use_partition.
Change-Id: I50db8d3c99eea39e46cc5876cb1f49513c084073
2014-03-24 12:54:30 -07:00
Alex Converse
f16f507c76 Deduplicate and rename mode info step.
Change-Id: Ie624a119ce8e0891f4ca396040d679e22ef8ce27
2014-03-24 12:54:30 -07:00
Dmitry Kovalev
6bfcb269a5 Cleaning up vp9_aq_cyclicrefresh.{c, h}.
Change-Id: I288e5ffade508fc3c803986d47ccf06df8d784dd
2014-03-24 12:03:44 -07:00
Jim Bankoski
f7188e5aea refactor reset_skip_txfm_size and elimate a lot of code
Change-Id: Id70bd0ff8836c28d9c8653e018e071ca9fb06610
2014-03-24 08:54:49 -07:00
Dmitry Kovalev
9895c9d4dd Merge "Removing redundant {above, left}_seg_context manipulation code." 2014-03-22 22:31:48 -07:00
Jingning Han
5950a69213 Merge "Reformat non-RD coding flow" 2014-03-21 21:43:02 -07:00
Jingning Han
89cc421e89 Reformat non-RD coding flow
This commit reformats non-RD coding flow layout to allow mode
decision with fixed and variable block sizes.

Change-Id: I2cdd3bb9f26c499ee4a9849004fd925cdd195d09
2014-03-21 16:41:55 -07:00
Marco Paniconi
03a9e5edb6 Rename the aq_mode files.
Change-Id: Id76a628495c822e23825b66a7589b4a3279680e2
2014-03-21 15:20:59 -07:00
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
Yaowu Xu
2d70e16595 Merge "Fix a valgrind error" 2014-03-21 11:13:43 -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
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
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
Jingning Han
b64d58c773 Merge "Enable variable block size test in non-RD mode decision" 2014-03-19 18:54:42 -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
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
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
Jingning Han
5e33fd200c Merge "Add bit-stream write flag to nonrd_use_partition" 2014-03-17 14:17:58 -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
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
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
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