summaryrefslogtreecommitdiff
path: root/vp9/decoder
AgeCommit message (Collapse)Author
2015-05-28Merge "Add error handling when running out of free frame buffers."hkuang
2015-05-27Add error handling when running out of free frame buffers.hkuang
Change-Id: If28b59b9521204a6e3aecedcf75932d76a752567
2015-05-20[decoder] Optimize context buffer re-allocationMinghai Shang
1. Check existing buffer sizes when re-allocate context buffers. 2. Don't need to set mi buffers to 0 during setup_mi. Change-Id: I6b48b0e077a4d804312b605ad0dc34aec5795a6d
2015-05-16dec_build_inter_predictors: don't return a void fnJames Zern
split call of extend_and_predict() and return, fixes visual studio build warning since: 0a80164 Move mc_buf to cut down size of MACROBLOCKD. Change-Id: I7cdf712941ef773a07f038539cb8080dc27861cd
2015-05-15vp9_decodeframe.c: make a function staticJames Zern
silences a missing declaration warning Change-Id: I2f49ebca9ba7a47f3c48f5fe919b90cd4114a9bc
2015-05-15Merge "Move mc_buf to cut down size of MACROBLOCKD."Frank Galligan
2015-05-14Move mc_buf to cut down size of MACROBLOCKD.Frank Galligan
Change-Id: Icea64b9e5632b41aaa7cd7018c501d6add9b7a7f
2015-05-13Relocate memory operations for common codeJohann
With the sad functions, and hopefully the variance functions soon, moving to the vpx_dsp location, place the defines used in the reference C code in a common location. Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
2015-05-11Merge "Reduce border extension by 1 line"Adrian Grange
2015-05-11Sort variables dependency in read_uncompressed_headerJingning Han
Remove a few repeated data structure reads from read_uncompressed_header. Change-Id: I6eb741b39f9415ad0aa4631dfbf4a1ace4eba56a
2015-05-07Merge "Move shared SAD code to vpx_dsp"Johann
2015-05-06Move shared SAD code to vpx_dspJohann
Create a new component, vpx_dsp, for code that can be shared between codecs. Move the SAD code into the component. This reduces the size of vpxenc/dec by 36k on x86_64 builds. Change-Id: I73f837ddaecac6b350bf757af0cfe19c4ab9327a
2015-05-06Reduce border extension by 1 lineAdrian Grange
The code was using one row too many. Change-Id: Ie0c05d02c22ae3d0d13d3b6565c40de3bc4fa17a
2015-05-06Correct the inter prediction coordinate calculation which greatly reduced thehkuang
times of border extension. Change-Id: I8e5bd590cc696ee71cfe1f4cc66c12fb24aaf44e
2015-05-01FIX: Use correct above/left in read_intra_frame_mode_infoScott LaVarnway
Should be using xd->above_mi and xd->left_mi. Change-Id: Ifab83512db5491a955a3ed44a2d6e3b25b5ae5a5
2015-04-29vp9_decodeframe: simplify compare_tile_buffersJames Zern
return the difference between the 2 buffer sizes rather than exactly -1/0/1. Change-Id: Idf1ccff7088b31845470bcc71bea5927b0598cc7
2015-04-28vpx_mem: remove vpx_memsetJames Zern
vestigial. replace instances with memset() which they already were being defined to. Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28WIP: Use LUT for y_dequant/uv_dequantScott LaVarnway
instead of calculating every block. Change-Id: Ib19ff2546be8441f8755ae971ba2910f29412029
2015-04-21Revert "Remove mi_grid_* structures."Scott LaVarnway
(see I3a05cf1610679fed26e0b2eadd315a9ae91afdd6) For the test clip used, the decoder performance improved by ~2%. This is also an intermediate step towards adding back the mode_info streams. Change-Id: Idddc4a3f46e4180fbebddc156c4bbf177d5c2e0d
2015-04-15Reorganize *_rtcd() calling conventionsJohann
Change-Id: Ib1e17d8aae9b713b87f560ab5e49952ee2bfdcc2
2015-04-08Remove unnecessary mv clamp with on demand border extension.hkuang
Change-Id: Ia2956f06f409b9b0ca8320ca4c1ea5680e938402
2015-04-08Refactor dec_build_inter_predictorsFrank Galligan
Refactor the loops in dec_build_inter_predictors to try and decrease the number of instructions. Limited testing saw about 1% perf increase on x86 and about 0.67 % perf increase on Arm. Change-Id: I69cfe6335bb562fbaaebf43fb3f5c5a2a28882a2
2015-04-02Fix error of "Left shift of negative value -1".hkuang
Change-Id: Ia4f3feb20df0e89cc51b02def858e12e927312cc
2015-04-01Fix 10-bit video decode failure with --frame-parallel mode.hkuang
Also add unit test to avoid same error in the future. Issue:981 Change-Id: Iaf9889d8d5514cfdff1ea098e6ae133be56d501f
2015-03-31Move vp9_coef_con_tree to common/hui su
This tree should be defined in common/, as it is needed for both encoder and decoder. Change-Id: I4f5cbc80025cf2ced14182c98f7c82dc7d0f87db
2015-03-09Refactor read_intra_frame_mode_infoFrank Galligan
Change-Id: I56b0614154408e8ec613784b2007374df00fbf17
2015-03-06Remove some unnecessary code in thread context copy.hkuang
Change-Id: Iddf098e1bae9c10fc2f325f84156f50a0bd0055a
2015-03-06Merge "Only wait for previous frame's motion vector if needed."Hangyu Kuang
2015-03-05Only wait for previous frame's motion vector if needed.Hangyu Kuang
Change-Id: Iecce685a33b64844446c0009f21bc85566d7469f
2015-03-05Merge "Fix a tsan error bug in frame parallel decode."hkuang
2015-03-04Merge "Remove unnecessary loopfilter init."hkuang
2015-03-04Make encoder buffer allocation dynamicAdrian Grange
Frame buffers are now allocated dynamically on-demand. Entries in the reference frame map, cm->ref_frame_map, may now be set to -1 (INVALID_IDX) to indicate that there is not a valid reference buffer in that "slot". All slots in the reference frame map are now initialized to the empty state (-1) and each buffer is initialized to have a reference count of 0. Change-Id: Id1afe98de98db4ae8b2dfefed7889c3b28c68582
2015-03-03Fix a tsan error bug in frame parallel decode.hkuang
A frame may be waiting for an out of border pixel from another frame. A frame's row progress variable is set to -1 when start being decoded and another frame may be waiting for -2 row pixel from this frame. In this case, vp9_frameworker_wait will return directly and skip the waiting which leads to tsan error between threads. Change-Id: Id16604915fb598b823e34393f696e3aa46fb6422
2015-03-03Remove unnecessary loopfilter init.hkuang
Loopfilters are init in vp9_decode_frame. Change-Id: I4fbf6286b9b231451452e4ef3c19877a7b9a6768
2015-02-23fix the propagation of color space info in decoderYaowu Xu
This addresses the issue #960 Change-Id: Iddf45b4bd4f53cb0ddfd879e800a071cd843b915
2015-02-19Optimize the dequantization process on decoder side.Hangyu Kuang
Change-Id: I00621ff7165bbe86a18794b4a816976c9effaf78
2015-02-10Remove unnecessary border extension when frame size change.hkuang
This border extension is not needed with on-demond border extension. Change-Id: I8501b37f5f756dc7e874cef4c1cfdbfa9a16112a
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