diff options
author | Christophe Gisquet <christophe.gisquet@free.fr> | 2007-11-15 06:25:20 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-11-15 06:25:20 +0000 |
commit | 1a625dce18cee97974ef19f16f9e14a6cb795502 (patch) | |
tree | ef69f8c7ff4e931a7e9d1be8290773570d5dd842 /libavcodec/vc1.c | |
parent | d638424b8a61851830602eafa00f49c9fa1fea4a (diff) | |
download | ffmpeg-1a625dce18cee97974ef19f16f9e14a6cb795502.tar.gz |
Use put_signed_pixels_clamped where appropriate
Patch by Christophe GISQUET christophe.gisquet <whirlpool sign> fr(run of two 'e').(copy 2 bytes with offset -5)
Thread: [PATCH] Use signed version when putting and clamping pixels in VC-1
Originally committed as revision 11029 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r-- | libavcodec/vc1.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index ed0b03000a..41dc047a9e 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -3093,8 +3093,7 @@ static int vc1_decode_p_mb(VC1Context *v) if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; s->dsp.vc1_inv_trans_8x8(s->block[i]); if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; - for(j = 0; j < 64; j++) s->block[i][j] += 128; - s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); if(v->pq >= 9 && v->overlap) { if(v->c_avail) s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); @@ -3196,8 +3195,7 @@ static int vc1_decode_p_mb(VC1Context *v) if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; s->dsp.vc1_inv_trans_8x8(s->block[i]); if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; - for(j = 0; j < 64; j++) s->block[i][j] += 128; - s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); if(v->pq >= 9 && v->overlap) { if(v->c_avail) s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); @@ -3377,8 +3375,7 @@ static void vc1_decode_b_mb(VC1Context *v) if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; s->dsp.vc1_inv_trans_8x8(s->block[i]); if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; - for(j = 0; j < 64; j++) s->block[i][j] += 128; - s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); } else if(val) { vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block); if(!v->ttmbf && ttmb < 8) ttmb = -1; |