summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_reconinter.h
AgeCommit message (Collapse)Author
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
2013-05-08Eliminating several YV12_BUFFER_CONFIG usages.Dmitry Kovalev
Change-Id: Ia85b987c935d545920dcae5a6f44136b1a08a008
2013-05-08Using loop to iterate through YV12_BUFFER_CONFIG planes.Dmitry Kovalev
Change-Id: I22f1066eb0022c8d75f65a78435ee4ffecdfe0c9
2013-05-07Make setup_pred_block subsampling-aware.John Koleszar
Code previously set up the pointers by scaling by MI_UV_SIZE, which is 4:2:0 only. Change-Id: Ic13a92895cff018ec1345736746ed84cb31e6e31
2013-04-26Grow MODE_INFO array to use an 8x8 basis.Ronald S. Bultje
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-22Move pre, second_pre to per-plane MACROBLOCKD dataJohn Koleszar
Continue moving framebuffers to per-plane data. Change-Id: I237e5a998b364c4ec20316e7249206c0bff8631a
2013-04-22reconinter: remove unnecessary functions, paramsJohn Koleszar
Removes the redundant dst pointers from vp9_build_inter_predictors_sb{y,uv} and the remaining mb specific functions. Change-Id: I7b6bf439d9394b85ea79b4fe61a3ffc1025720da
2013-04-19Move dst to per-plane MACROBLOCKD dataJohn Koleszar
First in a series of commits moving the framebuffers pointers to per-plane data, so that they can be indexed numerically rather than by name. Change-Id: I6e0d60fd4d51e6375c384eb7321776564df21775
2013-04-19make build_inter_predictors block size agnostic (split)John Koleszar
All build_inter_predictors can now be serviced by the same inner function. Change-Id: I40b08bee8f047286db4b1aad9dcae37b879c3f2a
2013-04-18make buid_inter_predictors block size agnostic (chroma)John Koleszar
Updates to make non-SPLITMV inter predictors work for all plane types. Change-Id: I25dbef40b7ffcac30254b43eed1e22fc732378ae
2013-04-18Removing rounding from UV MV calculationJohn Koleszar
Consider the previous behavior for the MV 1 3/8 (11/8 pel). In the existing code, the fractional part of the MV is considered separately, and rounded is applied, giving a result of 6/8. Rounding is not required in this case, as we're increasing the precision from a q3 to a q4, and the correct value 11/16 can be represented exactly. Slight gain observed (+.033 average on derf) Change-Id: I320e160e8b12f1dd66aa0ce7966b5088870fe9f8
2013-04-18make buid_inter_predictors block size agnostic (luma)John Koleszar
This commit converts the luma versions of vp9_build_inter_predictors_sb to use a common function. Update the convolution functions to support block sizes larger than 16x16, and add a foreach_predicted_block walker. Next step will be to calculate the UV motion vector and implement SBUV, then fold in vp9_build_inter16x16_predictors_mb and SPLITMV. At the 16x16, 32x32, and 64x64 levels implemented in this commit, each plane is predicted with only a single call to vp9_build_inter_predictor. This is not yet called for SPLITMV. If the notion of SPLITMV/I8X8/I4X4 goes away, then the prediction block walker can go away, since we'll always predict the whole bsize in a single step. Implemented using a block walker at this stage for SPLITMV, as a 4x4 "prediction block size" within the BLOCK_SIZE_MB16X16 macroblock. It would also support other rectangular sizes too, if the blocks smaller than 16x16 remain implemented as a SPLITMV-like thing. Just using 4x4 for now. There's also a potential to combine with the foreach_transformed_block walker if the logic for calculating the size of the subsampled transform is made more straightforward, perhaps as a consequence of supporing smaller macroblocks than 16x16. Will watch what happens there. Change-Id: Iddd9973398542216601b630c628b9b7fdee33fe2
2013-04-18Make the use of pred buffers consistent in MB/SBJingning Han
Use in-place buffers (dst of MACROBLOCKD) for macroblock prediction. This makes the macroblock buffer handling consistent with those of superblock. Remove predictor buffer MACROBLOCKD. Change-Id: Id1bcd898961097b1e6230c10f0130753a59fc6df
2013-04-16Optimize the scaling calculationYunqing Wang
In decoder, the scaling calculation, such as (mv * x_num / x_den), is fairly time-consuming. In this patch, we check if the scaling happens or not at frame level, and then decide which function to call to skip scaling calculation when no scaling is needed. Tests showed a 3% decoder performance gain. Change-Id: I270901dd0331048e50368cfd51ce273dd82b8733
2013-04-12Enable inter predictor for rectangular block sizeJingning Han
Combine superblock inter predictors into a unified function that allows configurable block width and height. The inter predictions of block sizes smaller than 16x16 are handled differently. To be continued on merging them later. Change-Id: I14075959dd5e221f00c205c99ca35c1c31ef728e
2013-04-11WIP: removing predictor buffer usage from decoderScott LaVarnway
This patch will use the dest buffer instead of the predictor buffer. This will allow us in future commits to remove the extra mem copy that occurs in the dequant functions when eob == 0. We should also be able to remove extra params that are passed into the dequant functions. Change-Id: I7241bc1ab797a430418b1f3a95b5476db7455f6a
2013-03-27Removing redundant function arguments.Dmitry Kovalev
Almost all arguments for vp9_build_inter32x32_predictors_sb and vp9_build_inter64x64_predictors_sb can be deduced from the first macroblock argument. Change-Id: I5d477a607586d05698d5b3b9b9bc03891dd3fe83
2013-02-26Spatial resamping of ZEROMV predictorsJohn Koleszar
This patch allows coding frames using references of different resolution, in ZEROMV mode. For compound prediction, either reference may be scaled. To test, I use the resize_test and enable WRITE_RECON_BUFFER in vp9_onyxd_if.c. It's also useful to apply this patch to test/i420_video_source.h: --- a/test/i420_video_source.h +++ b/test/i420_video_source.h @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource { virtual void FillFrame() { // Read a frame from input_file. + if (frame_ != 3) if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) { limit_ = frame_; } This forces the frame that the resolution changes on to be coded with no motion, only scaling, and improves the quality of the result. Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
2013-02-26Removing redundant 'extern' keyword from function declarations.Dmitry Kovalev
Change-Id: I893fa36297b9bd9cff93d082f1736f6860b15c0d
2013-02-26Refactor inter recon functions to support scalingJohn Koleszar
Ensure that all inter prediction goes through a common code path that takes scaling into account. Removes a bunch of duplicate 1st/2nd predictor code. Also introduces a 16x8 mode for 8x8 MVs, similar to the 8x4 trick we were doing before. This has an unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that case for now. Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba
2013-02-05Convert subpixel filters to use convolve frameworkJohn Koleszar
Update the code to call the new convolution functions to do subpixel prediction rather than the existing functions. Remove the old C and assembly code, since it is unused. This causes a 50% performance reduction on the decoder, but that will be resolved when the asm for the new functions is available. There is no consensus for whether 6-tap or 2-tap predictors will be supported in the final codec, so these filters are implemented in terms of the 8-tap code, so that quality testing of these modes can continue. Implementing the lower complexity algorithms is a simple exercise, should it be necessary. This code produces slightly better results in the EIGHTTAP_SMOOTH case, since the filter is now applied in only one direction when the subpel motion is only in one direction. Like the previous code, the filtering is skipped entirely on full-pel MVs. This combination seems to give the best quality gains, but this may be indicative of a bug in the encoder's filter selection, since the encoder could achieve the result of skipping the filtering on full-pel by selecting one of the other filters. This should be revisited. Quality gains on derf positive on almost all clips. The only clip that seemed to be hurt at all datarates was football (-0.115% PSNR average, -0.587% min). Overall averages 0.375% PSNR, 0.347% SSIM. Change-Id: I7d469716091b1d89b4b08adde5863999319d69ff