summaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-04-15 06:22:17 +0000
committerDavid Conrad <lessen42@gmail.com>2009-04-15 06:22:17 +0000
commit3992526b3c43278945d00fac6e2ba5cb8f810ef3 (patch)
treeb0991914e1fac6727744ccc35f7df463d6f818d7 /libavcodec/vc1.c
parent0e58865d6e86bbb664d92311c0f81c65e0213c35 (diff)
downloadffmpeg-streaming-3992526b3c43278945d00fac6e2ba5cb8f810ef3.zip
ffmpeg-streaming-3992526b3c43278945d00fac6e2ba5cb8f810ef3.tar.gz
Split VC1 loop filter into separate functions for h/v and size
Originally committed as revision 18521 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r--libavcodec/vc1.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 604ab0a..0add2c7 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -314,15 +314,15 @@ static void vc1_loop_filter_iblk(MpegEncContext *s, int pq)
{
int i, j;
if(!s->first_slice_line)
- s->dsp.vc1_loop_filter(s->dest[0], 1, s->linesize, 16, pq);
- s->dsp.vc1_loop_filter(s->dest[0] + 8*s->linesize, 1, s->linesize, 16, pq);
+ s->dsp.vc1_v_loop_filter16(s->dest[0], s->linesize, pq);
+ s->dsp.vc1_v_loop_filter16(s->dest[0] + 8*s->linesize, s->linesize, pq);
for(i = !s->mb_x*8; i < 16; i += 8)
- s->dsp.vc1_loop_filter(s->dest[0] + i, s->linesize, 1, 16, pq);
+ s->dsp.vc1_h_loop_filter16(s->dest[0] + i, s->linesize, pq);
for(j = 0; j < 2; j++){
if(!s->first_slice_line)
- s->dsp.vc1_loop_filter(s->dest[j+1], 1, s->uvlinesize, 8, pq);
+ s->dsp.vc1_v_loop_filter8(s->dest[j+1], s->uvlinesize, pq);
if(s->mb_x)
- s->dsp.vc1_loop_filter(s->dest[j+1], s->uvlinesize, 1, 8, pq);
+ s->dsp.vc1_h_loop_filter8(s->dest[j+1], s->uvlinesize, pq);
}
}
@@ -2982,9 +2982,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
s->dsp.vc1_inv_trans_8x8(block);
s->dsp.add_pixels_clamped(block, dst, linesize);
if(apply_filter && cbp_top & 0xC)
- s->dsp.vc1_loop_filter(dst, 1, linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(dst, linesize, mquant);
if(apply_filter && cbp_left & 0xA)
- s->dsp.vc1_loop_filter(dst, linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(dst, linesize, mquant);
}
break;
case TT_4X4:
@@ -3006,9 +3006,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
if(!(subblkpat & (1 << (3 - j))) && !skip_block){
s->dsp.vc1_inv_trans_4x4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off);
if(apply_filter && (j&2 ? pat & (1<<(j-2)) : (cbp_top & (1 << (j + 2)))))
- s->dsp.vc1_loop_filter(dst + (j&1)*4 + (j&2)*2*linesize, 1, linesize, 4, mquant);
+ s->dsp.vc1_v_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, mquant);
if(apply_filter && (j&1 ? pat & (1<<(j-1)) : (cbp_left & (1 << (j + 1)))))
- s->dsp.vc1_loop_filter(dst + (j&1)*4 + (j&2)*2*linesize, linesize, 1, 4, mquant);
+ s->dsp.vc1_h_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, mquant);
}
}
break;
@@ -3031,9 +3031,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
if(!(subblkpat & (1 << (1 - j))) && !skip_block){
s->dsp.vc1_inv_trans_8x4(dst + j*4*linesize, linesize, block + off);
if(apply_filter && j ? pat & 0x3 : (cbp_top & 0xC))
- s->dsp.vc1_loop_filter(dst + j*4*linesize, 1, linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(dst + j*4*linesize, linesize, mquant);
if(apply_filter && cbp_left & (2 << j))
- s->dsp.vc1_loop_filter(dst + j*4*linesize, linesize, 1, 4, mquant);
+ s->dsp.vc1_h_loop_filter4(dst + j*4*linesize, linesize, mquant);
}
}
break;
@@ -3056,9 +3056,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
if(!(subblkpat & (1 << (1 - j))) && !skip_block){
s->dsp.vc1_inv_trans_4x8(dst + j*4, linesize, block + off);
if(apply_filter && cbp_top & (2 << j))
- s->dsp.vc1_loop_filter(dst + j*4, 1, linesize, 4, mquant);
+ s->dsp.vc1_v_loop_filter4(dst + j*4, linesize, mquant);
if(apply_filter && j ? pat & 0x5 : (cbp_left & 0xA))
- s->dsp.vc1_loop_filter(dst + j*4, linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(dst + j*4, linesize, mquant);
}
}
break;
@@ -3181,9 +3181,9 @@ static int vc1_decode_p_mb(VC1Context *v)
top_cbp = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
}
if(left_cbp & 0xC)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
if(top_cbp & 0xA)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
}
block_cbp |= 0xF << (i << 2);
} else if(val) {
@@ -3198,9 +3198,9 @@ static int vc1_decode_p_mb(VC1Context *v)
top_cbp = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
}
if(left_cbp & 0xC)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
if(top_cbp & 0xA)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
}
pat = 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), filter, left_cbp, top_cbp);
block_cbp |= pat << (i << 2);
@@ -3312,9 +3312,9 @@ static int vc1_decode_p_mb(VC1Context *v)
top_cbp = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
}
if(left_cbp & 0xC)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
if(top_cbp & 0xA)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
}
block_cbp |= 0xF << (i << 2);
} else if(is_coded[i]) {
@@ -3329,9 +3329,9 @@ static int vc1_decode_p_mb(VC1Context *v)
top_cbp = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
}
if(left_cbp & 0xC)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
+ s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
if(top_cbp & 0xA)
- s->dsp.vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
+ s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, mquant);
}
pat = 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), filter, left_cbp, top_cbp);
block_cbp |= pat << (i << 2);
OpenPOWER on IntegriCloud