Commit Graph

4099 Commits

Author SHA1 Message Date
Jingning Han
a313c8e7be Merge "Remove unused code in vp9_rd_pick_inter_mode_sb" 2014-08-18 09:27:56 -07:00
Pengchong Jin
997db6fc3f Merge "Add a speed feature to give the tighter search range" 2014-08-15 19:51:04 -07:00
Dmitry Kovalev
0b8b682b70 Merge "Removing duplicated code from init_config()." 2014-08-15 17:13:37 -07:00
Pengchong Jin
eca93642e2 Add a speed feature to give the tighter search range
Add a speed feature to give the tighter partition search
range. Before partition search, calculate the histogram
of the partition sizes of the left, above and previous
co-located blocks of the current block. If the variance of
observed partition sizes is small enough, adjust the search
range around the mean partition size, which will be tigher.

The feature is currently turned on at speed 2. Experiments on
sample youtube clips show on average the runtime is reduced
by 3-7%.

For hard stdhd clips:
park_joy_1080p @ 15000kbps:       509251 ms -> 491953 ms (3.3%)
pedestrian_area_1080p @ 2000kbps: 223941 ms -> 214226 ms (4.3%)

The PSNR performance is changed:
derf: -0.112%
yt:   -0.099%
hd:   -0.090%
stdhd:-0.102%

Change-Id: Ie205ec5325bf92ec5676c243e30ba9d0adca10f2
2014-08-15 16:14:20 -07:00
Dmitry Kovalev
dc35b40a67 Merge "Simplifying vp9_set_speed_features() function." 2014-08-15 15:31:43 -07:00
Jingning Han
5d453e39cf Remove unused code in vp9_rd_pick_inter_mode_sb
Change-Id: I4f0bac3367b1a7c5e7f746b97ca619b81c8dfc49
2014-08-15 15:08:46 -07:00
Dmitry Kovalev
5509b7fd8f Removing duplicated code from init_config().
Change-Id: I50f4485cfbdaadc3084aa5bc63bf3a2f15a0d903
2014-08-15 14:25:00 -07:00
Yunqing Wang
28b1437d77 Remove a unused speed feature
Removed disable_split_var_thresh, which is not used anymore.

Change-Id: I50119b150442e1571157433b5effc6aae0dbe0fd
2014-08-15 14:10:27 -07:00
Dmitry Kovalev
fa8de273e7 Merge "Cleaning up vp9_encoder.c." 2014-08-15 12:52:44 -07:00
Dmitry Kovalev
f1ec9e8712 Cleaning up vp9_encoder.c.
Change-Id: Ib06c59d1adefb841a6ff653619dffb7e23f3318d
2014-08-15 10:26:03 -07:00
Dmitry Kovalev
31e54bbf42 Removing active_arnr_{strength, frames} from VP9_COMP.
Change-Id: I60472b71ca75ee0522ed2611f43e1207d44b66d0
2014-08-15 10:22:00 -07:00
Jingning Han
80e5550723 Merge "Remove redundant vp9_init_plane_quantizers call" 2014-08-14 18:50:16 -07:00
James Zern
2ba201fcdb Merge "32 Align Load bug In the sub_pixel_avg_variance the parameter sec was also aligned load and changed to unaligned." 2014-08-14 18:42:34 -07:00
Dmitry Kovalev
480693b995 Merge "Moving framerate from VP9EncoderConfig to VP9_COMP." 2014-08-14 18:26:35 -07:00
Yaowu Xu
2aea20d613 Merge "Mask out H_PRED and V_PRED for 32x32 blocks" 2014-08-14 15:25:34 -07:00
Yaowu Xu
d0f256e9d4 Merge "Set max_intra_bsize to 32x32" 2014-08-14 15:25:30 -07:00
Adrian Grange
54f8cb78c6 Merge "Fix bug 837: realloc mode info buffers on resize" 2014-08-14 14:53:33 -07:00
Jingning Han
d67b608c5d Remove redundant vp9_init_plane_quantizers call
When aq mode is on, the quantizer will be reset later in the same
function (line 571).

Change-Id: I20635db31261d136d04d5deeb881ad3957078bf1
2014-08-14 14:21:08 -07:00
levytamar82
efdfdf5787 32 Align Load bug
In the sub_pixel_avg_variance the parameter sec was also aligned load and
changed to unaligned.

Change-Id: I4d4966e0291059ea4d705baed1503dc58444fcb7
2014-08-14 14:07:28 -07:00
Yaowu Xu
5966586aef Mask out H_PRED and V_PRED for 32x32 blocks
Change-Id: I2847af5062b5fa320629fcabb9fa6b23ba3e5513
2014-08-14 10:52:10 -07:00
Yaowu Xu
4d6d061316 Set max_intra_bsize to 32x32
At --good and speed 3 or above for resolution less than 720p. This
disables the tests for 64x64 intra prediction modes. Encoding time
reduction is about 1%.

Change-Id: Ib396e3d1417fece416e3f0fee929b128acbb130f
2014-08-14 10:51:44 -07:00
Yaowu Xu
d4a47a6cc0 Merge "Replace current_video_frame with better alternatives" 2014-08-14 09:06:38 -07:00
Adrian Grange
4e30565a9f Fix bug 837: realloc mode info buffers on resize
The test to determine if the mode info buffers need
to be resized when the frame size changes was
incorrect, as per bug 837.

By storing the size of the allocated data structure,
a simple test determines whether to allocate more
memory when the frame size changes.

Change-Id: I1544698f2882cf958fc672485614f2f46e9719bd
2014-08-14 08:59:15 -07:00
Adam Xu
1d476a9ba4 Merge "Simplify select_tx_mode()" 2014-08-13 19:50:01 -07:00
Yaowu Xu
741a23cd97 Replace current_video_frame with better alternatives
In the encoder, current_video_frame is used in a couple of places to
decide encoding strategy, this commit replaces with more appropriate
variables.

Change-Id: I3d3d8d8e2ea02c489e4639b9d4c446a63e357d29
2014-08-13 17:19:34 -07:00
Jingning Han
ccef8842d2 Allow full coeff probability model and cost update
This commit moves the simplified coefficient probability model
and costing update to speed 4, and turns on chessboard pattern
mode search for sub 720p sequences. The overall coding performance
of speed 3 is improved:
derf  0.889%
stdhd 1.744%

The speed 3 runtime for test sequences are improved:
bus cif at 1000 kbps 9823 ms -> 9642 ms
pedestrian 1080p 2000 kbps 189559 ms -> 183284 ms

Change-Id: Iecbc7496a68f31fd49fb09f8dfd97c028d675a5d
2014-08-13 14:17:14 -07:00
Jingning Han
1e30547984 Skip mode search based on reference frame consistency
This commit enables the encoder to skip NEARMV and ZEROMV if the
above and left blocks have identical reference frame, and the
current reference is different from that. It reduces the runtime
of speed 3 for test sequences:
bus cif at 1000 kbps 10064 ms -> 9823 ms
pedestrian 1080p at 2000 kbps 193078 ms -> 189559 ms

The compression performance is changed by
derf  -0.085%
stdhd -0.103%

Change-Id: If304f26d42e6412152a84c3dd7b02635c38444f4
2014-08-13 14:16:18 -07:00
Jingning Han
6e086548cb Merge "Enable motion field based mode seach skip" 2014-08-13 14:13:19 -07:00
Jingning Han
0daadeb60c Enable motion field based mode seach skip
This commit allows the encoder to check the above and left neighbor
blocks' reference frames and motion vectors. If they are all
consistent, skip checking the NEARMV and ZEROMV modes. This is
enabled in speed 3. The coding performance is improved:

pedestrian area 1080p at 2000 kbps,
from  74773 b/f, 41.101 dB, 198064 ms
to    74795 b/f, 41.099 dB, 193078 ms

park joy 1080p at 15000 kbps,
from 290727 b/f, 30.640 dB, 609113 ms
to   290558 b/f, 30.630 dB, 592815 ms

Overall compression performance of speed 3 is changed
derf  -0.171%
stdhd -0.168%

Change-Id: I8d47dd543a5f90d7a1c583f74035b926b6704b95
2014-08-13 12:15:13 -07:00
Yaowu Xu
b6a41802c4 Simplify select_tx_mode()
The function is called only once, right after all stats counters are
reset to 0. Therefore all the computations have zero effect on return
values. This commmit to removed those effectless code.

Change-Id: I50d27c0802547921fa36c60aa4bd92d76247f595
2014-08-13 11:48:29 -07:00
Jim Bankoski
07c3abe21e Merge "intra blocks disallowed inadvertently" 2014-08-13 08:40:14 -07:00
Paul Wilkins
a3dbc8b304 Merge "Minor Two pass rate control adjustments." 2014-08-13 02:56:19 -07:00
James Zern
a6b7bd6a1c Merge "fixes several -Wunused-function warnings" 2014-08-12 20:15:14 -07:00
Jim Bankoski
f452961765 fixes several -Wunused-function warnings
Change-Id: I4dc2cb255f4fe30998b6ee61184895dee9f5da8e
2014-08-12 16:51:07 -07:00
Jim Bankoski
5c55202c6b intra blocks disallowed inadvertently
At speed 6 the smallest partitioning was 16x16 and biggest
intra block was 8x8, essentially disallowing all intra blocks
which produces ugly artifacts when revealing new video.

Change-Id: I364042d4c64e09be0666ade64aac94d0a1b586cf
2014-08-12 16:22:32 -07:00
Alex Converse
f55f68c13a Fix pickmode for intra DC blocks
Change-Id: I4906043ec1e3577ba37622a235c54adacb66125a
2014-08-12 16:04:14 -07:00
Paul Wilkins
ea55e4d26a Minor Two pass rate control adjustments.
Alter way in which we identify static scenes.
Remove some redundant code.

Change-Id: I883c2ea2e341770648a8663d8881f720ed099b61
2014-08-12 16:27:32 +01:00
James Zern
1d9e2b5003 Merge "remove unused fields from BOOL_CODER / vp9_writer" 2014-08-11 23:08:45 -07:00
James Zern
2ee221a2dc Merge "vp9_write_bit_buffer: fix function name typo" 2014-08-11 18:43:51 -07:00
Jingning Han
245e57c78e Merge "Enable fast forward txfm and quant for rate-distortion search" 2014-08-11 17:56:48 -07:00
Dmitry Kovalev
ccddd5d0f9 Merge "Removing unised OUTPUT_YUV_SRC define." 2014-08-11 11:03:20 -07:00
Jingning Han
5b63c2797a Merge "Integrate fast txfm and quant path into skip_recode system" 2014-08-11 08:53:34 -07:00
Jingning Han
9da4cd94f5 Merge "Extend skip_txfm flag into array to cover YUV planes" 2014-08-11 08:53:25 -07:00
Dmitry Kovalev
55f6ef9e53 Removing unised OUTPUT_YUV_SRC define.
Change-Id: Ia88eebf10c8620dadaa66722543db291e44fe104
2014-08-08 17:14:01 -07:00
Dmitry Kovalev
cd1fbc67f9 Simplifying vp9_set_speed_features() function.
Change-Id: I3e67230690b81ef54ef48ae26107fe7bc880ab8e
2014-08-08 16:29:24 -07:00
Jingning Han
b4b09c9796 Enable fast forward txfm and quant for rate-distortion search
This commit enables encoder to select fast forward transform and
quantization path according to the prediction residual sse/variance,
in the rate-distortion optimization scheme.

Change-Id: Ief9fc3844fd4107166d401970e800c6e5ce2b5fe
2014-08-08 16:16:51 -07:00
Dmitry Kovalev
6e5149b68d Merge "Moving pass from VP9_COMP to VP9EncoderConfig." 2014-08-08 16:07:47 -07:00
Adrian Grange
a334cb0b7d Merge "Common encode/decode function to get reference frame" 2014-08-08 15:56:18 -07:00
Dmitry Kovalev
5a78c40657 Moving framerate from VP9EncoderConfig to VP9_COMP.
Framerate changes over time, VP9EncoderConfig supposed to have static
read-only data.

Change-Id: I36580a7ee71243c1eabb57691089691731d03e67
2014-08-08 15:29:37 -07:00
Dmitry Kovalev
91c2f1e45a Moving pass from VP9_COMP to VP9EncoderConfig.
We had a very complicated way to initialize cpi->pass from
cfg->g_pass:
switch (cfg->g_pass) {
  case VPX_RC_ONE_PASS:
    oxcf->mode = ONE_PASS_GOOD;
    break;
  case VPX_RC_FIRST_PASS:
    oxcf->mode = TWO_PASS_FIRST;
    break;
  case VPX_RC_LAST_PASS:
    oxcf->mode = TWO_PASS_SECOND_BEST;
    break;
}

cpi->pass = get_pass(oxcf->mode).

Now pass is moved to VP9EncoderConfig and initialization is simple:
switch (cfg->g_pass) {
  case VPX_RC_ONE_PASS:
    oxcf->pass = 0;
    break;
  case VPX_RC_FIRST_PASS:
    oxcf->pass = 1;
    break;
  case VPX_RC_LAST_PASS:
    oxcf->pass = 2;
    break;
}

Change-Id: I8f582203a4575f5e39b071598484a8ad2b72e0d9
2014-08-08 14:27:54 -07:00