Fix splitmv/compound prediction when eightpel is enabled.

Change-Id: I9d6083d54e3d478ec20dc6dc48d3f45eb5c7e16b
This commit is contained in:
Ronald S. Bultje 2012-04-19 10:07:14 -07:00
parent 18433aef17
commit 1259b0b22e
5 changed files with 78 additions and 0 deletions

View File

@ -860,6 +860,26 @@ static void filter_block2d_8
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 @@ void vp8_eighttap_predict_c
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,
@ -898,6 +937,25 @@ void vp8_eighttap_predict_sharp_c
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
(
unsigned char *src_ptr,

View File

@ -84,12 +84,14 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
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;
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

View File

@ -89,6 +89,11 @@ extern prototype_subpixel_predict(vp8_subpix_eighttap8x4);
#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 @@ extern prototype_subpixel_predict(vp8_subpix_eighttap8x4_sharp);
#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,12 +173,14 @@ typedef struct
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;
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

View File

@ -729,6 +729,7 @@ static void init_frame(VP8D_COMP *pbi)
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 @@ static void init_frame(VP8D_COMP *pbi)
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(

View File

@ -1105,6 +1105,8 @@ static void encode_frame_internal(VP8_COMP *cpi)
&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 @@ static void encode_frame_internal(VP8_COMP *cpi)
&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(