Commit b6fa8993 authored by Kostya Shishkov's avatar Kostya Shishkov

Overlap filtering was done in reverse order

Originally committed as revision 7111 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2b70eb2b
...@@ -3340,10 +3340,10 @@ static int vc1_decode_p_mb(VC1Context *v) ...@@ -3340,10 +3340,10 @@ static int vc1_decode_p_mb(VC1Context *v)
for(j = 0; j < 64; j++) s->block[i][j] += 128; 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_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
if(v->pq >= 9 && v->overlap) { if(v->pq >= 9 && v->overlap) {
if(v->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? ((i&1)>>1) : (s->mb_y&1));
if(v->c_avail) if(v->c_avail)
s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? (i&1) : (s->mb_x&1)); s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? (i&1) : (s->mb_x&1));
if(v->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? ((i&1)>>1) : (s->mb_y&1));
} }
} else if(val) { } else if(val) {
vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block); vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block);
...@@ -3443,10 +3443,10 @@ static int vc1_decode_p_mb(VC1Context *v) ...@@ -3443,10 +3443,10 @@ static int vc1_decode_p_mb(VC1Context *v)
for(j = 0; j < 64; j++) s->block[i][j] += 128; 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_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->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? ((i&1)>>1) : (s->mb_y&1));
if(v->c_avail) if(v->c_avail)
s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? (i&1) : (s->mb_x&1)); s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? (i&1) : (s->mb_x&1));
if(v->a_avail)
s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2), (i<4) ? ((i&1)>>1) : (s->mb_y&1));
} }
} else if(is_coded[i]) { } else if(is_coded[i]) {
status = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block); status = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block);
...@@ -3712,16 +3712,6 @@ static void vc1_decode_i_blocks(VC1Context *v) ...@@ -3712,16 +3712,6 @@ static void vc1_decode_i_blocks(VC1Context *v)
vc1_put_block(v, s->block); vc1_put_block(v, s->block);
if(v->pq >= 9 && v->overlap) { if(v->pq >= 9 && v->overlap) {
if(!s->first_slice_line) {
s->dsp.vc1_v_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize, 0);
if(!(s->flags & CODEC_FLAG_GRAY)) {
s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize, s->mb_y&1);
s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize, s->mb_y&1);
}
}
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 1);
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
if(s->mb_x) { if(s->mb_x) {
s->dsp.vc1_h_overlap(s->dest[0], s->linesize, 0); s->dsp.vc1_h_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 0); s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 0);
...@@ -3732,6 +3722,16 @@ static void vc1_decode_i_blocks(VC1Context *v) ...@@ -3732,6 +3722,16 @@ static void vc1_decode_i_blocks(VC1Context *v)
} }
s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize, 1); s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize, 1);
s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1); s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
if(!s->first_slice_line) {
s->dsp.vc1_v_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize, 0);
if(!(s->flags & CODEC_FLAG_GRAY)) {
s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize, s->mb_y&1);
s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize, s->mb_y&1);
}
}
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 1);
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
} }
if(get_bits_count(&s->gb) > v->bits) { if(get_bits_count(&s->gb) > v->bits) {
...@@ -3842,16 +3842,6 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) ...@@ -3842,16 +3842,6 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
vc1_put_block(v, s->block); vc1_put_block(v, s->block);
if(overlap) { if(overlap) {
if(!s->first_slice_line) {
s->dsp.vc1_v_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize, 0);
if(!(s->flags & CODEC_FLAG_GRAY)) {
s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize, s->mb_y&1);
s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize, s->mb_y&1);
}
}
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 1);
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
if(s->mb_x) { if(s->mb_x) {
s->dsp.vc1_h_overlap(s->dest[0], s->linesize, 0); s->dsp.vc1_h_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 0); s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 0);
...@@ -3862,6 +3852,16 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) ...@@ -3862,6 +3852,16 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
} }
s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize, 1); s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize, 1);
s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1); s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
if(!s->first_slice_line) {
s->dsp.vc1_v_overlap(s->dest[0], s->linesize, 0);
s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize, 0);
if(!(s->flags & CODEC_FLAG_GRAY)) {
s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize, s->mb_y&1);
s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize, s->mb_y&1);
}
}
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize, 1);
s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize, 1);
} }
if(get_bits_count(&s->gb) > v->bits) { if(get_bits_count(&s->gb) > v->bits) {
......
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