Mercurial > libavcodec.hg
comparison vc1.c @ 5921:afcd3b752f95 libavcodec
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
author | kostya |
---|---|
date | Thu, 15 Nov 2007 06:25:20 +0000 |
parents | d5790580ed3e |
children | 80103098c797 |
comparison
equal
deleted
inserted
replaced
5920:50093e0b6b54 | 5921:afcd3b752f95 |
---|---|
3091 | 3091 |
3092 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); | 3092 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); |
3093 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; | 3093 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; |
3094 s->dsp.vc1_inv_trans_8x8(s->block[i]); | 3094 s->dsp.vc1_inv_trans_8x8(s->block[i]); |
3095 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; | 3095 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; |
3096 for(j = 0; j < 64; j++) s->block[i][j] += 128; | 3096 s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3097 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | |
3098 if(v->pq >= 9 && v->overlap) { | 3097 if(v->pq >= 9 && v->overlap) { |
3099 if(v->c_avail) | 3098 if(v->c_avail) |
3100 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3099 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3101 if(v->a_avail) | 3100 if(v->a_avail) |
3102 s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3101 s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3194 | 3193 |
3195 vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset); | 3194 vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset); |
3196 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; | 3195 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; |
3197 s->dsp.vc1_inv_trans_8x8(s->block[i]); | 3196 s->dsp.vc1_inv_trans_8x8(s->block[i]); |
3198 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; | 3197 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; |
3199 for(j = 0; j < 64; j++) s->block[i][j] += 128; | 3198 s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); |
3200 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); | |
3201 if(v->pq >= 9 && v->overlap) { | 3199 if(v->pq >= 9 && v->overlap) { |
3202 if(v->c_avail) | 3200 if(v->c_avail) |
3203 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3201 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3204 if(v->a_avail) | 3202 if(v->a_avail) |
3205 s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3203 s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3375 | 3373 |
3376 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); | 3374 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); |
3377 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; | 3375 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; |
3378 s->dsp.vc1_inv_trans_8x8(s->block[i]); | 3376 s->dsp.vc1_inv_trans_8x8(s->block[i]); |
3379 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; | 3377 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; |
3380 for(j = 0; j < 64; j++) s->block[i][j] += 128; | 3378 s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3381 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | |
3382 } else if(val) { | 3379 } else if(val) { |
3383 vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block); | 3380 vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block); |
3384 if(!v->ttmbf && ttmb < 8) ttmb = -1; | 3381 if(!v->ttmbf && ttmb < 8) ttmb = -1; |
3385 first_block = 0; | 3382 first_block = 0; |
3386 if((i<4) || !(s->flags & CODEC_FLAG_GRAY)) | 3383 if((i<4) || !(s->flags & CODEC_FLAG_GRAY)) |