diff options
author | Jason Garrett-Glaser <jason@x264.com> | 2011-07-07 01:08:30 +0400 |
---|---|---|
committer | Jason Garrett-Glaser <jason@x264.com> | 2011-07-09 03:12:42 +0400 |
commit | 6a2176aac05e1edbcdf8fb9c26d572d092a00c3c (patch) | |
tree | 46610cb3f89619a540eb7503dacf266a7afb60f8 /libavcodec/h264.c | |
parent | 99b6d2c065c3823e77e23cadaf9077ca954b36ff (diff) |
H.264: improve qp_thresh check
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f79f4d1d35..33c9527946 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2931,7 +2931,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ } } } - h->qp_thresh= 15 + 52 - FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]); + h->qp_thresh = 15 + 52 - FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) + - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]) + + 6 * (h->sps.bit_depth_luma - 8); #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) |