2010-05-18 11:58:33 -04:00
|
|
|
/*
|
2010-09-09 08:16:39 -04:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 11:58:33 -04:00
|
|
|
*
|
2010-06-18 12:39:21 -04:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 16:19:40 -04:00
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
2010-06-18 12:39:21 -04:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 16:19:40 -04:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 11:58:33 -04:00
|
|
|
*/
|
|
|
|
|
2012-11-29 16:36:10 -08:00
|
|
|
#ifndef VP9_COMMON_VP9_RECONINTER_H_
|
|
|
|
#define VP9_COMMON_VP9_RECONINTER_H_
|
2010-05-18 11:58:33 -04:00
|
|
|
|
2012-12-18 15:31:19 -08:00
|
|
|
#include "vpx/vpx_integer.h"
|
2012-11-28 10:41:40 -08:00
|
|
|
#include "vp9/common/vp9_onyxc_int.h"
|
2012-07-18 13:43:01 -07:00
|
|
|
|
Convert subpixel filters to use convolve framework
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-01-28 16:59:03 -08:00
|
|
|
struct subpix_fn_table;
|
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_y,
|
2012-08-16 11:04:34 -07:00
|
|
|
int dst_ystride,
|
|
|
|
int clamp_mvs);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
2012-08-08 17:12:12 -07:00
|
|
|
int dst_uvstride);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_y,
|
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
2012-08-08 17:12:12 -07:00
|
|
|
int dst_ystride,
|
|
|
|
int dst_uvstride);
|
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_y,
|
2012-08-09 16:07:41 -07:00
|
|
|
int dst_ystride);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
2012-08-09 16:07:41 -07:00
|
|
|
int dst_uvstride);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_y,
|
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
Dual 16x16 inter prediction.
This patch introduces the concept of dual inter16x16 prediction. A
16x16 inter-predicted macroblock can use 2 references instead of 1,
where both references use the same mvmode (new, near/est, zero). In the
case of newmv, this means that two MVs are coded instead of one. The
frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual
prediction, or per-MB single/dual prediction selection ("hybrid"), in
which case a single bit is coded per-MB to indicate whether the MB uses
single or dual inter prediction.
In the future, we can (maybe?) get further gains by mixing this with
Adrian's 32x32 work, per-segment dual prediction settings, or adding
support for dual splitmv/8x8mv inter prediction.
Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most
gain is at medium/high bitrates, but there's minor gains at low bitrates
also. Output was confirmed to match between encoder and decoder.
Note for optimization people: this patch introduces a 2nd version of
16x16/8x8 sixtap/bilin functions, which does an avg instead of a
store. They may want to look and make sure this is implemented to
their satisfaction so we can optimize it best in the future.
Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
2011-12-06 11:53:02 -08:00
|
|
|
int dst_ystride,
|
|
|
|
int dst_uvstride);
|
2011-04-28 10:53:59 -04:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
|
2012-12-18 15:31:19 -08:00
|
|
|
uint8_t *dst_y,
|
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
2013-01-05 18:20:25 -08:00
|
|
|
int dst_ystride,
|
|
|
|
int dst_uvstride);
|
|
|
|
|
|
|
|
extern void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
|
|
|
|
uint8_t *dst_y,
|
|
|
|
uint8_t *dst_u,
|
|
|
|
uint8_t *dst_v,
|
2012-08-20 17:45:36 -07:00
|
|
|
int dst_ystride,
|
|
|
|
int dst_uvstride);
|
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_inter_predictors_mb(MACROBLOCKD *xd);
|
2010-05-18 11:58:33 -04:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_inter_predictors_b(BLOCKD *d, int pitch,
|
Convert subpixel filters to use convolve framework
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-01-28 16:59:03 -08:00
|
|
|
struct subpix_fn_table *sppf);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
|
Convert subpixel filters to use convolve framework
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-01-28 16:59:03 -08:00
|
|
|
struct subpix_fn_table *sppf);
|
2011-08-24 14:42:26 -04:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d,
|
2012-10-17 11:40:00 -07:00
|
|
|
int pitch);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
|
2012-10-17 11:40:00 -07:00
|
|
|
BLOCKD *d, int pitch);
|
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd);
|
2012-10-31 16:09:17 -07:00
|
|
|
|
2012-10-30 16:25:53 -07:00
|
|
|
extern void vp9_setup_interp_filters(MACROBLOCKD *xd,
|
2012-08-15 11:00:53 +01:00
|
|
|
INTERPOLATIONFILTERTYPE filter,
|
2012-10-30 17:53:32 -07:00
|
|
|
VP9_COMMON *cm);
|
2010-05-18 11:58:33 -04:00
|
|
|
|
2012-12-18 15:31:19 -08:00
|
|
|
#endif // VP9_COMMON_VP9_RECONINTER_H_
|