From e8b562087db87a426aa895d6c3664bc26949eb54 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Mon, 9 Jan 2006 03:38:37 +0000 Subject: tweak h264_biweight Originally committed as revision 4835 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dsputil.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libavcodec/dsputil.c') diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index c7ae725c6f..882bf66520 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2489,7 +2489,7 @@ H264_MC(avg_, 16) #define op_scale2(x) dst[x] = clip_uint8( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1)) #define H264_WEIGHT(W,H) \ static void weight_h264_pixels ## W ## x ## H ## _c(uint8_t *block, int stride, int log2_denom, int weight, int offset){ \ - int attribute_unused x, y; \ + int y; \ offset <<= log2_denom; \ if(log2_denom) offset += 1<<(log2_denom-1); \ for(y=0; y> 1; \ - offset = ((offset << 1) + 1) << log2_denom; \ +static void biweight_h264_pixels ## W ## x ## H ## _c(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset){ \ + int y; \ + offset = ((offset + 1) | 1) << log2_denom; \ for(y=0; y