summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_reconinter.h
AgeCommit message (Collapse)Author
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
2018-10-30clang-tidy: fix vp9/common parametersJohann
BUG=webm:1444 Change-Id: I1a14ad119b3bcbaddcf2291a7521513cf6425635
2018-09-15cosmetics: normalize include guardsJames Zern
use the recommended format [1] of: <PROJECT>_<PATH>_<FILE>_H_ [1] https://google.github.io/styleguide/cppguide.html#The__define_Guard "All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be <PROJECT>_<PATH>_<FILE>_H_." Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037
2017-09-05Remove get_filter_base() and get_filter_offset() in convolveLinfeng Zhang
so that the convolve functions are independent of table alignment. Change-Id: Ieab132a30d72c6e75bbe9473544fbe2cf51541ee
2017-04-25Clean vp9_highbd_build_inter_predictor() and highbd_inter_predictor()Linfeng Zhang
BUG=webm:1388 Change-Id: I7ee32e0c08f0fb41712a8cc640b2c5bba872421d
2017-04-25Update highbd convolve functions arguments to use uint16_t src/dstLinfeng Zhang
BUG=webm:1388 Change-Id: I6912de2639895d817ce850da8ea9f6c8fe21da42
2017-04-19Clean CONVERT_TO_BYTEPTR/SHORTPTR in convolveLinfeng Zhang
Replace by CAST_TO_BYTEPTR/SHORTPTR. The rule is: if a short ptr is casted to a byte ptr, any offset operation on the byte ptr must be doubled. We do this by casting to short ptr first, adding offset, then casting back to byte ptr. BUG=webm:1388 Change-Id: I9e18a73ba45ddae58fc9dae470c0ff34951fe248
2016-08-02vp9/common: apply clang-formatclang-format
Change-Id: Ie0f150fdcfcbf7c4db52d3a08bc8238ed1c72e3b
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
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-05-26Move inter_predictor to vp9_reconinter.hScott LaVarnway
This function was originally static. Change-Id: I1922fa86711ace884d9f394210b6bb9ea2a0bfe3
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-10-09Rename highbitdepth functions to use highbd prefixDeb Mukherjee
Uses highbd_ prefix convention consistently. Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-09-18Adds high bitdepth convolve, interpred & scalingDeb Mukherjee
Change-Id: Ie51c352a6b250547207cbc1ebba833a01ed053e3
2014-07-28Move vp9_dec_build_inter_predictors_* to decoder folder.hkuang
Change-Id: Ibe9fa28440cc79ba9f3504d78c7dca7bb01a23e1
2014-05-16Removing MACROBLOCKD dependency from loop filter.Dmitry Kovalev
Change-Id: I9ef40f3d95ab8f94f69e92ea25678a40956bc1ce
2014-03-03vp9_reconinter.h static functions in header converted to globalJim Bankoski
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-02-10Convert small header functions to inlineJim Bankoski
Change-Id: I4e5575f0d7ccfe2361b8cbf78e7dc079272c9f5f
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
2014-01-27Decoupling set_ref_ptrs() and vp9_setup_interp_filters().Dmitry Kovalev
Change-Id: I8d17867a4772554cbba2bd113cc5b4c99d50146d
2014-01-24Removing subpix_fn_table struct.Dmitry Kovalev
We don't use different filter kernels for x and y, it is always one kernel for both directions. Change-Id: Iefcbb02ec74bf46ea20d9dca672a3efd5d631517
2014-01-24Merge changes ↵James Zern
I826655a7,I5164df72,Iba9b198c,Ide9a6846,I4f51ce85,I0e6aa00f,Ic334da9a,I252f5f8a,I7865db2d,I13b434b1 * changes: test/: remove unnecessary extern "C"s top-level: add extern "C" to headers vpx_ports: add extern "C" to headers vpx: add extern "C" to headers vp9/encoder: add extern "C" to headers vp9/decoder: add extern "C" to headers vp9/common: add extern "C" to headers vp8/encoder: add extern "C" to headers vp8/decoder: add extern "C" to headers vp8/common: add extern "C" to headers
2014-01-23vp9/common: add extern "C" to headersJames Zern
Change-Id: Ic334da9aee968e33762c2b25d9fbad24c844b411
2014-01-22Rename set_scale_factors as set_ref_ptrsAdrian Grange
New name better describes what the function does. Change-Id: I33be1366a81f058a9854b804bcde211061187dc7
2014-01-11Merge "cosmetics: vp9_reconinter.h: make some variables const"James Zern
2014-01-03Adding RefBuffer struct.Dmitry Kovalev
Adding RefBuffer to simplify reference buffer management. The struct has a pointer to image data and scale factors relative to the current frame. Change-Id: If38eb1491ff687cc11428aee339f3e052e2c5d9e
2013-12-26cosmetics: vp9_reconinter.h: make some variables constJames Zern
Change-Id: If5cd0a1487e97c8e9d13dc2e078c6dceaf79de4f
2013-12-19Using single struct to represent scale factors.Dmitry Kovalev
Moving back to scale_factors struct. We don't need anymore x_offset_q4 and y_offset_q4 because both values are calculated locally inside vp9_scale_mv function. Change-Id: I78a2122ba253c428a14558bda0e78ece738d2b5b
2013-12-19Call set_scaled_offsets() just before scale_mv() call.Dmitry Kovalev
Before mv scaling it is required to calculate x_offset_q4/y_offset_q4 by calling set_scaled_offsets(). Now offset configuration can not be missed because it happens just before scale_mv(). Change-Id: I7dd1a85b85811a6cc67c46c9b01e6ccbbb06ce3a
2013-11-25Use separate inter predictors for enc/decJingning Han
The decoder will construct inter predictor using lazy border extension, while the encoder, going with multiple runs of motion search in the rate- distortion optimization loop for each block, does border extension at frame level. This commit makes separate the inter predictors for encoder and decoder, respectively. Change-Id: Ieca2fecba3a7201a6d64ef9f219e5d91e50559c3
2013-11-19Move vp9_setup_interp_filter() to encoderYaowu Xu
As it is used in encoder only. Change-Id: I5f2a8abbe72bb18cbf6ce36a3dc7e132aeae8ec2
2013-10-24Merge changes I1868fb75,I9ff504c6Dmitry Kovalev
* changes: Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE. Adding VP9_FRAME_MARKER constant.
2013-10-23Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.Dmitry Kovalev
Change-Id: I1868fb75ed88bfa65c1c2ca24677d65f2894d713
2013-10-22Improve scale_factors structYunqing Wang
The ref's scale_factors are set at frame level, and then copied for each partition block. Since the struct members are mostly constant, this patch separated the constant and non-constant members, and reduced struct copying. This gave 0.5% ~ 1.4% decoder speed gain. Change-Id: I94043bf5a6995c8042da52e5c661818dfa6f6d4c
2013-08-26Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the common/decoder.Dmitry Kovalev
Adding temporary "typedef BLOCK_SIZE BLOCK_SIZE_TYPE" which will go away after encoder's patch. Change-Id: I06ec6a6f079401439843ec981d1496234fd7775c
2013-08-09Moving scale_factors and related code to separate files.Dmitry Kovalev
Change-Id: I531829e5aee2a4a7a112d528ecccbddf052d0e74
2013-08-02Changing function arg type from int_mv* to MV*.Dmitry Kovalev
Change-Id: Ic878d31df2ce783a2c9a8c4bc9ed301ec8ffe25e
2013-07-18Merge scale_factors and scale_factors_uv.Ronald S. Bultje
This prevents a duplicate memcpy of a 128-byte struct every time set_scale_factors() is called (which is a lot), thus leading to a decrease from 3.7 MB to 1.85 MB of struct copying per 64x64 block RD/partition loop. Overall, this decreases encoding time of the first 50 frames of bus @ 1500kbps (speed 0) from 1min5.9 to 1min4.9, i.e. about a 1.5% overall speedup. We can likely get more gains by removing the copy of the other struct (and replacing it with an indexing) as well. Change-Id: I3dceb7e79f71e6fe911b11cc994cf89a869dde7a
2013-07-03Refactoring setup_pre_planes function.Dmitry Kovalev
Removing set_refs, adding set_ref function. Change-Id: I5635c478b106ae4e57d317f1c83d929644307e63
2013-06-27Decoder's code cleanup.Dmitry Kovalev
Using vp9_set_pred_flag function instead of custom code, adding decode_tokens function which is now called from decode_atom, decode_sb_intra, and decode_sb. Change-Id: Ie163a7106c0241099da9c5fe03069bd71f9d9ff8
2013-06-21Transforming scale_mv_component_q4 into scale_mv_q4 function.Dmitry Kovalev
Using MV instead of int_mv for function arguments. Change-Id: Ic25e13dccbc98fac1fa1b3255127e00cca2a57f6
2013-05-22Generalized intra 4x4 encoding for all sizesYaowu Xu
Change-Id: I1b86744fa247233c8df031b3f4b87b212c8dd094
2013-05-16Initial version of alpha channel supportJohn Koleszar
This is a mostly-working implementation of an extra channel in the bitstream. Configure with --enable-alpha to test. Notable TODOs: - Add extra channel to all mismatch tests, PSNR, SSIM, etc - Configurable subsampling - Variable number of planes (currently always uses all 4) - Loop filtering - Per-plane lossless quantizer - ARNR support This implementation just uses the same contents as the Y channel for the A channel, due to lack of content and general pain in playing back 4 channel content. A later patch will use the actual alpha channel passed in from outside the codec. Change-Id: Ibf81f023b1c570bd84b3064e9b4b8ae52e087592
2013-05-15Moving the same code to new function vp9_setup_scale_factors.Dmitry Kovalev
Change-Id: I2408ad22717784a40e23701ccb9d978265440e4f
2013-05-14Moving several static functions from vp9_reconinter.h to vp9_reconinter.c.Dmitry Kovalev
Change-Id: I5da9c16bab26f6ff0c9d3a2a29ef6c84f5093161
2013-05-08Merge "Eliminating several YV12_BUFFER_CONFIG usages." into experimentalDmitry Kovalev