Skip to content
Snippets Groups Projects
Commit bda1c56c authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

minor optimization of the h264 loop filter

Originally committed as revision 4198 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 21be92bf
No related branches found
No related tags found
No related merge requests found
...@@ -2667,11 +2667,11 @@ static inline void h264_loop_filter_luma_c(uint8_t *pix, int xstride, int ystrid ...@@ -2667,11 +2667,11 @@ static inline void h264_loop_filter_luma_c(uint8_t *pix, int xstride, int ystrid
int i_delta; int i_delta;
if( ABS( p2 - p0 ) < beta ) { if( ABS( p2 - p0 ) < beta ) {
pix[-2*xstride] = p1 + clip( ( p2 + ( ( p0 + q0 + 1 ) >> 1 ) - ( p1 << 1 ) ) >> 1, -tc0[i], tc0[i] ); pix[-2*xstride] = p1 + clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc0[i], tc0[i] );
tc++; tc++;
} }
if( ABS( q2 - q0 ) < beta ) { if( ABS( q2 - q0 ) < beta ) {
pix[xstride] = q1 + clip( ( q2 + ( ( p0 + q0 + 1 ) >> 1 ) - ( q1 << 1 ) ) >> 1, -tc0[i], tc0[i] ); pix[ xstride] = q1 + clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc0[i], tc0[i] );
tc++; tc++;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment