summaryrefslogtreecommitdiff
path: root/vp9/decoder
AgeCommit message (Collapse)Author
2015-02-06Make encoder and decoder share common thread functionYunqing Wang
Moved vp9_accumulate_frame_counts to vp9_thread_common.c to eliminate the duplicate code. Change-Id: I9cf506d729603c8bf1494b4c86a3b7d47af1917a
2015-02-06Rename loopfilter_thread files to thread_common filesYunqing Wang
Renames the files to allow more common thread code to be moved to vp9/common. Change-Id: I7386e64e221086e3cdc087e79812f993c423413b
2015-02-06Merge "vp9: fix segfault w/corrupt data post frame-parallel merge"James Zern
2015-02-05Merge "Fix a thread lost bug in frame parallel decode."hkuang
2015-02-05vp9: fix segfault w/corrupt data post frame-parallel mergeJames Zern
cm->frame_bufs[].idx values were made consistent in: 61c5e94 Use -1 consistently as invalid buffer idx update the initialization in swap_frame_buffers() to match. additionally: - remove some shadowed variables in the former and marked them volatile Change-Id: Ie3f9636c405bd822112bb56bd22d28024ae98909
2015-02-04Mute the harmless tsan error in frame parallel decode.hkuang
Change-Id: I52565fd90461221f89134997a0782cb1b681df01
2015-02-04Fix a thread lost bug in frame parallel decode.hkuang
After syncing the frame worker thread, avaiable thread count should increase by 1 even the worker thread does not have displayable frame to output. Change-Id: I9eeb87720fed82dfe38555286833ff88e8a8e746
2015-02-04vp9_dthread: remove frame_parallel_decoding_mode requirementYunqing Wang
This patch continues the work to remove frame_parallel_decoding_mode requirement in VP9 multi-threaded tile decoder. In order to do that, the frame counts associated to each thread need to be accumulated together after the frame is decoded. Change-Id: Idba1a756cedfed3c154aef52ed82c8da3bbf9e0c
2015-02-03vp9_dthread: pass frame counts to decoder functionsYunqing Wang
The current multi-threaded tile decoder requires that the videoes are encoded with frame_parallel_decoding_mode = 1. This requirement is not necessary, and is better to be removed. This patch includes the first part of the work. Change-Id: Ic7695fb3cfe13f9022582c9f0edd2aa6e2e36d28
2015-02-02Fix a bug from merging frame parallel branch into master.hkuang
The merge did not merge the fix for issue #850. Change-Id: I0dc1377dbfcb9497fb01a13d4f78ac65bff5eb33
2015-01-30Try again to merge branch 'frame-parallel' into master branch.hkuang
In frame parallel decode, libvpx decoder decodes several frames on all cpus in parallel fashion. If not being flushed, it will only return frame when all the cpus are busy. If getting flushed, it will return all the frames in the decoder. Compare with current serial decode mode in which libvpx decoder is idle between decode calls, libvpx decoder is busy between decode calls. Current frame parallel decode will only speed up the decoding for frame parallel encoded videos. For non frame parallel encoded videos, frame parallel decode is slower than serial decode due to lack of loopfilter worker thread. There are still some known issues that need to be addressed. For example: decode frame parallel videos with segmentation enabled is not right sometimes. * frame-parallel: Add error handling for frame parallel decode and unit test for that. Fix a bug in frame parallel decode and add a unit test for that. Add two test vectors to test frame parallel decode. Add key frame seeking to webmdec and webm_video_source. Implement frame parallel decode for VP9. Increase the thread test range to cover 5, 6, 7, 8 threads. Fix a bug in adding frame parallel unit test. Add VP9 frame-parallel unit test. Manually pick "Make the api behavior conform to api spec." from master branch. Move vp9_dec_build_inter_predictors_* to decoder folder. Add segmentation map array for current and last frame segmentation. Include the right header for VP9 worker thread. Move vp9_thread.* to common. ctrl_get_reference does not need user_priv. Seperate the frame buffers from VP9 encoder/decoder structure. Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""" Conflicts: test/codec_factory.h test/decode_test_driver.cc test/decode_test_driver.h test/invalid_file_test.cc test/test-data.sha1 test/test.mk test/test_vectors.cc vp8/vp8_dx_iface.c vp9/common/vp9_alloccommon.c vp9/common/vp9_entropymode.c vp9/common/vp9_loopfilter_thread.c vp9/common/vp9_loopfilter_thread.h vp9/common/vp9_mvref_common.c vp9/common/vp9_onyxc_int.h vp9/common/vp9_reconinter.c vp9/decoder/vp9_decodeframe.c vp9/decoder/vp9_decodeframe.h vp9/decoder/vp9_decodemv.c vp9/decoder/vp9_decoder.c vp9/decoder/vp9_decoder.h vp9/encoder/vp9_encoder.c vp9/encoder/vp9_pickmode.c vp9/encoder/vp9_rdopt.c vp9/vp9_cx_iface.c vp9/vp9_dx_iface.c This reverts commit a18da9760a74d9ce6fb9f875706dc639c95402f5. Change-Id: I361442ffec1586d036ea2e0ee97ce4f077585f02
2015-01-23Revert "Merge branch 'frame-parallel' to enable frame parallel decode in ↵Johann
master branch." This reverts commit bde04ce5039cbcf86c8b34bdb4127e18d7e1d0c7 Change-Id: I053dae04c761b04a36dc239558503905a14d2470
2015-01-22Merge branch 'frame-parallel' to enable frame parallel decode in master branch.hkuang
In frame parallel decode, libvpx decoder decodes several frames on all cpus in parallel fashion. If not being flushed, it will only return frame when all the cpus are busy. If getting flushed, it will return all the frames in the decoder. Compare with current serial decode mode in which libvpx decoder is idle between decode calls, libvpx decoder is busy between decode calls. VP9 frame parallel decode is >30% faster than serial decode with tile parallel threading which will makes devices play 1080P VP9 videos more easily. * frame-parallel: Add error handling for frame parallel decode and unit test for that. Fix a bug in frame parallel decode and add a unit test for that. Add two test vectors to test frame parallel decode. Add key frame seeking to webmdec and webm_video_source. Implement frame parallel decode for VP9. Increase the thread test range to cover 5, 6, 7, 8 threads. Fix a bug in adding frame parallel unit test. Add VP9 frame-parallel unit test. Manually pick "Make the api behavior conform to api spec." from master branch. Move vp9_dec_build_inter_predictors_* to decoder folder. Add segmentation map array for current and last frame segmentation. Include the right header for VP9 worker thread. Move vp9_thread.* to common. ctrl_get_reference does not need user_priv. Seperate the frame buffers from VP9 encoder/decoder structure. Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""" Conflicts: test/codec_factory.h test/decode_test_driver.cc test/decode_test_driver.h test/invalid_file_test.cc test/test-data.sha1 test/test.mk test/test_vectors.cc vp8/vp8_dx_iface.c vp9/common/vp9_alloccommon.c vp9/common/vp9_entropymode.c vp9/common/vp9_loopfilter_thread.c vp9/common/vp9_loopfilter_thread.h vp9/common/vp9_mvref_common.c vp9/common/vp9_onyxc_int.h vp9/common/vp9_reconinter.c vp9/decoder/vp9_decodeframe.c vp9/decoder/vp9_decodeframe.h vp9/decoder/vp9_decodemv.c vp9/decoder/vp9_decoder.c vp9/decoder/vp9_decoder.h vp9/encoder/vp9_encoder.c vp9/encoder/vp9_pickmode.c vp9/encoder/vp9_rdopt.c vp9/vp9_cx_iface.c vp9/vp9_dx_iface.c Change-Id: Ib92eb35851c172d0624970e312ed515054e5ca64
2015-01-16vp9_ethread: add parallel loopfilterYunqing Wang
1. Added row-based loopfilter in encoder; 2. Moved common multi-threaded loopfilter functions from decoder to common; 3. Merged multi-threaded loopfilter code, and made encoder/ decoder call same function to reduce code duplication. Encoder tests showed that 1% - 2% speedup was seen for good-quality 2-pass mode(at speed 3); 1% - 3% speedup using 2 threads and 4% - 6% speedup using 4 threads were seen for real-time mode(at speed 7). Change-Id: I8a4ac51c2ad9bab9fa7b864e90743931c53ec1c4
2015-01-14Add encoder control for setting color spaceYaowu Xu
This commit adds encoder side control for vp9 to set color space info in the output compressed bitstream. It also amends the "vp9_encoder_params_get_to_decoder" test to verify the correct color space information is passed from the encoder end to decoder end. Change-Id: Ibf5fba2edcb2a8dc37557f6fae5c7816efa52650
2015-01-13Enable decoder to pass through color space infoYaowu Xu
This commit added a field to vpx_image_t for indicating color space, the field is also added to YUV_BUFFER_CONFIG. This allows the color space information pass through the decoder from input stream to the output buffer. The commit also updated compare_img() function with added verification of matching color space to ensure the color space information to be correctly passed from encode to decoder in compressed vp9 streams. Change-Id: I412776ec83defd8a09d76759aeb057b8fa690371
2015-01-09Fix comments and color formatYaowu Xu
Replaced "color space" with "color format" in comments where color sampling format is concerned, so to differentiate from the concept defined in COLOR_SPACE. Change-Id: I8c935034c166b24307a99352dab1686531276bb8
2015-01-08Merge "vp9: add per-tile longjmp error handling"James Zern
2015-01-08Merge "vp9: fix -Wclobbered (longjmp + local variables)"James Zern
2015-01-08Merge "Remove unnecessary init_macroblockd."hkuang
2015-01-06Merge "Use -1 consistently as invalid buffer idx"Yaowu Xu
2015-01-06Use -1 consistently as invalid buffer idxYaowu Xu
Instead of mixed use of both -1 and INT_MAX. This also fixes a vp9 fuzzing test failure. Change-Id: I950ea94b44ec7cdb5232773bee30b104e342f52a
2015-01-06Enable coefficient range checking for 10-/12-bitDeb Mukherjee
Also fixes a broken build with --enable-coefficient-range-checking configuration option. Change-Id: Icc536f53088e8cec59dfb8f635668555fdb9125e
2014-12-30Remove unnecessary init_macroblockd.hkuang
macroblockd are init again inside decode_tiles and decode_tiles_mt. Change-Id: I1f42837864f095c319cdb24cec7d6aa6a3a4da50
2014-12-23vp9: fix -Wclobbered (longjmp + local variables)James Zern
Local variables used at the setjmp() site need to be marked volatile. Relevant excerpt from the 'man longjmp': =============== The values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria: · they are local to the function that made the corresponding setjmp(3) call; · their values are changed between the calls to setjmp(3) and longjmp(); and · they are not declared as volatile. =============== Change-Id: I093e6eeeedbf5f781d202248ca701ba2c29d3064
2014-12-19resolve visual studio warnings around initializersJim Bankoski
Change-Id: Id2ad4fb24242f7ca8fa7a152f0889fded4113613
2014-12-19vp9: add per-tile longjmp error handlingJames Zern
this avoids longjmp'ing from another thread on error which will cause undesired behavior Change-Id: Ic9074ed8cc4243944bf2539d6e482f213f4e8c86
2014-12-18Merge "make vp9 encoder static initializers thread safe"James Zern
2014-12-18make vp9 encoder static initializers thread safeJim Bankoski
Change-Id: If2d0888d13ebe52bc7c3b16f16319408a86ab6de
2014-12-16Merge "Revert "Revert "Add support for setting byte alignment."""Frank Galligan
2014-12-16Merge "Prevent decoder from using uninitialized entropy context."Yaowu Xu
2014-12-15Revert "Revert "Add support for setting byte alignment.""Frank Galligan
This reverts commit 91471d6aad285ff10e7582e485d8adadd1986fe2. Fixes the compile issues if post_proc is enabled. Change-Id: Ib40a15ce2c194f9b5adfa65a17ab01ddf60f5a59
2014-12-15Revert "Add support for setting byte alignment."Paul Wilkins
Fails to compile. Bad calls to vp9_alloc_frame_buffer and vp9_realloc_frame_buffer in postproc.c This reverts commit 399823b6f50fb7465f62822d1395e2192e7b07fc. Change-Id: I29f0e173f8e185d3a303cfdb17813e1eccb51e3a
2014-12-12Merge "Optimize bit_read_buffer."James Zern
2014-12-12Optimize bit_read_buffer.hkuang
Change-Id: Iee43c34909deec9787b29c1c33672213b9f049df
2014-12-12Add support for setting byte alignment.Frank Galligan
Add support for setting byte alignment on the Y, U, and V plane of the reference buffers. The byte alignment must be a power of 2, from 32 to 1024. A value of 0 sets legacy alignment. Change-Id: I7c1399622f7aa68e123646369216b32047dda73d
2014-12-11Remove unnecessary dqcoeff memset.hkuang
dqcoeff is set to be 0 on initialization. And set back to 0 after being used everytime. Change-Id: I32b8e149bba40a8d707849f737a8e49a691f319c
2014-12-11Prevent decoder from using uninitialized entropy context.Alexander Voronov
If decoding starts with intra-only frame, there is a possibility of using uninitialized entropy context, what leads to undefined behavior. Change-Id: Icbb64b5b1bd1e5de2a4bfa2884e56bc0a20840af
2014-12-09Merge "Clean up the logic of handling corrupted frame."hkuang
2014-12-08Add error handling for frame parallel decode and unit test for that.hkuang
Change-Id: I6e309e11f1641618d2424b7a2c0fe744b8974dec
2014-12-04Merge "vp9_reader: reorder struct members"James Zern
2014-12-04Clean up the logic of handling corrupted frame.hkuang
No more checking of corrupted reference frame as we skip decoding any non-intra frame in case of frame corrupted. Change-Id: I77d41bbb02fc5f61972740e2d411441eb6a17073
2014-12-02vp9: sync threads after a longjmpJames Zern
Synchronize all threads immediately as a subsequent decode call may cause a resize invalidating some allocations. fixes one aspect of crbug.com/437655 Change-Id: Ie993b62c2756478543206ddbe43ec6268d90a470
2014-11-24vp9_reader: reorder struct membersJames Zern
improves locality of reference Change-Id: Ia4d55bb8c98e479528d88303fa35e8c74fbf939d
2014-11-14Fix a bug in frame parallel decode and add a unit test for that.hkuang
A flush bug is discovered during putting frame parallel decoder into Android. This test will expose that bug. Change-Id: Ia047f27972f4da0471649f79f1f91e7695297473
2014-11-06Modify the frame context memory deallocationYunqing Wang
This patch was to fix the vpxdec fuzzing3 test failure. When an error occurs, setjmp() is invoked, which calls the decoder removing routine. In multiple thread situation, other threads could try to access the frame context memory that is already deallocated, thus causing a segfault. An invalid unit test was added for this issue. Change-Id: Ida7442154f3d89759483f0f4fe0324041fffb952
2014-11-05Merge "Totally remove prev_mi in VP9 decoder."hkuang
2014-11-05Totally remove prev_mi in VP9 decoder.hkuang
This will save the memory and improve the decode speed due to removing unnecessary memset of big prev_mi array for all the key frames. Decoding a all key frames 1080p video shows speed improve around 2%. Change-Id: I6284a445c1291056e3c15135c3c20d502f791c10
2014-11-05Merge "Simplify interface of write_selected_tx_size and read_tx_size"Hui Su
2014-11-04Simplify interface of write_selected_tx_size and read_tx_sizeHui Su
Change-Id: Ia2b2a895deefaaf7b34bf26df86add56dbab082c