ref: 1259b0b22e4a9f500e4dafad3323a6bd6264f56f
parent: 18433aef17d9c4674de98a329e4e46e5677f846e
author: Ronald S. Bultje <rbultje@google.com>
date: Thu Apr 19 06:07:14 EDT 2012
Fix splitmv/compound prediction when eightpel is enabled. Change-Id: I9d6083d54e3d478ec20dc6dc48d3f45eb5c7e16b
--- a/vp8/common/filter.c
+++ b/vp8/common/filter.c
@@ -860,6 +860,26 @@
filter_block2d_second_pass_8(FData + 4*(Interp_Extend-1), output_ptr, output_pitch, 4, 4, 4, 4, VFilter);
}
+static void filter_block2d_avg_8
+(
+ unsigned char *src_ptr,
+ unsigned char *output_ptr,
+ unsigned int src_pixels_per_line,
+ int output_pitch,
+ const short *HFilter,
+ const short *VFilter
+)
+{
+ int FData[(3+Interp_Extend*2)*4]; /* Temp data buffer used in filtering */
+
+ /* First filter 1-D horizontally... */
+ filter_block2d_first_pass_8(src_ptr - ((Interp_Extend-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 3+Interp_Extend*2, 4, HFilter);
+
+ /* then filter verticaly... */
+ filter_block2d_second_pass_avg_8(FData + 4*(Interp_Extend-1), output_ptr, output_pitch, 4, 4, 4, 4, VFilter);
+}
+
void vp8_eighttap_predict_c
(
unsigned char *src_ptr,
@@ -879,6 +899,25 @@
filter_block2d_8(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter);
}
+void vp8_eighttap_predict_avg4x4_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+
+ HFilter = vp8_sub_pel_filters_8[xoffset]; /* 8 tap */
+ VFilter = vp8_sub_pel_filters_8[yoffset]; /* 8 tap */
+
+ filter_block2d_avg_8(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter);
+}
+
void vp8_eighttap_predict_sharp_c
(
unsigned char *src_ptr,
@@ -896,6 +935,25 @@
VFilter = vp8_sub_pel_filters_8s[yoffset]; /* 8 tap */
filter_block2d_8(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter);
+}
+
+void vp8_eighttap_predict_avg4x4_sharp_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+
+ HFilter = vp8_sub_pel_filters_8s[xoffset]; /* 8 tap */
+ VFilter = vp8_sub_pel_filters_8s[yoffset]; /* 8 tap */
+
+ filter_block2d_avg_8(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter);
}
void vp8_eighttap_predict8x8_c
--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -84,6 +84,7 @@
rtcd->subpix.eighttap8x8 = vp8_eighttap_predict8x8_c;
rtcd->subpix.eighttap_avg16x16 = vp8_eighttap_predict_avg16x16_c;
rtcd->subpix.eighttap_avg8x8 = vp8_eighttap_predict_avg8x8_c;
+ rtcd->subpix.eighttap_avg4x4 = vp8_eighttap_predict_avg4x4_c;
rtcd->subpix.eighttap8x4 = vp8_eighttap_predict8x4_c;
rtcd->subpix.eighttap4x4 = vp8_eighttap_predict_c;
rtcd->subpix.eighttap16x16_sharp = vp8_eighttap_predict16x16_sharp_c;
@@ -90,6 +91,7 @@
rtcd->subpix.eighttap8x8_sharp = vp8_eighttap_predict8x8_sharp_c;
rtcd->subpix.eighttap_avg16x16_sharp = vp8_eighttap_predict_avg16x16_sharp_c;
rtcd->subpix.eighttap_avg8x8_sharp = vp8_eighttap_predict_avg8x8_sharp_c;
+ rtcd->subpix.eighttap_avg4x4_sharp = vp8_eighttap_predict_avg4x4_sharp_c;
rtcd->subpix.eighttap8x4_sharp = vp8_eighttap_predict8x4_sharp_c;
rtcd->subpix.eighttap4x4_sharp = vp8_eighttap_predict_sharp_c;
#endif
--- a/vp8/common/subpixel.h
+++ b/vp8/common/subpixel.h
@@ -89,6 +89,11 @@
#endif
extern prototype_subpixel_predict(vp8_subpix_eighttap4x4);
+#ifndef vp8_subpix_eighttap_avg4x4
+#define vp8_subpix_eighttap_avg4x4 vp8_eighttap_predict_avg4x4_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_eighttap_avg4x4);
+
#ifndef vp8_subpix_eighttap16x16_sharp
#define vp8_subpix_eighttap16x16_sharp vp8_eighttap_predict16x16_sharp_c
#endif
@@ -118,6 +123,11 @@
#define vp8_subpix_eighttap4x4_sharp vp8_eighttap_predict_sharp_c
#endif
extern prototype_subpixel_predict(vp8_subpix_eighttap4x4_sharp);
+
+#ifndef vp8_subpix_eighttap_avg4x4_sharp
+#define vp8_subpix_eighttap_avg4x4_sharp vp8_eighttap_predict_avg4x4_sharp_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_eighttap_avg4x4_sharp);
#endif /* CONFIG_ENAHNCED_INTERP */
#ifndef vp8_subpix_bilinear16x16
@@ -163,6 +173,7 @@
vp8_subpix_fn_t eighttap8x8;
vp8_subpix_fn_t eighttap_avg16x16;
vp8_subpix_fn_t eighttap_avg8x8;
+ vp8_subpix_fn_t eighttap_avg4x4;
vp8_subpix_fn_t eighttap8x4;
vp8_subpix_fn_t eighttap4x4;
vp8_subpix_fn_t eighttap16x16_sharp;
@@ -169,6 +180,7 @@
vp8_subpix_fn_t eighttap8x8_sharp;
vp8_subpix_fn_t eighttap_avg16x16_sharp;
vp8_subpix_fn_t eighttap_avg8x8_sharp;
+ vp8_subpix_fn_t eighttap_avg4x4_sharp;
vp8_subpix_fn_t eighttap8x4_sharp;
vp8_subpix_fn_t eighttap4x4_sharp;
#endif
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -729,6 +729,7 @@
RTCD_VTABLE(subpix), eighttap_avg8x8);
xd->subpixel_predict_avg16x16 = SUBPIX_INVOKE(
RTCD_VTABLE(subpix), eighttap_avg16x16);
+ xd->subpixel_predict_avg = SUBPIX_INVOKE(RTCD_VTABLE(subpix), eighttap_avg4x4);
}
else if (pc->mcomp_filter_type == EIGHTTAP_SHARP)
{
@@ -736,6 +737,7 @@
xd->subpixel_predict8x4 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), eighttap8x4_sharp);
xd->subpixel_predict8x8 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), eighttap8x8_sharp);
xd->subpixel_predict16x16 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), eighttap16x16_sharp);
+ xd->subpixel_predict_avg = SUBPIX_INVOKE(RTCD_VTABLE(subpix), eighttap_avg4x4_sharp);
xd->subpixel_predict_avg8x8 = SUBPIX_INVOKE(
RTCD_VTABLE(subpix), eighttap_avg8x8_sharp);
xd->subpixel_predict_avg16x16 = SUBPIX_INVOKE(
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1105,6 +1105,8 @@
&cpi->common.rtcd.subpix, eighttap8x8);
xd->subpixel_predict16x16 = SUBPIX_INVOKE(
&cpi->common.rtcd.subpix, eighttap16x16);
+ xd->subpixel_predict_avg = SUBPIX_INVOKE(
+ &cpi->common.rtcd.subpix, eighttap_avg4x4);
xd->subpixel_predict_avg8x8 = SUBPIX_INVOKE(
&cpi->common.rtcd.subpix, eighttap_avg8x8);
xd->subpixel_predict_avg16x16 = SUBPIX_INVOKE(
@@ -1120,6 +1122,8 @@
&cpi->common.rtcd.subpix, eighttap8x8_sharp);
xd->subpixel_predict16x16 = SUBPIX_INVOKE(
&cpi->common.rtcd.subpix, eighttap16x16_sharp);
+ xd->subpixel_predict_avg = SUBPIX_INVOKE(
+ &cpi->common.rtcd.subpix, eighttap_avg4x4_sharp);
xd->subpixel_predict_avg8x8 = SUBPIX_INVOKE(
&cpi->common.rtcd.subpix, eighttap_avg8x8_sharp);
xd->subpixel_predict_avg16x16 = SUBPIX_INVOKE(