skip outer pixels if possible in h264_loop_filter_luma_c().
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 19 Jan 2010 22:46:58 +0000 (22:46 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 19 Jan 2010 22:46:58 +0000 (22:46 +0000)
overall 3.7% faster loop filtering (C version only)

Originally committed as revision 21332 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/dsputil.c

index 41a6377..25f501a 100644 (file)
@@ -2999,10 +2999,12 @@ static inline void h264_loop_filter_luma_c(uint8_t *pix, int xstride, int ystrid
                 int i_delta;
 
                 if( FFABS( p2 - p0 ) < beta ) {
+                    if(tc0[i])
                     pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc0[i], tc0[i] );
                     tc++;
                 }
                 if( FFABS( q2 - q0 ) < beta ) {
+                    if(tc0[i])
                     pix[   xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc0[i], tc0[i] );
                     tc++;
                 }