summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_convolve.c
AgeCommit message (Collapse)Author
2013-03-26Implicit weighted prediction experimentDeb Mukherjee
Adds an experiment to use a weighted prediction of two INTER predictors, where the weight is one of (1/4, 3/4), (3/8, 5/8), (1/2, 1/2), (5/8, 3/8) or (3/4, 1/4), and is chosen implicitly based on consistency of the predictors to the already reconstructed pixels to the top and left of the current macroblock or superblock. Currently the weighting is not applied to SPLITMV modes, which default to the usual (1/2, 1/2) weighting. However the code is in place controlled by a macro. The same weighting is used for Y and UV components, where the weight is derived from analyzing the Y component only. Results (over compound inter-intra experiment) derf: +0.18% yt: +0.34% hd: +0.49% stdhd: +0.23% The experiment suggests bigger benefit for explicitly signaled weights. Change-Id: I5438539ff4485c5752874cd1eb078ff14bf5235a
2013-02-27Use 256-byte aligned filter tablesJohn Koleszar
This avoids duplicating all the filters twice. Includes fixups to the convolve routines and associated tests to make this work. Change-Id: I922f86021594e55072ddb63b42b2313605db6e00
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-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-11Faster convolve8_avg.Christian Duvivier
Implement convolve8_avg using common functions which are already optimized instead of using more obscure ones which have only C versions. Encoder overall speed-up of about 12%. Change-Id: I8c57aa76936c8a48f22b115f19f61d9f2ae1e4b6
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
2013-02-05Add 8-tap generic convolverJohn Koleszar
This commit introduces a new convolution function which will be used to replace the existing subpixel interpolation functions. It is much the same as the existing functions, but allows for changing the filter kernel on a per-pixel basis, and doesn't bake in knowledge of the filter to be applied or the size of the resulting block into the function name. Replacing the existing subpel filters will come in a later commit. Change-Id: Ic9a5615f2f456cb77f96741856fc650d6d78bb91