summaryrefslogtreecommitdiff
path: root/libavcodec/h264_loopfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-16 11:55:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-16 11:55:35 +0000
commit2e36c931f0e8d9fe812badd4dee90fdd352c05be (patch)
treec6c0e6656c3df4dc7dbd42b5601a85eacf2e5370 /libavcodec/h264_loopfilter.c
parent3e906f4cfb15738b4c0cb56bad64531620af4818 (diff)
Avoid wasting 4 cpu cycles per MB in redundantly calculating qp_thresh.
Originally committed as revision 21243 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_loopfilter.c')
-rw-r--r--libavcodec/h264_loopfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 08c9723e9c..7d462e18cd 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -654,7 +654,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
//for sufficiently low qp, filtering wouldn't do anything
//this is a conservative estimate: could also check beta_offset and more accurate chroma_qp
if(!FRAME_MBAFF){
- int qp_thresh = 15 - h->slice_alpha_c0_offset - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]);
+ int qp_thresh = h->qp_thresh;
int qp = s->current_picture.qscale_table[mb_xy];
if(qp <= qp_thresh
&& (mb_x == 0 || ((qp + s->current_picture.qscale_table[mb_xy-1] + 1)>>1) <= qp_thresh)