summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_reconinter.c
AgeCommit message (Collapse)Author
2019-10-03vp9/common/vp9_reconinter: fix int sanitizer warningsHien Ho
Unit Test: VP9/InvalidFileTest implicit conversion from type 'int' of value -65536 (32-bit, signed) to type 'int16_t' (aka 'short') changed the value to 0 (16-bit, signed) BUG=webm:1615 BUG=webm:1645 Change-Id: I4ce0c6abf8b5bf43ee43e958ad75d9fa28b23eee
2019-04-02use 64bit integer for memory offset.Jerome Jiang
Change-Id: I3d27286202e26ceecf4e551732b7d536d224d920
2019-03-29update .clang-format for version clang-7.0.1 update.Hien Ho
added files that are affected by clang-format version 7. BUG=b/120815481 Change-Id: I40662ce962e4f4b1fcdf183b700f85cc5c0f9f82
2019-03-11vp9-decoder: use long int for buffer offset.Jerome Jiang
integer overflow when frame size too big. BUG=webm:1603 Change-Id: Ifbb81b5fb6a2043d09d403e7c50ab8d7bf125dca
2017-04-25Clean vp9_highbd_build_inter_predictor() and highbd_inter_predictor()Linfeng Zhang
BUG=webm:1388 Change-Id: I7ee32e0c08f0fb41712a8cc640b2c5bba872421d
2016-08-02vp9/common: apply clang-formatclang-format
Change-Id: Ie0f150fdcfcbf7c4db52d3a08bc8238ed1c72e3b
2016-07-06Remove decode asserts from better-hw-compatibilityDebargha Mukherjee
Safer to have the decoder operate normally and have better-hw-compatibility only implement encoding changes. Fixes some test failures. Change-Id: I0dd70d002e4e893992f0cd59774b9363e6f7fe76
2016-05-18Move, rename, and inline high_inter_predictor.Alex Converse
The inlining mirrors what was done with the low bit depth inter_predictor. And the new highbd_inter_predictor name is more consistent with other high bit depth functions. Change-Id: I96437f745759aeec6260c6e39a974bf36f1c211c
2016-01-19VP9: Eliminate MB_MODE_INFOScott LaVarnway
Change-Id: Ifa607dd2bb366ce09fa16dfcad3cc45a2440c185
2016-01-05Assert no mv clamping for scaled referencesYaowu Xu
Under --enable-better-hw-compabibility, this commit adds the asserts that no mv clamping is applied for scaled references, so when built with this configure option, decoder will assert if an input bitstream triggger mv clamping for scaled reference frames. Change-Id: I786e86a2bbbfb5bc2d2b706a31b0ffa8fe2eb0cb
2016-01-04Assert no 8x4/4x8 partition for scaled referencesYaowu Xu
This commit adds a new configure option: --enable-better-hw-compatibility The purpose of the configure option is to provide information on known hardware decoder implementation bugs, so encoder implementers may choose to implement their encoders in a way to avoid triggering these decoder bugs. The WebM team were made aware of that a number of hardware decoders have trouble in handling the combination of scaled frame reference frame and 8x4 or 4x8 partitions. This commit added asserts to vp9 decoder, so when built with above configure option, the decoder can assert if an input bitstream triggers such decoder bug. Change-Id: I386204cfa80ed16b50ebde57f886121ed76200bf
2015-09-08Fix the sub8x8 block inter prediction with scaled reference frameJingning Han
Sync the encoder's buffer offset calculation for sub8x8 block motion compensated prediction with scaled reference frame to match the decoder's behavior. This resolves an enc/dec mismatch issue when sub8x8 inter mode with scaled is turned on. Change-Id: I4bab3672b007a5ae0c992f8a701341892d2458b0
2015-08-10Make build_inter_predictors static functionJingning Han
Remove the function declaration from vp9_reconinter.h file. Change-Id: I193562151b69ece19b9ee2efa1a791fe2522cca0
2015-07-31Code refactor on InterpKernelZoe Liu
It in essence refactors the code for both the interpolation filtering and the convolution. This change includes the moving of all the files as well as the changing of the code from vp9_ prefix to vpx_ prefix accordingly, for underneath architectures: (1) x86; (2) arm/neon; and (3) mips/msa. The work on mips/drsp2 will be done in a separate change list. Change-Id: Ic3ce7fb7f81210db7628b373c73553db68793c46
2015-07-06remove vp9_get_interp_kernel()James Zern
expose filter_kernels[] and do the table lookup directly Change-Id: I0b10bff0327c3e01a723736141a9ffd377cd3d20
2015-05-26Move inter_predictor to vp9_reconinter.hScott LaVarnway
This function was originally static. Change-Id: I1922fa86711ace884d9f394210b6bb9ea2a0bfe3
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-01use MAX_MB_PLANE consistentlyYaowu Xu
Change-Id: Ic416a7f145001a88f5a7f70dde9b1edbc1b69381
2015-02-04Account for chroma component costs in RTC mode decisionJingning Han
This commit allows the encoder to account for additional chroma plane costs in the mode decision process, if the current block potentially contains significant color change. It improves the visual quality at very low bit-rates. The compression performance of dark720p is improved by 12.39% in speed 6. For jimred at 150 kbps, the PSNR of V component (red) increased by 0.2 dB, at the expense of about 5% increase in encoding time. Note that for sequences where the chroma components are fairly consistent, the encoding time increase is negligible. On average the rtc set compression performance is improved by 1.172% in PSNR and 1.920% in SSIM. Change-Id: Ia55b24ef23a25304f7ec9958fbf07fd6e658505c
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-11-24Fix a tautological assert.Alex Converse
Change-Id: I90ad08823e1d038384536fa9f458caadc2c87f38
2014-10-09Rename highbitdepth functions to use highbd prefixDeb Mukherjee
Uses highbd_ prefix convention consistently. Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-09-29Miscellaneous decoder changes for high bitdepthDeb Mukherjee
Also includes yv12 config changes. Change-Id: Iacf40d8bf486815b54c32a127ce3cd4516b7e44f
2014-09-25Avoid calling vp9_is_scaled two times in a function.hkuang
Use a local variable to hold the result of vp9_is_scaled. Change-Id: I5e203909805923e20eefef596bc84424da47dbe2
2014-09-25Fix a couple of commentsYaowu Xu
The first comment is obselete given the way is now normative in VP9 bitstream. The second comment line was too long. Change-Id: I6546585babf60d466485ddcf2daa6d2fa79e999a
2014-09-24Correct the condition for border extensionYaowu Xu
As reported in issue #850, the condition for border extension was not complete. This commit added the case when the scaling is enabled. This fixes issue #850. Change-Id: I67768b23f0dcc4ac9a9aa0a0825b0fe8cb85a72e
2014-09-24Merge "Fix invalid memory access on 2x downscale."Yaowu Xu
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-09-18Adds high bitdepth convolve, interpred & scalingDeb Mukherjee
Change-Id: Ie51c352a6b250547207cbc1ebba833a01ed053e3
2014-09-15Fix invalid memory access on 2x downscale.Alexander Voronov
The issue was discovered on bitstream with 2x vertical downscale. For zero MVs, y_pad is set to 1 only when vertical convolution is required. The original code assumes that for y_step_q4 == 32 we don't perform vertical convolution. But vp9_setup_scale_factors_for_frame() sets convolve functions so that when x_step and y_step are both not equal to 16, convolve in both directions is performed. And convolve() unconditionally subtracts one stride from source pointer when calls convolve_horiz(). This leads to invalid memory access. Change-Id: I882dfa6081a58e172b5ffa55842bfcd6727f10bf
2014-07-28Move vp9_dec_build_inter_predictors_* to decoder folder.hkuang
Change-Id: Ibe9fa28440cc79ba9f3504d78c7dca7bb01a23e1
2014-07-11Remove an unused parameterYaowu Xu
Change-Id: I6ad6fd75dc3c9e6218d88148cf49e205398e2af5
2014-07-10Fix a bug in boundary checking.hkuang
Change-Id: Ifc741da9da6f61c8d3c1f675ec6b8a96570f877d
2014-06-18BITSTREAM: Handle transform size and motion vectors more logically for non-420.Alex Converse
This breaks the profile 1 bitstream. Don't force non420 uv transform size to 1/4 y size. In the 4:2:0 case the chroma corresponding to a luma block is 1/4 its size. In the 4:4:4 case chroma and luma planes are the same size. Disallowing larger transforms can result in a loss of compression efficiency and is inconsistent. For sub-8x8 blocks only average corresponding motion vectors. 4:2:0 and profile 0 behavior remains unchanged. Change-Id: I560ae07183012c6734dd1860ea54ed6f62f3cae8
2014-05-16Removing MACROBLOCKD dependency from loop filter.Dmitry Kovalev
Change-Id: I9ef40f3d95ab8f94f69e92ea25678a40956bc1ce
2014-04-03Removing interp_kernel from MACROBLOCKD.Dmitry Kovalev
Now interp_kernel is obtained when it is really required (based on mbmi->interp_filter value). Change-Id: I4c7a93c179d1045eba16e7526c293d02c9b8b47e
2014-04-01Renaming two members in MACROBLOCKD struct.Dmitry Kovalev
Renames: mi_8x8 -> mi mode_info_stride -> mi_stride Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-03-24Change back the scaling calculation.hkuang
Let the calculation to be compatible with Google's HW implementation. Change-Id: I22e179888cdb0419e230351c0a47661b37051fef
2014-03-17Fix the md5 mismatch for some scale cases.hkuang
Fixes issue #731 Change-Id: Id313e84b8fb4ff20f6a4e1ed11cb601927888318
2014-03-12Revert "With on demand border extension, clamping the MV"Yaowu Xu
This reverts commit b0fec6ab4a61ded1ab2ade188987631f53c4e9c1. Change-Id: I9acd8ee0423f22d92138f11579611ff959331013
2014-03-12Revert "Remove dec_build_inter_predictors() parameters"Yaowu Xu
This reverts commit 9650b9d72aa236e76c54b4f0acebd6bf1d6bbe48. Change-Id: I841c4a4734170fda63469e32adc10703aa4bf0fa
2014-03-03vp9_reconinter.h static functions in header converted to globalJim Bankoski
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-03-01Remove dec_build_inter_predictors() parametersYaowu Xu
There were two parameters not in use, this commit removed them. Change-Id: Ia03a73b9a2521400bed539df45574e34214ed93a
2014-02-14Cleanup some comments.Adrian Grange
Change-Id: I568861ba1d43620865ad9a98a97eef37a51fd856
2014-02-04Merge "Moving x1 & y1 calculation under if condition."Dmitry Kovalev
2014-02-04With on demand border extension, clamping the MVhkuang
is not longer needed. Change-Id: I40c37ef18c67ab27fc336694dfca3c43a87c47ca
2014-02-03Moving x1 & y1 calculation under if condition.Dmitry Kovalev
Change-Id: Iae787d491f7cfe24855ef8f2d04e2c6c19350378
2014-02-03vp9_filter.h: rename interp_kernel typeJames Zern
-> InterpKernel avoids conflicts in variable names, fixing the build with various toolchains. broken since: 8691565 Removing subpix_fn_table struct. Change-Id: Ib5f6fdbcb494a97b62c75b99d4d826ff25d4c981