From c2d337429c7c87ee559efe54dbc0f84f2a25c3a4 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 21 Oct 2011 00:00:39 -0700 Subject: H264: change weight/biweight functions to take a height argument. Neon parts by Mans Rullgard . --- libavcodec/h264dsp_template.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'libavcodec/h264dsp_template.c') diff --git a/libavcodec/h264dsp_template.c b/libavcodec/h264dsp_template.c index ee4bbe51dc..3d99cfcfec 100644 --- a/libavcodec/h264dsp_template.c +++ b/libavcodec/h264dsp_template.c @@ -29,14 +29,16 @@ #define op_scale1(x) block[x] = av_clip_pixel( (block[x]*weight + offset) >> log2_denom ) #define op_scale2(x) dst[x] = av_clip_pixel( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1)) -#define H264_WEIGHT(W,H) \ -static void FUNCC(weight_h264_pixels ## W ## x ## H)(uint8_t *_block, int stride, int log2_denom, int weight, int offset){ \ +#define H264_WEIGHT(W) \ +static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block, int stride, int height, \ + int log2_denom, int weight, int offset) \ +{ \ int y; \ pixel *block = (pixel*)_block; \ stride /= sizeof(pixel); \ offset <<= (log2_denom + (BIT_DEPTH-8)); \ if(log2_denom) offset += 1<<(log2_denom-1); \ - for(y=0; y