diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2006-01-09 03:38:37 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2006-01-09 03:38:37 +0000 |
commit | e8b562087db87a426aa895d6c3664bc26949eb54 (patch) | |
tree | 479e1e923e3185fe7f5c9f1d70c3429091cf1dd3 /libavcodec/dsputil.c | |
parent | 70abb4075954c1323dc0fb81e51c46faceef1e4c (diff) | |
download | ffmpeg-e8b562087db87a426aa895d6c3664bc26949eb54.tar.gz |
tweak h264_biweight
Originally committed as revision 4835 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 9 |
1 files changed, 4 insertions, 5 deletions
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<H; y++, block += stride){ \ @@ -2514,10 +2514,9 @@ static void weight_h264_pixels ## W ## x ## H ## _c(uint8_t *block, int stride, op_scale1(15); \ } \ } \ -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 offsetd, int offsets){ \ - int attribute_unused x, y; \ - int offset = (offsets + offsetd + 1) >> 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<H; y++, dst += stride, src += stride){ \ op_scale2(0); \ op_scale2(1); \ |