On Mon, Dec 19, 2016 at 6:43 PM, <vign...@multicorewareinc.com> wrote:
> # HG changeset patch > # User Vignesh Vijayakumar <vign...@multicorewareinc.com> > # Date 1481959810 -19800 > # Sat Dec 17 13:00:10 2016 +0530 > # Branch stable > This patch cannot go directly to stable branch as this is a new feature that needs to be tested first. Please send for default branch. > # Node ID 176274eb5f2cee9733ba47697e7004482b3bbc12 > # Parent ce19aaa0637df84d56fc985b0062c7fe2664cdf6 > API changes to reconfigure scalinglists > > diff -r ce19aaa0637d -r 176274eb5f2c source/encoder/api.cpp > --- a/source/encoder/api.cpp Fri Dec 16 11:01:59 2016 +0530 > +++ b/source/encoder/api.cpp Sat Dec 17 13:00:10 2016 +0530 > @@ -183,6 +183,13 @@ > } > else > { > + if (encoder->m_latestParam->scalingLists && > encoder->m_latestParam->scalingLists != encoder->m_param->scalingLists) > + { > + if (encoder->m_scalingList.parseScalingList(encoder->m_ > latestParam->scalingLists)) > + return -1; > + encoder->m_scalingList.setupQuantMatrices(); > + encoder->m_latestParam->bRepeatHeaders = true; > I'm not so sure that this is a good idea. Enabling repeat-headers half way through the encode seems a little weird to be. IMO, it would be more prudent to allow for reconfiguring scaling lists only when repeat headers is enabled. Else, just print a warning. > + } > encoder->m_reconfigure = true; > encoder->printReconfigureParams(); > } > diff -r ce19aaa0637d -r 176274eb5f2c source/encoder/encoder.cpp > --- a/source/encoder/encoder.cpp Fri Dec 16 11:01:59 2016 +0530 > +++ b/source/encoder/encoder.cpp Sat Dec 17 13:00:10 2016 +0530 > @@ -408,6 +408,14 @@ > if (m_analysisFile) > fclose(m_analysisFile); > > + if (m_latestParam != NULL && m_latestParam != m_param) > + { > + if (m_latestParam->scalingLists != m_param->scalingLists) > + free((char*)m_latestParam->scalingLists); > + > + PARAM_NS::x265_param_free(m_latestParam); > + } > + > if (m_param) > { > /* release string arguments that were strdup'd */ > @@ -420,8 +428,6 @@ > > PARAM_NS::x265_param_free(m_param); > } > - > - PARAM_NS::x265_param_free(m_latestParam); > } > > void Encoder::updateVbvPlan(RateControl* rc) > @@ -986,6 +992,8 @@ > encParam->bEnableRectInter = param->bEnableRectInter; > encParam->maxNumMergeCand = param->maxNumMergeCand; > encParam->bIntraInBFrames = param->bIntraInBFrames; > + if (param->scalingLists && !encParam->scalingLists) > + encParam->scalingLists = strdup(param->scalingLists); > /* To add: Loop Filter/deblocking controls, transform skip, signhide > require PPS to be resent */ > /* To add: SAO, temporal MVP, AMP, TU depths require SPS to be > resent, at every CVS boundary */ > return x265_check_params(encParam); > @@ -2474,6 +2482,7 @@ > TOOLCMP(oldParam->bEnableRectInter, newParam->bEnableRectInter, > "rect=%d to %d\n"); > TOOLCMP(oldParam->maxNumMergeCand, newParam->maxNumMergeCand, > "max-merge=%d to %d\n"); > TOOLCMP(oldParam->bIntraInBFrames, newParam->bIntraInBFrames, > "b-intra=%d to %d\n"); > + TOOLCMP(oldParam->scalingLists, newParam->scalingLists, > "scalinglists=%s to %s\n"); > } > > bool Encoder::computeSPSRPSIndex() > _______________________________________________ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel >
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel