On Wed, Jul 6, 2011 at 3:54 PM, Ronald S. Bultje <[email protected]> wrote: > Hi, > > On Wed, Jul 6, 2011 at 2:20 PM, Jason Garrett-Glaser <[email protected]> wrote: >> Eliminate redundant check in filter_mb_fast, consider bit depth in >> calculating qp_thresh. >> --- >> libavcodec/h264.c | 4 +++- >> libavcodec/h264_loopfilter.c | 6 +----- >> 2 files changed, 4 insertions(+), 6 deletions(-) >> - 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); > > This part should be OK. > >> @@ -241,10 +241,6 @@ void ff_h264_filter_mb_fast( H264Context *h, int mb_x, >> int mb_y, uint8_t *img_y, >> qp1 = (qp + qp1 + 1) >> 1; >> qpc0 = (qpc + qpc0 + 1) >> 1; >> qpc1 = (qpc + qpc1 + 1) >> 1; >> - qp_thresh = 15+52 - h->slice_alpha_c0_offset; >> - if(qp <= qp_thresh && qp0 <= qp_thresh && qp1 <= qp_thresh && >> - qpc <= qp_thresh && qpc0 <= qp_thresh && qpc1 <= qp_thresh) >> - return; >> >> if( IS_INTRA(mb_type) ) { >> static const int16_t bS4[4] = {4,4,4,4}; > > I wonder about this part. If you're right, this should never trigger. > Right? As a random test, can you test that this code never triggers > when running the h264 conformance suite? If indeed it doesn't, it's > fine with me.
Confirmed it doesn't. Jason _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
