From 2e36c931f0e8d9fe812badd4dee90fdd352c05be Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 16 Jan 2010 11:55:35 +0000 Subject: Avoid wasting 4 cpu cycles per MB in redundantly calculating qp_thresh. Originally committed as revision 21243 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 60564978cd..3cec4182ec 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2110,6 +2110,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ return 1; // deblocking switched inside frame } } + h->qp_thresh= 15 - h->slice_alpha_c0_offset - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]); #if 0 //FMO if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5) -- cgit v1.2.3