summaryrefslogtreecommitdiff
path: root/vp9/decoder/vp9_decodemv.c
AgeCommit message (Collapse)Author
2015-07-02Merge "vp9_pred_common: inline vp9_get_tx_size_context"James Zern
2015-07-02Merge "vp9_pred_common: inline vp9_get_segment_id"James Zern
2015-06-22Remove tile paramScott LaVarnway
and added to MACROBLOCKD. Change-Id: I0e60aaa9f84bcc9f2376d71bd934f251baee38db
2015-06-16Merge "Update use_prev_frame_mvs flag in decoder."Scott LaVarnway
2015-06-15vp9_pred_common: inline vp9_get_tx_size_contextJames Zern
+ drop 'vp9_' prefix Change-Id: If3f3ec32d03026af78b8fcd82749e587a3f43059
2015-06-15vp9_pred_common: inline vp9_get_segment_idJames Zern
+ drop 'vp9_' prefix Change-Id: Id5a3c8d416dbdf93d9f4f1bde662f7b2c2290168
2015-06-11inline vp9_get_segdata()Scott LaVarnway
and change name. Change-Id: I706645cf9d9dc04f1b3b6ac80df80edb7f101854
2015-06-11inline vp9_segfeature_active()Scott LaVarnway
and changed name. Change-Id: Ie023ca66cc2c823032f58d4faeb53fd1863c94f3
2015-06-08Update use_prev_frame_mvs flag in decoder.Scott LaVarnway
Added check to see if last frame was all intra. This will eliminate two checks in find_mv_refs_idx(). Also, do not update the frame mvs if the current frame is all intra. This improved performance on material with frequent intra-only frames. Change-Id: I44a4042c3670ab0d38439d565062a0e2a1ba9d1e
2015-06-04Reducing size of MODE_INFO structScott LaVarnway
Reduced size from 124 bytes to 104 bytes. For decode only builds, it is reduced to 68 bytes. Change-Id: If9e6b92285459425fa086ab5a743d0a598a69de3
2015-06-02Remove counts paramScott LaVarnway
Moved to MACROBLOCKD. Change-Id: Icce765b334f2755f4fe2a4c39fb2ae2d7660d004
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-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-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-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-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
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-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-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
2014-10-31Bind motion vectors with frame buffer structure.hkuang
This will save a lot of memory for decoder due to removing of prev_mi, but prev_mi is still needed in encoder. So this will increase a little bit memory for encoder. Change-Id: I24b2f1a423ebffa55a9bd2fcee1077dac995b2ed
2014-10-22vp9_ethread: allocate frame contexts outside VP9_COMMON structYunqing Wang
This patch allocated frame contexts outside VP9_COMMON. This allows multiple threads to share the same copy of frame contexts, and reduces the overhead. It also guarantees the correct update of these contexts during bitstream packing. This patch doesn't change encoding result. Change-Id: Ic181a2460b891d1d587278a6d02d8057b9dbd353
2014-10-22Implement frame parallel decode for VP9.Hangyu Kuang
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-14Merge "Remove extra line."hkuang
2014-10-10Remove extra line.hkuang
Change-Id: I5e79c276d8953ae17cd35b2846e6e40660c037c3
2014-10-09Optimize the code to set the refernce frame right after reading the header.hkuang
Change-Id: I495cf4a366e06e3220ed132500b1ba1c8448f708
2014-10-09Remove unnecessary scale check in set_ref.hkuang
Scale check has been done in read_inter_block_mode_info. Change-Id: I6c86f93bd579109ed30ff13a04a30e35f5ae6fc5
2014-09-19Remove mi_grid_* structures.hkuang
mi_grid_* are arrays of pointer to pointer. They save the pointers that point to the MIs in cm->mi. But they are unnecessary and complicated. The original goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer inside MODE_INFO_t, same goal could be achieved. This commit totally removes the mi_grid_* structures. But there are still many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit will do on-demand MODE_INFO_t allocation in order to save these memories. Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
2014-07-28Add segmentation map array for current and last frame segmentation.hkuang
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-24Changed validation of reference frame sizeYaowu Xu
A previous change, https://gerrit.chromium.org/gerrit/#/c/70632, introduced a size validation for reference frames to insuare the input stream is a valid VP9 stream. However, the logic requiring all reference frames have valid size turned out to be too strict. In this commit, we modify the validation to require one of the reference frame has valid dimension. In addition, the decoder reports error whenever it detects the use of reference frame with invalid scalig ratio. Change-Id: If8efc312244087556cfe00f1fcbdff811268ebad
2014-04-22Renaming MB_PREDICTION_MODE to PREDICTION_MODE.Dmitry Kovalev
Actually, it would be great to have two separate enums INTRA_MODES and INTER_MODES in future. Change-Id: I6c4147cf0002853da9c1e03fe9514eab876f01c8
2014-04-01Renaming two members in MACROBLOCKD struct.Dmitry Kovalev
Renames: mi_8x8 -> mi mode_info_stride -> mi_stride Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-03-21Making c++ compiler happier.Dmitry Kovalev
Change-Id: Ie224e968589bdb0774dc112e6f6df56cc0447465
2014-03-18Fixing warnings/errors from c++ compiler.Dmitry Kovalev
Change-Id: Ia561dda53f2dd10e3a10a2df2adb8027ab19397a
2014-03-13Merge "Speeding up reading of intra block modes."Dmitry Kovalev
2014-03-12Speeding up reading of intra block modes.Dmitry Kovalev
Reimplementing sub8x8-reading of intra block modes in read_intra_frame_mode_info() and read_intra_block_mode_info(). Code looks more readable as well. Change-Id: Ia42fc7d0dad708bc0c7a8bff1f8b37809b843f40
2014-03-10Removing last_mi from MACROBLOCKD struct.Dmitry Kovalev
Change-Id: Ied12b39c55667b26fd3bf90eb331e601c53a10f6
2014-03-10Adding reusable get_y_mode_prob() function.Dmitry Kovalev
Change-Id: Iebd182d7aeebc0f8964b6fd35057449bb25b00c1
2014-03-05Removing vp9_onyxd_int.h file.Dmitry Kovalev
Moving VP9Decompressor struct from vp9_onyxd_int.h to vp9_onyxd.h. Change-Id: Ic86c15e44130541a7f692db43ef9109293f99ae8
2014-02-25Merge "Consistent names for reference_mode functions."Dmitry Kovalev
2014-02-19Consistent names for reference_mode functions.Dmitry Kovalev
Change-Id: I48c9e5e4ca21e11740c750ca2eabf7e8a51c52d2
2014-02-19Adding is_mv_valid() function.Dmitry Kovalev
Change-Id: I9d036244b558765b252d8c6681b22721cb2e51bb
2014-02-12Renaming skip_coeff to skip for consistency.Dmitry Kovalev
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-01-31static function convert to inline or global vp9_blockd.hJim Bankoski
Change-Id: Ifdd951f24932839f06d1c700371662511dde6ebe
2014-01-29Renaming "mbskip" to "skip".Dmitry Kovalev
Change-Id: I27a30b43eae026a77f92958e2238d02d9cdf7832
2014-01-24Renaming INTERPOLATION_TYPE to INTERP_FILTER.Dmitry Kovalev
Corresponding renames: subpel_kernel => interp_kernel vp9_get_filter_kernel() => vp9_get_interp_kernel() pred_filter_type => pred_interp_filter adaptive_pred_filter_type => adaptive_pred_interp_filter mcomp_filter_type => interp_filter read_interp_filter_type() => read_interp_filter() write_interp_filter_type() => write_interp_filter() fix_mcomp_filter_type() => fix_interp_filter() Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-16Deprecate the use of best_mv in decoding processJingning Han
This commit removes the use of best_mv in the decoding process. This variable can be replaced with nearest_mv. It saves a few cycles on assigning the values for best_mv. Change-Id: Ic183f9c1fb615c54efd7e6ccfedcf09d493435e4