Commit Graph

10579 Commits

Author SHA1 Message Date
hkuang
f2fe530e15 Add two test vectors to test frame parallel decode.
The added vectors are mainly used to test the output cache
mechanism in frame parallel decode.

Change-Id: I3d413d060daa5abf72358f6350bd1d16d71adc5a
2014-11-06 16:28:35 -08:00
Hangyu Kuang
9ce3a7d76c Implement frame parallel decode for VP9.
Using 4 threads, frame parallel decode is ~3x faster than single thread
decode and around 30% faster than tile parallel decode for frame parallel
encoded video on both Android and desktop with 4 threads. Decode speed is
scalable to threads too which means decode could be even faster with more threads.

Change-Id: Ia0a549aaa3e83b5a17b31d8299aa496ea4f21e3e
2014-10-22 10:50:58 -07:00
hkuang
4d0d78424b Increase the thread test range to cover 5, 6, 7, 8 threads.
Change-Id: Id25c294720551bb5153987d8758668befaa57929
2014-09-05 17:11:30 -07:00
hkuang
5106e4dfa8 Fix a bug in adding frame parallel unit test.
There are two CreateDecoder functions and decode_test_driver is not
calling the right function now. This bug is discovered during really
enable the frame parallel flag inside libvpx. This bug does not affect
any existing unit test though.

Change-Id: Icd9633c4b66d50e422a09c4310ff791082878936
2014-08-18 11:16:15 -07:00
hkuang
02410659cd Merge "Add VP9 frame-parallel unit test." into frame_parallel 2014-08-14 14:55:09 -07:00
hkuang
a3ef7d5a50 Add VP9 frame-parallel unit test.
Make sure VP9 frame-parallel decode passes all the standard
test vectors. Only test running with 2,3,4 threads now.

Also refactor the video decode test driver to support passing
in decode flags which is used to enable frame-parallel decode.

Change-Id: I6a712464232c2e13681634951c7e176312522e1e
2014-08-14 13:06:26 -07:00
hkuang
48c5d470e7 Manually pick "Make the api behavior conform to api spec." from
master branch.

Change-Id: I7323ec4cf8b8b7841e37f2bf90548cefa9de9795
2014-08-07 15:15:46 -07:00
hkuang
44395a21da Move vp9_dec_build_inter_predictors_* to decoder folder.
Change-Id: Ibe9fa28440cc79ba9f3504d78c7dca7bb01a23e1
2014-07-28 11:09:11 -07:00
hkuang
7eca086707 Add segmentation map array for current and last frame segmentation.
The original implementation only allocates one segmentation map and this
works fine for serial decode. But for frame parallel decode,  each thread
need to have its own segmentation map and the last frame segmentation map
should be provided from last frame decoding thread.

After finishing decoding a frame, thread need to serve the old segmentation
map that associate with the previous decoded frame. The thread also need to
use another segmentation map for decoding the current frame.

Change-Id: I442ddff36b5de9cb8a7eb59e225744c78f4492d8
2014-07-28 10:44:02 -07:00
hkuang
4c08120ca0 Merge "Include the right header for VP9 worker thread." into frame_parallel 2014-07-14 16:09:16 -07:00
hkuang
294b849796 Include the right header for VP9 worker thread.
pthread.h is not supported in windows. vp9_thread.h includes
the emulation layer for pthread in windows.

Change-Id: I2b1c8ec299928472faca7ebeea998170c9f4d744
2014-07-14 16:03:38 -07:00
hkuang
3cffa0c74e Move vp9_thread.* to common.
Prepare for frame parallel decoding, the reference count buffers
need to be protected by mutex. Move vp9_thread.* to common
folder so that those buffers could use cross-platform mutex
from vp9_thread.*.

(cherry picked from commit 337e8015c9)

Change-Id: I0587a08447925f4554d7788686a31483c2ae3f37
2014-07-11 15:24:31 -07:00
hkuang
10aa23f751 ctrl_get_reference does not need user_priv.
The relationship of the user private data at runtime
is not preserved from decode() to this call which may
occur at an unknown point in the future

Change-Id: Ia7eb25365c805147614574c3af87aedbe0305fc6
2014-07-02 19:28:38 -07:00
hkuang
28a794f680 Seperate the frame buffers from VP9 encoder/decoder structure.
Prepare for frame parallel decoding, the frame buffers must be
separated from the encoder and decoder structure, while the encoder
and decoder will hold the pointer of the BufferPool.

Change-Id: I172c78f876e41fb5aea11be5f632adadf2a6f466
2014-07-02 15:34:20 -07:00
hkuang
bf58d1725c Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:"""
This reverts commit 749e0c7b28.

Change-Id: I0c63a152baf94d38496dd925a40040366153bf4f
2014-07-02 14:57:39 -07:00
Paul Wilkins
579c7bcca5 Merge "Adapt strength of AQ2." 2014-07-02 09:49:34 -07:00
Pengchong Jin
2c04e85d06 Merge "Store/read 16x16 block statistics obtained from the first pass" 2014-07-02 08:36:22 -07:00
Paul Wilkins
adf4293e4e Adapt strength of AQ2.
Adapt the use of segmentation in AQ mode 2 based on
the ambient kf/arf/gf Q.

Disable segmentation where the rate per SB is very
low and overheads are likely to outweigh the benefits.

This patch reduces the -ve average metrics impact
of AQ mode 2 while allowing stronger 3 segment AQ
in some cases. Average improvement ~0.5-1.0%.

Change-Id: I5892dfcc7507c5cc6444531cc7fe17554cf8d0c7
2014-07-02 16:34:26 +01:00
Deb Mukherjee
82dc1332af Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.

Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.

Change-Id: Ie2794daf6dbafd2f128464f9b9da520fc54c0dd6
2014-07-02 05:41:14 -07:00
Tim Kopp
08cb2b0211 Merge "VP9 denoiser used s/int/enum where appropriate" 2014-07-01 23:03:24 -07:00
Tim Kopp
73799aa3f7 Merge "Denoised output is now grayscale" 2014-07-01 23:03:07 -07:00
James Zern
262bc7b280 Merge "vp8/bitstream.h: quiet warnings in EDSP builds" 2014-07-01 22:48:15 -07:00
James Zern
8aafd34050 Merge changes I875ac5a7,I2b13369d,I9ceb47a9
* changes:
  update vp9_thread.[hc]
  vp9_thread_test: remove unnecessary c_str()'s
  vp9_thread_test: factorize decode loop
2014-07-01 20:46:53 -07:00
Yaowu Xu
82fd084b35 Merge "Re-design quantization process" 2014-07-01 19:04:01 -07:00
Jingning Han
9ac2f66320 Re-design quantization process
This commit re-designs the quantization process for transform
coefficient blocks of size 4x4 to 16x16. It improves compression
performance for speed 7 by 3.85%. The SSSE3 version for the
new quantization process is included.

The average runtime of the 8x8 block quantization is reduced
from 285 cycles -> 255 cycles, i.e., over 10% faster.

Change-Id: I61278aa02efc70599b962d3314671db5b0446a50
2014-07-01 17:00:07 -07:00
Jim Bankoski
bd756699b9 Merge "Add a test that tests invalid partitions for profile 1" 2014-07-01 16:48:56 -07:00
Jim Bankoski
56dbf1ca6c Merge "validate uv block size when reading partition" 2014-07-01 16:48:45 -07:00
Pengchong Jin
aaabbd67b2 Store/read 16x16 block statistics obtained from the first pass
Add a conditional compile flag for this feature. Also add a
switch to enable the encoder to use these statistics in the
second pass. Currently, the switch is turned off.

Change-Id: Ia1c858c35ec90e36f19f5cffe156b97ddaa04922
2014-07-01 16:47:17 -07:00
Yunqing Wang
64742f825d Merge "Elevate NEWMV mode checking threshold in real time" 2014-07-01 16:05:51 -07:00
Jim Bankoski
ee3802150c Add a test that tests invalid partitions for profile 1
Change-Id: I3d95fbe9a8098256582b5386881d5b7bbdb317ed
2014-07-01 15:37:26 -07:00
James Zern
2f16e79e62 Merge "vp9_thread_test: add 'Thread' to test names" 2014-07-01 15:25:45 -07:00
Yunqing Wang
f31ff029df Elevate NEWMV mode checking threshold in real time
The current threshold is knid of low, and in many cases NEWMV
mode is checked but not picked as the best mode. This patch
added a speed feature to increase NEWMV threshold, so that
less partition mode checking goes to check NEWMV. This feature
is enabled for speed 6 and 7.

Rtc set borg tests showed:
1. Speed 6, overall psnr: -0.088%, ssim: -1.339%;
   Average speedup on rtc set is 11.1%.
2. Speed 7, overall psnr: -0.505%, ssim: -2.320%
   Average speedup on rtc set is 12.9%.

Change-Id: I953b849eeb6e0d5a1f13eacba30c14204472c5be
2014-07-01 14:50:39 -07:00
Tim Kopp
1a66dab93a VP9 denoiser used s/int/enum where appropriate
Change-Id: Id52a7869fd1f31bb060de170e3295da7435adb9e
2014-07-01 14:07:40 -07:00
Tim Kopp
2f71de77f0 Denoised output is now grayscale
Grayscale is conditionally compiled.

Change-Id: I482ab237560d0bae8d397fd9999e78d38104f2a1
2014-07-01 14:07:40 -07:00
Alex Converse
79ceb79b35 Add a new yuv444 testvector.
This refelects the profile 1 bitstream change in 6c54dbc.

Change-Id: I39625d88f236a79b7f2955d79c5a451e3753da16
2014-07-01 11:03:17 -07:00
Dmitry Kovalev
19cbf54143 Merge "Fix visual studio build issue" 2014-07-01 10:30:39 -07:00
Jim Bankoski
abf0df08f1 validate uv block size when reading partition
Change-Id: I74fc5f1a7bab3128cdd49441b83ec3a25aee65ca
2014-07-01 10:26:26 -07:00
Yunqing Wang
9ba1d60bd1 Fix visual studio build issue
Fixed the signed/unsigned mismatch.

Change-Id: Id83d603b8f1745b71f4cf695a0751e55518b1316
2014-07-01 08:58:05 -07:00
James Zern
e656f44c24 update vp9_thread.[hc]
pull the latest from WebP, which adds a worker interface abstraction
allowing an application to override init/reset/sync/launch/execute/end

this has the side effect of removing a harmless, but annoying, TSan
warning.

Original source:
 http://git.chromium.org/webm/libwebp.git
  100644 blob 08ad4e1fecba302bf1247645e84a7d2779956bc3 src/utils/thread.c
  100644 blob 7bd451b124ae3b81596abfbcc823e3cb129d3a38 src/utils/thread.h

Local modifications:
 - s/WebP/VP9/g
 - camelcase functions -> lower with _'s
 - associate '*' with the variable, not the type

Change-Id: I875ac5a74ed873cbcb19a3a100b5e0ca6fcd9aed
2014-07-01 00:39:10 -07:00
James Zern
8c6263e8dc vp9_thread_test: remove unnecessary c_str()'s
EXPECT_EQ() works with strings

Change-Id: I2b13369d2aa7ff305ee516e6cb73bd099f8dead9
2014-07-01 00:31:23 -07:00
James Zern
0b27ed434c vp9_thread_test: factorize decode loop
+ add a SCOPED_TRACE with the current filename

Change-Id: I9ceb47a9154bc0d9f9878a83b707e8ed935790f9
2014-06-30 23:58:42 -07:00
James Zern
415b84bee0 vp9_thread_test: add 'Thread' to test names
s/VP9DecodeMTTest/VP9DecodeMultiThreadedTest/

this enables simpler test filtering

Change-Id: I010a451cf32fa5a95db6734cc22f331f0a0d515a
2014-06-30 23:38:21 -07:00
James Zern
b7a51cd894 vp8/bitstream.h: quiet warnings in EDSP builds
fixes:
vp8\encoder\bitstream.h: same type qualifier used more than once

Change-Id: I62b99342131fdaedb1f7cc8d2dcd13ab34637cd7
2014-06-30 23:29:34 -07:00
James Zern
14e3caca9a Merge "libs.mk: don't include x86inc.asm in codec src list" 2014-06-30 22:57:00 -07:00
James Zern
968291f556 Merge "Revert "Fix a bug in VP9Worker which leads to unit test hang."" 2014-06-30 17:50:45 -07:00
Alex Converse
6c54dbcb69 Merge "BITSTREAM: Handle transform size and motion vectors more logically for non-420." 2014-06-30 17:44:01 -07:00
hkuang
1480ba6f0a Revert "Fix a bug in VP9Worker which leads to unit test hang."
The caller should reset the state instead of letting worker
to reset.

This reverts commit 34b2ce15f9.

Change-Id: Idb546ea6386cffc44e98dee772900d21ab79710f
2014-06-30 17:02:26 -07:00
Yunqing Wang
4bb4c2291b Merge "Encode_breakout code refactoring" 2014-06-30 16:05:25 -07:00
Yaowu Xu
370618ffb4 Merge "change to not force interp_type as SWITCHABLE" 2014-06-30 15:44:08 -07:00
Yaowu Xu
186bd4eb52 change to not force interp_type as SWITCHABLE
Encoder still uses SWITCHABLE as default via DEFAULT_INTERP_FILTER,
but does not override the default if it is not SWITCHABLE.

Change-Id: I3c0f6653bd228381a623a026c66599b0a87d01d5
2014-06-30 12:48:21 -07:00