On Fri, Feb 21, 2014 at 5:23 PM, Aarthi Priya Thirumalai < [email protected]> wrote:
> > > > On Fri, Feb 21, 2014 at 4:53 PM, <[email protected]> wrote: > >> # HG changeset patch >> # User Deepthi Nandakumar <[email protected]> >> # Date 1392976266 -19800 >> # Node ID 3275142274c8e424c9a9a57dbc2c70b0707ea996 >> # Parent 5e2043f89aa11363dffe33a0ff06550a7d862326 >> ratecontrol: clean up confusing if-checks in calcAdaptiveQuantFrame >> >> diff -r 5e2043f89aa1 -r 3275142274c8 source/encoder/ratecontrol.cpp >> --- a/source/encoder/ratecontrol.cpp Fri Feb 21 03:05:48 2014 -0600 >> +++ b/source/encoder/ratecontrol.cpp Fri Feb 21 15:21:06 2014 +0530 >> @@ -105,23 +105,20 @@ >> int block_xy = 0; >> int block_x = 0, block_y = 0; >> double strength = 0.f; >> - if (cfg->param.rc.aqMode == X265_AQ_NONE || cfg->param.rc.aqStrength >> == 0) >> + >> + if (cfg->param.rc.cuTree && cfg->param.rc.aqStrength == 0) /* CUTree >> is enabled with zero strength AQ */ >> { >> - /* Need to init it anyways for CU tree */ >> int cuWidth = ((maxCol / 2) + X265_LOWRES_CU_SIZE - 1) >> >> X265_LOWRES_CU_BITS; >> int cuHeight = ((maxRow / 2) + X265_LOWRES_CU_SIZE - 1) >> >> X265_LOWRES_CU_BITS; >> int cuCount = cuWidth * cuHeight; >> - >> - if (cfg->param.rc.aqMode && cfg->param.rc.aqStrength == 0) >> > we need the above check . can be re written as if > (cfg->param.rc.cuTree) -- sry, pls ignore this comment. since we always > malloc inQscaleFactor, dont think this if check is necessary. > But since we need to do weighted prediction even if aq and cu tree is disabled, the primary if condition (at the beginning )needs to pass if aqMode is NONE. > > + >> + memset(pic->m_lowres.qpOffset, 0, cuCount * sizeof(double)); >> + memset(pic->m_lowres.qpAqOffset, 0, cuCount * sizeof(double)); >> + for (int cuxy = 0; cuxy < cuCount; cuxy++) >> { >> - memset(pic->m_lowres.qpOffset, 0, cuCount * sizeof(double)); >> - memset(pic->m_lowres.qpAqOffset, 0, cuCount * >> sizeof(double)); >> - for (int cuxy = 0; cuxy < cuCount; cuxy++) >> - { >> - pic->m_lowres.invQscaleFactor[cuxy] = 256; >> - } >> + pic->m_lowres.invQscaleFactor[cuxy] = 256; >> } >> - >> + >> /* Need variance data for weighted prediction */ >> if (cfg->param.bEnableWeightedPred) >> { >> _______________________________________________ >> x265-devel mailing list >> [email protected] >> https://mailman.videolan.org/listinfo/x265-devel >> > >
_______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
