Commit 1557951f authored by kostya's avatar kostya

321l: do not use shifted s->linesize instead of correct s->uvlinesize.

This should fix chroma issues in WMV3/VC-1 decoder with avfilter enabled. 



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23370 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f4576dfe
...@@ -2225,12 +2225,12 @@ static int vc1_decode_p_mb(VC1Context *v) ...@@ -2225,12 +2225,12 @@ static int vc1_decode_p_mb(VC1Context *v)
if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
s->dsp.vc1_inv_trans_8x8(s->block[i]); s->dsp.vc1_inv_trans_8x8(s->block[i]);
if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
s->dsp.put_signed_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, i & 4 ? s->uvlinesize : s->linesize);
if(v->pq >= 9 && v->overlap) { if(v->pq >= 9 && v->overlap) {
if(v->c_avail) if(v->c_avail)
s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
if(v->a_avail) if(v->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
} }
if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){ if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
int left_cbp, top_cbp; int left_cbp, top_cbp;
...@@ -2359,9 +2359,9 @@ static int vc1_decode_p_mb(VC1Context *v) ...@@ -2359,9 +2359,9 @@ static int vc1_decode_p_mb(VC1Context *v)
s->dsp.put_signed_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->pq >= 9 && v->overlap) {
if(v->c_avail) if(v->c_avail)
s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
if(v->a_avail) if(v->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
} }
if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){ if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
int left_cbp, top_cbp; int left_cbp, top_cbp;
...@@ -2561,7 +2561,7 @@ static void vc1_decode_b_mb(VC1Context *v) ...@@ -2561,7 +2561,7 @@ static void vc1_decode_b_mb(VC1Context *v)
if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
s->dsp.vc1_inv_trans_8x8(s->block[i]); s->dsp.vc1_inv_trans_8x8(s->block[i]);
if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
s->dsp.put_signed_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, i & 4 ? s->uvlinesize : s->linesize);
} else if(val) { } else if(val) {
vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), 0, 0, 0); vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), 0, 0, 0);
if(!v->ttmbf && ttmb < 8) ttmb = -1; if(!v->ttmbf && ttmb < 8) ttmb = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment