Mercurial > libavcodec.hg
changeset 11045:5f712d734793 libavcodec
factorize first filter call out, this makes the code somewhat
smaller without any speed loss.
author | michael |
---|---|
date | Thu, 28 Jan 2010 19:44:13 +0000 |
parents | 3f66d1d80e03 |
children | 15add32dd717 |
files | h264_loopfilter.c |
diffstat | 1 files changed, 4 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/h264_loopfilter.c Thu Jan 28 14:29:53 2010 +0000 +++ b/h264_loopfilter.c Thu Jan 28 19:44:13 2010 +0000 @@ -340,15 +340,13 @@ int16_t bS4[4] = {4,4,4,4}; int16_t bS3[4] = {3,3,3,3}; int16_t *bSH = FIELD_PICTURE ? bS3 : bS4; + if(left_type) + filter_mb_edgev( &img_y[4*0], linesize, bS4, qp0, h); if( IS_8x8DCT(mb_type) ) { - if(left_type) - filter_mb_edgev( &img_y[4*0], linesize, bS4, qp0, h); filter_mb_edgev( &img_y[4*2], linesize, bS3, qp, h); filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, h); filter_mb_edgeh( &img_y[4*2*linesize], linesize, bS3, qp, h); } else { - if(left_type) - filter_mb_edgev( &img_y[4*0], linesize, bS4, qp0, h); filter_mb_edgev( &img_y[4*1], linesize, bS3, qp, h); filter_mb_edgev( &img_y[4*2], linesize, bS3, qp, h); filter_mb_edgev( &img_y[4*3], linesize, bS3, qp, h); @@ -399,19 +397,15 @@ filter_mb_edgec##hv( &img_cr[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, h );\ }\ } + if(left_type) + FILTER(v,0,0); if( edges == 1 ) { - if(left_type) - FILTER(v,0,0); FILTER(h,1,0); } else if( IS_8x8DCT(mb_type) ) { - if(left_type) - FILTER(v,0,0); FILTER(v,0,2); FILTER(h,1,0); FILTER(h,1,2); } else { - if(left_type) - FILTER(v,0,0); FILTER(v,0,1); FILTER(v,0,2); FILTER(v,0,3);