Re: [x265] [PATCH] Support encoding only the focused frames in the crf 2pass
m_reencode = m_start; > +m_start = m_numEntries; > +} > +else > +{ > + > +m_isQpModified = false; > +m_isGopReEncoded = false; > +} > } > +else > +{ > > -m_start = X265_MAX(m_start, endIndex - fps); > +m_isQpModified = false; > +m_isGopReEncoded = false; > +} > + > +m_start = X265_MAX(m_start, m_numEntries - distance + > m_param->keyframeMax); > > return true; > } > @@ -1391,15 +1369,47 @@ int RateControl::rateControlStart(Frame* curFrame, > RateControlEntry* rce, Encode > rce->frameSizeMaximum *= m_param->maxAUSizeFactor; > } > } > + > +///< regenerate the qp > if (!m_isAbr && m_2pass && m_param->rc.rateControlMode == X265_RC_CRF) > { > -rce->qpPrev = x265_qScale2qp(rce->qScale); > -rce->qScale = rce->newQScale; > -rce->qpaRc = curEncData.m_avgQpRc = curEncData.m_avgQpAq = > x265_qScale2qp(rce->newQScale); > -m_qp = int(rce->qpaRc + 0.5); > -rce->frameSizePlanned = qScale2bits(rce, rce->qScale); > -m_framesDone++; > -return m_qp; > +if (!m_param->rc.bEncFocusedFramesOnly) > +{ > +rce->qpPrev = x265_qScale2qp(rce->qScale); > +rce->qScale = rce->newQScale; > +rce->qpaRc = curEncData.m_avgQpRc = curEncData.m_avgQpAq = > x265_qScale2qp(rce->newQScale); > +m_qp = int(rce->qpaRc + 0.5); > +rce->frameSizePlanned = qScale2bits(rce, rce->qScale); > +m_framesDone++; > +return m_qp; > +} > +else > +{ > +int index = m_encOrder[rce->poc]; > +index++; > +double totalDuration = m_frameDuration; > +for (int j = 0; totalDuration < 1.0 && index < m_numEntries; > j++) > +{ > +switch (m_rce2Pass[index].sliceType) > +{ > +case B_SLICE: > +curFrame->m_lowres.plannedType[j] = > m_rce2Pass[index].keptAsRef ? X265_TYPE_BREF : X265_TYPE_B; > +break; > +case P_SLICE: > +curFrame->m_lowres.plannedType[j] = X265_TYPE_P; > +break; > +case I_SLICE: > +curFrame->m_lowres.plannedType[j] = m_param->bOpenGOP > ? X265_TYPE_I : X265_TYPE_IDR; > +break; > +default: > +break; > +} > + > +curFrame->m_lowres.plannedSatd[j] = > m_rce2Pass[index].currentSatd; > +totalDuration += m_frameDuration; > +index++; > +} > +} > } > > if (m_isAbr || m_2pass) // ABR,CRF > @@ -1890,7 +1900,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > qScale = x265_clip3(lqmin, lqmax, qScale); > } > > -if (!m_2pass || m_param->bliveVBV2pass) > +if (!m_2pass || m_param->bliveVBV2pass || (m_2pass && > m_param->rc.rateControlMode == X265_RC_CRF && > m_param->rc.bEncFocusedFramesOnly)) > { > /* clip qp to permissible range after vbv-lookahead > estimation to avoid possible > * mispredictions by initial frame size predictors */ > @@ -1927,7 +1937,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > else > { > double abrBuffer = 2 * m_rateTolerance * m_bitrate; > -if (m_2pass) > +if (m_2pass && (m_param->rc.rateControlMode != X265_RC_CRF || > !m_param->rc.bEncFocusedFramesOnly)) > { > double lmin = m_lmin[m_sliceType]; > double lmax = m_lmax[m_sliceType]; > @@ -2828,7 +2838,7 @@ int RateControl::rateControlEnd(Frame* curFrame, > int64_t bits, RateControlEntry* > > if (m_param->rc.aqMode || m_isVbv || m_param->bAQMotion || > bEnableDistOffset) > { > -if (m_isVbv && !(m_2pass && m_param->rc.rateControlMode == > X265_RC_CRF)) > +if (m_isVbv && !(m_2pass && m_param->rc.rateControlMode == > X265_RC_CRF && !m_param->rc.bEncFocusedFramesOnly)) > { > double avgQpRc = 0; > /* determine avg QP decided by VBV rate control */ > @@ -2862,8 +2872,9 @@ int RateControl::rateControlEnd(Frame* curFrame, > int64_t bi
Re: [x265] [PATCH] encoding only the focused frames in the crf 2 pass
Scale; > +rce->qpaRc = curEncData.m_avgQpRc = curEncData.m_avgQpAq = > x265_qScale2qp(rce->newQScale); > +m_qp = int(rce->qpaRc + 0.5); > +rce->frameSizePlanned = qScale2bits(rce, rce->qScale); > +m_framesDone++; > +return m_qp; > +} > +else > +{ > +int index = m_encOrder[rce->poc]; > +index++; > +double totalDuration = m_frameDuration; > +for (int j = 0; totalDuration < 1.0 && index < m_numEntries; > j++) > +{ > +switch (m_rce2Pass[index].sliceType) > +{ > +case B_SLICE: > +curFrame->m_lowres.plannedType[j] = > m_rce2Pass[index].keptAsRef ? X265_TYPE_BREF : X265_TYPE_B; > +break; > +case P_SLICE: > +curFrame->m_lowres.plannedType[j] = X265_TYPE_P; > +break; > +case I_SLICE: > +curFrame->m_lowres.plannedType[j] = m_param->bOpenGOP > ? X265_TYPE_I : X265_TYPE_IDR; > +break; > +default: > +break; > +} > + > +curFrame->m_lowres.plannedSatd[j] = > m_rce2Pass[index].currentSatd; > +totalDuration += m_frameDuration; > +index++; > +} > +} > } > > if (m_isAbr || m_2pass) // ABR,CRF > @@ -1890,7 +1905,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > qScale = x265_clip3(lqmin, lqmax, qScale); > } > > -if (!m_2pass || m_param->bliveVBV2pass) > +if (!m_2pass || m_param->bliveVBV2pass || (m_2pass && > m_param->rc.rateControlMode == X265_RC_CRF && > m_param->rc.bEncFocusedFramesOnly)) > { > /* clip qp to permissible range after vbv-lookahead > estimation to avoid possible > * mispredictions by initial frame size predictors */ > @@ -1927,7 +1942,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > else > { > double abrBuffer = 2 * m_rateTolerance * m_bitrate; > -if (m_2pass) > +if (m_2pass && (m_param->rc.rateControlMode != X265_RC_CRF || > !m_param->rc.bEncFocusedFramesOnly)) > { > [AM] Please include a conformance check in Encoder::configure() to disable m_param->rc.bEncFocusedFramesOnly if either bStatRead or CRF is disabled. > double lmin = m_lmin[m_sliceType]; > double lmax = m_lmax[m_sliceType]; > @@ -2828,7 +2843,7 @@ int RateControl::rateControlEnd(Frame* curFrame, > int64_t bits, RateControlEntry* > > if (m_param->rc.aqMode || m_isVbv || m_param->bAQMotion || > bEnableDistOffset) > { > -if (m_isVbv && !(m_2pass && m_param->rc.rateControlMode == > X265_RC_CRF)) > +if (m_isVbv && !(m_2pass && m_param->rc.rateControlMode == > X265_RC_CRF && !m_param->rc.bEncFocusedFramesOnly)) > { > double avgQpRc = 0; > /* determine avg QP decided by VBV rate control */ > @@ -2862,8 +2877,9 @@ int RateControl::rateControlEnd(Frame* curFrame, > int64_t bits, RateControlEntry* > if (m_param->rc.rateControlMode == X265_RC_CRF) > { > double crfVal, qpRef = curEncData.m_avgQpRc; > + > bool is2passCrfChange = false; > - if (m_2pass) > +if (m_2pass && !m_param->rc.bEncFocusedFramesOnly) > { > if (fabs(curEncData.m_avgQpRc - rce->qpPrev) > 0.1) > { > diff --git a/source/encoder/ratecontrol.h b/source/encoder/ratecontrol.h > index 996465eeb..204bd71e1 100644 > --- a/source/encoder/ratecontrol.h > +++ b/source/encoder/ratecontrol.h > @@ -73,6 +73,7 @@ struct RateControlEntry > Predictor rowPreds[3][2]; > Predictor* rowPred[2]; > > +int64_t currentSatd; > int64_t lastSatd; /* Contains the picture cost of the previous > frame, required for resetAbr and VBV */ > int64_t leadingNoBSatd; > int64_t rowTotalBits; /* update cplxrsum and totalbits at the end of > 2 rows */ > @@ -87,6 +88,8 @@ struct RateControlEntry > double rowCplxrSum; > double qpNoVbv; > double bufferFill; > +double bufferFillFinal; > +double bufferFillActual; > double targetFill; > boolvbvEndAdj; > double frameDuration; > diff --git a/source/x265.h b/source/x265.h > index 3f3133536..6bb893c98 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1443,6 +1443,9 @@ typedef struct x265_param > * encoder will default to using x265_2pass.log */ > const char* statFileName; > > +/* if only the focused frames would be re-encode or not */ > +int bEncFocusedFramesOnly; > + > [AM] Update X265_BUILD, add help document, and add an entry for the new param in info SEI. Is this a param?API only option? If so, clarify that in the document. Else, add a test CLI. > /* temporally blur quants */ > doubleqblur; > > -- > 2.22.0.windows.1 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [Patch] reset conformance window offsets during x265 reconfigure
Pushed to master On Fri, Aug 20, 2021 at 10:59 AM Dakshinya T R S < dakshi...@multicorewareinc.com> wrote: > From 65406c08be155593e96630215740c44516f6fee1 Mon Sep 17 00:00:00 2001 > From: DakshinyaTRS > Date: Mon, 16 Aug 2021 17:13:50 +0530 > Subject: [PATCH] reset conformance window offsets during x265 reconfigure > > --- > source/encoder/encoder.cpp | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp > index c079e94c4..dee8fd85d 100644 > --- a/source/encoder/encoder.cpp > +++ b/source/encoder/encoder.cpp > @@ -2556,7 +2556,11 @@ int Encoder::reconfigureParam(x265_param* encParam, > x265_param* param) > encParam->dynamicRd = param->dynamicRd; > encParam->bEnableTransformSkip = param->bEnableTransformSkip; > encParam->bEnableAMP = param->bEnableAMP; > - > + if (param->confWinBottomOffset == 0 && param->confWinRightOffset == 0) > + { > + encParam->confWinBottomOffset = param->confWinBottomOffset; > + encParam->confWinRightOffset = param->confWinRightOffset; > + } > /* Resignal changes in params in Parameter Sets */ > m_sps.maxAMPDepth = (m_sps.bUseAMP = param->bEnableAMP && > param->bEnableAMP) ? param->maxCUDepth : 0; > m_pps.bTransformSkipEnabled = param->bEnableTransformSkip ? 1 : 0; > -- > 2.32.0.windows.2 > > > _______ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fix compilation errors on MAC Apple silicon
ER_4 \a, \b, \filterhps > b 10f > 15: > -HPS_FILTER_12 \a \b \filterhps > +HPS_FILTER_12 \a, \b, \filterhps > b 10f > 7: > cmp w5, #0 > @@ -371,44 +375,44 @@ function x265_interp_8tap_horiz_ps_\w\()x\h\()_neon > cmp w4, #3 > b.eq3f > 0: > -HPS_FILTER \w \h qpel_filter_0_32b > +HPS_FILTER \w, \h, qpel_filter_0_32b > b 5f > 1: > -HPS_FILTER \w \h qpel_filter_1_32b > +HPS_FILTER \w, \h, qpel_filter_1_32b > b 5f > 2: > -HPS_FILTER \w \h qpel_filter_2_32b > +HPS_FILTER \w, \h, qpel_filter_2_32b > b 5f > 3: > -HPS_FILTER \w \h qpel_filter_3_32b > +HPS_FILTER \w, \h, qpel_filter_3_32b > b 5f > 5: > ret > endfunc > .endm > > -LUMA_HPS4 4 > -LUMA_HPS4 8 > -LUMA_HPS4 16 > -LUMA_HPS8 4 > -LUMA_HPS8 8 > -LUMA_HPS8 16 > -LUMA_HPS8 32 > -LUMA_HPS12 16 > -LUMA_HPS16 4 > -LUMA_HPS16 8 > -LUMA_HPS16 12 > -LUMA_HPS16 16 > -LUMA_HPS16 32 > -LUMA_HPS16 64 > -LUMA_HPS24 32 > -LUMA_HPS32 8 > -LUMA_HPS32 16 > -LUMA_HPS32 24 > -LUMA_HPS32 32 > -LUMA_HPS32 64 > -LUMA_HPS48 64 > -LUMA_HPS64 16 > -LUMA_HPS64 32 > -LUMA_HPS64 48 > -LUMA_HPS64 64 > +LUMA_HPS4,4 > +LUMA_HPS4,8 > +LUMA_HPS4,16 > +LUMA_HPS8,4 > +LUMA_HPS8,8 > +LUMA_HPS8,16 > +LUMA_HPS8,32 > +LUMA_HPS12,16 > +LUMA_HPS16,4 > +LUMA_HPS16,8 > +LUMA_HPS16,12 > +LUMA_HPS16,16 > +LUMA_HPS16,32 > +LUMA_HPS16,64 > +LUMA_HPS24,32 > +LUMA_HPS32,8 > +LUMA_HPS32,16 > +LUMA_HPS32,24 > +LUMA_HPS32,32 > +LUMA_HPS32,64 > +LUMA_HPS48,64 > +LUMA_HPS64,16 > +LUMA_HPS64,32 > +LUMA_HPS64,48 > +LUMA_HPS64,64 > diff --git a/source/common/aarch64/mc-a.S b/source/common/aarch64/mc-a.S > index cbaf9b501..339b53ae4 100644 > --- a/source/common/aarch64/mc-a.S > +++ b/source/common/aarch64/mc-a.S > @@ -23,7 +23,11 @@ > > #include "asm.S" > > +#ifdef __APPLE__ > +.section __RODATA,__rodata > +#else > .section .rodata > +#endif > > .align 4 > > diff --git a/source/common/aarch64/pixel-util.S > b/source/common/aarch64/pixel-util.S > index a085ebdfa..13c85ad8f 100644 > --- a/source/common/aarch64/pixel-util.S > +++ b/source/common/aarch64/pixel-util.S > @@ -24,7 +24,11 @@ > > #include "asm.S" > > +#ifdef __APPLE__ > +.section __RODATA,__rodata > +#else > .section .rodata > +#endif > > .align 4 > > diff --git a/source/common/aarch64/sad-a.S b/source/common/aarch64/sad-a.S > index c27cce5ce..04269d381 100644 > --- a/source/common/aarch64/sad-a.S > +++ b/source/common/aarch64/sad-a.S > @@ -23,7 +23,11 @@ > > #include "asm.S" > > +#ifdef __APPLE__ > +.section __RODATA,__rodata > +#else > .section .rodata > +#endif > > .align 4 > > @@ -94,12 +98,12 @@ function x265_sad_x\x\()_8x\h\()_neon > endfunc > .endm > > -SAD_X_8xN 3 4 > -SAD_X_8xN 3 8 > -SAD_X_8xN 3 16 > -SAD_X_8xN 3 32 > +SAD_X_8xN 3,4 > +SAD_X_8xN 3,8 > +SAD_X_8xN 3,16 > +SAD_X_8xN 3,32 > > -SAD_X_8xN 4 4 > -SAD_X_8xN 4 8 > -SAD_X_8xN 4 16 > -SAD_X_8xN 4 32 > +SAD_X_8xN 4,4 > +SAD_X_8xN 4,8 > +SAD_X_8xN 4,16 > +SAD_X_8xN 4,32 > diff --git a/source/test/testharness.h b/source/test/testharness.h > index 6e680953f..088343b51 100644 > --- a/source/test/testharness.h > +++ b/source/test/testharness.h > @@ -73,7 +73,7 @@ protected: > #include > #elif ( !defined(__APPLE__) && defined (__GNUC__) && > defined(__ARM_NEON__)) > #include > -#elif defined(__GNUC__) && (!defined(__clang__) || __clang_major__ < 4) > +#else > /* fallback for older GCC/MinGW */ > static inline uint32_t __rdtsc(void) > { > -- > 2.22.0.windows.1 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Disable fall-back on traditional scenecut algorithm with --hist-scenecut
i < origNumFrames; i += > m_param->bframes + 1) > { > -if (!m_param->bHistBasedSceneCut || > (m_param->bHistBasedSceneCut && frames[i + 1]->bScenecut)) > +if (!m_param->bHistBasedSceneCut || > (m_param->bHistBasedSceneCut && m_param->bEnableTradScdInHscd && frames[i + > 1]->bScenecut)) > scenecut(frames, i, i + 1, true, origNumFrames); > > for (int j = i + 1; j <= X265_MIN(i + m_param->bframes + 1, > origNumFrames); j++) > { > -if (frames[j]->bScenecut && scenecutInternal(frames, j - > 1, j, true)) > +if (frames[j]->bScenecut) > { > -m_extendGopBoundary = true; > +if (m_param->bEnableTradScdInHscd) > +m_extendGopBoundary = scenecutInternal(frames, j > - 1, j, true); > +else > +m_extendGopBoundary = true; > break; > } > } > diff --git a/source/test/regression-tests.txt > b/source/test/regression-tests.txt > index 971c854df..26d43b28a 100644 > --- a/source/test/regression-tests.txt > +++ b/source/test/regression-tests.txt > @@ -160,6 +160,7 @@ Traffic_4096x2048_30p.y4m, --preset medium --frame-dup > --dup-threshold 60 --hrd > Kimono1_1920x1080_24_400.yuv,--preset superfast --qp 28 --zones 0,139,q=32 > sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 --frame-dup --dup-threshold 60 --hrd --bitrate 1 > --vbv-bufsize 15000 --vbv-maxrate 12000 > sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 > +sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 --no-traditional-scenecut > sintel_trailer_2k_1920x1080_24.yuv, --preset ultrafast --hist-scenecut > --hist-threshold 0.02 > crowd_run_1920x1080_50.yuv, --preset faster --ctu 32 --rskip 2 > --rskip-edge-threshold 5 > crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 2 > --rskip-edge-threshold 5 --aq-mode 4 > diff --git a/source/x265.h b/source/x265.h > index 324f3163f..3f3133536 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1963,6 +1963,10 @@ typedef struct x265_param > /* Flag indicating whether the encoder should emit an End of Sequence > * NAL at the end of every Coded Video Sequence. Default false */ > int bEnableEndOfSequence; > + > +/* Flag to turn on/off traditional scenecut detection in histogram > based scenecut detection. > + * When false, only spatial properties are used for scenecut > detection. Default true */ > +int bEnableTradScdInHscd; > } x265_param; > > /* x265_param_alloc: > diff --git a/source/x265cli.h b/source/x265cli.h > index 46a2b68ae..8fcf37b8a 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -144,6 +144,8 @@ static const struct option long_options[] = > { "hist-scenecut",no_argument, NULL, 0}, > { "no-hist-scenecut", no_argument, NULL, 0}, > { "hist-threshold", required_argument, NULL, 0}, > +{ "traditional-scenecut", no_argument, NULL, 0}, > +{ "no-traditional-scenecut", no_argument, NULL, 0}, > { "fades",no_argument, NULL, 0 }, > { "no-fades", no_argument, NULL, 0 }, > { "scenecut-aware-qp", required_argument, NULL, 0 }, > -- > 2.24.0.windows.2 > > > On Fri, Jul 30, 2021 at 3:24 PM Pooja Venkatesan < > po...@multicorewareinc.com> wrote: > >> >> >> On Fri, Jul 30, 2021 at 2:18 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> >>> >>> On Thu, Jun 24, 2021 at 2:18 PM Pooja Venkatesan < >>> po...@multicorewareinc.com> wrote: >>> >>>> From f6c1b86d99ab3a0dd57204f930e526a07e28fed7 Mon Sep 17 00:00:00 2001 >>>> From: Praveen Karadugattu >>>> Date: Sun, 20 Jun 2021 21:20:50 +0530 >>>> Subject: [PATCH] Disable fall-back on traditional scenecut algorithm >>>> with >>>> --hist-scenecut >>>> >>>> --- >>>> doc/reST/cli.rst | 9 +++-- >>>> source/CMakeLists.txt| 2 +- >>>> source/common/param.cpp | 8 +++- >>>> source/encoder/encoder.cpp | 17 - >>>> source/encoder/slicetype.cpp | 15 ++- >>>> source/test/regression-tests.txt | 1 + >>>&
Re: [x265] [PATCH] Disable fall-back on traditional scenecut algorithm with --hist-scenecut
extendGopBoundary = false; > for (int i = m_param->bframes + 1; i < origNumFrames; i += > m_param->bframes + 1) > { > -if (!m_param->bHistBasedSceneCut || > (m_param->bHistBasedSceneCut && frames[i + 1]->bScenecut)) > +if (!m_param->bHistBasedSceneCut || > (m_param->bHistBasedSceneCut && !m_param->bDisableTradScdInHscd && frames[i > + 1]->bScenecut)) > scenecut(frames, i, i + 1, true, origNumFrames); > > for (int j = i + 1; j <= X265_MIN(i + m_param->bframes + 1, > origNumFrames); j++) > { > -if (frames[j]->bScenecut && scenecutInternal(frames, j - > 1, j, true)) > +if (frames[j]->bScenecut) > { > -m_extendGopBoundary = true; > +if (!m_param->bDisableTradScdInHscd) > +m_extendGopBoundary = scenecutInternal(frames, j > - 1, j, true); > +else > +m_extendGopBoundary = true; > break; > } > } > diff --git a/source/test/regression-tests.txt > b/source/test/regression-tests.txt > index 971c854df..828157cab 100644 > --- a/source/test/regression-tests.txt > +++ b/source/test/regression-tests.txt > @@ -160,6 +160,7 @@ Traffic_4096x2048_30p.y4m, --preset medium --frame-dup > --dup-threshold 60 --hrd > Kimono1_1920x1080_24_400.yuv,--preset superfast --qp 28 --zones 0,139,q=32 > sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 --frame-dup --dup-threshold 60 --hrd --bitrate 1 > --vbv-bufsize 15000 --vbv-maxrate 12000 > sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 > +sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut > --hist-threshold 0.02 --disable-traditional-scenecut > sintel_trailer_2k_1920x1080_24.yuv, --preset ultrafast --hist-scenecut > --hist-threshold 0.02 > crowd_run_1920x1080_50.yuv, --preset faster --ctu 32 --rskip 2 > --rskip-edge-threshold 5 > crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 2 > --rskip-edge-threshold 5 --aq-mode 4 > diff --git a/source/x265.h b/source/x265.h > index 324f3163f..3a65fdda6 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1963,6 +1963,10 @@ typedef struct x265_param > /* Flag indicating whether the encoder should emit an End of Sequence > * NAL at the end of every Coded Video Sequence. Default false */ > int bEnableEndOfSequence; > + > +/* Flag to turn off traditional scenecut detection in histogram based > scenecut detection so that > + * only spatial properties are used for scenecut detection. Default > false */ > +int bDisableTradScdInHscd; > } x265_param; > > /* x265_param_alloc: > diff --git a/source/x265cli.h b/source/x265cli.h > index 46a2b68ae..86136fbfb 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -144,6 +144,7 @@ static const struct option long_options[] = > { "hist-scenecut",no_argument, NULL, 0}, > { "no-hist-scenecut", no_argument, NULL, 0}, > { "hist-threshold", required_argument, NULL, 0}, > +{ "disable-traditional-scenecut", no_argument, NULL, 0}, > { "fades",no_argument, NULL, 0 }, > { "no-fades", no_argument, NULL, 0 }, > { "scenecut-aware-qp", required_argument, NULL, 0 }, > -- > 2.24.0.windows.2 > > Regards, > *Pooja Venkatesan*, > Video Codec Engineer, > Media & AI analytics BU > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [x265 PATCH] cli.rst: Fix --level-idc document
Pushed to master On Tue, May 25, 2021 at 12:28 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > From 82786fccce10379be439243b6a776dc2f5918cb4 Mon Sep 17 00:00:00 2001 > From: Aruna > Date: Tue, 25 May 2021 12:20:03 +0530 > Subject: [PATCH] cli.rst: Fix --level-idc document > > --- > doc/reST/cli.rst | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst > index 2f556326b..4154221af 100755 > --- a/doc/reST/cli.rst > +++ b/doc/reST/cli.rst > @@ -632,9 +632,8 @@ Profile, Level, Tier > auto-detection by the encoder. If specified, the encoder will > attempt to bring the encode specifications within that specified > level. If the encoder is unable to reach the level it issues a > - warning and aborts the encode. If the requested requirement level is > - higher than the actual level, the actual requirement level is > - signaled. > + warning and aborts the encode. The requested level will be signaled > + in the bitstream even if it is higher than the actual level. > > Beware, specifying a decoder level will force the encoder to enable > VBV for constant rate factor encodes, which may introduce > @@ -714,11 +713,8 @@ Profile, Level, Tier > (main, main10, etc). Second, an encoder is created from this > x265_param instance and the :option:`--level-idc` and > :option:`--high-tier` parameters are used to reduce bitrate or other > - features in order to enforce the target level. Finally, the encoder > - re-examines the final set of parameters and detects the actual > - minimum decoder requirement level and this is what is signaled in > - the bitstream headers. The detected decoder level will only use High > - tier if the user specified a High tier level. > + features in order to enforce the target level. The detected decoder level > + will only use High tier if the user specified a High tier level. > > The signaled profile will be determined by the encoder's internal > bitdepth and input color space. If :option:`--keyint` is 0 or 1, > -- > 2.20.1.windows.1 > > > -- > Regards, > *Aruna Matheswaran,* > Video Codec Engineer, > Media & AI analytics BU, > > > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [x265 PATCH] cli.rst: Fix --level-idc document
>From 82786fccce10379be439243b6a776dc2f5918cb4 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 25 May 2021 12:20:03 +0530 Subject: [PATCH] cli.rst: Fix --level-idc document --- doc/reST/cli.rst | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst index 2f556326b..4154221af 100755 --- a/doc/reST/cli.rst +++ b/doc/reST/cli.rst @@ -632,9 +632,8 @@ Profile, Level, Tier auto-detection by the encoder. If specified, the encoder will attempt to bring the encode specifications within that specified level. If the encoder is unable to reach the level it issues a - warning and aborts the encode. If the requested requirement level is - higher than the actual level, the actual requirement level is - signaled. + warning and aborts the encode. The requested level will be signaled + in the bitstream even if it is higher than the actual level. Beware, specifying a decoder level will force the encoder to enable VBV for constant rate factor encodes, which may introduce @@ -714,11 +713,8 @@ Profile, Level, Tier (main, main10, etc). Second, an encoder is created from this x265_param instance and the :option:`--level-idc` and :option:`--high-tier` parameters are used to reduce bitrate or other - features in order to enforce the target level. Finally, the encoder - re-examines the final set of parameters and detects the actual - minimum decoder requirement level and this is what is signaled in - the bitstream headers. The detected decoder level will only use High - tier if the user specified a High tier level. + features in order to enforce the target level. The detected decoder level + will only use High tier if the user specified a High tier level. The signaled profile will be determined by the encoder's internal bitdepth and input color space. If :option:`--keyint` is 0 or 1, -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add: Fix for VMAF Exceptions
->enable_transform, vcd->phone_model, vcd->psnr, vcd->ssim, > vcd->ms_ssim, vcd->pool, vcd->thread, vcd->subsample, > vcd->enable_conf_interval); > +free(vmafframedata->format); > return score; > } > #endif > diff --git a/source/encoder/frameencoder.cpp > b/source/encoder/frameencoder.cpp > index 2086a15a5..05c1d93a5 100644 > --- a/source/encoder/frameencoder.cpp > +++ b/source/encoder/frameencoder.cpp > @@ -2143,6 +2143,7 @@ void FrameEncoder::vmafFrameLevelScore() > vmafframedata->internalBitDepth = m_param->internalBitDepth; > vmafframedata->reference_frame = fenc; > vmafframedata->distorted_frame = recon; > +vmafframedata->internalCsp = m_param->internalCsp; > > fenc->m_vmafScore = > x265_calculate_vmaf_framelevelscore(vmafframedata); > > diff --git a/source/x265.h b/source/x265.h > index f44040ba7..0e572e468 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -709,6 +709,7 @@ typedef struct x265_vmaf_data > int internalBitDepth; > FILE *reference_file; /* FILE pointer for input file */ > FILE *distorted_file; /* FILE pointer for recon file generated*/ > +char *format; > }x265_vmaf_data; > [AM] Update X265_BUILD. > /* data to calculate frame level VMAF score */ > @@ -716,16 +717,17 @@ typedef struct x265_vmaf_framedata > { > int width; > int height; > -int frame_set; > -int internalBitDepth; > +int frame_set; > +int internalBitDepth; > void *reference_frame; /* points to fenc of particular frame */ > void *distorted_frame; /* points to recon of particular frame */ > +char *format; > +int internalCsp; > }x265_vmaf_framedata; > > /* common data needed to calculate both frame level and video level VMAF > scores */ > typedef struct x265_vmaf_commondata > { > -char *format; > char *model_path; > char *log_path; > char *log_fmt; > @@ -742,7 +744,7 @@ typedef struct x265_vmaf_commondata > int enable_conf_interval; > }x265_vmaf_commondata; > > -static const x265_vmaf_commondata vcd[] = { { NULL, (char > *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, > 0, NULL, 0, 1, 0 } }; > +static const x265_vmaf_commondata vcd[] = { { (char > *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, > 0, NULL, 0, 1, 0 } }; > > /* x265 input parameters > [AM] Please mention the VMAF version with the integration works fine in VMAF documentation. > * > -- > 2.17.1 > > > Thanks & Regards, > Dakshinya T R S, > Intern at Multicoreware, > Bannari Amman Institute of Technology, > Sathyamangalam. > __ > > 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 > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add: End Of Bitstream and End Of Sequence NAL units
t %s\n", > OPT(param->bEnableAccessUnitDelimiters)); > +H0(" --[no-]eobEmit end of bitstream nal > unit at the end of the bitstream. Default %s\n", > OPT(param->bEnableEndOfBitstream)); > +H0(" --[no-]eosEmit end of sequence nal > unit at the end of every coded video sequence. Default %s\n", > OPT(param->bEnableEndOfSequence)); > H1(" --hash Decoded Picture Hash SEI 0: > disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n", > param->decodedPictureHashSEI); > H0(" --atc-seiEmit the alternative > transfer characteristics SEI message where the integer is the preferred > transfer characteristics. Default disabled\n"); > H0(" --pic-struct Set the picture structure > and emits it in the picture timing SEI message. Values in the range 0..12. > See D.3.3 of the HEVC spec. for a detailed explanation.\n"); > diff --git a/source/x265cli.h b/source/x265cli.h > index 9eb571cfb..46a2b68ae 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -264,6 +264,10 @@ static const struct option long_options[] = > { "repeat-headers", no_argument, NULL, 0 }, > { "aud", no_argument, NULL, 0 }, > { "no-aud", no_argument, NULL, 0 }, > +{ "eob", no_argument, NULL, 0 }, > +{ "no-eob", no_argument, NULL, 0 }, > +{ "eos", no_argument, NULL, 0 }, > +{ "no-eos", no_argument, NULL, 0 }, > { "info", no_argument, NULL, 0 }, > { "no-info", no_argument, NULL, 0 }, > { "zones", required_argument, NULL, 0 }, > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add: End Of Bitstream and End Of Sequence NAL units
On Wed, Mar 24, 2021 at 6:22 PM Niranjan Bala wrote: > > > On Mon, Mar 22, 2021 at 10:17 PM Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> >> >> On Mon, Mar 22, 2021 at 11:25 AM Niranjan Bala < >> niran...@multicorewareinc.com> wrote: >> >>> >>>>> >>>>> +.. option:: --eob, --no-eob >>>>> + >>>>> + Emit an end of bitstream NAL unit at the end of the bitstream. >>>>> + >>>>> +.. option:: --eos, --no-eos >>>>> + >>>>> + Emit an end of sequence NAL unit at the end of every coded >>>>> + video sequence. >>>>> + >>>>> >>>> [AM] Please mention the default settings. >>>> Also, API documentation for x265_encoder_end_nal_units() is missing. >>>> >>> Default settings and API documentation are added. >>> >>>> +if ((m_param->bEnableEndOfBitstream || >>>>> m_param->bEnableEndOfSequence) && outFrameCount == >>>>> (uint32_t)m_param->totalFrames) >>>>> >>>> [AM] This may not work with live input streams. Please check. >>>> >>> EOB and EOS NAL units should be added at the end when we know the end of >>> the bitstream. Since we do not know the end in live input streams, it is >>> not added in that scenario. >>> >> [AM] Number of frames is not known in live input cases at the beginning >> of the encode. However, input pipes will indicate the end of the file and >> you can still handle EOD insertion after flushing all the input pictures. >> > Addressed this and sent out the patch in a separate email thread. > >> +{ >>>>> +if (api->encoder_end_nal_units(m_encoder, _nal, >>>>> ) < 0) >>>>> +{ >>>>> +x265_log(NULL, X265_LOG_ERROR, "Failure >>>>> generating end nal units\n"); >>>>> +m_ret = 3; >>>>> +goto fail; >>>>> +} >>>>> +else >>>>> +m_cliopt.totalbytes += >>>>> m_cliopt.output->writeHeaders(p_nal, nal); >>>>> >>>> [AM] Should we mark --eob as `CLI only` option? Given that EOB >>>> insertion is handled completely in the application, I don't see the need >>>> for the APIs specific to EOB. Please clarify. >>>> >>> No. --eob is not a 'CLI only' option. EOB insertion is handled in >>> x265lib using the API. We need to add EOB after the main encoder loop. I >>> think it's not appropriate to add EOB insertion in any previously existing >>> APIs after x265_encoder_encode. Hence, added an API for handling the end >>> NAL units similar to x265_encoder_headers. >>> >> [AM] If you expect the integrating application to call >> x265_encoder_end_nal_units, what is the use of bEnableEndOfBitstream >> param? >> > In x265_encoder_end_nal_units, we are adding EOB and EOS NAL units at the > end based on these params. If bEnableEndOfBitstream param is set, EOB NAL > unit is added. If bEnableEndOfSequence param is set, EOS NAL unit is added. > [AM] Ok. My suggestion is that, if EOS and EOD NALs are inserted in the NAL list of the last frame encoded inside the library, we don't have to expect the integrating application to call x265_encoder_end_nal_units API. Else, it will be a burden for the integrating application to update its wrapper app. Please check if this is feasible. > -- >>> >>> Thanks & Regards >>> *Niranjan Kumar B* >>> Video Codec Engineer >>> Media & AI Analytics >>> +91 958 511 1449 >>> <https://multicorewareinc.com/> >>> ___ >>> x265-devel mailing list >>> x265-devel@videolan.org >>> https://mailman.videolan.org/listinfo/x265-devel >>> >> >> >> -- >> Regards, >> *Aruna Matheswaran,* >> Video Codec Engineer, >> Media & AI analytics BU, >> >> >> >> ___ >> x265-devel mailing list >> x265-devel@videolan.org >> https://mailman.videolan.org/listinfo/x265-devel >> > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN] Stopping Hg mirror support
All, Given that it is more than 6 months since we migrated to Git, we are now thinking about stopping the support for the hg mirror hosted at http://hg.videolan.org/x265. Please let us know if we not supporting the hg mirror will majorly impact any of your workflows. -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add: End Of Bitstream and End Of Sequence NAL units
On Mon, Mar 22, 2021 at 11:25 AM Niranjan Bala < niran...@multicorewareinc.com> wrote: > >>> >>> +.. option:: --eob, --no-eob >>> + >>> + Emit an end of bitstream NAL unit at the end of the bitstream. >>> + >>> +.. option:: --eos, --no-eos >>> + >>> + Emit an end of sequence NAL unit at the end of every coded >>> + video sequence. >>> + >>> >> [AM] Please mention the default settings. >> Also, API documentation for x265_encoder_end_nal_units() is missing. >> > Default settings and API documentation are added. > >> +if ((m_param->bEnableEndOfBitstream || >>> m_param->bEnableEndOfSequence) && outFrameCount == >>> (uint32_t)m_param->totalFrames) >>> >> [AM] This may not work with live input streams. Please check. >> > EOB and EOS NAL units should be added at the end when we know the end of > the bitstream. Since we do not know the end in live input streams, it is > not added in that scenario. > [AM] Number of frames is not known in live input cases at the beginning of the encode. However, input pipes will indicate the end of the file and you can still handle EOD insertion after flushing all the input pictures. > +{ >>> +if (api->encoder_end_nal_units(m_encoder, _nal, ) >>> < 0) >>> +{ >>> +x265_log(NULL, X265_LOG_ERROR, "Failure generating >>> end nal units\n"); >>> +m_ret = 3; >>> +goto fail; >>> +} >>> +else >>> +m_cliopt.totalbytes += >>> m_cliopt.output->writeHeaders(p_nal, nal); >>> >> [AM] Should we mark --eob as `CLI only` option? Given that EOB insertion >> is handled completely in the application, I don't see the need for the APIs >> specific to EOB. Please clarify. >> > No. --eob is not a 'CLI only' option. EOB insertion is handled in x265lib > using the API. We need to add EOB after the main encoder loop. I think it's > not appropriate to add EOB insertion in any previously existing APIs after > x265_encoder_encode. Hence, added an API for handling the end NAL units > similar to x265_encoder_headers. > [AM] If you expect the integrating application to call x265_encoder_end_nal_units, what is the use of bEnableEndOfBitstream param? > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add: End Of Bitstream and End Of Sequence NAL units
> crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 2 > --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4 > crowd_run_1920x1080_50.yuv, --preset ultrafast --video-signal-type-preset > BT2100_PQ_YCC:BT2100x108n0005 > +crowd_run_1920x1080_50.yuv, --preset ultrafast --eob --eos > > # Main12 intraCost overflow bug test > 720p50_parkrun_ter.y4m,--preset medium > diff --git a/source/x265.h b/source/x265.h > index 1c51e76..1d52ece 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1956,6 +1956,13 @@ typedef struct x265_param > * or color-volume, it will be discarded. */ > const char* videoSignalTypePreset; > > +/* Flag indicating whether the encoder should emit an End of Bitstream > + * NAL at the end of bitstream. Default false */ > +int bEnableEndOfBitstream; > + > +/* Flag indicating whether the encoder should emit an End of Sequence > + * NAL at the end of every Coded Video Sequence. Default false */ > +int bEnableEndOfSequence; > } x265_param; > > /* x265_param_alloc: > @@ -2269,6 +2276,7 @@ typedef struct x265_api > int (*encoder_reconfig)(x265_encoder*, x265_param*); > int (*encoder_reconfig_zone)(x265_encoder*, x265_zone*); > int (*encoder_headers)(x265_encoder*, x265_nal**, > uint32_t*); > +int (*encoder_end_nal_units)(x265_encoder*, x265_nal**, > uint32_t*); > int (*encoder_encode)(x265_encoder*, x265_nal**, uint32_t*, > x265_picture*, x265_picture*); > void (*encoder_get_stats)(x265_encoder*, x265_stats*, > uint32_t); > void (*encoder_log)(x265_encoder*, int, char**); > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index e9af67c..bfb6293 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -351,6 +351,8 @@ namespace X265_NS { > H0(" --[no-]idr-recovery-sei Emit recovery point infor SEI > at each IDR frame \n"); > H0(" --[no-]temporal-layersEnable a temporal sublayer > for unreferenced B frames. Default %s\n", > OPT(param->bEnableTemporalSubLayers)); > H0(" --[no-]audEmit access unit delimiters > at the start of each access unit. Default %s\n", > OPT(param->bEnableAccessUnitDelimiters)); > +H0(" --[no-]eobEmit end of bitstream nal > unit at the end of the bitstream. Default %s\n", > OPT(param->bEnableEndOfBitstream)); > +H0(" --[no-]eosEmit end of sequence nal > unit at the end of every coded video sequence. Default %s\n", > OPT(param->bEnableEndOfSequence)); > H1(" --hash Decoded Picture Hash SEI 0: > disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n", > param->decodedPictureHashSEI); > H0(" --atc-seiEmit the alternative > transfer characteristics SEI message where the integer is the preferred > transfer characteristics. Default disabled\n"); > H0(" --pic-struct Set the picture structure > and emits it in the picture timing SEI message. Values in the range 0..12. > See D.3.3 of the HEVC spec. for a detailed explanation.\n"); > diff --git a/source/x265cli.h b/source/x265cli.h > index 9eb571c..46a2b68 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -264,6 +264,10 @@ static const struct option long_options[] = > { "repeat-headers", no_argument, NULL, 0 }, > { "aud", no_argument, NULL, 0 }, > { "no-aud", no_argument, NULL, 0 }, > +{ "eob", no_argument, NULL, 0 }, > +{ "no-eob", no_argument, NULL, 0 }, > +{ "eos", no_argument, NULL, 0 }, > +{ "no-eos", no_argument, NULL, 0 }, > { "info", no_argument, NULL, 0 }, > { "no-info", no_argument, NULL, 0 }, > { "zones", required_argument, NULL, 0 }, > -- > 1.8.3.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN] x265 v3.5 is out!
Hi all, x265 version 3.5 is out with new features and encoder enhancements. Please download v3.5 from our downloads page <https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz> ( MD5Sum is deb5df5cb2ec17bdbae6ac6bbc3b1eef) and do check out the full documentation available in our release notes <https://x265.readthedocs.io/en/release_3.5/releasenotes.html>. Release notes === New feature 1. Real-time VBV for ABR (Average BitRate) encodes in –pass 2 using :option:`--vbv-live-multi-pass`: Improves VBV compliance with no significant impact on coding efficiency. Enhancements to existing features - 1. Improved hist-based scene cut algorithm: Reduces false positives by leveraging motion and scene transition info. 2. Support for RADL pictures at IDR scene cuts: Improves coding efficiency with no significant impact on performance. 3. Bidirectional scene cut aware Frame Quantizer Selection: Saves bits than forward masking with no noticeable perceptual quality difference. API changes --- 1. Additions to x265_param structure to support the newly added features and encoder enhancements. 2. New x265_param options :option:`--min-vbv-fullness` and :option:`--max-vbv-fullness` to control min and max VBV fullness. Bug fixes - 1. Incorrect VBV lookahead in :option:`--analysis-load` + :option:`--scale-factor`. 2. Encoder hang when VBV is used with slices. 3. QP spikes in the row-level VBV rate-control when WPP enabled. 4. Encoder crash in :option:`--abr-ladder`. Happy compressing!! -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add a new param option for simplifying colorimetry parameters
loc 0\n"); > +H0(" BT601_626: > --colorprim bt470bg --transfer smpte170m --colormatrix bt470bg --range > limited --chromaloc 0\n"); > +H0(" BT709_YCC: > --colorprim bt709 --transfer bt709 --colormatrix bt709 --range limited > --chromaloc 0\n"); > +H0(" BT709_RGB: > --colorprim bt709 --transfer bt709 --colormatrix gbr --range limited\n"); > +H0(" BT2020_YCC_NCL: > --colorprim bt2020 --transfer bt2020-10 --colormatrix bt709 --range > limited --chromaloc 2\n"); > +H0(" BT2020_RGB: > --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --range > limited\n"); > +H0(" BT2100_PQ_YCC: > --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --range > limited --chromaloc 2\n"); > +H0(" > BT2100_PQ_ICTCP: --colorprim bt2020 --transfer smpte2084 --colormatrix > ictcp --range limited --chromaloc 2\n"); > +H0(" BT2100_PQ_RGB: > --colorprim bt2020 --transfer smpte2084 --colormatrix gbr --range > limited\n"); > +H0(" BT2100_HLG_YCC: > --colorprim bt2020 --transfer arib-std-b67 --colormatrix bt2020nc --range > limited --chromaloc 2\n"); > +H0(" BT2100_HLG_RGB: > --colorprim bt2020 --transfer arib-std-b67 --colormatrix gbr --range > limited\n"); > +H0(" FR709_RGB: > --colorprim bt709 --transfer bt709 --colormatrix gbr --range full\n"); > +H0(" FR2020_RGB: > --colorprim bt2020 --transfer bt2020-10 --colormatrix gbr --range full\n"); > +H0(" FRP3D65_YCC: > --colorprim smpte432 --transfer bt709 --colormatrix smpte170m --range > full --chromaloc 1\n"); > +H0("color-volume > options and their corresponding values:\n"); > +H0(" > P3D65x1000n0005: --master-display > G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(1000,5)\n"); > +H0(" P3D65x4000n005: > --master-display > G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(4000,50)\n"); > +H0(" > BT2100x108n0005: --master-display > G(8500,39850)B(6550,2300)R(34000,146000)WP(15635,16450)L(1000,1)\n"); > H0(" --[no-]cllEmit content light level > info SEI. Default %s\n", OPT(param->bEmitCLL)); > H0(" --[no-]hdr10 Control dumping of HDR10 SEI > packet. If max-cll or master-display has non-zero values, this is enabled. > Default %s\n", OPT(param->bEmitHDR10SEI)); > H0(" --[no-]hdr-optAdd luma and chroma offsets > for HDR/WCG content. Default %s. Now deprecated.\n", OPT(param->bHDROpt)); > diff --git a/source/x265cli.h b/source/x265cli.h > index a24d25435..3d2480374 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -249,6 +249,7 @@ static const struct option long_options[] = > { "crop-rect", required_argument, NULL, 0 }, /* DEPRECATED */ > { "master-display", required_argument, NULL, 0 }, > { "max-cll",required_argument, NULL, 0 }, > +{"video-signal-type-preset", required_argument, NULL, 0 }, > { "min-luma", required_argument, NULL, 0 }, > { "max-luma", required_argument, NULL, 0 }, > { "log2-max-poc-lsb", required_argument, NULL, 8 }, > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH][master] Add CLI option for simplifying colorimetry parameters
rprim bt2020 --transfer bt2020-10 --colormatrix bt709 --range > limited --chromaloc 2\n"); > +H0(" BT2020_RGB: > --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --range > limited\n"); > +H0(" BT2100_PQ_YCC: > --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --range > limited --chromaloc 2\n"); > +H0(" > BT2100_PQ_ICTCP: --colorprim bt2020 --transfer smpte2084 --colormatrix > ictcp --range limited --chromaloc 2\n"); > +H0(" BT2100_PQ_RGB: > --colorprim bt2020 --transfer smpte2084 --colormatrix gbr --range > limited\n"); > +H0(" BT2100_HLG_YCC: > --colorprim bt2020 --transfer arib-std-b67 --colormatrix bt2020nc --range > limited --chromaloc 2\n"); > +H0(" BT2100_HLG_RGB: > --colorprim bt2020 --transfer arib-std-b67 --colormatrix gbr --range > limited\n"); > +H0(" FR709_RGB: > --colorprim bt709 --transfer bt709 --colormatrix gbr --range full\n"); > +H0(" FR2020_RGB: > --colorprim bt2020 --transfer bt2020-10 --colormatrix gbr --range full\n"); > +H0(" FRP3D65_YCC: > --colorprim smpte432 --transfer bt709 --colormatrix smpte170m --range > full --chromaloc 1\n"); > +H0("color-volume > options and their corresponding values:\n"); > +H0(" > P3D65x1000n0005: --master-display > G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(1000,5)\n"); > +H0(" P3D65x4000n005: > --master-display > G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(4000,50)\n"); > +H0(" > BT2100x108n0005: --master-display > G(8500,39850)B(6550,2300)R(34000,146000)WP(15635,16450)L(1000,1)\n"); > H0(" --[no-]cllEmit content light level > info SEI. Default %s\n", OPT(param->bEmitCLL)); > H0(" --[no-]hdr10 Control dumping of HDR10 SEI > packet. If max-cll or master-display has non-zero values, this is enabled. > Default %s\n", OPT(param->bEmitHDR10SEI)); > H0(" --[no-]hdr-optAdd luma and chroma offsets > for HDR/WCG content. Default %s. Now deprecated.\n", OPT(param->bHDROpt)); > diff --git a/source/x265cli.h b/source/x265cli.h > index a24d25435..3d2480374 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -249,6 +249,7 @@ static const struct option long_options[] = > { "crop-rect", required_argument, NULL, 0 }, /* DEPRECATED */ > { "master-display", required_argument, NULL, 0 }, > { "max-cll",required_argument, NULL, 0 }, > +{"video-signal-type-preset", required_argument, NULL, 0 }, > { "min-luma", required_argument, NULL, 0 }, > { "max-luma", required_argument, NULL, 0 }, > { "log2-max-poc-lsb", required_argument, NULL, 8 }, > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] Fix mingw build warnings
>From 475b750fbd810e64c82414b9d8169bad420fa8f6 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 9 Feb 2021 14:25:24 +0530 Subject: [PATCH] Fix mingw build warnings --- source/x265.cpp | 8 +--- source/x265cli.h | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/x265.cpp b/source/x265.cpp index 758c2adec..fae83dc5a 100644 --- a/source/x265.cpp +++ b/source/x265.cpp @@ -46,9 +46,11 @@ using namespace X265_NS; #define X265_HEAD_ENTRIES 3 - -#ifdef _WIN32 -#define strdup _strdup +#define CONSOLE_TITLE_SIZE 200 + +#ifdef _WIN32 +#define strdup _strdup +static char orgConsoleTitle[CONSOLE_TITLE_SIZE] = ""; #endif #ifdef _WIN32 diff --git a/source/x265cli.h b/source/x265cli.h index 7a2e0a267..47f1ad25d 100644 --- a/source/x265cli.h +++ b/source/x265cli.h @@ -33,11 +33,9 @@ #include -#define CONSOLE_TITLE_SIZE 200 #ifdef _WIN32 #include #define SetThreadExecutionState(es) -static char orgConsoleTitle[CONSOLE_TITLE_SIZE] = ""; #else #define GetConsoleTitle(t, n) #define SetConsoleTitle(t) -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, patch.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265][PATCH][RELEASE_3.5] Modify Window offsets relative to slice-types for --scenecut-aware-qp
lastScenecut + int(windowSize))) > +qp += WINDOW1_DELTA * fwdNonRefQpDelta; > +else if (((curFrame->m_poc) > (lastScenecut + > int(windowSize))) && ((curFrame->m_poc) <= (lastScenecut + 2 * > int(windowSize > +qp += WINDOW2_DELTA * fwdNonRefQpDelta; > else if (curFrame->m_poc > lastScenecut + 2 * > int(windowSize)) > -qp -= window3Delta; > +qp += WINDOW3_DELTA * fwdNonRefQpDelta; > } > } > } > @@ -3248,14 +3253,13 @@ double RateControl::backwardMasking(Frame* > curFrame, double q) > { > double qp = x265_qScale2qp(q); > double fwdRefQpDelta = double(m_param->fwdRefQpDelta); > -double window3Delta = WINDOW3_DELTA * fwdRefQpDelta; > double bwdRefQpDelta = double(m_param->bwdRefQpDelta); > double bwdNonRefQpDelta = double(m_param->bwdNonRefQpDelta); > > if (curFrame->m_isInsideWindow == BACKWARD_WINDOW) > { > if (bwdRefQpDelta < 0) > -bwdRefQpDelta = fwdRefQpDelta - window3Delta; > +bwdRefQpDelta = WINDOW3_DELTA * fwdRefQpDelta; > double sliceTypeDelta = SLICE_TYPE_DELTA * bwdRefQpDelta; > if (bwdNonRefQpDelta < 0) > bwdNonRefQpDelta = bwdRefQpDelta + sliceTypeDelta; > diff --git a/source/encoder/ratecontrol.h b/source/encoder/ratecontrol.h > index 148269b6f..996465eeb 100644 > --- a/source/encoder/ratecontrol.h > +++ b/source/encoder/ratecontrol.h > @@ -47,9 +47,9 @@ struct SPS; > #define CLIP_DURATION(f) x265_clip3(MIN_FRAME_DURATION, > MAX_FRAME_DURATION, f) > > /*Scenecut Aware QP*/ > -#define WINDOW1_DELTA 0 /* The offset for the frames coming > in the window-1*/ > -#define WINDOW2_DELTA 0.3 /* The offset for the frames coming > in the window-2*/ > -#define WINDOW3_DELTA 0.6 /* The offset for the frames coming > in the window-3*/ > +#define WINDOW1_DELTA 1.0 /* The offset for the frames coming > in the window-1*/ > +#define WINDOW2_DELTA 0.7 /* The offset for the frames coming > in the window-2*/ > +#define WINDOW3_DELTA 0.4 /* The offset for the frames coming > in the window-3*/ > > struct Predictor > { > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN] Refresh x265 clone
All, We had to recently strip a commit that got pushed into Release_3.5 branch due to some unavoidable reasons. Hence, we request all those who auto-update x265 to refresh your git repos so that we'll be on the same page. Apologies for the inconvenience caused! Please reach out to us for any queries. -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265][PATCH] Fix: Hang when vbv is used with slices
x265_log(m_param, X265_LOG_DEBUG, "POC %d row %d - >> encode restart required for VBV, to %.2f from %.2f\n", >> m_frame->m_poc, row, qpBase, >> curEncData.m_cuStat[cuAddr].baseQp); >> >> -m_vbvResetTriggerRow = row; >> +m_vbvResetTriggerRow[curRow.sliceId] = row; >> m_outStreams[0].copyBits(_backupStreams[0]); >> >> rowCoder.copyState(curRow.bufferedEntropy); >> @@ -1707,8 +1709,8 @@ void FrameEncoder::processRowEncoder(int intRow, >> ThreadLocalData& tld) >> m_frame->m_poc, row, qpBase, >> curEncData.m_cuStat[cuAddr].baseQp); >> >> // prevent the WaveFront::findJob() method from >> providing new jobs >> -m_vbvResetTriggerRow = row; >> -m_bAllRowsStop = true; >> +m_vbvResetTriggerRow[curRow.sliceId] = row; >> +m_bAllRowsStop[curRow.sliceId] = true; >> >> for (uint32_t r = m_sliceBaseRow[sliceId + 1] - 1; r >> >= row; r--) >> { >> @@ -1720,7 +1722,7 @@ void FrameEncoder::processRowEncoder(int intRow, >> ThreadLocalData& tld) >> stopRow.lock.acquire(); >> while (stopRow.active) >> { >> -if (dequeueRow(r * 2)) >> +if (dequeueRow(m_row_to_idx[r] * 2)) >> stopRow.active = false; >> else >> { >> @@ -1758,13 +1760,13 @@ void FrameEncoder::processRowEncoder(int intRow, >> ThreadLocalData& tld) >> curEncData.m_rowStat[r].sumQpAq = 0; >> } >> >> -m_bAllRowsStop = false; >> +m_bAllRowsStop[curRow.sliceId] = false; >> } >> } >> } >> >> if (m_param->bEnableWavefront && curRow.completed >= 2 && >> !bLastRowInSlice && >> -(!m_bAllRowsStop || intRow + 1 < m_vbvResetTriggerRow)) >> +(!m_bAllRowsStop[curRow.sliceId] || intRow + 1 < >> m_vbvResetTriggerRow[curRow.sliceId])) >> { >> /* activate next row */ >> ScopedLock below(m_rows[row + 1].lock); >> @@ -1779,7 +1781,7 @@ void FrameEncoder::processRowEncoder(int intRow, >> ThreadLocalData& tld) >> } >> >> ScopedLock self(curRow.lock); >> -if ((m_bAllRowsStop && intRow > m_vbvResetTriggerRow) || >> +if ((m_bAllRowsStop[curRow.sliceId] && intRow > >> m_vbvResetTriggerRow[curRow.sliceId]) || >> (!bFirstRowInSlice && ((curRow.completed < numCols - 1) || >> (m_rows[row - 1].completed < numCols)) && m_rows[row - 1].completed < >> curRow.completed + 2)) >> { >> curRow.active = false; >> diff --git a/source/encoder/frameencoder.h b/source/encoder/frameencoder.h >> index 668936872..f4cfc624d 100644 >> --- a/source/encoder/frameencoder.h >> +++ b/source/encoder/frameencoder.h >> @@ -140,9 +140,9 @@ public: >> int m_localTldIdx; >> bool m_reconfigure; /* reconfigure in progress */ >> volatile boolm_threadActive; >> -volatile boolm_bAllRowsStop; >> +volatile bool*m_bAllRowsStop; >> volatile int m_completionCount; >> -volatile int m_vbvResetTriggerRow; >> +volatile int *m_vbvResetTriggerRow; >> volatile int m_sliceCnt; >> >> uint32_t m_numRows; >> -- >> 2.18.0.windows.1 >> >> >> -- >> >> Thanks & Regards >> *Niranjan Kumar B* >> Video Codec Engineer >> Media & AI Analytics >> +91 958 511 1449 >> <https://multicorewareinc.com/> >> ___ >> x265-devel mailing list >> x265-devel@videolan.org >> https://mailman.videolan.org/listinfo/x265-devel >> > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265][PATCH] Fix: Access violation when aqMode=0 + qgSize=8
On Tue, Jan 19, 2021 at 9:24 AM Niranjan Bala wrote: > From c0947ffa313365f68f85b1f988e0521327d71a75 Mon Sep 17 00:00:00 2001 > From: Niranjan > Date: Wed, 13 Jan 2021 20:27:02 +0530 > Subject: [PATCH] Fix: Access violation when aqMode=0 + qgSize=8 > > --- > source/common/lowres.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/source/common/lowres.cpp b/source/common/lowres.cpp > index 578981d64..334640ec9 100644 > --- a/source/common/lowres.cpp > +++ b/source/common/lowres.cpp > @@ -73,7 +73,7 @@ bool Lowres::create(x265_param* param, PicYuv *origPic, > uint32_t qgSize) > > size_t planesize = lumaStride * (lines + 2 * origPic->m_lumaMarginY); > size_t padoffset = lumaStride * origPic->m_lumaMarginY + > origPic->m_lumaMarginX; > -if (!!param->rc.aqMode || !!param->rc.hevcAq || !!param->bAQMotion) > +if (!!param->rc.aqMode || !!param->rc.hevcAq || !!param->bAQMotion || > !!param->bEnableWeightedPred || !!param->bEnableWeightedBiPred) > { > [AM] The right fix for this issue would be to disable aq offset computation if aq-mode=0 and no-cutree is specified or to handle curFrame->m_lowres.wp_ssd computation outside calcAdaptiveQuantFrame(). Please revisit the code and see if this unwanted memory allocation per frame can be avoided. > CHECKED_MALLOC_ZERO(qpAqOffset, double, cuCountFullRes); > CHECKED_MALLOC_ZERO(invQscaleFactor, int, cuCountFullRes); > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > _______ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [Patch] fix: corrects output mismatch for cutree enabled analysis save/load enodes with reuse-levels in between 1 to 10 for similar encoder settings.
On Thu, Jan 21, 2021 at 5:34 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > > Adding to my reply above. > > [AM] Why MAX_NUM_CU_GEOMS combinations? > > [KS] Will optimize storage based on min-cu-size configuration. > > On Thu, Jan 21, 2021 at 4:09 PM Srikanth Kurapati < > srikanth.kurap...@multicorewareinc.com> wrote: > >> >> [AM] Can't we share lowres cutree stats generated at qg size granularity? >> Why MAX_NUM_CU_GEOMS combinations? >> >> [KS] If we share like that then we will have to calculate the dqp per cu >> at analysis phase just like save encode and we will not get the savings in >> cpu cycles there. Currently we are storing the final dqp derived from >> lowres mv costs at qg size granularity by taking the difference between the >> final qp and base qp per slice. >> > [AM] What is the memory footprint and performance impact of 1. Sharing cutree offsets per qg and collating CU-level offsets from qg-level offsets, and 2. Sharing cu-tree offsets of all partition sizes? I don't think #1 will have a significant hit on performance as the partition evaluations in load encode is restricted. > MAX_NUM_CU_GEOMS is 85 = ( 1 + 4 + 16 + 64 ) this is maximum number of >> partitions at which qp can be computed and used in a ctu. >> >> [AM] Won't this implicitly turn OFF cutree at reuse-level 1? >> >> [KS] Agreed and addressed. >> >> >> On Tue, Jan 19, 2021 at 11:12 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> >>> >>> On Mon, Jan 11, 2021 at 8:08 PM Srikanth Kurapati < >>> srikanth.kurap...@multicorewareinc.com> wrote: >>> >>>> From d516d0564888e154d88d89320302725d87bfab78 Mon Sep 17 00:00:00 2001 >>>> From: Srikanth Kurapati >>>> Date: Wed, 30 Dec 2020 17:00:08 +0530 >>>> Subject: [PATCH] fix: corrects output mismatch for cutree enabled >>>> analysis >>>> save/load enodes with reuse-levels in between 1 to 10 for similar >>>> encoder >>>> settings. >>>> >>>> --- >>>> source/abrEncApp.cpp | 14 +++- >>>> source/common/common.h | 3 +- >>>> source/common/cudata.h | 2 +- >>>> source/encoder/analysis.cpp | 31 - >>>> source/encoder/analysis.h| 1 + >>>> source/encoder/api.cpp | 28 +++- >>>> source/encoder/encoder.cpp | 123 ++- >>>> source/encoder/slicetype.cpp | 2 +- >>>> source/x265.h| 4 +- >>>> 9 files changed, 166 insertions(+), 42 deletions(-) >>>> >>>> diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp >>>> index fa62ebf63..ea255e3f6 100644 >>>> --- a/source/abrEncApp.cpp >>>> +++ b/source/abrEncApp.cpp >>>> @@ -340,7 +340,12 @@ namespace X265_NS { >>>> memcpy(intraDst->partSizes, intraSrc->partSizes, >>>> sizeof(char) * src->depthBytes); >>>> memcpy(intraDst->chromaModes, intraSrc->chromaModes, >>>> sizeof(uint8_t) * src->depthBytes); >>>> if (m_param->rc.cuTree) >>>> -memcpy(intraDst->cuQPOff, intraSrc->cuQPOff, >>>> sizeof(int8_t) * src->depthBytes); >>>> +{ >>>> +if (m_param->analysisSaveReuseLevel == 10) >>>> +memcpy(intraDst->cuQPOff, intraSrc->cuQPOff, >>>> sizeof(int8_t) * src->depthBytes); >>>> +else >>>> +memcpy(intraDst->cuQPOff, intraSrc->cuQPOff, >>>> sizeof(int8_t) * (src->numCUsInFrame * MAX_NUM_CU_GEOMS)); >>>> +} >>>> } >>>> else >>>> { >>>> @@ -355,7 +360,12 @@ namespace X265_NS { >>>> memcpy(interDst->depth, interSrc->depth, sizeof(uint8_t) * >>>> src->depthBytes); >>>> memcpy(interDst->modes, interSrc->modes, sizeof(uint8_t) * >>>> src->depthBytes); >>>> if (m_param->rc.cuTree) >>>> -memcpy(interDst->cuQPOff, interSrc->cuQPOff, >>>> sizeof(int8_t) * src->depthBytes); >>>> +{ >>>> +if (m_param->analysisReuseLevel == 10) >>>> +memcpy(interDst->cuQPOff, interSrc->cuQPOff, >>>>
Re: [x265] [Patch] fix: corrects output mismatch for cutree enabled analysis save/load enodes with reuse-levels in between 1 to 10 for similar encoder settings.
analysisSaveReuseLevel > 4) > @@ -5599,13 +5653,23 @@ void > Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData > } > absPartIdx += ctu->m_numPartitions >> (depth * 2); > } > + > +if (m_param->rc.cuTree && m_param->analysisSaveReuseLevel > < 10) > +{ > +uint32_t nextCuIdx = (cuAddr + 1) * MAX_NUM_CU_GEOMS; > +for (uint32_t i = cuAddr * MAX_NUM_CU_GEOMS; i < > nextCuIdx ; i++) > +interDataCTU->cuQPOff[i] = > (int8_t)(interDataCTU->cuQPOff[i] - baseQP); > +} > + > if (m_param->analysisSaveReuseLevel == 10 && > bIntraInInter) > memcpy(>modes[ctu->m_cuAddr * > ctu->m_numPartitions], ctu->m_lumaIntraDir, sizeof(uint8_t)* > ctu->m_numPartitions); > } > +if (m_param->rc.cuTree && m_param->analysisSaveReuseLevel == > 10) > +reuseQPBufsize = depthBytes; > } > > if ((analysis->sliceType == X265_TYPE_IDR || analysis->sliceType > == X265_TYPE_I) && m_param->rc.cuTree) > -analysis->frameRecordSize += sizeof(uint8_t)* > analysis->numCUsInFrame * analysis->numPartitions + depthBytes * 3 + > (sizeof(int8_t) * depthBytes); > +analysis->frameRecordSize += sizeof(uint8_t)* > analysis->numCUsInFrame * analysis->numPartitions + depthBytes * 3 + > (sizeof(int8_t) * reuseQPBufsize); > else if (analysis->sliceType == X265_TYPE_IDR || > analysis->sliceType == X265_TYPE_I) > analysis->frameRecordSize += sizeof(uint8_t)* > analysis->numCUsInFrame * analysis->numPartitions + depthBytes * 3; > else > @@ -5613,7 +5677,8 @@ void Encoder::writeAnalysisFile(x265_analysis_data* > analysis, FrameData > /* Add sizeof depth, modes, partSize, cuQPOffset, mergeFlag */ > analysis->frameRecordSize += depthBytes * 2; > if (m_param->rc.cuTree) > -analysis->frameRecordSize += (sizeof(int8_t) * depthBytes); > +analysis->frameRecordSize += (sizeof(int8_t) * > reuseQPBufsize); > + > if (m_param->analysisSaveReuseLevel > 4) > analysis->frameRecordSize += (depthBytes * 2); > > @@ -5669,7 +5734,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* > analysis, FrameData > X265_FWRITE((analysis->intraData)->chromaModes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > X265_FWRITE((analysis->intraData)->partSizes, sizeof(char), > depthBytes, m_analysisFileOut); > if (m_param->rc.cuTree) > -X265_FWRITE((analysis->intraData)->cuQPOff, sizeof(int8_t), > depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->intraData)->cuQPOff, sizeof(int8_t), > reuseQPBufsize, m_analysisFileOut); > X265_FWRITE((analysis->intraData)->modes, sizeof(uint8_t), > analysis->numCUsInFrame * analysis->numPartitions, m_analysisFileOut); > } > else > @@ -5677,7 +5742,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* > analysis, FrameData > X265_FWRITE((analysis->interData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > X265_FWRITE((analysis->interData)->modes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > if (m_param->rc.cuTree) > -X265_FWRITE((analysis->interData)->cuQPOff, sizeof(int8_t), > depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->cuQPOff, sizeof(int8_t), > reuseQPBufsize, m_analysisFileOut); > if (m_param->analysisSaveReuseLevel > 4) > { > X265_FWRITE((analysis->interData)->partSize, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > @@ -5762,7 +5827,7 @@ void > Encoder::writeAnalysisFileRefine(x265_analysis_data* analysis, FrameData > interData->mv[1][depthBytes].word = > ctu->m_mv[1][absPartIdx].word; > interData->mvpIdx[1][depthBytes] = > ctu->m_mvpIdx[1][absPartIdx]; > ref[1][depthBytes] = ctu->m_refIdx[1][absPartIdx]; > -predMode = 4; // used as indiacator if the block is > coded as bidir > +predMode = 4; // used as indicator if the block is > coded as bidir > } > interData->modes[depthBytes] = predMode; > > diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp > index 0adb0d0db..3bc01268b 100644 > --- a/source/encoder/slicetype.cpp > +++ b/source/encoder/slicetype.cpp > @@ -1894,7 +1894,7 @@ void Lookahead::slicetypeAnalyse(Lowres **frames, > bool bKeyframe) > > if (!framecnt) > { > -if (m_param->rc.cuTree) > +if (m_param->rc.cuTree && !m_param->analysisLoad) > [AM] Won't this implicitly turn OFF cutree at reuse-level 1? > cuTree(frames, 0, bKeyframe); > return; > } > diff --git a/source/x265.h b/source/x265.h > index f44040ba7..8d7a75826 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -144,7 +144,7 @@ typedef struct x265_analysis_intra_data > uint8_t* modes; > char* partSizes; > uint8_t* chromaModes; > -int8_t*cuQPOff; > +int8_t* cuQPOff; > }x265_analysis_intra_data; > > typedef struct x265_analysis_MV > @@ -167,7 +167,7 @@ typedef struct x265_analysis_inter_data > uint8_t*interDir; > uint8_t*mvpIdx[2]; > int8_t* refIdx[2]; > -x265_analysis_MV* mv[2]; > +x265_analysis_MV* mv[2]; > int64_t* sadCost; > int8_t*cuQPOff; > }x265_analysis_inter_data; > -- > 2.20.1.windows.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265] [Patch] [Master, Release 3.5] Fixes cmake backward compatibility issues for version control script
Pushed the fix to Release_3.5 and cherry-picked the same to master. On Wed, Jan 6, 2021 at 12:33 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > From 1983a69a00424bed9f66b34bddf09cd2165b31c1 Mon Sep 17 00:00:00 2001 > From: Srikanth Kurapati > Date: Thu, 31 Dec 2020 16:35:27 +0530 > Subject: [PATCH] Fixes cmake backward compatibility issues for version > control > script > > --- > source/cmake/Version.cmake | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake > index a3988d3..3bbf42f 100644 > --- a/source/cmake/Version.cmake > +++ b/source/cmake/Version.cmake > @@ -48,7 +48,7 @@ if(HG_EXECUTABLE) > endif() > endif(HG_EXECUTABLE) > find_package(Git QUIET) #No restrictions on Git versions used, any > versions from 1.8.x to 2.2.x or later should do. > -if(Git_FOUND) > +if(GIT_FOUND) > find_program(GIT_EXECUTABLE git) > message(STATUS "GIT_EXECUTABLE ${GIT_EXECUTABLE}") > if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > @@ -56,7 +56,7 @@ if(Git_FOUND) > elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt) > set(GIT_ARCHETYPE "1") > endif() > -endif(Git_FOUND) > +endif(GIT_FOUND) > if(HG_ARCHETYPE) > #Read the lines of the archive summary file to extract the version > message(STATUS "SOURCE CODE IS FROM x265 HG ARCHIVED ZIP OR TAR BALL") > @@ -122,7 +122,7 @@ elseif(GIT_ARCHETYPE) > set(X265_LATEST_TAG ${git_releasetag}) > if(DEFINED git_releasetagdistance) > set(X265_TAG_DISTANCE ${git_releasetagdistance}) > -if(X265_TAG_DISTANCE STRGREATER_EQUAL "0") > +if(X265_TAG_DISTANCE STRGREATER "0" OR X265_TAG_DISTANCE > STREQUAL "0") > #for x265 the repository changeset has to be a tag id or > commit id after the tag > #hence mandating it's presence in version file always for > valid tag distances. > if(DEFINED git_repositorychangeset) > -- > 1.8.3.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fix: Build warnings in Windows + cleanup
lmax[m_sliceType]; > > -if (m_param->bEnableSceneCutAwareQp == FORWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp & FORWARD) > q = forwardMasking(curFrame, q); > -if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp & BACKWARD) > q = backwardMasking(curFrame, q); > > q = x265_clip3(qmin, qmax, q); > @@ -2156,9 +2156,9 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > double qmin = m_lmin[m_sliceType]; > double qmax = m_lmax[m_sliceType]; > > -if (m_param->bEnableSceneCutAwareQp == FORWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp & FORWARD) > q = forwardMasking(curFrame, q); > -if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp & BACKWARD) > q = backwardMasking(curFrame, q); > > q = x265_clip3(qmin, qmax, q); > @@ -3192,8 +3192,6 @@ double RateControl::forwardMasking(Frame* curFrame, > double q) > int lastIFrame = m_top->m_rateControl->m_lastScenecutAwareIFrame; > double fwdRefQpDelta = double(m_param->fwdRefQpDelta); > double fwdNonRefQpDelta = double(m_param->fwdNonRefQpDelta); > -double bwdRefQpDelta = double(m_param->bwdRefQpDelta); > -double bwdNonRefQpDelta = double(m_param->bwdNonRefQpDelta); > double sliceTypeDelta = SLICE_TYPE_DELTA * fwdRefQpDelta; > double window2Delta = WINDOW2_DELTA * fwdRefQpDelta; > double window3Delta = WINDOW3_DELTA * fwdRefQpDelta; > diff --git a/source/test/rate-control-tests.txt > b/source/test/rate-control-tests.txt > index 6c8f10cb6..e3dd2507d 100644 > --- a/source/test/rate-control-tests.txt > +++ b/source/test/rate-control-tests.txt > @@ -46,6 +46,7 @@ sita_1920x1080_30.yuv, --preset ultrafast --crf 20 > --no-cutree --keyint 50 --min > sita_1920x1080_30.yuv, --preset medium --crf 20 --no-cutree --keyint 50 > --min-keyint 50 --no-open-gop --pass 1 --vbv-bufsize 7000 --vbv-maxrate > 5000 --repeat-headers --multi-pass-opt-rps:: --preset medium --crf 20 > --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 2 > --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers --multi-pass-opt-rps > sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 1 > sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --hist-scenecut --pass 1::--preset medium --bitrate > 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 2 --scenecut-aware-qp 3 > --masking-strength 300,-1,7,100,2,3 > +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 2 --masking-strength > 100,-1,-1 > > # multi-pass rate control and analysis > ducks_take_off_1080p50.y4m,--bitrate 6000 --pass 1 > --multi-pass-opt-analysis --hash 1 --ssim --psnr:: --bitrate 6000 --pass > 2 --multi-pass-opt-analysis --hash 1 --ssim --psnr > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index 0c0d27ff5..41d73e174 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -181,7 +181,7 @@ namespace X265_NS { > H1(" 1 - Forward masking\n"); > H1(" 2 - Backward masking\n"); > H1(" 3 - Bidirectional > masking\n"); > -H1(" --masking-strengthComma separated values which > specifies the duration and offset for the QP increment for inter-frames"); > +H1(" --masking-strengthComma separated values which > specify the duration and offset for the QP increment for inter-frames when > scenecut-aware-qp is enabled.\n"); > H0(" --radl Number of RADL pictures > allowed in front of IDR. Default %d\n", param->radl); > H0(" --intra-refresh Use Periodic Intra Refresh > instead of IDR frames\n"); > H0(" --rc-lookahead Number of frames for > frame-type lookahead (determines encoder latency) Default %d\n", > param->lookaheadDepth); > -- > 2.18.0.windows.1 > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265] [Final Patch] fix: avoids unnecessary lexicographic order checks on git changesets
#hence mandating it's presence in version file always for > valid tag distances. > +if(DEFINED git_repositorychangeset) > +string(SUBSTRING "${git_repositorychangeset}" 0 9 > X265_REVISION_ID) > +else() > +message(WARNING "X265 LATEST COMMIT TIP INFORMATION > NOT AVAILABLE") > +endif() > +else() > +message(WARNING "X265 TAG DISTANCE INVALID") > +endif() > +else() > +message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > +endif() > +else() > +message(WARNING "X265 RELEASE VERSION LABEL MISSING: > ${X265_LATEST_TAG}") > +endif() > +message(STATUS "GIT ARCHIVAL INFORMATION PROCESSED") > +else() > execute_process( > COMMAND > ${GIT_EXECUTABLE} describe --abbrev=0 --tags > @@ -132,62 +165,15 @@ elseif(GIT_ARCHETYPE STREQUAL "2") > ERROR_QUIET > OUTPUT_STRIP_TRAILING_WHITESPACE > ) > -elseif(GIT_ARCHETYPE STREQUAL "1") > -message(STATUS "X265 GIT ARCHIVE EXTRACT VERSION INFORMATION > PROCESSING") > -#Read the lines of the archive summary file to extract the version > -file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt filebuf) > -STRING(REGEX REPLACE "\n" ";" filebuf "${filebuf}") > -foreach(line ${filebuf}) > -string(FIND "${line}" ": " pos) > -string(SUBSTRING "${line}" 0 ${pos} key) > -string(SUBSTRING "${line}" ${pos} -1 value) > -string(SUBSTRING "${value}" 2 -1 value) > -set(git_${key} ${value}) > -endforeach() > -if(DEFINED git_releasetag) > -set(X265_LATEST_TAG ${git_releasetag}) > -if(DEFINED git_releasetagcommitid) > -string(SUBSTRING "${git_releasetagcommitid}" 0 9 > X265_REVISION_ID) > -else() > -message(WARNING "RELEASE CHANGESET INFO NOT PRESENT IN > VERSION FILE") > -endif() > -if(DEFINED git_repositorychangeset) > - string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REPO_ID) > -else() > - message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT > AVAILABLE") > -endif() > -if(DEFINED git_releasetagdistance) > - set(X265_TAG_DISTANCE ${git_releasetagdistance}) > -else() > - message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > -endif() > -else() > -message(WARNING "X265 RELEASE VERSION LABEL MISSING: > ${X265_LATEST_TAG}") > -endif() > +message(STATUS "GIT LIVE REPO VERSION RETRIEVED") > endif() > > -# formatting based on positive or negative distance from tag > +# formatting based on distance from tag > if(X265_TAG_DISTANCE STREQUAL "0") > -if(X265_REVISION_ID STREQUAL X265_REPO_ID) > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING") > -endif() > +set(X265_VERSION "${X265_LATEST_TAG}") > elseif(X265_TAG_DISTANCE STRGREATER "0") > -if(X265_REVISION_ID STRLESS X265_REPO_ID) > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -else() > -message(WARNING "ARCCHIVE TIP CHANGESET TO BE GREATER THAN > REVISION ID") > -endif() > -elseif(X265_TAG_DISTANCE STRLESS "0") > -if(X265_REVISION_ID STRGREATER X265_REPO_ID) > - set(X265_VERSION > "${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}") > -else() > -message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE > TIP CHANGESET") > -endif() > -else() > -message(ERROR "Inappropriate set of version information") > +set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > endif() > > #will always be printed in its entirety based on version file > configuration to avail revision monitoring by repo owners > -message(STATUS "x265 RELEASE VERSION ${X265_VERSION}") > +message(STATUS "X265 RELEASE VERSION ${X265_VERSION}") > diff --git a/x265Version.txt b/x265Version.txt > index ac225ec4d..33950f9a0 100644 > --- a/x265Version.txt > +++ b/x265Version.txt > @@ -1,5 +1,4 @@ > #Attribute: Values > repositorychangeset: 5163c32d7 > -releasetagcommitid: a4f320054 > releasetagdistance: 28 > releasetag: 3.4 > -- > 2.20.1.windows.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265][PATCH] Fix: warnings in Windows
5_param > > /* The offset by which QP is incremented for non-referenced > inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ > doublebwdNonRefQpDelta; > + > +/* It is set when bEnableSceneCutAwareQp is 1 or 3 */ > +int forwardWindow; > + > +/* It is set when bEnableSceneCutAwareQp is 2 or 3 */ > +int backwardWindow; > } x265_param; > [AM] Do we really need two new params? These 2 params are duplicating p->bEnableSceneCutAwareQp. We can either replace them with "p->bEnableSceneCutAwareQp & BACKWARD" and "p->bEnableSceneCutAwareQp & BACKWARD" checks respectively. Or, remove p->bEnableSceneCutAwareQp. > > /* x265_param_alloc: > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index 0c0d27ff5..8ad5a18cb 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -181,7 +181,7 @@ namespace X265_NS { > H1(" 1 - Forward masking\n"); > H1(" 2 - Backward masking\n"); > H1(" 3 - Bidirectional > masking\n"); > -H1(" --masking-strengthComma separated values which > specifies the duration and offset for the QP increment for inter-frames"); > +H1(" --masking-strengthComma separated values which > specifies the duration and offset for the QP increment for inter-frames\n"); > H0(" --radl Number of RADL pictures > allowed in front of IDR. Default %d\n", param->radl); > H0(" --intra-refresh Use Periodic Intra Refresh > instead of IDR frames\n"); > H0(" --rc-lookahead Number of frames for > frame-type lookahead (determines encoder latency) Default %d\n", > param->lookaheadDepth); > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265] [Fix Patch] [Master, Release 3.5 branches] Fix: avoids unnecessary lexicographic order checks on git changesets
On Thu, Dec 24, 2020 at 6:22 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > just to make sure that the is tag information is not spurious. All valid > tags will have a commit id associated with them. We read it to check if the > association is complete. > [AM] Tag's commit info in the version file and the associated parsing is unnecessary as we aren't using it anywhere. Please remove that . > > On Thu, Dec 24, 2020 at 5:55 PM Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> >> >> On Wed, Dec 23, 2020 at 9:40 PM Srikanth Kurapati < >> srikanth.kurap...@multicorewareinc.com> wrote: >> >>> From 06e09d500b9453b32835a6090df873b7b5842f22 Mon Sep 17 00:00:00 2001 >>> From: Srikanth Kurapati >>> Date: Wed, 16 Dec 2020 10:52:33 +0530 >>> Subject: [PATCH] fix: avoids unnecessary lexicographic order checks on >>> git >>> changesets >>> >>> and correct variables used for git archive version reporting >>> --- >>> source/cmake/Version.cmake | 103 - >>> 1 file changed, 44 insertions(+), 59 deletions(-) >>> >>> diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake >>> index 37c759268..f67b77395 100644 >>> --- a/source/cmake/Version.cmake >>> +++ b/source/cmake/Version.cmake >>> @@ -28,8 +28,6 @@ >>> set(X265_VERSION "unknown") >>> set(X265_LATEST_TAG "0.0") >>> set(X265_TAG_DISTANCE "0") >>> -set(HG_ARCHETYPE "0") >>> -set(GIT_ARCHETYPE "0") >>> >>> #Find version control software to be used for live and extracted >>> repositories from compressed tarballs >>> if(CMAKE_VERSION VERSION_LESS "2.8.10") >>> @@ -43,10 +41,10 @@ else() >>> endif() >>> if(HG_EXECUTABLE) >>> #Set Version Control binary for source code kind >>> -if(EXISTS CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt) >>> +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt) >>> set(HG_ARCHETYPE "1") >>> elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg) >>> -set(HG_ARCHETYPE "2") >>> +set(HG_ARCHETYPE "0") >>> endif() >>> endif(HG_EXECUTABLE) >>> find_package(Git QUIET) #No restrictions on Git versions used, any >>> versions from 1.8.x to 2.2.x or later should do. >>> @@ -54,14 +52,14 @@ if(Git_FOUND) >>> find_program(GIT_EXECUTABLE git) >>> message(STATUS "GIT_EXECUTABLE ${GIT_EXECUTABLE}") >>> if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) >>> -set(GIT_ARCHETYPE "2") >>> +set(GIT_ARCHETYPE "0") >>> elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt) >>> set(GIT_ARCHETYPE "1") >>> endif() >>> endif(Git_FOUND) >>> -if(HG_ARCHETYPE STREQUAL "1") >>> +if(HG_ARCHETYPE) >>> #Read the lines of the archive summary file to extract the version >>> -message(STATUS "SOURCE CODE IS FROM x265 ARCHIVED ZIP OR TAR BALL") >>> +message(STATUS "SOURCE CODE IS FROM x265 HG ARCHIVED ZIP OR TAR >>> BALL") >>> file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt archive) >>> STRING(REGEX REPLACE "\n" ";" archive "${archive}") >>> foreach(f ${archive}) >>> @@ -79,7 +77,8 @@ if(HG_ARCHETYPE STREQUAL "1") >>> string(SUBSTRING "${hg_node}" 0 12 X265_REVISION_ID) >>> endif() >>> message(STATUS "HG ARCHIVAL INFORMATION PROCESSED") >>> -elseif(HG_ARCHETYPE STREQUAL "2") >>> +elseif(NOT DEFINED GIT_ARCHETYPE) >>> +# means that's its neither hg archive nor git clone/archive hence it >>> has to be hg live repo as these are only four cases that need to processed >>> in mutual exclusion. >>> execute_process(COMMAND >>> ${HG_EXECUTABLE} log -r. --template "{latesttag}" >>> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} >>> @@ -107,33 +106,8 @@ elseif(HG_ARCHETYPE STREQUAL "2") >>> string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) >>> endif() >>> message(STATUS "HG LIVE REPO STATUS CHECK DONE") >>> -elseif(GIT_ARCHETYPE STREQUAL "2") >>> -execute_process( >>&g
Re: [x265] [X265] [Fix Patch] [Master, Release 3.5 branches] Fix: avoids unnecessary lexicographic order checks on git changesets
he archive summary file to extract the version > file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt filebuf) > STRING(REGEX REPLACE "\n" ";" filebuf "${filebuf}") > @@ -152,42 +126,53 @@ elseif(GIT_ARCHETYPE STREQUAL "1") > message(WARNING "RELEASE CHANGESET INFO NOT PRESENT IN > VERSION FILE") > endif() > if(DEFINED git_repositorychangeset) > - string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REPO_ID) > +string(SUBSTRING "${git_repositorychangeset}" 0 9 > X265_REVISION_ID) > else() > - message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT > AVAILABLE") > +message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT > AVAILABLE") > endif() > if(DEFINED git_releasetagdistance) > - set(X265_TAG_DISTANCE ${git_releasetagdistance}) > +set(X265_TAG_DISTANCE ${git_releasetagdistance}) > else() > - message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > +message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > endif() > else() > message(WARNING "X265 RELEASE VERSION LABEL MISSING: > ${X265_LATEST_TAG}") > endif() > + message(STATUS "GIT ARCHIVAL INFORMATION PROCESSED") > +else() > +execute_process( > +COMMAND > +${GIT_EXECUTABLE} describe --abbrev=0 --tags > +WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > +OUTPUT_VARIABLE X265_LATEST_TAG > +ERROR_QUIET > +OUTPUT_STRIP_TRAILING_WHITESPACE > +) > +execute_process( > +COMMAND > +${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count > --first-parent > +WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > +OUTPUT_VARIABLE X265_TAG_DISTANCE > +ERROR_QUIET > +OUTPUT_STRIP_TRAILING_WHITESPACE > +) > +execute_process( > +COMMAND > +${GIT_EXECUTABLE} log --pretty=format:%h -n 1 > +WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > +OUTPUT_VARIABLE X265_REVISION_ID > +ERROR_QUIET > +OUTPUT_STRIP_TRAILING_WHITESPACE > +) > +message(STATUS "GIT LIVE REPO VERSION RETRIEVED") > endif() > > -# formatting based on positive or negative distance from tag > +# formatting based on distance from tag > if(X265_TAG_DISTANCE STREQUAL "0") > -if(X265_REVISION_ID STREQUAL X265_REPO_ID) > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING") > -endif() > +set(X265_VERSION "${X265_LATEST_TAG}") > elseif(X265_TAG_DISTANCE STRGREATER "0") > -if(X265_REVISION_ID STRLESS X265_REPO_ID) > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -else() > -message(WARNING "ARCCHIVE TIP CHANGESET TO BE GREATER THAN > REVISION ID") > - endif() > -elseif(X265_TAG_DISTANCE STRLESS "0") > -if(X265_REVISION_ID STRGREATER X265_REPO_ID) > - set(X265_VERSION > "${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}") > -else() > -message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE > TIP CHANGESET") > -endif() > -else() > -message(ERROR "Inappropriate set of version information") > +set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > endif() > > #will always be printed in its entirety based on version file > configuration to avail revision monitoring by repo owners > -message(STATUS "x265 RELEASE VERSION ${X265_VERSION}") > +message(STATUS "X265 RELEASE VERSION ${X265_VERSION}") > -- > 2.20.1.windows.1 > [AM] The need for releasetagcommitid is still not clear. Why do we need that? > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265] [Fix Patch] [Master, Release 3.5 branches] fix: avoids unnecessary lexicographic order checks on git changesets, corrects version reporting
On Tue, Dec 22, 2020 at 2:25 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > > From 123a406a4845ec228bd234693115e6ffb6bc423f Mon Sep 17 00:00:00 2001 > From: Srikanth Kurapati > Date: Wed, 16 Dec 2020 10:52:33 +0530 > Subject: [PATCH] fix: avoids unnecessary lexicographic order checks on git > changesets > > and correct variables used for git archive version reporting > --- > source/cmake/Version.cmake | 28 ++-- > 1 file changed, 10 insertions(+), 18 deletions(-) > > diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake > index 37c759268..21730cf91 100644 > --- a/source/cmake/Version.cmake > +++ b/source/cmake/Version.cmake > @@ -152,14 +152,14 @@ elseif(GIT_ARCHETYPE STREQUAL "1") > message(WARNING "RELEASE CHANGESET INFO NOT PRESENT IN > VERSION FILE") > endif() > if(DEFINED git_repositorychangeset) > - string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REPO_ID) > +string(SUBSTRING "${git_repositorychangeset}" 0 9 > X265_REPO_ID) > else() > - message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT > AVAILABLE") > +message(STATUS "X265 LATEST COMMIT TIP INFORMATION NOT > AVAILABLE") > endif() > if(DEFINED git_releasetagdistance) > - set(X265_TAG_DISTANCE ${git_releasetagdistance}) > +set(X265_TAG_DISTANCE ${git_releasetagdistance}) > else() > - message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > +message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION > UNAVAILABLE") > endif() > else() > message(WARNING "X265 RELEASE VERSION LABEL MISSING: > ${X265_LATEST_TAG}") > @@ -168,25 +168,17 @@ endif() > > # formatting based on positive or negative distance from tag > if(X265_TAG_DISTANCE STREQUAL "0") > -if(X265_REVISION_ID STREQUAL X265_REPO_ID) > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING") > -endif() > +set(X265_VERSION "${X265_LATEST_TAG}") > elseif(X265_TAG_DISTANCE STRGREATER "0") > -if(X265_REVISION_ID STRLESS X265_REPO_ID) > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > +if(GIT_ARCHETYPE STREQUAL "1") > [AM] Why aren't we handling HG here? > +set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REPO_ID}") > [AM] Use X265_REVISION_ID to hold "repositoryChangeset" in both the cases ( i.e ARCHIVE type 1 and 2). > else() > -message(WARNING "ARCCHIVE TIP CHANGESET TO BE GREATER THAN > REVISION ID") > +set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > endif() > elseif(X265_TAG_DISTANCE STRLESS "0") > -if(X265_REVISION_ID STRGREATER X265_REPO_ID) > - set(X265_VERSION > "${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}") > -else() > -message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE > TIP CHANGESET") > -endif() > +set(X265_VERSION > "${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}") > [AM] With the clean up mentioned above, this section shall be eliminated. [AM] Treating GIT_ARCHETYPE as a flag will improve code readability. > else() > -message(ERROR "Inappropriate set of version information") > +message(ERROR "Inappropriate version information") > [AM] This else() will never take a hit. Remove this. > endif() > > #will always be printed in its entirety based on version file > configuration to avail revision monitoring by repo owners > -- > 2.20.1.windows.1 > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN] x265.org is taken down for maintenance
All, We are taking down x265.org for maintenance activities. The site will be back in a couple of weeks. For any information, please post here, or reach out to x265-supp...@multicorewareinc.com -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [Patch] [Master branch] Fix version information reporting for x265 git archival
}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process(COMMAND > -${HG_EXECUTABLE} log -r. --template "{latesttagdistance}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${HG_EXECUTABLE} log -r. --template "{node}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) > - > -if(X265_LATEST_TAG MATCHES "^r") > -string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) > -endif() > -elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} describe --abbrev=0 --tags > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count > --first-parent > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} log -1 --format=g%h > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -endif() > -if(X265_TAG_DISTANCE STREQUAL "0") > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -endif() > - > -message(STATUS "x265 version ${X265_VERSION}") > diff --git a/x265Version.txt b/x265Version.txt > new file mode 100644 > index 0..ac225ec4d > --- /dev/null > +++ b/x265Version.txt > @@ -0,0 +1,5 @@ > +#Attribute: Values > +repositorychangeset: 5163c32d7 > +releasetagcommitid: a4f320054 > +releasetagdistance: 28 > +releasetag: 3.4 > -- > 2.20.1.windows.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [Patch] [Release 3.5 branch ] Fix version information reporting for x265 git archival
X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process(COMMAND > -${HG_EXECUTABLE} log -r. --template "{latesttagdistance}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${HG_EXECUTABLE} log -r. --template "{node}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) > - > -if(X265_LATEST_TAG MATCHES "^r") > -string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) > -endif() > -elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} describe --abbrev=0 --tags > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count > --first-parent > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} log -1 --format=g%h > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -endif() > -if(X265_TAG_DISTANCE STREQUAL "0") > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -endif() > - > -message(STATUS "x265 version ${X265_VERSION}") > diff --git a/x265Version.txt b/x265Version.txt > new file mode 100644 > index 0..ea179871e > --- /dev/null > +++ b/x265Version.txt > @@ -0,0 +1,5 @@ > +#Attribute: Values > +repositorychangeset: 6722fce1f > +releasetagcommitid: a4f320054 > +releasetagdistance: 31 > +releasetag: 3.4 > -- > 2.20.1.windows.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265][PATCH] Fix: QP offset in scenecut-aware-qp with bi-directional window
Pushed to Release_3.5 On Fri, Dec 11, 2020 at 8:30 PM Niranjan Bala wrote: > From f36f211dd1ec4c3d580416e04c879b695fd3501b Mon Sep 17 00:00:00 2001 > From: Niranjan > Date: Fri, 11 Dec 2020 20:22:53 +0530 > Subject: [PATCH] Fix: QP offset in scenecut-aware-qp with bi-directional > window > > --- > source/encoder/ratecontrol.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/source/encoder/ratecontrol.cpp > b/source/encoder/ratecontrol.cpp > index 554acfe38..2b7ac9423 100644 > --- a/source/encoder/ratecontrol.cpp > +++ b/source/encoder/ratecontrol.cpp > @@ -1860,7 +1860,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > double lqmax = m_lmax[m_sliceType]; > if (m_param->bEnableSceneCutAwareQp == FORWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > qScale = forwardMasking(curFrame, qScale); > -else if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > qScale = backwardMasking(curFrame, qScale); > qScale = x265_clip3(lqmin, lqmax, qScale); > q = x265_qScale2qp(qScale); > @@ -1987,7 +1987,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > > if (m_param->bEnableSceneCutAwareQp == FORWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > q = forwardMasking(curFrame, q); > -else if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > q = backwardMasking(curFrame, q); > > q = x265_clip3(qmin, qmax, q); > @@ -2156,7 +2156,7 @@ double RateControl::rateEstimateQscale(Frame* > curFrame, RateControlEntry *rce) > > if (m_param->bEnableSceneCutAwareQp == FORWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > q = forwardMasking(curFrame, q); > -else if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > +if (m_param->bEnableSceneCutAwareQp == BACKWARD || > m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL) > q = backwardMasking(curFrame, q); > > q = x265_clip3(qmin, qmax, q); > -- > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH]Add: Forward and Backward masking
5000 --repeat-headers --multi-pass-opt-rps > -sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp > -sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --hist-scenecut --pass 1::--preset medium --bitrate > 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 2 --scenecut-aware-qp > --qp-delta-nonref 8 > +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 1 > +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 > --no-cutree --aq-mode 0 --hist-scenecut --pass 1::--preset medium --bitrate > 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 2 --scenecut-aware-qp 3 > --masking-strength 300,-1,7,100,2,3 > > # multi-pass rate control and analysis > ducks_take_off_1080p50.y4m,--bitrate 6000 --pass 1 > --multi-pass-opt-analysis --hash 1 --ssim --psnr:: --bitrate 6000 --pass > 2 --multi-pass-opt-analysis --hash 1 --ssim --psnr > diff --git a/source/x265.h b/source/x265.h > index f44040ba7..b064f67c2 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -607,6 +607,9 @@ typedef enum > #define X265_ANALYSIS_SAVE 1 > #define X265_ANALYSIS_LOAD 2 > > +#define FORWARD 1 > +#define BACKWARD2 > +#define BI_DIRECTIONAL 3 > #define SLICE_TYPE_DELTA0.3 /* The offset decremented or > incremented for P-frames or b-frames respectively*/ > #define BACKWARD_WINDOW 1 /* Scenecut window before a scenecut */ > #define FORWARD_WINDOW 2 /* Scenecut window after a scenecut */ > @@ -1847,21 +1850,24 @@ typedef struct x265_param >Default 1 (Enabled). API only. */ > int bResetZoneConfig; > > -/* It reduces the bits spent on the inter-frames within the > scenecutWindow before and after a scenecut > +/* It reduces the bits spent on the inter-frames within the > scenecutWindow before and / or after a scenecut > * by increasing their QP in ratecontrol pass2 algorithm without any > deterioration in visual quality. > - * Default is disabled. */ > + * 0 - Disabled (default). > + * 1 - Forward masking. > + * 2 - Backward masking. > + * 3 - Bi-directional masking. */ > int bEnableSceneCutAwareQp; > > /* The duration(in milliseconds) for which there is a reduction in > the bits spent on the inter-frames after a scenecut > - * by increasing their QP, when bEnableSceneCutAwareQp is set. > Default is 500ms.*/ > -int scenecutWindow; > + * by increasing their QP, when bEnableSceneCutAwareQp is 1 or 3. > Default is 500ms.*/ > +int fwdScenecutWindow; > > -/* The offset by which QP is incremented for inter-frames when > bEnableSceneCutAwareQp is set. > +/* The offset by which QP is incremented for inter-frames after a > scenecut when bEnableSceneCutAwareQp is 1 or 3. > * Default is +5. */ > -double refQpDelta; > +doublefwdRefQpDelta; > > -/* The offset by which QP is incremented for non-referenced > inter-frames when bEnableSceneCutAwareQp is set. */ > -double nonRefQpDelta; > +/* The offset by which QP is incremented for non-referenced > inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. */ > +doublefwdNonRefQpDelta; > > /* A genuine threshold used for histogram based scene cut detection. > * This threshold determines whether a frame is a scenecut or not > @@ -1932,6 +1938,16 @@ typedef struct x265_param > /* Maximum VBV fullness to be maintained. Default 80. Keep the buffer > * at max 80% full */ > double maxVbvFullness; > + > +/* The duration(in milliseconds) for which there is a reduction in > the bits spent on the inter-frames before a scenecut > + * by increasing their QP, when bEnableSceneCutAwareQp is 2 or 3. > Default is 100ms.*/ > +int bwdScenecutWindow; > + > +/* The offset by which QP is incremented for inter-frames before a > scenecut when bEnableSceneCutAwareQp is 2 or 3. */ > +doublebwdRefQpDelta; > + > +/* The offset by which QP is incremented for non-referenced > inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ > +doublebwdNonRefQpDelta; > } x265_param; > > /* x265_param_alloc: > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index c28dd7f8c..0f50589c1 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -177,10 +177,12 @@ namespace X265_NS { > H0(&
Re: [x265] [PATCH]Add: Forward and Backward masking
s a reduction in > the bits spent on the inter-frames after a scenecut > - * by increasing their QP, when bEnableSceneCutAwareQp is set. > Default is 500ms.*/ > -int scenecutWindow; > + * by increasing their QP, when bEnableSceneCutAwareQp is 1 or 3. > Default is 500ms.*/ > +int fwdScenecutWindow; > > -/* The offset by which QP is incremented for inter-frames when > bEnableSceneCutAwareQp is set. > +/* The offset by which QP is incremented for inter-frames after a > scenecut when bEnableSceneCutAwareQp is 1 or 3. > * Default is +5. */ > -double refQpDelta; > +doublefwdRefQpDelta; > > -/* The offset by which QP is incremented for non-referenced > inter-frames when bEnableSceneCutAwareQp is set. */ > -double nonRefQpDelta; > +/* The offset by which QP is incremented for non-referenced > inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. */ > +doublefwdNonRefQpDelta; > + > +/* The duration(in milliseconds) for which there is a reduction in > the bits spent on the inter-frames before a scenecut > + * by increasing their QP, when bEnableSceneCutAwareQp is 2 or 3. > Default is 100ms.*/ > +int bwdScenecutWindow; > + > +/* The offset by which QP is incremented for inter-frames before a > scenecut when bEnableSceneCutAwareQp is 2 or 3. */ > +doublebwdRefQpDelta; > + > +/* The offset by which QP is incremented for non-referenced > inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ > +doublebwdNonRefQpDelta; > [AM] Introduce new params at the end of the structure to maintain backward compatibility > > /* A genuine threshold used for histogram based scene cut detection. > * This threshold determines whether a frame is a scenecut or not > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index c28dd7f8c..0f50589c1 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -177,10 +177,12 @@ namespace X265_NS { > H0(" --no-hist-scenecutDisables histogram based > scene-cut detection using histogram based algorithm.\n"); > H1(" --hist-threshold <0.0..1.0> Luma Edge histogram's > Normalized SAD threshold for histogram based scenecut detection Default > %.2f\n", param->edgeTransitionThreshold); > H0(" --[no-]fades Enable detection and > handling of fade-in regions. Default %s\n", OPT(param->bEnableFades)); > -H1(" --[no-]scenecut-aware-qp Enable increasing QP for > frames inside the scenecut window after scenecut. Default %s\n", > OPT(param->bEnableSceneCutAwareQp)); > -H1(" --scenecut-window <0..1000> QP incremental duration(in > milliseconds) when scenecut-aware-qp is enabled. Default %d\n", > param->scenecutWindow); > -H1(" --qp-delta-ref <0..10>QP offset to increment with > base QP for inter-frames. Default %f\n", param->refQpDelta); > -H1(" --qp-delta-nonref <0..10> QP offset to increment with > base QP for non-referenced inter-frames. Default %f\n", > param->nonRefQpDelta); > +H1(" --scenecut-aware-qp <0..3>Enable increasing QP for > frames inside the scenecut window around scenecut. Default %s\n", > OPT(param->bEnableSceneCutAwareQp)); > +H1(" 0 - Disabled\n"); > +H1(" 1 - Forward masking\n"); > +H1(" 2 - Backward masking\n"); > +H1(" 3 - Bidirectional > masking\n"); > +H1(" --masking-strengthComma separated values which > specifies the duration and offset for the QP increment for inter-frames"); > H0(" --radl Number of RADL pictures > allowed in front of IDR. Default %d\n", param->radl); > H0(" --intra-refresh Use Periodic Intra Refresh > instead of IDR frames\n"); > H0(" --rc-lookahead Number of frames for > frame-type lookahead (determines encoder latency) Default %d\n", > param->lookaheadDepth); > diff --git a/source/x265cli.h b/source/x265cli.h > index a24d25435..7a2e0a267 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -148,11 +148,8 @@ static const struct option long_options[] = > { "hist-threshold", required_argument, NULL, 0}, > { "fades",no_argument, NULL, 0 }, > { "no-fades", no_argument, NULL, 0 }, > -{ "scenecut-aware-qp",no_argument, NULL, 0 }, > -{ "no-scenecut-aware-qp", no_argument, NULL, 0 }, > -{ "scenecut-window",required_argument, NULL, 0 }, > -{ "qp-delta-ref", required_argument, NULL, 0 }, > -{ "qp-delta-nonref",required_argument, NULL, 0 }, > +{ "scenecut-aware-qp", required_argument, NULL, 0 }, > +{ "masking-strength", required_argument, NULL, 0 }, > { "radl", required_argument, NULL, 0 }, > { "ctu-info", required_argument, NULL, 0 }, > { "intra-refresh",no_argument, NULL, 0 }, > -- > [AM] Update test command lines. > 2.18.0.windows.1 > > > -- > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [X265] [PATCH] [Master and Release 3.x] Adds support for archival and version reporting for git repositories
XECUTABLE "${HG_EXECUTABLE}.bat") > -endif() > -message(STATUS "hg found at ${HG_EXECUTABLE}") > - > -execute_process(COMMAND > -${HG_EXECUTABLE} log -r. --template "{latesttag}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process(COMMAND > -${HG_EXECUTABLE} log -r. --template "{latesttagdistance}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${HG_EXECUTABLE} log -r. --template "{node}" > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) > - > - if(X265_LATEST_TAG MATCHES "^r") > -string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) > -endif() > -elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} describe --abbrev=0 --tags > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count > --first-parent > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} log -1 --format=g%h > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -endif() > -if(X265_TAG_DISTANCE STREQUAL "0") > -set(X265_VERSION "${X265_LATEST_TAG}") > -else() > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -endif() > - > -message(STATUS "x265 version ${X265_VERSION}") > diff --git a/x265Version.txt b/x265Version.txt > new file mode 100644 > index 0..221a7a6d9 > --- /dev/null > +++ b/x265Version.txt > @@ -0,0 +1,5 @@ > +#Attribute: Values > +repositorychangeset: a82c6c7a7 > +releasetagcommitid: 6722fce1f > +releasetagdistance: 28 > +releasetag: Release_3.5 > [AM] Release_3.5 is not a valid tag. Also, as I mentioned already, each branch must have different versions of x265Version.txt. > -- > 2.20.1.windows.1 > > > On Tue, Oct 20, 2020 at 5:19 PM Srikanth Kurapati < > srikanth.kurap...@multicorewareinc.com> wrote: > >> >> >> On Mon, Oct 19, 2020 at 9:09 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> >>> >>> On Sun, Oct 18, 2020 at 5:28 PM Srikanth Kurapati < >>> srikanth.kurap...@multicorewareinc.com> wrote: >>> >>>> From 89c497c96918c22aa4dd074e603ec8ce56982415 Mon Sep 17 00:00:00 2001 >>>> From: Srikanth Kurapati >>>> Date: Tue, 13 Oct 2020 20:46:56 +0530 >>>> Subject: [PATCH] fix enables git repository archival for x265 release >>>> versions >>>> >>> [AM] Commit message is confusing to me. Needs to be changed to something >>> like "Fix incorrect version display in archived git repositories" >>> >>[KS] simplified. >> >>> >>>> --- >>>> doc/reST/cli.rst | 8 +- >>>> source/CMakeLists.txt | 2 +- >>>> source/cmake/Version.cmake | 172 + >>>> source/cmake/version.cmake | 97 - >>>> x265Version.txt| 5 ++ >>>> 5 files changed, 184 insertions(+), 100 deletions(-) >>>> create mode 100644 source/cmake/Version.cmake >>>> delete mode 100644 source/cmake/version.cmake >>>> create mode 100644 x265Version.txt >>>> >>>> diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst >>>> index 1a1de9f50..716b51e01 100755 >>>> --- a/doc/reST/cli.rst >>>> +++ b/doc/reST/cli.rst >>>> @@ -36,13 +36,17 @@ Executable Options >>>
Re: [x265] [X265] [PATCH] [Master and Release 3.x] Adds support for archival and version reporting for git repositories
> -) > -string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) > - > -if(X265_LATEST_TAG MATCHES "^r") > -string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) > -endif() > -elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} describe --abbrev=0 --tags > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count > --first-parent > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_TAG_DISTANCE > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} log -1 --format=g%h > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_REVISION_ID > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -endif() > -if(X265_TAG_DISTANCE STREQUAL "0") > -set(X265_VERSION "${X265_LATEST_TAG}") > [AM] Since this chunk has been removed in Version.cmake, the version info will look messy if X265_LATEST_TAG is 0. > -else() > -set(X265_VERSION > "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") > -endif() > - > -message(STATUS "x265 version ${X265_VERSION}") > diff --git a/x265Version.txt b/x265Version.txt > new file mode 100644 > index 0..74b23469e > --- /dev/null > +++ b/x265Version.txt > @@ -0,0 +1,5 @@ > +#Attribute: Values > +repositorychangeset: a82c6c7a7 > +releasetagcommitid: 6722fce1f > +releasetagdistance: 28 > +releasetag: 3.5 > [AM] 3.5 isn't a valid tag. Also, the commit message says the patch is applicable for master and Release_3.x. In that case, one x265Version.txt file per branch is expected. > -- > 2.20.1.windows.1 > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [x265 - PATCH] vbv: fix incorrect target fill
Pushed to Release_3.5 On Wed, Sep 30, 2020 at 11:44 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > From e56e88cc54e6c5fc8c8997937e3b46744e9de66a Mon Sep 17 00:00:00 2001 > From: Aruna > Date: Wed, 30 Sep 2020 23:38:34 +0530 > Subject: [PATCH] vbv: fix incorrect target fill > > --- > source/encoder/ratecontrol.cpp | 8 +--- > source/encoder/ratecontrol.h | 2 ++ > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/source/encoder/ratecontrol.cpp > b/source/encoder/ratecontrol.cpp > index 4e7d52419..515d9e543 100644 > --- a/source/encoder/ratecontrol.cpp > +++ b/source/encoder/ratecontrol.cpp > @@ -356,6 +356,8 @@ bool RateControl::init(const SPS& sps) > m_bufferFillFinal = m_bufferSize * m_param->rc.vbvBufferInit; > m_bufferFillActual = m_bufferFillFinal; > m_bufferExcess = 0; > +m_minBufferFill = m_param->minVbvFullness / 100; > +m_maxBufferFill = 1 - (m_param->maxVbvFullness / 100); > m_initVbv = true; > } > > @@ -2380,7 +2382,7 @@ double RateControl::clipQscale(Frame* curFrame, > RateControlEntry* rce, double q) > { > finalDur = x265_clip3(0.4, 1.0, totalDuration); > } > -targetFill = X265_MIN(m_bufferFill + totalDuration * > m_vbvMaxRate * 0.5, m_bufferSize * ((m_param->minVbvFullness / 100) * > finalDur)); > +targetFill = X265_MIN(m_bufferFill + totalDuration * > m_vbvMaxRate * 0.5, m_bufferSize * (1 - m_minBufferFill * finalDur)); > if (bufferFillCur < targetFill) > { > q *= 1.01; > @@ -2389,7 +2391,7 @@ double RateControl::clipQscale(Frame* curFrame, > RateControlEntry* rce, double q) > } > /* Try to get the buffer not more than 80% filled, > but don't set an impossible goal. */ > > -targetFill = x265_clip3(m_bufferSize * > ((m_param->maxVbvFullness / 100) * finalDur), m_bufferSize, m_bufferFill - > totalDuration * m_vbvMaxRate * 0.5); > +targetFill = x265_clip3(m_bufferSize * (1 - > m_maxBufferFill * finalDur), m_bufferSize, m_bufferFill - totalDuration * > m_vbvMaxRate * 0.5); > if ((m_isCbr || m_2pass) && bufferFillCur > > targetFill && !m_isSceneTransition) > { > q /= 1.01; > @@ -2406,7 +2408,7 @@ double RateControl::clipQscale(Frame* curFrame, > RateControlEntry* rce, double q) > /* Fallback to old purely-reactive algorithm: no lookahead. */ > if ((m_sliceType == P_SLICE || m_sliceType == B_SLICE || > (m_sliceType == I_SLICE && m_lastNonBPictType == > I_SLICE)) && > -m_bufferFill / m_bufferSize < (m_param->minVbvFullness / > 100)) > +m_bufferFill / m_bufferSize < m_minBufferFill) > { > q /= x265_clip3(0.5, 1.0, 2.0 * m_bufferFill / > m_bufferSize); > } > diff --git a/source/encoder/ratecontrol.h b/source/encoder/ratecontrol.h > index 809e0c620..449cb218b 100644 > --- a/source/encoder/ratecontrol.h > +++ b/source/encoder/ratecontrol.h > @@ -164,6 +164,8 @@ public: > double m_avgPFrameQp; > double m_bufferFillActual; > double m_bufferExcess; > + double m_minBufferFill; > +double m_maxBufferFill; > bool m_isFirstMiniGop; > Predictor m_pred[4]; /* Slice predictors to preidct bits for > each Slice type - I,P,Bref and B */ > int64_t m_leadingNoBSatd; > -- > 2.20.1.windows.1 > > > -- > Regards, > *Aruna Matheswaran,* > Video Codec Engineer, > Media & AI analytics BU, > > > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [x265 - PATCH] abr-ladder: Fix crash due to uninitialized analysis buffer
>From e46d490f2fef06d5fec96c3f22f2835d64019c25 Mon Sep 17 00:00:00 2001 From: Aruna Date: Thu, 1 Oct 2020 00:28:29 +0530 Subject: [PATCH] abr-ladder: Fix crash due to uninitialized analysis buffer --- source/abrEncApp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp index fa62ebf63..cd85154f1 100644 --- a/source/abrEncApp.cpp +++ b/source/abrEncApp.cpp @@ -98,13 +98,15 @@ namespace X265_NS { x265_picture_init(m_passEnc[pass]->m_param, m_inputPicBuffer[pass][idx]); } -m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, m_queueSize); +CHECKED_MALLOC_ZERO(m_analysisBuffer[pass], x265_analysis_data, m_queueSize); m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisRead[pass] = new ThreadSafeInteger[m_queueSize]; m_readFlag[pass] = X265_MALLOC(int, m_queueSize); } return true; +fail: +return false; } void AbrEncoder::destroy() -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, abr-ladder.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [x265 - PATCH] vbv: fix incorrect target fill
>From e56e88cc54e6c5fc8c8997937e3b46744e9de66a Mon Sep 17 00:00:00 2001 From: Aruna Date: Wed, 30 Sep 2020 23:38:34 +0530 Subject: [PATCH] vbv: fix incorrect target fill --- source/encoder/ratecontrol.cpp | 8 +--- source/encoder/ratecontrol.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp index 4e7d52419..515d9e543 100644 --- a/source/encoder/ratecontrol.cpp +++ b/source/encoder/ratecontrol.cpp @@ -356,6 +356,8 @@ bool RateControl::init(const SPS& sps) m_bufferFillFinal = m_bufferSize * m_param->rc.vbvBufferInit; m_bufferFillActual = m_bufferFillFinal; m_bufferExcess = 0; +m_minBufferFill = m_param->minVbvFullness / 100; +m_maxBufferFill = 1 - (m_param->maxVbvFullness / 100); m_initVbv = true; } @@ -2380,7 +2382,7 @@ double RateControl::clipQscale(Frame* curFrame, RateControlEntry* rce, double q) { finalDur = x265_clip3(0.4, 1.0, totalDuration); } -targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5, m_bufferSize * ((m_param->minVbvFullness / 100) * finalDur)); +targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5, m_bufferSize * (1 - m_minBufferFill * finalDur)); if (bufferFillCur < targetFill) { q *= 1.01; @@ -2389,7 +2391,7 @@ double RateControl::clipQscale(Frame* curFrame, RateControlEntry* rce, double q) } /* Try to get the buffer not more than 80% filled, but don't set an impossible goal. */ -targetFill = x265_clip3(m_bufferSize * ((m_param->maxVbvFullness / 100) * finalDur), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5); +targetFill = x265_clip3(m_bufferSize * (1 - m_maxBufferFill * finalDur), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5); if ((m_isCbr || m_2pass) && bufferFillCur > targetFill && !m_isSceneTransition) { q /= 1.01; @@ -2406,7 +2408,7 @@ double RateControl::clipQscale(Frame* curFrame, RateControlEntry* rce, double q) /* Fallback to old purely-reactive algorithm: no lookahead. */ if ((m_sliceType == P_SLICE || m_sliceType == B_SLICE || (m_sliceType == I_SLICE && m_lastNonBPictType == I_SLICE)) && -m_bufferFill / m_bufferSize < (m_param->minVbvFullness / 100)) +m_bufferFill / m_bufferSize < m_minBufferFill) { q /= x265_clip3(0.5, 1.0, 2.0 * m_bufferFill / m_bufferSize); } diff --git a/source/encoder/ratecontrol.h b/source/encoder/ratecontrol.h index 809e0c620..449cb218b 100644 --- a/source/encoder/ratecontrol.h +++ b/source/encoder/ratecontrol.h @@ -164,6 +164,8 @@ public: double m_avgPFrameQp; double m_bufferFillActual; double m_bufferExcess; +double m_minBufferFill; +double m_maxBufferFill; bool m_isFirstMiniGop; Predictor m_pred[4]; /* Slice predictors to preidct bits for each Slice type - I,P,Bref and B */ int64_t m_leadingNoBSatd; -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, x265.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] fix: help for rskip cli option to avoid make errors
Pushed to Release_3.4 and cherry-picked the same into Release_3.5. On Wed, Sep 23, 2020 at 7:20 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > From 00a099092918fa9899cbd445129443cfdbfa8860 Mon Sep 17 00:00:00 2001 > From: Srikanth Kurapati > Date: Wed, 23 Sep 2020 19:13:53 +0530 > Subject: [PATCH] edit: help documentation for recursion skip > > --- > source/x265cli.cpp | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index c28dd7f8c..3f66a4bad 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -127,9 +127,8 @@ namespace X265_NS { > H0(" --[no-]ssim-rdEnable ssim rate distortion > optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd)); > H0(" --[no-]rd-refine Enable QP based RD > refinement for rd levels 5 and 6. Default %s\n", > OPT(param->bEnableRdRefine)); > H0(" --[no-]early-skip Enable early SKIP detection. > Default %s\n", OPT(param->bEnableEarlySkip)); > -H0(" --rskip Set mode for early exit from > recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit using CU > edge density.\n" > -" Mode 0: disabled. Default > %d\n", param->recursionSkipMode); > -H1(" --rskip-edge-thresholdThreshold in terms of > percentage (integer of range [0,100]) for minimum edge density in CUs used > to prun the recursion depth. Applicable only for rskip mode 2. Value is > preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); > +H0(" --rskip Enable recursion skip for > early exit from CTU analysis during inter prediction. 1: exit using RD cost > & CU homogeneity. 2: exit using CU edge density. 0: disabled. Default > %d\n", param->recursionSkipMode); > +H1(" --rskip-edge-thresholdThreshold in terms of > percentage (an integer of range [0,100]) for minimum edge density in CU's > used to prune the recursion depth. Applicable only to rskip mode 2. Value > is preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); > H1(" --[no-]tskip-fast Enable fast intra transform > skipping. Default %s\n", OPT(param->bEnableTSkipFast)); > H1(" --[no-]splitrd-skip Enable skipping split RD > analysis when sum of split CU rdCost larger than one split CU rdCost for > Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip)); > H1(" --nr-intra An integer value in range of > 0 to 2000, which denotes strength of noise reduction in intra CUs. Default > 0\n"); > -- > 2.20.1.windows.1 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] analysis-save/load: update doc and regression CLI's for reusing cutree info in reuse-levels >= 2
65_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset veryslow --no-cutree > --analysis-load x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > +crowd_run_540p50.y4m, --preset veryslow --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset veryslow --analysis-save > x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset veryslow --analysis-save > x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra > 4 --dynamic-refine --analysis-load-reuse-level 10 > --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 > --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset > veryslow --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset veryslow --analysis-load > x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > crowd_run_540p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra > 4 --dynamic-refine --analysis-load-reuse-level 10 > --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 > --vbv-bufsize 30000 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset > medium --no-cutree --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset medium --no-cutree --analysis-load > x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat > --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate > 12000::News-4k.y4m, --analysis-load x265_analysis_fdup.dat --frame-dup > --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 > -- > 2.23.0.windows.1 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] fix: help for rskip cli option to avoid make errors
On Wed, Sep 16, 2020 at 9:02 PM Praveen Kumar Karadugattu < praveenku...@multicorewareinc.com> wrote: > Looks good to me. > > Regards, > Praveen > > On Wed, Sep 16, 2020 at 7:06 PM Srikanth Kurapati < > srikanth.kurap...@multicorewareinc.com> wrote: > >> From a92bc566e03f473af25db8f78d1eb3f40106a959 Mon Sep 17 00:00:00 2001 >> From: Srikanth Kurapati >> Date: Fri, 4 Sep 2020 11:06:39 +0530 >> Subject: [PATCH] fix: help for rskip cli option to avoid make errors >> > [AM] What make error is fixed in this patch? I just see an update to the help line. > >> --- >> source/x265cli.cpp | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/source/x265cli.cpp b/source/x265cli.cpp >> index c28dd7f8c..2575e02cd 100755 >> --- a/source/x265cli.cpp >> +++ b/source/x265cli.cpp >> @@ -127,8 +127,7 @@ namespace X265_NS { >> H0(" --[no-]ssim-rdEnable ssim rate distortion >> optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd)); >> H0(" --[no-]rd-refine Enable QP based RD >> refinement for rd levels 5 and 6. Default %s\n", >> OPT(param->bEnableRdRefine)); >> H0(" --[no-]early-skip Enable early SKIP >> detection. Default %s\n", OPT(param->bEnableEarlySkip)); >> -H0(" --rskip Set mode for early exit >> from recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit >> using CU edge density.\n" >> -" Mode 0: disabled. Default >> %d\n", param->recursionSkipMode); >> +H0(" --rskip Enable recurison skip for >> early exit. 1: exit using rdcost & CU homogenity. 2: exit using CU edge >> density. 0: disabled. Default %d\n", param->recursionSkipMode); >> H1(" --rskip-edge-thresholdThreshold in terms of >> percentage (integer of range [0,100]) for minimum edge density in CUs used >> to prun the recursion depth. Applicable only for rskip mode 2. Value is >> preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); >> H1(" --[no-]tskip-fast Enable fast intra transform >> skipping. Default %s\n", OPT(param->bEnableTSkipFast)); >> H1(" --[no-]splitrd-skip Enable skipping split RD >> analysis when sum of split CU rdCost larger than one split CU rdCost for >> Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip)); >> -- >> 2.20.1.windows.1 >> >> -- >> *With Regards,* >> *Srikanth Kurapati.* >> ___ >> 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 > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] How to use the abr-ladder option on ffmpeg
Diego, The docs <https://x265.readthedocs.io/en/master/> link has been fixed. Please check now. On Wed, Sep 16, 2020 at 1:26 PM Diego Pasqualin wrote: > Thank you Mario and Aruna for your response. > > However I couldn't find the release for the new x265 3.4 application, > which should have the abr-ladder option. > I tried here http://ftp.videolan.org/pub/videolan/x265/ and here > https://bitbucket.org/multicoreware/x265_git/downloads/ . > By the way which one is the official repository? The link to download the > config file in the docs > <https://x265.readthedocs.io/en/default/cli.html#cmdoption-abr-ladder> is > broken, all the links are actually pointing to what I believe it was an old > repository > > Em ter., 15 de set. de 2020 Ă s 16:01, Aruna Matheswaran < > ar...@multicorewareinc.com> escreveu: > >> Diego, >> >> Since --abr-ladder is an application level feature, it can be enabled >> only with x265 application. >> >> On Tue, Sep 15, 2020 at 6:24 PM Diego Pasqualin >> wrote: >> >>> Hi there, I'm sorry if this is off-topic, but I'm trying to find out how >>> to use the latest --abr-ladder option on ffmpeg, but: (1) I'm not sure if >>> it is already available on ffmpeg or how to find it out, and if it is >>> available (2) how to specify the input/output inside the configuration >>> file, because ffmpeg complains that required parameters are missing from >>> the command line. >>> >>> Could anyone help with any of the points? Thank you very much in advance. >>> _______ >>> x265-devel mailing list >>> x265-devel@videolan.org >>> https://mailman.videolan.org/listinfo/x265-devel >>> >> >> >> -- >> Regards, >> *Aruna Matheswaran,* >> Video Codec Engineer, >> Media & AI analytics BU, >> >> >> >> _______ >> 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 > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH1] Cherry-pick doc update from master to Release_3.4 branch
Cherry-picked this commit to Release_3.3 and Release_3.4. On Wed, Sep 16, 2020 at 9:10 PM Janani T E wrote: > From ae6dfffd22ae0f39f8d2414f247f8a9500885812 Mon Sep 17 00:00:00 2001 > From: Janani T E > Date: Fri, 28 Aug 2020 09:50:24 + > Subject: [PATCH] Changing x265 repository link > > --- > doc/reST/introduction.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/doc/reST/introduction.rst b/doc/reST/introduction.rst > index c503946..138a8ee 100644 > --- a/doc/reST/introduction.rst > +++ b/doc/reST/introduction.rst > @@ -43,7 +43,7 @@ developers. x265 leverages many of the outstanding > video encoding > features and optimizations from the x264 AVC encoder project. > > The x265 software is available for free under the GNU GPL 2 license, > -from https://bitbucket.org/multicoreware/x265. For commercial companies > +from https://bitbucket.org/multicoreware/x265_git. For commercial > companies > that wish to distribute x265 without being subject to the open source > requirements of the GPL 2 license, commercial licenses are available > with competitive terms. Contact license @ x265.com to inquire about > -- > 1.8.3.1 > > > -- > Thanks and Regards, > Janani. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH2] Cherry-pick doc update from master to Release_3.4 branch
Cherry-picked this commit to Release_3.3 and Release_3.4. On Wed, Sep 16, 2020 at 9:11 PM Janani T E wrote: > From 41af36cf75fcac29cbe1b7b7d6154706106a7f2c Mon Sep 17 00:00:00 2001 > From: Janani TE > Date: Mon, 31 Aug 2020 08:50:11 + > Subject: [PATCH] cli.rst: Updating reference_scaling and > DCIP3_4K_to_400_dynamic documentation > > --- > doc/reST/cli.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst > index 6252f2f..8dbc413 100644 > --- a/doc/reST/cli.rst > +++ b/doc/reST/cli.rst > @@ -2009,7 +2009,7 @@ other levels. > All other strings indicate a filename containing custom scaling > lists in the HM format. The encode will abort if the file is not > parsed correctly. Custom lists must be signaled in the SPS. A sample > - scaling list file is available in `the downloads page < > https://bitbucket.org/multicoreware/x265/downloads/reference_scalinglist.txt > >`_ > + scaling list file is available in `the downloads page < > https://bitbucket.org/multicoreware/x265_git/downloads/reference_scalinglist.txt > >`_ > > .. option:: --lambda-file > > @@ -2296,7 +2296,7 @@ VUI fields must be manually specified. > to be encoded as Dynamic Tone Mapping into the bitstream. > > Click `here < > https://www.sra.samsung.com/assets/User-data-registered-itu-t-t35-SEI-message-for-ST-2094-40-v1.1.pdf > >`_ > - for the syntax of the metadata file. A sample JSON file is available in > `the downloads page < > https://bitbucket.org/multicoreware/x265/downloads/DCIP3_4K_to_400_dynamic.json > >`_ > + for the syntax of the metadata file. A sample JSON file is available in > `the downloads page < > https://bitbucket.org/multicoreware/x265_git/downloads/DCIP3_4K_to_400_dynamic.json > >`_ > > .. option:: --dhdr10-opt, --no-dhdr10-opt > > -- > 1.8.3.1 > > -- > Thanks and Regards, > Janani. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] How to use the abr-ladder option on ffmpeg
Diego, Since --abr-ladder is an application level feature, it can be enabled only with x265 application. On Tue, Sep 15, 2020 at 6:24 PM Diego Pasqualin wrote: > Hi there, I'm sorry if this is off-topic, but I'm trying to find out how > to use the latest --abr-ladder option on ffmpeg, but: (1) I'm not sure if > it is already available on ffmpeg or how to find it out, and if it is > available (2) how to specify the input/output inside the configuration > file, because ffmpeg complains that required parameters are missing from > the command line. > > Could anyone help with any of the points? Thank you very much in advance. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] analysis-save/load: Enable reuse of cutree info in reuse-levels >= 2
Pushed to master On Wed, Sep 9, 2020 at 11:47 PM Mahesh Pittala wrote: > From d6025f47a444aed2906c5f6cf293e017410d0808 Mon Sep 17 00:00:00 2001 > From: Mahesh Pittala > Date: Wed, 9 Sep 2020 15:02:09 +0530 > Subject: [PATCH] analysis-save/load: Enable reuse of cutree info in > reuse-levels >= 2 > > --- > source/encoder/analysis.cpp | 2 +- > source/encoder/encoder.cpp | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/source/encoder/analysis.cpp b/source/encoder/analysis.cpp > index 157bae8..aabf386 100644 > --- a/source/encoder/analysis.cpp > +++ b/source/encoder/analysis.cpp > @@ -3645,7 +3645,7 @@ int Analysis::calculateQpforCuSize(const CUData& > ctu, const CUGeom& cuGeom, int3 > qp += distortionData->offset[ctu.m_cuAddr]; > } > > -if (m_param->analysisLoadReuseLevel == 10 && m_param->rc.cuTree) > +if (m_param->analysisLoadReuseLevel >= 2 && m_param->rc.cuTree) > { > int cuIdx = (ctu.m_cuAddr * ctu.m_numPartitions) + > cuGeom.absPartIdx; > if (ctu.m_slice->m_sliceType == I_SLICE) > diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp > index cf7bfb9..1f710e1 100644 > --- a/source/encoder/encoder.cpp > +++ b/source/encoder/encoder.cpp > @@ -5167,7 +5167,7 @@ int > Encoder::validateAnalysisData(x265_analysis_validate* saveParam, int writeFl > > int bcutree; > X265_FREAD(, sizeof(int), 1, m_analysisFileIn, > &(saveParam->cuTree)); > -if (loadLevel == 10 && m_param->rc.cuTree && (!bcutree || > saveLevel < 2)) > +if (loadLevel >= 2 && m_param->rc.cuTree && (!bcutree || > saveLevel < 2)) > { > x265_log(NULL, X265_LOG_ERROR, "Error reading cu-tree info. > Disabling cutree offsets. \n"); > m_param->rc.cuTree = 0; > -- > 1.8.3.1 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Introduce CLI/param options to control min and max VBV fullness
Pushed to master On Thu, Sep 10, 2020 at 8:08 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > > > On Thu, Sep 10, 2020 at 2:59 AM Alex Giladi wrote: > >> Hi Aruna, >> I don't understand the relationship between the patch and compression >> efficiency / compliance: >> +Increasing the minimum required fullness shall improve the >> compression efficiency, >> +but is expected to affect VBV conformance. Experimental option. >> 1. Does the result produce streams which may violate HRD constraints? >> > > [AM] No, Alex. The default buffer fullness limits are set in a manner that > rate-control shall account for HRD prediction errors and the encodes will > not encounter HRD violation. Relaxing the limits too much via the CLI > options may not give space for rate-control to compensate prediction errors > and might result in HRD violation. It is highly content-dependent. > > 2. How does this option affect compression efficiency? >> > [AM] Though the default hard coded HRD fullness limits are good in > maintaining VBV conformance overall, it might impose unwanted rate-control > constraints in some titles. Tuning these limits slightly to adapt to the > source title is expected to improve compression efficiency without > violating HRD conformance. > >> >> Best, >> Alex. >> >>> >>> _______ >> x265-devel mailing list >> x265-devel@videolan.org >> https://mailman.videolan.org/listinfo/x265-devel >> > > > -- > Regards, > *Aruna Matheswaran,* > Video Codec Engineer, > Media & AI analytics BU, > > > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Introduce CLI/param options to control min and max VBV fullness
On Thu, Sep 10, 2020 at 2:59 AM Alex Giladi wrote: > Hi Aruna, > I don't understand the relationship between the patch and compression > efficiency / compliance: > +Increasing the minimum required fullness shall improve the > compression efficiency, > +but is expected to affect VBV conformance. Experimental option. > 1. Does the result produce streams which may violate HRD constraints? > [AM] No, Alex. The default buffer fullness limits are set in a manner that rate-control shall account for HRD prediction errors and the encodes will not encounter HRD violation. Relaxing the limits too much via the CLI options may not give space for rate-control to compensate prediction errors and might result in HRD violation. It is highly content-dependent. 2. How does this option affect compression efficiency? > [AM] Though the default hard coded HRD fullness limits are good in maintaining VBV conformance overall, it might impose unwanted rate-control constraints in some titles. Tuning these limits slightly to adapt to the source title is expected to improve compression efficiency without violating HRD conformance. > > Best, > Alex. > >> >> ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Introduce CLI/param options to control min and max VBV fullness
k-startFirst frame of the chunk. Default 0 (disabled)\n"); H0(" --chunk-end Last frame of the chunk. Default 0 (disabled)\n"); diff --git a/source/x265cli.h b/source/x265cli.h index 3e2fd5e6d..a24d25435 100644 --- a/source/x265cli.h +++ b/source/x265cli.h @@ -376,6 +376,8 @@ static const struct option long_options[] = { "no-cll", no_argument, NULL, 0 }, { "hme-range", required_argument, NULL, 0 }, { "abr-ladder", required_argument, NULL, 0 }, +{ "min-vbv-fullness", required_argument, NULL, 0 }, +{ "max-vbv-fullness", required_argument, NULL, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, -- 2.20.1.windows.1 On Wed, Sep 9, 2020 at 11:02 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > > > On Mon, Sep 7, 2020 at 10:33 AM Gopi Satykrishna Akisetty < > gopi.satykris...@multicorewareinc.com> wrote: > >> >> >> On Tue, Sep 1, 2020 at 8:41 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> From 672d4b53dd35ea4b847ae3177403f526f74cda4e Mon Sep 17 00:00:00 2001 >>> From: Aruna >>> Date: Tue, 1 Sep 2020 19:59:17 +0530 >>> Subject: [PATCH] Introduce CLI/param options to control min and max VBV >>> fullness >>> >>> --- >>> doc/reST/cli.rst | 18 +++--- >>> source/CMakeLists.txt | 2 +- >>> source/common/param.cpp| 14 -- >>> source/encoder/ratecontrol.cpp | 4 ++-- >>> source/x265.h | 8 >>> source/x265cli.h | 2 ++ >>> 6 files changed, 40 insertions(+), 8 deletions(-) >>> >>> diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst >>> index 02828e390..18ca17d35 100644 >>> --- a/doc/reST/cli.rst >>> +++ b/doc/reST/cli.rst >>> @@ -1671,8 +1671,8 @@ Quality, rate control and rate distortion options >>> >>> .. option:: --vbv-end >>> >>> - Final buffer emptiness. The portion of the decode buffer that must be >>> - available after all the specified frames have been inserted into the >>> + Final buffer fullness. The portion of the decode buffer that must be >>> + full after all the specified frames have been inserted into the >>> decode buffer. Specified as a fractional value between 0 and 1, or in >>> kbits. Default 0 (disabled) >>> >>> @@ -1684,8 +1684,20 @@ Quality, rate control and rate distortion options >>> .. option:: --vbv-end-fr-adj >>> >>> Frame from which qp has to be adjusted to achieve final decode buffer >>> - emptiness. Specified as a fraction of the total frames. Fractions > 0 >>> are >>> + fullness. Specified as a fraction of the total frames. Fractions > 0 >>> are >>> supported only when the total number of frames is known. Default 0. >>> + >>> +.. option:: --min-vbv-fullness >>> + >>> +Minimum VBV fullness percentage to be maintained. Specified as a >>> fractional >>> +value ranging between 0 and 100. Default 50 i.e, Tries to keep the >>> buffer at least >>> +50% full at any point in time. >>> + >>> +.. option:: --max-vbv-fullness >>> + >>> +Maximum VBV fullness percentage to be maintained. Specified as a >>> fractional >>> +value ranging between 0 and 100. Default 80 i.e Tries to keep the >>> buffer at max 80% >>> +full at any point in time. >>> >>> .. option:: --qp, -q >>> >>> diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt >>> index 1d1f8cacf..d9ed3983e 100644 >>> --- a/source/CMakeLists.txt >>> +++ b/source/CMakeLists.txt >>> @@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CPU" OFF) >>> option(STATIC_LINK_CRT "Statically link C runtime for release builds" >>> OFF) >>> mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD) >>> # X265_BUILD must be incremented each time the public API is changed >>> -set(X265_BUILD 195) >>> +set(X265_BUILD 196) >>> configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" >>> "${PROJECT_BINARY_DIR}/x265.def") >>> configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" >>> diff --git a/source/common/param.cpp b/source/common/param.cpp >>> index 240568445..f356074a4 100644 >>> --- a/source/common/param.cpp >>> +++ b/source/common/param.cpp &g
Re: [x265] [PATCH] Introduce CLI/param options to control min and max VBV fullness
On Mon, Sep 7, 2020 at 10:33 AM Gopi Satykrishna Akisetty < gopi.satykris...@multicorewareinc.com> wrote: > > > On Tue, Sep 1, 2020 at 8:41 PM Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> From 672d4b53dd35ea4b847ae3177403f526f74cda4e Mon Sep 17 00:00:00 2001 >> From: Aruna >> Date: Tue, 1 Sep 2020 19:59:17 +0530 >> Subject: [PATCH] Introduce CLI/param options to control min and max VBV >> fullness >> >> --- >> doc/reST/cli.rst | 18 +++--- >> source/CMakeLists.txt | 2 +- >> source/common/param.cpp| 14 -- >> source/encoder/ratecontrol.cpp | 4 ++-- >> source/x265.h | 8 >> source/x265cli.h | 2 ++ >> 6 files changed, 40 insertions(+), 8 deletions(-) >> >> diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst >> index 02828e390..18ca17d35 100644 >> --- a/doc/reST/cli.rst >> +++ b/doc/reST/cli.rst >> @@ -1671,8 +1671,8 @@ Quality, rate control and rate distortion options >> >> .. option:: --vbv-end >> >> - Final buffer emptiness. The portion of the decode buffer that must be >> - available after all the specified frames have been inserted into the >> + Final buffer fullness. The portion of the decode buffer that must be >> + full after all the specified frames have been inserted into the >> decode buffer. Specified as a fractional value between 0 and 1, or in >> kbits. Default 0 (disabled) >> >> @@ -1684,8 +1684,20 @@ Quality, rate control and rate distortion options >> .. option:: --vbv-end-fr-adj >> >> Frame from which qp has to be adjusted to achieve final decode buffer >> - emptiness. Specified as a fraction of the total frames. Fractions > 0 >> are >> + fullness. Specified as a fraction of the total frames. Fractions > 0 >> are >> supported only when the total number of frames is known. Default 0. >> + >> +.. option:: --min-vbv-fullness >> + >> +Minimum VBV fullness percentage to be maintained. Specified as a >> fractional >> +value ranging between 0 and 100. Default 50 i.e, Tries to keep the >> buffer at least >> +50% full at any point in time. >> + >> +.. option:: --max-vbv-fullness >> + >> +Maximum VBV fullness percentage to be maintained. Specified as a >> fractional >> +value ranging between 0 and 100. Default 80 i.e Tries to keep the >> buffer at max 80% >> +full at any point in time. >> >> .. option:: --qp, -q >> >> diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt >> index 1d1f8cacf..d9ed3983e 100644 >> --- a/source/CMakeLists.txt >> +++ b/source/CMakeLists.txt >> @@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CPU" OFF) >> option(STATIC_LINK_CRT "Statically link C runtime for release builds" >> OFF) >> mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD) >> # X265_BUILD must be incremented each time the public API is changed >> -set(X265_BUILD 195) >> +set(X265_BUILD 196) >> configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" >> "${PROJECT_BINARY_DIR}/x265.def") >> configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" >> diff --git a/source/common/param.cpp b/source/common/param.cpp >> index 240568445..f356074a4 100644 >> --- a/source/common/param.cpp >> +++ b/source/common/param.cpp >> @@ -255,6 +255,8 @@ void x265_param_default(x265_param* param) >> param->rc.vbvBufferInit = 0.9; >> param->vbvBufferEnd = 0; >> param->vbvEndFrameAdjust = 0; >> +param->minVbvFullness = 50; >> +param->maxVbvFullness = 80; >> param->rc.rfConstant = 28; >> param->rc.bitrate = 0; >> param->rc.qCompress = 0.6; >> @@ -1375,6 +1377,8 @@ int x265_param_parse(x265_param* p, const char* >> name, const char* value) >> sscanf(value, "%d,%d,%d", >hmeRange[0], >hmeRange[1], >> >hmeRange[2]); >> p->bEnableHME = true; >> } >> +OPT("min-vbv-fullness") p->minVbvFullness = atof(value); >> +OPT("max-vbv-fullness") p->maxVbvFullness = atof(value); >> else >> return X265_PARAM_BAD_NAME; >> } >> @@ -1714,6 +1718,10 @@ int x265_check_params(x265_param* param) >> "Valid vbv-end-fr-adj must be a fraction 0 - 1"); >> CHECK(!param->totalFrames &&
Re: [x265] [PATCH] Add real-time VBV fullness based QP tuning in VBV 2 pass
>rc.vbvMaxBitrate > 0; > -if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) > +if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || > m_param->bliveVBV2pass) > { > int numFrames; > for (numFrames = 0; numFrames < maxSearch; numFrames++) > @@ -1749,7 +1750,7 @@ void Lookahead::slicetypeDecide() > } > } > > -bool isKeyFrameAnalyse = (m_param->rc.cuTree || > (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)) && > !m_param->rc.bStatRead; > +bool isKeyFrameAnalyse = (m_param->rc.cuTree || > (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)); > if (isKeyFrameAnalyse && IS_X265_TYPE_I(m_lastNonB->sliceType)) > { > m_inputLock.acquire(); > @@ -1764,9 +1765,10 @@ void Lookahead::slicetypeDecide() > m_inputLock.release(); > > frames[j + 1] = NULL; > -slicetypeAnalyse(frames, true); > +if (!m_param->rc.bStatRead) > +slicetypeAnalyse(frames, true); > bool bIsVbv = m_param->rc.vbvBufferSize > 0 && > m_param->rc.vbvMaxBitrate > 0; > -if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) > +if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || > m_param->bliveVBV2pass) > { > int numFrames; > for (numFrames = 0; numFrames < maxSearch; numFrames++) > diff --git a/source/x265.h b/source/x265.h > index 0ffa600b0..3fc464f6d 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1920,6 +1920,11 @@ typedef struct x265_param > > /* Maxrate that could be signaled to the decoder. Default 0. API > only. */ > int decoderVbvMaxRate; > + > +/*Enables Qp tuning with respect to real time VBV buffer fullness in > rate > +control 2 pass. Experimental.Default is disabled*/ > +int bliveVBV2pass; > + > } x265_param; > > /* x265_param_alloc: > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index 6e8e0e661..0cf2d815c 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -221,6 +221,7 @@ namespace X265_NS { > " - 3 : Nth pass, > overwrites stats file\n"); > H0(" --[no-]multi-pass-opt-analysis Refine analysis in 2 pass > based on analysis information from pass 1\n"); > H0(" --[no-]multi-pass-opt-distortion Use distortion of CTU > from pass 1 to refine qp in 2 pass\n"); > +H0(" --[no-]vbv-live-multi-passEnable realtime VBV in rate > control 2 pass.Default %s\n", OPT(param->bliveVBV2pass)); > H0(" --stats Filename for stats file in > multipass pass rate control. Default x265_2pass.log\n"); > H0(" --[no-]analyze-src-pics Motion estimation uses > source frame planes. Default disable\n"); > H0(" --[no-]slow-firstpass Enable a slow first pass in > a multipass rate control mode. Default %s\n", > OPT(param->rc.bEnableSlowFirstPass)); > diff --git a/source/x265cli.h b/source/x265cli.h > index 311f06935..3e2fd5e6d 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -284,6 +284,8 @@ static const struct option long_options[] = > { "no-multi-pass-opt-analysis",no_argument, NULL, 0 }, > { "multi-pass-opt-distortion", no_argument, NULL, 0 }, > { "no-multi-pass-opt-distortion", no_argument, NULL, 0 }, > +{ "vbv-live-multi-pass", no_argument, NULL, 0 }, > +{ "no-vbv-live-multi-pass",no_argument, NULL, 0 }, > { "slow-firstpass", no_argument, NULL, 0 }, > { "no-slow-firstpass",no_argument, NULL, 0 }, > { "multi-pass-opt-rps", no_argument, NULL, 0 }, > -- > 2.28.0.windows.1 > > *Thanks,* > *Kirithika* > > > On Wed, Sep 9, 2020 at 10:52 AM Kirithika Kalirathnam < > kirith...@multicorewareinc.com> wrote: > >> On Mon, Sep 7, 2020 at 6:19 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> >>> >>> On Fri, Sep 4, 2020 at 5:44 PM Kirithika Kalirathnam < >>> kirith...@multicorewareinc.com> wrote: >>> >>>> From f1391f094c9c3c0502624532f751219d126905aa Mon Sep 17 00:00:00 2001 >>>> From: Kirithika >>>> Date: Fri, 28 Aug 2020 09:20:47 +0530 >>>> Subject: [PATCH] Add real-time VBV fullness based Q
Re: [x265] [PATCH] Add real-time VBV fullness based QP tuning in VBV 2 pass
mp;& m_param->bframes) || > m_param->rc.cuTree || m_param->scenecutThreshold || > m_param->bHistBasedSceneCut || > (m_param->lookaheadDepth && m_param->rc.vbvBufferSize))) > { > -slicetypeAnalyse(frames, false); > +if(!m_param->rc.bStatRead) > +slicetypeAnalyse(frames, false); > bool bIsVbv = m_param->rc.vbvBufferSize > 0 && > m_param->rc.vbvMaxBitrate > 0; > -if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) > +if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || > m_param->rc.bRealtimeVBV2pass) > { > int numFrames; > for (numFrames = 0; numFrames < maxSearch; numFrames++) > @@ -1749,7 +1750,7 @@ void Lookahead::slicetypeDecide() > } > } > > -bool isKeyFrameAnalyse = (m_param->rc.cuTree || > (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)) && > !m_param->rc.bStatRead; > +bool isKeyFrameAnalyse = (m_param->rc.cuTree || > (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)); > if (isKeyFrameAnalyse && IS_X265_TYPE_I(m_lastNonB->sliceType)) > { > m_inputLock.acquire(); > @@ -1764,9 +1765,10 @@ void Lookahead::slicetypeDecide() > m_inputLock.release(); > > frames[j + 1] = NULL; > -slicetypeAnalyse(frames, true); > +if (!m_param->rc.bStatRead) > +slicetypeAnalyse(frames, true); > bool bIsVbv = m_param->rc.vbvBufferSize > 0 && > m_param->rc.vbvMaxBitrate > 0; > -if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) > +if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || > m_param->rc.bRealtimeVBV2pass) > { > int numFrames; > for (numFrames = 0; numFrames < maxSearch; numFrames++) > diff --git a/source/x265.h b/source/x265.h > index 0ffa600b0..bcd1d4e58 100644 > --- a/source/x265.h > +++ b/source/x265.h > @@ -1486,6 +1486,10 @@ typedef struct x265_param > /* internally enable if tune grain is set */ > int bEnableConstVbv; > > +/*Enables Qp tuning with respect to real time VBV buffer fullness > in rate > +control 2 pass. Experimental.Default is disabled*/ > +int bRealtimeVBV2pass; > + > [AM] Always add new param options to the end of the structure. Nested structures shall break backward compatibility. > } rc; > > /*== Video Usability Information ==*/ > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index 6e8e0e661..0b17a8d3a 100755 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -221,6 +221,7 @@ namespace X265_NS { > " - 3 : Nth pass, > overwrites stats file\n"); > H0(" --[no-]multi-pass-opt-analysis Refine analysis in 2 pass > based on analysis information from pass 1\n"); > H0(" --[no-]multi-pass-opt-distortion Use distortion of CTU > from pass 1 to refine qp in 2 pass\n"); > +H0(" --[no-]realtime-vbv-2pass Enable realtime VBV in rate > control 2 pass.Default %s\n", OPT(param->bLossless)); > H0(" --stats Filename for stats file in > multipass pass rate control. Default x265_2pass.log\n"); > H0(" --[no-]analyze-src-pics Motion estimation uses > source frame planes. Default disable\n"); > H0(" --[no-]slow-firstpass Enable a slow first pass in > a multipass rate control mode. Default %s\n", > OPT(param->rc.bEnableSlowFirstPass)); > diff --git a/source/x265cli.h b/source/x265cli.h > index 311f06935..89840d9af 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -284,6 +284,8 @@ static const struct option long_options[] = > { "no-multi-pass-opt-analysis",no_argument, NULL, 0 }, > { "multi-pass-opt-distortion", no_argument, NULL, 0 }, > { "no-multi-pass-opt-distortion", no_argument, NULL, 0 }, > +{ "realtime-vbv-2pass", no_argument, NULL, 0 }, > +{ "no-realtime-vbv-2pass",no_argument, NULL, 0 }, > [AM] Please add an entry for the new option in x265_param2string(); This will keep the info SEI updated. > { "slow-firstpass", no_argument, NULL, 0 }, > { "no-slow-firstpass",no_argument, NULL, 0 }, > { "multi-pass-opt-rps", no_argument, NULL, 0 }, > -- > 2.28.0.windows.1 > > *Thanks,* > *Kirithika* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] fix warnings when assembling with NASM 2.15
ALLOC_STACK %4 > > LOAD_IF_USED 0, 1, 2, 3, 4, 5, 6 > > -DEFINE_ARGS_INTERNAL %0, %4, %5 > > +%if %0 > 4 > > + %ifnum %4 > > + DEFINE_ARGS %5 > > + %else > > + DEFINE_ARGS %4, %5 > > + %endif > > + %elifnnum %4 > > + DEFINE_ARGS %4 > > + %endif > > %endmacro > > > > %define has_epilogue regs_used > 3 || stack_size > 0 || > vzeroupper_required > > diff --git a/source/common/x86/x86util.asm > b/source/common/x86/x86util.asm > > index fa8712257..fe8939332 100644 > > --- a/source/common/x86/x86util.asm > > +++ b/source/common/x86/x86util.asm > > @@ -578,8 +578,10 @@ > > %elif %1==2 > > %if mmsize==8 > > SBUTTERFLY dq, %3, %4, %5 > > -%else > > +%elif %0==6 > > TRANS q, ORDER, %3, %4, %5, %6 > > +%else > > +TRANS q, ORDER, %3, %4, %5 > > %endif > > %elif %1==4 > > SBUTTERFLY qdq, %3, %4, %5 > > -- > > 2.24.3 (Apple Git-128) > > > > ___ > > x265-devel mailing list > > x265-devel@videolan.org > > https://mailman.videolan.org/listinfo/x265-devel > > > > > Would be nice, if somebody could look into this patch, because all this > noise since NASM 2.15 is > really anyoing. > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add support for reusing cutree offsets in all reuse levels 1, 2, 5
On Wed, Sep 2, 2020 at 6:53 PM Mahesh Pittala wrote: > > > On Tue, Sep 1, 2020 at 7:09 PM Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> >> >> On Mon, Aug 31, 2020 at 7:38 PM Mahesh Pittala < >> mah...@multicorewareinc.com> wrote: >> >>> From 812cccaa864da47dcf9567dccb81c9fef220c626 Mon Sep 17 00:00:00 2001 >>> From: maheshpittala >>> Date: Sat, 1 Aug 2020 14:52:48 +0530 >>> Subject: [PATCH 1/1] Add support for reusing cutree offsets in all reuse >>> levels 1,2,5 >>> >>> Depth information required to load cutree offsets so writing depth >>> information >>> but not using in reuse level 1 >>> >> [AM] Will this restrict reuse-level 1 from sharing analysis info across >> non-dyadic resolutions? >> > No > [AM] I don't see the logic for cutree sharing between non dyadic resolutions either. Am I missing anything? > --- >>> source/abrEncApp.cpp| 23 ++-- >>> source/encoder/analysis.cpp | 2 +- >>> source/encoder/api.cpp | 53 +--- >>> source/encoder/encoder.cpp | 239 +--- >>> 4 files changed, 188 insertions(+), 129 deletions(-) >>> >>> diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp >>> index fa62ebf63..e26d3adfc 100644 >>> --- a/source/abrEncApp.cpp >>> +++ b/source/abrEncApp.cpp >>> @@ -330,15 +330,16 @@ namespace X265_NS { >>> >>> if (src->sliceType == X265_TYPE_IDR || src->sliceType == >>> X265_TYPE_I) >>> { >>> -if (m_param->analysisSaveReuseLevel < 2) >>> -goto ret; >>> x265_analysis_intra_data *intraDst, *intraSrc; >>> intraDst = >>> (x265_analysis_intra_data*)m_analysisInfo->intraData; >>> intraSrc = (x265_analysis_intra_data*)src->intraData; >>> -memcpy(intraDst->depth, intraSrc->depth, sizeof(uint8_t) * >>> src->depthBytes); >>> -memcpy(intraDst->modes, intraSrc->modes, sizeof(uint8_t) * >>> src->numCUsInFrame * src->numPartitions); >>> -memcpy(intraDst->partSizes, intraSrc->partSizes, >>> sizeof(char) * src->depthBytes); >>> -memcpy(intraDst->chromaModes, intraSrc->chromaModes, >>> sizeof(uint8_t) * src->depthBytes); >>> +memcpy(intraDst->depth, intraSrc->depth, sizeof(uint8_t)* >>> src->depthBytes); >>> +if (m_param->analysisSaveReuseLevel > 1) >>> +{ >>> +memcpy(intraDst->modes, intraSrc->modes, >>> sizeof(uint8_t)* src->numCUsInFrame * src->numPartitions); >>> +memcpy(intraDst->partSizes, intraSrc->partSizes, >>> sizeof(char)* src->depthBytes); >>> +memcpy(intraDst->chromaModes, intraSrc->chromaModes, >>> sizeof(uint8_t)* src->depthBytes); >>> +} >>> if (m_param->rc.cuTree) >>> memcpy(intraDst->cuQPOff, intraSrc->cuQPOff, >>> sizeof(int8_t) * src->depthBytes); >>> } >>> @@ -347,13 +348,12 @@ namespace X265_NS { >>> bool bIntraInInter = (src->sliceType == X265_TYPE_P || >>> m_param->bIntraInBFrames); >>> int numDir = src->sliceType == X265_TYPE_P ? 1 : 2; >>> memcpy(m_analysisInfo->wt, src->wt, sizeof(WeightParam) * 3 >>> * numDir); >>> -if (m_param->analysisSaveReuseLevel < 2) >>> -goto ret; >>> x265_analysis_inter_data *interDst, *interSrc; >>> interDst = >>> (x265_analysis_inter_data*)m_analysisInfo->interData; >>> interSrc = (x265_analysis_inter_data*)src->interData; >>> -memcpy(interDst->depth, interSrc->depth, sizeof(uint8_t) * >>> src->depthBytes); >>> -memcpy(interDst->modes, interSrc->modes, sizeof(uint8_t) * >>> src->depthBytes); >>> +memcpy(interDst->depth, interSrc->depth, sizeof(uint8_t)* >>> src->depthBytes); >>> +if (m_param->analysisSaveReuseLevel > 1) >>> +memcpy(interDst->modes, interSrc->modes, >>> sizeof(uint8_t)* src->depthBytes); >>> if (m_param->rc.cuTree) >>> memcpy(interDst
Re: [x265] [PATCH] Corrected wrong cli in docs wrt --colormatrix & --videoformat
"Invalid scenecut Window duration. Value must be between 0 and > 1000(inclusive)"); > -CHECK(param->refQpDelta < 0 || param->refQpDelta > 10, > -"Invalid refQpDelta value. Value must be between 0 and 10 > (inclusive)"); > -CHECK(param->nonRefQpDelta < 0 || param->nonRefQpDelta > 10, > -"Invalid nonRefQpDelta value. Value must be between 0 and 10 > (inclusive)"); > if (param->bEnableHME) > { > for (int level = 0; level < 3; level++) > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > old mode 100644 > new mode 100755 > index b198e55..6e8e0e6 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -296,16 +296,16 @@ namespace X265_NS { > H0(" 5=40:33, 6=24:11, 7=20:11, > 8=32:11, 9=80:33, 10=18:11, 11=15:11,\n"); > H0(" 12=64:33, 13=160:99, 14=4:3, > 15=3:2, 16=2:1 or custom ratio of . Default %d\n", > param->vui.aspectRatioIdc); > H1(" --display-window Describe overscan cropping > region as 'left,top,right,bottom' in pixels\n"); > -H1(" --overscanSpecify whether it is > appropriate for decoder to show cropped region: undef, show or crop. > Default undef\n"); > -H0(" --videoformat Specify video format from > undef, component, pal, ntsc, secam, mac. Default undef\n"); > +H1(" --overscanSpecify whether it is > appropriate for decoder to show cropped region: unknown, show or crop. > Default unknown\n"); > +H0(" --videoformat Specify video format from > unknown, component, pal, ntsc, secam, mac. Default unknown\n"); > H0(" --range Specify black level and > range of luma and chroma signals as full or limited Default limited\n"); > H0(" --colorprim Specify color primaries > from bt709, unknown, reserved, bt470m, bt470bg, smpte170m,\n"); > -H0(" smpte240m, film, bt2020, > smpte428, smpte431, smpte432. Default undef\n"); > +H0(" smpte240m, film, bt2020, > smpte428, smpte431, smpte432. Default unknown\n"); > H0(" --transferSpecify transfer > characteristics from bt709, unknown, reserved, bt470m, bt470bg, > smpte170m,\n"); > H0(" smpte240m, linear, log100, > log316, iec61966-2-4, bt1361e, iec61966-2-1,\n"); > -H0(" bt2020-10, bt2020-12, > smpte2084, smpte428, arib-std-b67. Default undef\n"); > -H1(" --colormatrix Specify color matrix setting > from undef, bt709, fcc, bt470bg, smpte170m,\n"); > -H1(" smpte240m, GBR, YCgCo, > bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp. > Default undef\n"); > +H0(" bt2020-10, bt2020-12, > smpte2084, smpte428, arib-std-b67. Default unknown\n"); > +H1(" --colormatrix Specify color matrix setting > from unknown, bt709, fcc, bt470bg, smpte170m,\n"); > +H1(" smpte240m, gbr, ycgco, > bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp. > Default unknown\n"); > H1(" --chromaloc Specify chroma sample > location (0 to 5). Default of %d\n", > param->vui.chromaSampleLocTypeTopField); > H0(" --master-display SMPTE ST 2086 master display > color volume info SEI (HDR)\n"); > H0("format: > G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\n"); > -- > 1.8.3.1 > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] Introduce CLI/param options to control min and max VBV fullness
ess=%.1f max-vbv-fullness=%.1f", +p->rc.vbvMaxBitrate, p->rc.vbvBufferSize, p->rc.vbvBufferInit, p->minVbvFullness, p->maxVbvFullness); if (p->vbvBufferEnd) s += sprintf(s, " vbv-end=%.1f vbv-end-fr-adj=%.1f", p->vbvBufferEnd, p->vbvEndFrameAdjust); if (p->rc.rateControlMode == X265_RC_CRF) @@ -2436,6 +2444,8 @@ void x265_copy_params(x265_param* dst, x265_param* src) dst->rc.vbvMaxBitrate = src->rc.vbvMaxBitrate; dst->rc.vbvBufferInit = src->rc.vbvBufferInit; +dst->minVbvFullness = src->minVbvFullness; +dst->maxVbvFullness = src->maxVbvFullness; dst->rc.cuTree = src->rc.cuTree; dst->rc.rfConstantMax = src->rc.rfConstantMax; dst->rc.rfConstantMin = src->rc.rfConstantMin; diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp index 82d7c4f2a..0e0845a85 100644 --- a/source/encoder/ratecontrol.cpp +++ b/source/encoder/ratecontrol.cpp @@ -2370,7 +2370,7 @@ double RateControl::clipQscale(Frame* curFrame, RateControlEntry* rce, double q) { finalDur = x265_clip3(0.4, 1.0, totalDuration); } -targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5, m_bufferSize * (1 - 0.5 * finalDur)); +targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5, m_bufferSize * ((m_param->minVbvFullness / 100) * finalDur)); if (bufferFillCur < targetFill) { q *= 1.01; @@ -2378,7 +2378,7 @@ double RateControl::clipQscale(Frame* curFrame, RateControlEntry* rce, double q) continue; } /* Try to get the buffer not more than 80% filled, but don't set an impossible goal. */ -targetFill = x265_clip3(m_bufferSize * (1 - 0.2 * finalDur), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5); +targetFill = x265_clip3(m_bufferSize * ((m_param->maxVbvFullness / 100) * finalDur), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5); if (m_isCbr && bufferFillCur > targetFill && !m_isSceneTransition) { q /= 1.01; diff --git a/source/x265.h b/source/x265.h index 0ffa600b0..46024db37 100644 --- a/source/x265.h +++ b/source/x265.h @@ -1920,6 +1920,14 @@ typedef struct x265_param /* Maxrate that could be signaled to the decoder. Default 0. API only. */ int decoderVbvMaxRate; + +/* Minimum VBV fullness to be maintained. Default 50. Keep the buffer + * at least 50% full */ +double minVbvFullness; + +/* Maximum VBV fullness to be maintained. Default 80. Keep the buffer +* at max 80% full */ +double maxVbvFullness; } x265_param; /* x265_param_alloc: diff --git a/source/x265cli.h b/source/x265cli.h index 311f06935..b7bdd0c2d 100644 --- a/source/x265cli.h +++ b/source/x265cli.h @@ -374,6 +374,8 @@ static const struct option long_options[] = { "no-cll", no_argument, NULL, 0 }, { "hme-range", required_argument, NULL, 0 }, { "abr-ladder", required_argument, NULL, 0 }, +{ "min-vbv-fullness", required_argument, NULL, 0 }, +{ "max-vbv-fullness", required_argument, NULL, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, -- -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, x265_patch.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add support for reusing cutree offsets in all reuse levels 1, 2, 5
t; analysis->numCUsInFrame * analysis->numPartitions + depthBytes; > } > -else > +else if (m_param->analysisSaveReuseLevel > 1) > analysis->frameRecordSize += sizeof(int32_t)* > analysis->numCUsInFrame * X265_MAX_PRED_MODE_PER_CTU * numDir; > } > analysis->depthBytes = depthBytes; > @@ -5661,44 +5694,58 @@ void > Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData > X265_FWRITE((WeightParam*)analysis->wt, sizeof(WeightParam), > numPlanes * numDir, m_analysisFileOut); > > if (m_param->analysisSaveReuseLevel < 2) > -return; > - > -if (analysis->sliceType == X265_TYPE_IDR || analysis->sliceType == > X265_TYPE_I) > { > -X265_FWRITE((analysis->intraData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->intraData)->chromaModes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->intraData)->partSizes, sizeof(char), > depthBytes, m_analysisFileOut); > -if (m_param->rc.cuTree) > -X265_FWRITE((analysis->intraData)->cuQPOff, sizeof(int8_t), > depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->intraData)->modes, sizeof(uint8_t), > analysis->numCUsInFrame * analysis->numPartitions, m_analysisFileOut); > +if (analysis->sliceType == X265_TYPE_IDR || analysis->sliceType > == X265_TYPE_I) > +{ > +X265_FWRITE((analysis->intraData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +if (m_param->rc.cuTree) > +X265_FWRITE((analysis->intraData)->cuQPOff, > sizeof(int8_t), depthBytes, m_analysisFileOut); > +} > +else > +{ > +X265_FWRITE((analysis->interData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +if (m_param->rc.cuTree) > +X265_FWRITE((analysis->interData)->cuQPOff, > sizeof(int8_t), depthBytes, m_analysisFileOut); > +} > } > else > { > -X265_FWRITE((analysis->interData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->interData)->modes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -if (m_param->rc.cuTree) > -X265_FWRITE((analysis->interData)->cuQPOff, sizeof(int8_t), > depthBytes, m_analysisFileOut); > -if (m_param->analysisSaveReuseLevel > 4) > +if (analysis->sliceType == X265_TYPE_IDR || analysis->sliceType > == X265_TYPE_I) > { > - X265_FWRITE((analysis->interData)->partSize, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->interData)->mergeFlag, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > -if (m_param->analysisSaveReuseLevel == 10) > +X265_FWRITE((analysis->intraData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->intraData)->chromaModes, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->intraData)->partSizes, sizeof(char), > depthBytes, m_analysisFileOut); > +if (m_param->rc.cuTree) > +X265_FWRITE((analysis->intraData)->cuQPOff, > sizeof(int8_t), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->intraData)->modes, sizeof(uint8_t), > analysis->numCUsInFrame * analysis->numPartitions, m_analysisFileOut); > +} > +else > +{ > +X265_FWRITE((analysis->interData)->depth, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->modes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +if (m_param->rc.cuTree) > +X265_FWRITE((analysis->interData)->cuQPOff, > sizeof(int8_t), depthBytes, m_analysisFileOut); > +if (m_param->analysisSaveReuseLevel > 4) > { > -X265_FWRITE((analysis->interData)->interDir, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > -if (bIntraInInter) > X265_FWRITE((analysis->intraData)->chromaModes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > -for (uint32_t dir = 0; dir < numDir; dir++) > +X265_FWRITE((analysis->interData)->partSize, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->mergeFlag, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > +if (m_param->analysisSaveReuseLevel == 10) > { > -X265_FWRITE((analysis->interData)->mvpIdx[dir], > sizeof(uint8_t), depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->interData)->refIdx[dir], > sizeof(int8_t), depthBytes, m_analysisFileOut); > -X265_FWRITE((analysis->interData)->mv[dir], > sizeof(MV), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->interDir, > sizeof(uint8_t), depthBytes, m_analysisFileOut); > +if (bIntraInInter) > X265_FWRITE((analysis->intraData)->chromaModes, sizeof(uint8_t), > depthBytes, m_analysisFileOut); > +for (uint32_t dir = 0; dir < numDir; dir++) > +{ > +X265_FWRITE((analysis->interData)->mvpIdx[dir], > sizeof(uint8_t), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->refIdx[dir], > sizeof(int8_t), depthBytes, m_analysisFileOut); > +X265_FWRITE((analysis->interData)->mv[dir], > sizeof(MV), depthBytes, m_analysisFileOut); > +} > +if (bIntraInInter) > +X265_FWRITE((analysis->intraData)->modes, > sizeof(uint8_t), analysis->numCUsInFrame * analysis->numPartitions, > m_analysisFileOut); > } > -if (bIntraInInter) > -X265_FWRITE((analysis->intraData)->modes, > sizeof(uint8_t), analysis->numCUsInFrame * analysis->numPartitions, > m_analysisFileOut); > } > +if (m_param->analysisSaveReuseLevel > 1 && > m_param->analysisSaveReuseLevel != 10) > +X265_FWRITE((analysis->interData)->ref, sizeof(int32_t), > analysis->numCUsInFrame * X265_MAX_PRED_MODE_PER_CTU * numDir, > m_analysisFileOut); > } > -if (m_param->analysisSaveReuseLevel != 10) > -X265_FWRITE((analysis->interData)->ref, sizeof(int32_t), > analysis->numCUsInFrame * X265_MAX_PRED_MODE_PER_CTU * numDir, > m_analysisFileOut); > - > } > #undef X265_FWRITE > } > -- > 2.18.2 > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] x265: Doc update
Pushed to master. On Mon, Aug 31, 2020 at 2:18 PM Janani T E wrote: > From ac51d98c64f515fed8a44dc6f62fd564d6c89879 Mon Sep 17 00:00:00 2001 > From: Janani TE > Date: Mon, 31 Aug 2020 08:28:37 + > Subject: [PATCH] Changing x265 repository link > > --- > doc/reST/introduction.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/doc/reST/introduction.rst b/doc/reST/introduction.rst > index c503946..138a8ee 100644 > --- a/doc/reST/introduction.rst > +++ b/doc/reST/introduction.rst > @@ -43,7 +43,7 @@ developers. x265 leverages many of the outstanding > video encoding > features and optimizations from the x264 AVC encoder project. > > The x265 software is available for free under the GNU GPL 2 license, > -from https://bitbucket.org/multicoreware/x265. For commercial companies > +from https://bitbucket.org/multicoreware/x265_git. For commercial > companies > that wish to distribute x265 without being subject to the open source > requirements of the GPL 2 license, commercial licenses are available > with competitive terms. Contact license @ x265.com to inquire about > -- > 1.8.3.1 > > -- > Thanks and Regards, > Janani. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] cli.rst: Updating reference_scaling and DCIP3_4K_to_400_dynamic documentation
Pushed to master. On Mon, Aug 31, 2020 at 2:28 PM Janani T E wrote: > From eec17884a67cc66aab44cb6b44f5f86ee9c69be5 Mon Sep 17 00:00:00 2001 > From: Janani TE > Date: Mon, 31 Aug 2020 08:50:11 + > Subject: [PATCH] cli.rst: Updating reference_scaling and > DCIP3_4K_to_400_dynamic documentation > > --- > doc/reST/cli.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst > index 59b3f74..02828e3 100644 > --- a/doc/reST/cli.rst > +++ b/doc/reST/cli.rst > @@ -2023,7 +2023,7 @@ other levels. > All other strings indicate a filename containing custom scaling > lists in the HM format. The encode will abort if the file is not > parsed correctly. Custom lists must be signaled in the SPS. A sample > - scaling list file is available in `the downloads page < > https://bitbucket.org/multicoreware/x265/downloads/reference_scalinglist.txt > >`_ > + scaling list file is available in `the downloads page < > https://bitbucket.org/multicoreware/x265_git/downloads/reference_scalinglist.txt > >`_ > > .. option:: --lambda-file > > @@ -2310,7 +2310,7 @@ VUI fields must be manually specified. > to be encoded as Dynamic Tone Mapping into the bitstream. > > Click `here < > https://www.sra.samsung.com/assets/User-data-registered-itu-t-t35-SEI-message-for-ST-2094-40-v1.1.pdf > >`_ > - for the syntax of the metadata file. A sample JSON file is available in > `the downloads page < > https://bitbucket.org/multicoreware/x265/downloads/DCIP3_4K_to_400_dynamic.json > >`_ > + for the syntax of the metadata file. A sample JSON file is available in > `the downloads page < > https://bitbucket.org/multicoreware/x265_git/downloads/DCIP3_4K_to_400_dynamic.json > >`_ > > .. option:: --dhdr10-opt, --no-dhdr10-opt > > -- > 1.8.3.1 > > > -- > Thanks and Regards, > Janani. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fix qp spikes in the row-level VBV rate-control when WPP enabled
Pushed into master branch. On Fri, Aug 28, 2020 at 10:50 AM Kirithika Kalirathnam < kirith...@multicorewareinc.com> wrote: > From 1c18fa6dee969814d14875f6d90a7a156ee1ebb4 Mon Sep 17 00:00:00 2001 > From: Kirithika > Date: Wed, 26 Aug 2020 16:44:32 +0530 > Subject: [PATCH] Fix qp spikes in the row-level VBV rate-control when WPP > enabled > > This commit fixes the unwanted QP spikes that comes due to irrelevant > entropy information > --- > source/encoder/ratecontrol.cpp | 8 > 1 file changed, 8 deletions(-) > > diff --git a/source/encoder/ratecontrol.cpp > b/source/encoder/ratecontrol.cpp > index 32b24c23c..82d7c4f2a 100644 > --- a/source/encoder/ratecontrol.cpp > +++ b/source/encoder/ratecontrol.cpp > @@ -2543,13 +2543,7 @@ int RateControl::rowVbvRateControl(Frame* curFrame, > uint32_t row, RateControlEnt > double qScaleVbv = x265_qp2qScale(qpVbv); > uint64_t rowSatdCost = curEncData.m_rowStat[row].rowSatd; > double encodedBits = curEncData.m_rowStat[row].encodedBits; > -uint32_t rowInSlice = row - m_sliceBaseRow[sliceId]; > > -if (m_param->bEnableWavefront && rowInSlice == 1) > -{ > -rowSatdCost += curEncData.m_rowStat[row - 1].rowSatd; > -encodedBits += curEncData.m_rowStat[row - 1].encodedBits; > -} > rowSatdCost >>= X265_DEPTH - 8; > updatePredictor(rce->rowPred[0], qScaleVbv, (double)rowSatdCost, > encodedBits); > if (curEncData.m_slice->m_sliceType != I_SLICE && > !m_param->rc.bEnableConstVbv) > @@ -2558,8 +2552,6 @@ int RateControl::rowVbvRateControl(Frame* curFrame, > uint32_t row, RateControlEnt > if (qpVbv < refFrame->m_encData->m_rowStat[row].rowQp) > { > uint64_t intraRowSatdCost = > curEncData.m_rowStat[row].rowIntraSatd; > -if (m_param->bEnableWavefront && rowInSlice == 1) > -intraRowSatdCost += curEncData.m_rowStat[row - > 1].rowIntraSatd; > intraRowSatdCost >>= X265_DEPTH - 8; > updatePredictor(rce->rowPred[1], qScaleVbv, > (double)intraRowSatdCost, encodedBits); > } > -- > 2.28.0.windows.1 > > *Thanks,* > *Kirithika* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] [Release_3.4/master] cli.rst: Update --abr-ladder documentation
>From 48edb0a4b67b8f4515974834c056eddb4929d872 Mon Sep 17 00:00:00 2001 From: Aruna Date: Wed, 26 Aug 2020 19:52:02 +0530 Subject: [PATCH] cli.rst: Update --abr-ladder documentation --- doc/reST/cli.rst | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst index c3c5410ae..59b3f745e 100644 --- a/doc/reST/cli.rst +++ b/doc/reST/cli.rst @@ -2549,10 +2549,15 @@ ABR-ladder Options if analysis reuse isn't preferred ), and reuse-level indicates the level ( :option:`--analysis-load-reuse-level`) at which analysis info has to be reused. - A sample config file is available in `the downloads page < https://bitbucket.org/multicoreware/x265/downloads/Sample_ABR_ladder_config >`_ - - Default: Disabled ( Conventional single encode generation ). Experimental feature. + Sample config file:: + + [540p:0:nil] --input 540pSource.y4m --ctu 16 --bitrate 1600 --vbv-maxrate 2400 --vbv-bufsize 4800 -o 540p.hevc --preset veryslow + [1080p:10:540p] --input 1080pSource.y4m --ctu 32 --bitrate 5800 --vbv-maxrate 8700 --vbv-bufsize 17400 -o 1080p.hevc --preset veryslow --scale-factor 2 + [2160p:10:1080p] --input 2160pSource.y4m --bitrate 16800 --vbv-maxrate 25200 --vbv-bufsize 50400 -o 2160p.hevc --preset veryslow --scale-factor 2 + The above sample config file is available in `the downloads page < https://bitbucket.org/multicoreware/x265_git/downloads/Sample_ABR_ladder_config.txt >`_ + + Default: Disabled ( Conventional single encode generation ). Experimental feature. **CLI ONLY** -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, patch.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH: Release_3.3 branch] hme: Perform check for search range only if hme is enabled.
Pushed to Release_3.3, Release_3.4 and master. On Tue, Aug 25, 2020 at 2:33 PM Pooja Venkatesan wrote: > Hi, > The patch is to be applied on the Release_3.3 branch > > From acea099ac4e3834716cc7a474d9035553eac3a72 Mon Sep 17 00:00:00 2001 > From: Pooja Venkatesan > Date: Tue, 25 Aug 2020 14:23:23 +0530 > Subject: [PATCH] hme: Perform check for search range only if hme is > enabled. > > --- > source/common/param.cpp | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/source/common/param.cpp b/source/common/param.cpp > index d2cab5b3d..7bac55316 100644 > --- a/source/common/param.cpp > +++ b/source/common/param.cpp > @@ -1761,9 +1761,12 @@ int x265_check_params(x265_param* param) > "Invalid scenecut Window duration. Value must be between 0 and > 1000(inclusive)"); > CHECK(param->maxQpDelta < 0 || param->maxQpDelta > 10, > "Invalid maxQpDelta value. Value must be between 0 and 10 > (inclusive)"); > -for(int level = 0; level < 3; level++) > -CHECK(param->hmeRange[level] < 0 || param->hmeRange[level] >= > 32768, > -"Search Range for HME levels must be between 0 and 32768"); > +if (param->bEnableHME) > +{ > +for (int level = 0; level < 3; level++) > +CHECK(param->hmeRange[level] < 0 || param->hmeRange[level] >= > 32768, > +"Search Range for HME levels must be between 0 and > 32768"); > +} > #if !X86_64 > CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || > param->sourceHeight > 480), > "SEA motion search does not support resolutions greater than 480p > in 32 bit build"); > -- > 2.24.0.windows.2 > > Regards, > *Pooja Venkatesan*, > Video Codec Engineer, > Media & AI analytics BU > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fixing x265-git binary version in cmake
Pushed to Release_3.3, Release_3.4 and master. On Tue, Aug 25, 2020 at 6:41 PM Janani T E wrote: > From 822236be662585e35acaaf9f46df6a633fec5a5c Mon Sep 17 00:00:00 2001 > From: Janani TE > Date: Wed, 19 Aug 2020 17:26:17 +0530 > Subject: [PATCH] Fixing x265 git binary version in cmake > > --- > source/cmake/version.cmake | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/source/cmake/version.cmake b/source/cmake/version.cmake > index b1e995f..3530224 100644 > --- a/source/cmake/version.cmake > +++ b/source/cmake/version.cmake > @@ -65,15 +65,7 @@ elseif(HG_EXECUTABLE AND EXISTS > ${CMAKE_CURRENT_SOURCE_DIR}/../.hg) > elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) > execute_process( > COMMAND > -${GIT_EXECUTABLE} rev-list --tags --max-count=1 > -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > -OUTPUT_VARIABLE X265_LATEST_TAG_COMMIT > -ERROR_QUIET > -OUTPUT_STRIP_TRAILING_WHITESPACE > -) > -execute_process( > -COMMAND > -${GIT_EXECUTABLE} describe --tags ${X265_LATEST_TAG_COMMIT} > +${GIT_EXECUTABLE} describe --abbrev=0 --tags > WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > OUTPUT_VARIABLE X265_LATEST_TAG > ERROR_QUIET > -- > 1.8.3. > > -- > Thanks and Regards, > Janani. > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] PATCH documentation fix for rskip 2 threshold
Pushed to Release_3.4 and master. On Tue, Aug 25, 2020 at 6:49 PM Srikanth Kurapati < srikanth.kurap...@multicorewareinc.com> wrote: > # HG changeset patch > # User Srikanth Kurapati > # Date 1596693977 -19800 > # Thu Aug 06 11:36:17 2020 +0530 > # Node ID 4fd5e5a02648749302abf517b1822b91583e6afe > # Parent 73ca1d7be3779ed6eb4cbbc4cdb3bec6371472b6 > documentation fix for rskip 2 threshold > > diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst > --- a/doc/reST/cli.rst > +++ b/doc/reST/cli.rst > @@ -863,13 +863,12 @@ > > Provides minimal quality degradation at good performance gains for > non-zero modes. > :option:`--rskip mode 0` means disabled. Default: 1, disabled when > :option:`--tune grain` is used. > - This is a integer value representing the edge-density percentage within > the CU. Internally normalized to a number between 0.0 to 1.0 in x265. > - Recommended low thresholds for slow encodes and high for fast encodes. > > .. option:: --rskip-edge-threshold <0..100> > > Denotes the minimum expected edge-density percentage within the CU, > below which the recursion is skipped. > - Default: 5, requires :option:`--rskip mode 2` to be enabled. > + Internally normalized to decimal value in x265 library. Recommended low > thresholds for slow encodes and high > + for fast encodes. Default: 5, requires :option:`--rskip mode 2` to be > enabled. > > .. option:: --splitrd-skip, --no-splitrd-skip > > > > -- > *With Regards,* > *Srikanth Kurapati.* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] vbv: Fix vbv lookahead computation on analysis load+scalefactor
Pushed to master and cherry-picked the fix into Release_3.4. On Tue, Aug 18, 2020 at 5:53 PM Kirithika Kalirathnam < kirith...@multicorewareinc.com> wrote: > From b3916d57398109761198c970c5cbb1d70f5767cf Mon Sep 17 00:00:00 2001 > From: Kirithika > Date: Tue, 18 Aug 2020 14:21:18 +0530 > Subject: [PATCH] vbv: Fix vbv lookahead computation on analysis > load+scalefactor > > --- > source/encoder/slicetype.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp > index 81d2adbe6..4e52e584c 100644 > --- a/source/encoder/slicetype.cpp > +++ b/source/encoder/slicetype.cpp > @@ -1513,7 +1513,7 @@ void Lookahead::slicetypeDecide() > if (!fenc) > break; > } > -vbvLookahead(frames, numFrames, true); > +vbvLookahead(frames, numFrames, false); > } > } > > @@ -1784,7 +1784,7 @@ void Lookahead::slicetypeDecide() > void Lookahead::vbvLookahead(Lowres **frames, int numFrames, int keyframe) > { > int prevNonB = 0, curNonB = 1, idx = 0; > -while (curNonB < numFrames && frames[curNonB]->sliceType == > X265_TYPE_B) > +while (curNonB < numFrames && > IS_X265_TYPE_B(frames[curNonB]->sliceType)) > curNonB++; > int nextNonB = keyframe ? prevNonB : curNonB; > int nextB = prevNonB + 1; > @@ -1851,7 +1851,7 @@ void Lookahead::vbvLookahead(Lowres **frames, int > numFrames, int keyframe) > } > prevNonB = curNonB; > curNonB++; > -while (curNonB <= numFrames && frames[curNonB]->sliceType == > X265_TYPE_B) > +while (curNonB <= numFrames && > IS_X265_TYPE_B(frames[curNonB]->sliceType)) > curNonB++; > } > > -- > 2.24.0.windows.2 > > *Thanks,* > *Kirithika* > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fix cost estimation error for hist-based scenecut
Pushed into master. On Thu, Jul 16, 2020 at 10:57 AM Pooja Venkatesan < po...@multicorewareinc.com> wrote: > From 613e174411f9d52677444f142f6f6dc0fe2e7885 Mon Sep 17 00:00:00 2001 > From: Pooja Venkatesan > Date: Thu, 9 Jul 2020 18:04:29 +0530 > Subject: [PATCH] Fix cost estimation error for hist-based scenecut > > --- > source/encoder/slicetype.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp > index 5292473b1..81d2adbe6 100644 > --- a/source/encoder/slicetype.cpp > +++ b/source/encoder/slicetype.cpp > @@ -2244,7 +2244,7 @@ bool Lookahead::scenecut(Lowres **frames, int p0, > int p1, bool bRealScenecut, in > * and not considered a scenecut. */ > for (int cp1 = p1; cp1 <= maxp1; cp1++) > { > -if (!m_param->bHistBasedSceneCut && !scenecutInternal(frames, > p0, cp1, false)) > +if (!scenecutInternal(frames, p0, cp1, false) && > !m_param->bHistBasedSceneCut) > { > /* Any frame in between p0 and cur_p1 cannot be a real > scenecut. */ > for (int i = cp1; i > p0; i--) > -- > 2.24.0.windows.2 > > Regards, > *Pooja Venkatesan*, > Video Codec Engineer, > Media & AI analytics BU > > _______ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH - x265] abr-ladder: fix memleak in copyInfo()
Pushed to master and cherry-picked to Release_3.4. On Mon, Jul 27, 2020 at 7:28 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > From d419c7152ada818a61697622b8527549e2a67161 Mon Sep 17 00:00:00 2001 > From: Aruna > Date: Mon, 27 Jul 2020 19:11:10 +0530 > Subject: [PATCH] abr-ladder: fix memleak in copyInfo() > > --- > source/abrEncApp.cpp | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp > index 4079fe3a2..fa62ebf63 100644 > --- a/source/abrEncApp.cpp > +++ b/source/abrEncApp.cpp > @@ -315,6 +315,7 @@ namespace X265_NS { > > x265_analysis_data *m_analysisInfo = > _parent->m_analysisBuffer[m_id][index]; > > +x265_free_analysis_data(m_param, m_analysisInfo); > memcpy(m_analysisInfo, src, sizeof(x265_analysis_data)); > x265_alloc_analysis_data(m_param, m_analysisInfo); > > -- > 2.20.1.windows.1 > > > -- > Regards, > *Aruna Matheswaran,* > Video Codec Engineer, > Media & AI analytics BU, > > > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH - x265] abr-ladder: fix memleak in copyInfo()
>From d419c7152ada818a61697622b8527549e2a67161 Mon Sep 17 00:00:00 2001 From: Aruna Date: Mon, 27 Jul 2020 19:11:10 +0530 Subject: [PATCH] abr-ladder: fix memleak in copyInfo() --- source/abrEncApp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp index 4079fe3a2..fa62ebf63 100644 --- a/source/abrEncApp.cpp +++ b/source/abrEncApp.cpp @@ -315,6 +315,7 @@ namespace X265_NS { x265_analysis_data *m_analysisInfo = _parent->m_analysisBuffer[m_id][index]; +x265_free_analysis_data(m_param, m_analysisInfo); memcpy(m_analysisInfo, src, sizeof(x265_analysis_data)); x265_alloc_analysis_data(m_param, m_analysisInfo); -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, patch.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [x265 - PATCH] Fix libvmaf integration issues
Pushed to master and cherry-picked the same into Release_3.4. On Mon, Jul 6, 2020 at 7:22 PM Aruna Matheswaran wrote: > From eff9041993e5f85bbd4498c07d20eeff9064467d Mon Sep 17 00:00:00 2001 > From: Aruna > Date: Mon, 6 Jul 2020 19:16:18 +0530 > Subject: [PATCH] Fix libvmaf integration issues > > 1. Updates the search path of libvmaf.h > 2. Fix incorrect argument in vmaf_encoder_log() API > --- > source/abrEncApp.cpp | 2 +- > source/encoder/api.cpp | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp > index 1205a83cd..4079fe3a2 100644 > --- a/source/abrEncApp.cpp > +++ b/source/abrEncApp.cpp > @@ -814,7 +814,7 @@ ret: > api->encoder_get_stats(m_encoder, , sizeof(stats)); > if (m_param->csvfn && !b_ctrl_c) > #if ENABLE_LIBVMAF > -api->vmaf_encoder_log(m_encoder, m_cliopt.argCount, > m_cliopt.argString, m_cliopt.param, vmafdata); > +api->vmaf_encoder_log(m_encoder, m_cliopt.argCnt, > m_cliopt.argString, m_cliopt.param, vmafdata); > #else > api->encoder_log(m_encoder, m_cliopt.argCnt, > m_cliopt.argString); > #endif > diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp > index 6413e4ea0..a986355e0 100644 > --- a/source/encoder/api.cpp > +++ b/source/encoder/api.cpp > @@ -33,7 +33,7 @@ > #include "svt.h" > > #if ENABLE_LIBVMAF > -#include "libvmaf.h" > +#include "libvmaf/libvmaf.h" > #endif > > /* multilib namespace reflectors */ > -- > 2.20.1.windows.1 > > > -- > Regards, > *Aruna Matheswaran,* > Video Codec Engineer, > Media & AI analytics BU, > > > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [x265 - PATCH] Fix libvmaf integration issues
>From eff9041993e5f85bbd4498c07d20eeff9064467d Mon Sep 17 00:00:00 2001 From: Aruna Date: Mon, 6 Jul 2020 19:16:18 +0530 Subject: [PATCH] Fix libvmaf integration issues 1. Updates the search path of libvmaf.h 2. Fix incorrect argument in vmaf_encoder_log() API --- source/abrEncApp.cpp | 2 +- source/encoder/api.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp index 1205a83cd..4079fe3a2 100644 --- a/source/abrEncApp.cpp +++ b/source/abrEncApp.cpp @@ -814,7 +814,7 @@ ret: api->encoder_get_stats(m_encoder, , sizeof(stats)); if (m_param->csvfn && !b_ctrl_c) #if ENABLE_LIBVMAF -api->vmaf_encoder_log(m_encoder, m_cliopt.argCount, m_cliopt.argString, m_cliopt.param, vmafdata); +api->vmaf_encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString, m_cliopt.param, vmafdata); #else api->encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString); #endif diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp index 6413e4ea0..a986355e0 100644 --- a/source/encoder/api.cpp +++ b/source/encoder/api.cpp @@ -33,7 +33,7 @@ #include "svt.h" #if ENABLE_LIBVMAF -#include "libvmaf.h" +#include "libvmaf/libvmaf.h" #endif /* multilib namespace reflectors */ -- 2.20.1.windows.1 -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, Fix_libvmaf_integration_issues.diff Description: Binary data ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Improve: Scenecut Aware Frame Quantizer Selection
fine X265_ANALYSIS_LOAD 2 > > +#define SLICE_TYPE_DELTA0.3 /* The offset decremented or > incremented for P-frames or b-frames respectively*/ > +#define BACKWARD_WINDOW 1 /* Scenecut window before a scenecut */ > +#define FORWARD_WINDOW 2 /* Scenecut window after a scenecut */ > + > typedef struct x265_cli_csp > { > int planes; > @@ -1843,9 +1847,8 @@ typedef struct x265_param >Default 1 (Enabled). API only. */ > int bResetZoneConfig; > > -/* Enables a ratecontrol algorithm for reducing the bits spent on the > inter-frames > - * within the scenecutWindow after a scenecut by increasing their QP > without > - * any deterioration in visual quality. It also increases the quality > of scenecut I-Frames by reducing their QP. > +/* It reduces the bits spent on the inter-frames within the > scenecutWindow before and after a scenecut > + * by increasing their QP in ratecontrol pass2 algorithm without any > deterioration in visual quality. > * Default is disabled. */ > int bEnableSceneCutAwareQp; > > @@ -1855,7 +1858,10 @@ typedef struct x265_param > > /* The offset by which QP is incremented for inter-frames when > bEnableSceneCutAwareQp is set. > * Default is +5. */ > -int maxQpDelta; > +double refQpDelta; > + > +/* The offset by which QP is incremented for non-referenced > inter-frames when bEnableSceneCutAwareQp is set. */ > +double nonRefQpDelta; > > /* A genuine threshold used for histogram based scene cut detection. > * This threshold determines whether a frame is a scenecut or not > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index b53dc2b0b..b198e55c2 100644 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -179,7 +179,8 @@ namespace X265_NS { > H0(" --[no-]fades Enable detection and > handling of fade-in regions. Default %s\n", OPT(param->bEnableFades)); > H1(" --[no-]scenecut-aware-qp Enable increasing QP for > frames inside the scenecut window after scenecut. Default %s\n", > OPT(param->bEnableSceneCutAwareQp)); > H1(" --scenecut-window <0..1000> QP incremental duration(in > milliseconds) when scenecut-aware-qp is enabled. Default %d\n", > param->scenecutWindow); > -H1(" --max-qp-delta <0..10>QP offset to increment with > base QP for inter-frames. Default %d\n", param->maxQpDelta); > +H1(" --qp-delta-ref <0..10>QP offset to increment with > base QP for inter-frames. Default %f\n", param->refQpDelta); > +H1(" --qp-delta-nonref <0..10> QP offset to increment with > base QP for non-referenced inter-frames. Default %f\n", > param->nonRefQpDelta); > H0(" --radl Number of RADL pictures > allowed in front of IDR. Default %d\n", param->radl); > H0(" --intra-refresh Use Periodic Intra Refresh > instead of IDR frames\n"); > H0(" --rc-lookahead Number of frames for > frame-type lookahead (determines encoder latency) Default %d\n", > param->lookaheadDepth); > diff --git a/source/x265cli.h b/source/x265cli.h > index 08f5d3d9e..311f06935 100644 > --- a/source/x265cli.h > +++ b/source/x265cli.h > @@ -151,7 +151,8 @@ static const struct option long_options[] = > { "scenecut-aware-qp",no_argument, NULL, 0 }, > { "no-scenecut-aware-qp", no_argument, NULL, 0 }, > { "scenecut-window",required_argument, NULL, 0 }, > -{ "max-qp-delta", required_argument, NULL, 0 }, > +{ "qp-delta-ref", required_argument, NULL, 0 }, > +{ "qp-delta-nonref",required_argument, NULL, 0 }, > { "radl", required_argument, NULL, 0 }, > { "ctu-info", required_argument, NULL, 0 }, > { "intra-refresh",no_argument, NULL, 0 }, > -- > 2.18.0.windows.1 > > > Thanks & Regards > *Niranjan Kumar B* > Video Codec Engineer > Media & AI Analytics > +91 958 511 1449 > <https://multicorewareinc.com/> > >> ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fix: QP modification bug in Scenecut Aware Frame Quantizer Selection
source/encoder/ratecontrol.cpp >>> b/source/encoder/ratecontrol.cpp >>> --- a/source/encoder/ratecontrol.cpp >>> +++ b/source/encoder/ratecontrol.cpp >>> @@ -3152,12 +3152,13 @@ >>> >>> double RateControl::scenecutAwareQp(Frame* curFrame, double q) >>> { >>> +double qp = x265_qScale2qp(q); >>> uint32_t maxWindowSize = uint32_t((m_param->scenecutWindow / >>> 1000.0) * (m_param->fpsNum / m_param->fpsDenom) + 0.5); >>> uint32_t windowSize = maxWindowSize / 3; >>> int lastScenecut = m_top->m_rateControl->m_lastScenecut; >>> int lastIFrame = m_top->m_rateControl->m_lastScenecutAwareIFrame; >>> -double maxQpDelta = x265_qp2qScale(double(m_param->maxQpDelta)); >>> -double iSliceDelta = x265_qp2qScale(double(I_SLICE_DELTA)); >>> +double maxQpDelta = double(m_param->maxQpDelta); >>> +double iSliceDelta = double(I_SLICE_DELTA); >>> double sliceTypeDelta = SLICE_TYPE_DELTA * maxQpDelta; >>> double window2Delta = WINDOW2_DELTA * maxQpDelta; >>> double window3Delta = WINDOW3_DELTA * maxQpDelta; >>> @@ -3173,11 +3174,11 @@ >>> if (!(lastIFrame > lastScenecut && lastIFrame <= (lastScenecut >>> + int(maxWindowSize)) >>> && curFrame->m_poc > lastIFrame)) >>> { >>> -q += maxQpDelta - sliceTypeDelta; >>> +qp += maxQpDelta - sliceTypeDelta; >>> if (((curFrame->m_poc) > (lastScenecut + int(windowSize))) >>> && ((curFrame->m_poc) <= (lastScenecut + 2 * int(windowSize >>> -q -= window2Delta; >>> +qp -= window2Delta; >>> else if (curFrame->m_poc > lastScenecut + 2 * >>> int(windowSize)) >>> -q -= window3Delta; >>> +qp -= window3Delta; >>> } >>> } >>> else if (isFrameInsideWindow && >>> IS_X265_TYPE_B(curFrame->m_lowres.sliceType)) >>> @@ -3185,16 +3186,16 @@ >>> if (!(lastIFrame > lastScenecut && lastIFrame <= (lastScenecut >>> + int(maxWindowSize)) >>> && curFrame->m_poc > lastIFrame)) >>> { >>> -q += maxQpDelta; >>> +qp += maxQpDelta; >>> if (curFrame->m_lowres.sliceType == X265_TYPE_B) >>> -q += sliceTypeDelta; >>> +qp += sliceTypeDelta; >>> if (((curFrame->m_poc) > (lastScenecut + int(windowSize))) >>> && ((curFrame->m_poc) <= (lastScenecut + 2 * int(windowSize >>> -q -= window2Delta; >>> +qp -= window2Delta; >>> else if (curFrame->m_poc > lastScenecut + 2 * >>> int(windowSize)) >>> -q -= window3Delta; >>> +qp -= window3Delta; >>> } >>> } >>> if (IS_X265_TYPE_I(curFrame->m_lowres.sliceType) && >>> curFrame->m_lowres.bScenecut) >>> -q = q - iSliceDelta; >>> -return q; >>> +qp = qp - iSliceDelta; >>> +return x265_qp2qScale(qp); >>> } >>> >>> Thanks & Regards >>> *Niranjan Kumar B* >>> Video Codec Engineer >>> Media & AI Analytics >>> +91 958 511 1449 >>> <https://multicorewareinc.com/> >>> >> ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 2 of 2] Add support for RADL pictures at IDR scenecuts.
op-length >> (keyint == min-keyint). Disabling radl.\n"); >> +x265_log(p, X265_LOG_WARNING, "Radl requires closed gop >> structure. Disabling radl.\n"); >> } >> >> if ((p->chunkStart || p->chunkEnd) && p->bOpenGOP && >> m_param->bResetZoneConfig) >> diff --git a/source/encoder/encoder.h b/source/encoder/encoder.h >> index 1d4fe2476..4fbd234c2 100644 >> --- a/source/encoder/encoder.h >> +++ b/source/encoder/encoder.h >> @@ -373,7 +373,7 @@ public: >> bool computeHistograms(x265_picture *pic); >> void computeHistogramSAD(double *maxUVNormalizedSAD, double >> *edgeNormalizedSAD, int curPoc); >> double normalizeRange(int32_t value, int32_t minValue, int32_t >> maxValue, double rangeStart, double rangeEnd); >> -void findSceneCuts(x265_picture *pic, bool& isMax, bool& bDup, >> double m_maxUVSADVal, double m_edgeSADVal); >> +void findSceneCuts(x265_picture *pic, bool& isMax, bool& isHardSC, >> bool& bDup, double m_maxUVSADVal, double m_edgeSADVal); >> >> void initRefIdx(); >> void analyseRefIdx(int *numRefIdx); >> diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp >> index 27052ca4e..2006fd434 100644 >> --- a/source/encoder/slicetype.cpp >> +++ b/source/encoder/slicetype.cpp >> @@ -1520,6 +1520,7 @@ void Lookahead::slicetypeDecide() >> int bframes, brefs; >> if (!m_param->analysisLoad || m_param->bAnalysisType == HEVC_INFO) >> { >> +bool isClosedGopRadl = m_param->radl && m_param->keyframeMax != >> m_param->keyframeMin; >> for (bframes = 0, brefs = 0;; bframes++) >> { >> Lowres& frm = list[bframes]->m_lowres; >> @@ -1579,6 +1580,16 @@ void Lookahead::slicetypeDecide() >> else >> frm.sliceType = X265_TYPE_IDR; >> } >> +if (frm.sliceType == X265_TYPE_IDR && frm.bScenecut && >> isClosedGopRadl) >> +{ >> +if ((m_param->bHistBasedSceneCut && >> frm.m_bIsHardScenecut) || >> +!m_param->bHistBasedSceneCut) >> +{ >> +for (int i = bframes; i < bframes + m_param->radl; >> i++) >> +list[i]->m_lowres.sliceType = X265_TYPE_B; >> +list[(bframes + m_param->radl)]->m_lowres.sliceType >> = X265_TYPE_IDR; >> +} >> +} >> if (frm.sliceType == X265_TYPE_IDR) >> { >> /* Closed GOP */ >> @@ -2146,7 +2157,7 @@ void Lookahead::slicetypeAnalyse(Lowres **frames, >> bool bKeyframe) >> } >> >> int zoneRadl = m_param->rc.zonefileCount && >> m_param->bResetZoneConfig ? m_param->rc.zones->zoneParam->radl : 0; >> -bool bForceRADL = (m_param->radl || zoneRadl) && >> !m_param->bOpenGOP; >> +bool bForceRADL = ((m_param->radl && m_param->keyframeMax == >> m_param->keyframeMin) || zoneRadl) && !m_param->bOpenGOP; >> bool bLastMiniGop = (framecnt >= m_param->bframes + 1) ? false : >> true; >> int radl = m_param->radl ? m_param->radl : zoneRadl; >> int preRADL = m_lastKeyframe + m_param->keyframeMax - radl - 1; >> /*Frame preceeding RADL in POC order*/ >> -- >> 2.24.0.windows.2 >> >> -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 1 of 2] Improvements to hist-based scenecut algorithm.
[0]; >>> +if (interCost < 0 || intraCost < 0) >>> +continue; >>> +int times = 0; >>> +double averageP = 0.0, averageI = 0.0; >>> +for (int j = i - 1; j >= 0 && times < 5; j--, times++) >>> +{ >>> +if (frames[j]->costEst[0][0] > 0 && >>> frames[j]->costEst[1][0] > 0) >>> +{ >>> +averageI += frames[j]->costEst[0][0]; >>> +averageP += frames[j]->costEst[1][0]; >>> +} >>> +else >>> +times--; >>> +} >>> +if (times) >>> +{ >>> +averageI = averageI / times; >>> +averageP = averageP / times; >>> +frames[i]->interPCostPercDiff = abs(interCost - >>> averageP) / X265_MIN(interCost, averageP) * 100; >>> +frames[i]->intraCostPercDiff = abs(intraCost - >>> averageI) / X265_MIN(intraCost, averageI) * 100; >>> +} >>> +} >>> +} >>> + >>> +/* When scenecut threshold is set, use scenecut detection for I >>> frame placements */ >>> +if (!m_param->bHistBasedSceneCut || (m_param->bHistBasedSceneCut && >>> frames[1]->bScenecut)) >>> isScenecut = scenecut(frames, 0, 1, true, origNumFrames); >>> >>> if (isScenecut && (m_param->bHistBasedSceneCut || >>> m_param->scenecutThreshold)) >>> @@ -2018,17 +2048,16 @@ void Lookahead::slicetypeAnalyse(Lowres >>> **frames, bool bKeyframe) >>> m_extendGopBoundary = false; >>> for (int i = m_param->bframes + 1; i < origNumFrames; i += >>> m_param->bframes + 1) >>> { >>> -if (!m_param->bHistBasedSceneCut) >>> +if (!m_param->bHistBasedSceneCut || >>> (m_param->bHistBasedSceneCut && frames[i + 1]->bScenecut)) >>> scenecut(frames, i, i + 1, true, origNumFrames); >>> >>> for (int j = i + 1; j <= X265_MIN(i + m_param->bframes + 1, >>> origNumFrames); j++) >>> { >>> -if ((!m_param->bHistBasedSceneCut && >>> frames[j]->bScenecut && scenecutInternal(frames, j - 1, j, true)) || >>> -(m_param->bHistBasedSceneCut && >>> frames[j]->bScenecut)) >>> -{ >>> -m_extendGopBoundary = true; >>> -break; >>> -} >>> +if (frames[j]->bScenecut && scenecutInternal(frames, j >>> - 1, j, true)) >>> + { >>> +m_extendGopBoundary = true; >>> +break; >>> +} >>> } >>> if (m_extendGopBoundary) >>> break; >>> @@ -2133,14 +2162,15 @@ void Lookahead::slicetypeAnalyse(Lowres >>> **frames, bool bKeyframe) >>> { >>> for (int j = 1; j < numBFrames + 1; j++) >>> { >>> -if ((!m_param->bHistBasedSceneCut && scenecut(frames, >>> j, j + 1, false, origNumFrames)) || >>> -(m_param->bHistBasedSceneCut && frames[j + >>> 1]->bScenecut) || >>> -(bForceRADL && (frames[j]->frameNum == preRADL))) >>> -{ >>> -frames[j]->sliceType = X265_TYPE_P; >>> -numAnalyzed = j; >>> -break; >>> -} >>> +bool isNextScenecut = false; >>> +if (!m_param->bHistBasedSceneCut || >>> (m_param->bHistBasedSceneCut && frames[j + 1]->bScenecut)) >>> +isNextScenecut = scenecut(frames, j, j + 1, false, >>> origNumFrames); >>> +if (isNextScenecut || (bForceRADL && >>> frames[j]->frameNum == preRADL)) >>> +{ >>> +frames[j]->sliceType = X265_TYPE_P; >>> +numAnalyzed = j; >>> +break; >>> +} >>> } >>> } >>> resetStart = bKeyframe ? 1 : X265_MIN(numBFrames + 2, >>> numAnalyzed + 1); >>> @@ -2203,7 +2233,7 @@ bool Lookahead::scenecut(Lowres **frames, int p0, >>> int p1, bool bRealScenecut, in >>> * and not considered a scenecut. */ >>> for (int cp1 = p1; cp1 <= maxp1; cp1++) >>> { >>> -if (!scenecutInternal(frames, p0, cp1, false)) >>> +if (!m_param->bHistBasedSceneCut && >>> !scenecutInternal(frames, p0, cp1, false)) >>> { >>> /* Any frame in between p0 and cur_p1 cannot be a real >>> scenecut. */ >>> for (int i = cp1; i > p0; i--) >>> @@ -2212,7 +2242,7 @@ bool Lookahead::scenecut(Lowres **frames, int p0, >>> int p1, bool bRealScenecut, in >>> noScenecuts = false; >>> } >>> } >>> -else if (scenecutInternal(frames, cp1 - 1, cp1, false)) >>> +else if ((m_param->bHistBasedSceneCut && >>> frames[cp1]->m_bIsMaxThres) || scenecutInternal(frames, cp1 - 1, cp1, >>> false)) >>> { >>> /* If current frame is a Scenecut from p0 frame as well >>> as Scenecut from >>> * preceeding frame, mark it as a Scenecut */ >>> @@ -2273,6 +2303,10 @@ bool Lookahead::scenecut(Lowres **frames, int p0, >>> int p1, bool bRealScenecut, in >>> >>> if (!frames[p1]->bScenecut) >>> return false; >>> +/* Check only scene transitions if max threshold */ >>> +if (m_param->bHistBasedSceneCut && frames[p1]->m_bIsMaxThres) >>> +return frames[p1]->bScenecut; >>> + >>> return scenecutInternal(frames, p0, p1, bRealScenecut); >>> } >>> >>> @@ -2289,7 +2323,19 @@ bool Lookahead::scenecutInternal(Lowres **frames, >>> int p0, int p1, bool bRealScen >>> /* magic numbers pulled out of thin air */ >>> float threshMin = (float)(threshMax * 0.25); >>> double bias = m_param->scenecutBias; >>> -if (bRealScenecut) >>> +if (m_param->bHistBasedSceneCut) >>> +{ >>> +double minT = 50.0 * (1 + m_param->edgeTransitionThreshold); >>> +if (frame->interPCostPercDiff > minT || >>> frame->intraCostPercDiff > minT) >>> +{ >>> +if (bRealScenecut && frame->bScenecut) >>> +x265_log(m_param, X265_LOG_DEBUG, "scene cut at %d \n", >>> frame->frameNum); >>> +return frame->bScenecut; >>> +} >>> +else >>> +return false; >>> +} >>> +else if (bRealScenecut) >>> { >>> if (m_param->keyframeMin == m_param->keyframeMax) >>> threshMin = threshMax; >>> diff --git a/source/x265.h b/source/x265.h >>> index 1e6f9ece6..32feb2bca 100644 >>> --- a/source/x265.h >>> +++ b/source/x265.h >>> @@ -1860,7 +1860,7 @@ typedef struct x265_param >>> /* A genuine threshold used for histogram based scene cut detection. >>> * This threshold determines whether a frame is a scenecut or not >>> * when compared against the edge and chroma histogram sad values. >>> - * Default 0.01. Range: Real number in the interval (0,2). */ >>> + * Default 0.03. Range: Real number in the interval (0,1). */ >>> doubleedgeTransitionThreshold; >>> >>> /* Enables histogram based scenecut detection algorithm to detect >>> scenecuts. Default disabled */ >>> -- >>> 2.24.0.windows.2 >>> >>> -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN] New hg mirror
All, As we all are aware, bitbucket is sunsetting its mercurial support on July 1, 2020, after which all the Hg repos including x265 <https://bitbucket.org/multicoreware/x265> will be deleted from their site. Given that several users/developers are still relying on our Hg mirror hosted on bitbucket, the x265 Hg mirror hosted at the videoLAN site http://hg.videolan.org/x265 will instead act as our primary Hg mirror at least until the end of 2020. Happy compressing! -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH]Fixed the normalization formula to ouput 0 to 1 and considered max chroma histogram SAD in histogram based scene cut detection
ouble maxUVSad, doub > { > bDup = true; > } > -else if (edgeSad > m_edgeHistThreshold && maxUVSad >= > m_chromaHistThreshold) > -{ > -pic->frameData.bScenecut = true; > -bDup = false; > -} > -else if (edgeSad > m_scaledEdgeThreshold || maxUVSad >= > m_scaledChromaThreshold) > +else if (edgeSad > m_scaledEdgeThreshold || maxUVSad >= > m_scaledChromaThreshold || (edgeSad > m_edgeHistThreshold && maxUVSad >= > m_chromaHistThreshold)) > { > pic->frameData.bScenecut = true; > bDup = false; > +x265_log(m_param, X265_LOG_DEBUG, "scene cut at %d \n", > pic->poc); > } > } > - > -if (pic->frameData.bScenecut) > - x265_log(m_param, X265_LOG_DEBUG, "scene cut at %d \n", pic->poc); > } > > /** > diff --git a/source/encoder/encoder.h b/source/encoder/encoder.h > index 2c45886..fd6b3e7 100644 > --- a/source/encoder/encoder.h > +++ b/source/encoder/encoder.h > @@ -163,7 +163,7 @@ class RateControl; > class ThreadPool; > class FrameData; > > -#define MAX_SCENECUT_THRESHOLD 2.0 > +#define MAX_SCENECUT_THRESHOLD 1.0 > #define SCENECUT_STRENGTH_FACTOR 2.0 > > class Encoder : public x265_encoder > @@ -257,8 +257,7 @@ public: > pixel* m_edgePic; > pixel* m_inputPic[3]; > int32_tm_curYUVHist[3][HISTOGRAM_BINS]; > -int32_tm_curMaxUVHist[HISTOGRAM_BINS]; > -int32_tm_prevMaxUVHist[HISTOGRAM_BINS]; > +int32_tm_prevYUVHist[3][HISTOGRAM_BINS]; > int32_tm_curEdgeHist[2]; > int32_tm_prevEdgeHist[2]; > uint32_t m_planeSizes[3]; > @@ -373,6 +372,7 @@ public: > > bool computeHistograms(x265_picture *pic); > void computeHistogramSAD(double *maxUVNormalizedSAD, double > *edgeNormalizedSAD, int curPoc); > +double normalizeRange(int32_t value, int32_t minValue, int32_t > maxValue, double rangeStart, double rangeEnd); > void findSceneCuts(x265_picture *pic, bool& bDup, double > m_maxUVSADVal, double m_edgeSADVal); > > void initRefIdx(); > diff --git a/source/x265cli.cpp b/source/x265cli.cpp > index 5b95698..b53dc2b 100644 > --- a/source/x265cli.cpp > +++ b/source/x265cli.cpp > @@ -175,7 +175,7 @@ namespace X265_NS { > H1(" --scenecut-bias <0..100.0>Bias for scenecut detection. > Default %.2f\n", param->scenecutBias); > H0(" --hist-scenecut Enables histogram based > scene-cut detection using histogram based algorithm.\n"); > H0(" --no-hist-scenecutDisables histogram based > scene-cut detection using histogram based algorithm.\n"); > -H1(" --hist-threshold <0.0..2.0> Luma Edge histogram's > Normalized SAD threshold for histogram based scenecut detection Default > %.2f\n", param->edgeTransitionThreshold); > +H1(" --hist-threshold <0.0..1.0> Luma Edge histogram's > Normalized SAD threshold for histogram based scenecut detection Default > %.2f\n", param->edgeTransitionThreshold); > H0(" --[no-]fades Enable detection and > handling of fade-in regions. Default %s\n", OPT(param->bEnableFades)); > H1(" --[no-]scenecut-aware-qp Enable increasing QP for > frames inside the scenecut window after scenecut. Default %s\n", > OPT(param->bEnableSceneCutAwareQp)); > H1(" --scenecut-window <0..1000> QP incremental duration(in > milliseconds) when scenecut-aware-qp is enabled. Default %d\n", > param->scenecutWindow); > -- > 1.8.3.1 > > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [ANN]x265 version 3.4 released
Hi all, x265 version 3.4 is out with cool new features and encoder enhancements in terms of encoding efficiency as well as speed. Please download v3.4 from our downloads page <https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz> ( MD5Sum is e37b91c1c114f8815a3f46f039fe79b5) and do check out the full documentation available in our release notes <https://x265.readthedocs.io/en/default/releasenotes.html#version-3-4>. Release Notes of version 3.4 == New features 1. **Edge-aware quadtree partitioning** to terminate CU depth recursion based on edge information. :option:`--rskip` level 2 enables the feature and :option:`--rskip-edge-threshold` denotes the minimum expected edge-density percentage within the CU, below which the recursion is skipped. Experimental feature. 2. Application-level feature :option:`--abr-ladder` for automating efficient ABR ladder generation. Shows ~65% savings in the over-all turn-around time required for the generation of a typical Apple HLS ladder in Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz over a sequential ABR-ladder generation approach that leverages save-load architecture. Enhancements to existing features - 1. Improved efficiency in 2-pass rate-control algorithm. The savings in the bitrate is ~1.72% with visual improvement in quality in the initial 1-2 secs. Encoder enhancements 1. Faster ARM64 encodes enabled by ASM contributions from Huawei. The speed-up over no-asm version for 1080p encodes @ medium preset is ~15% in a 16 core H/W. 2. Strict VBV conformance in zone encoding. Bug fixes - 1. Multi-pass encode failures with :option:`--frame-dup`. 2. Corrupted bitstreams with :option:`--hist-scenecut` when input depth and internal bit-depth differ. 3. Incorrect analysis propagation in multi-level save-load architecture. 4. Failure in detecting NUMA packages installed in non-standard directories. Happy compressing!! -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Fixed some of the wrongly represented cli parameters in the docs related to --colormatrix and --videoformat.
ay >>> structure, pictures within a mini-gop can only refer to the >>> previous pictures >>> in display order. In other words, picture with display order N can >>> only refer >>> -to pictures of display order lower than N. In random acccess >>> method, pictures >>> +to pictures of display order lower than N. In random access method, >>> pictures >>> can be referenced from both the directions. It accepts values in >>> the range >>> [0-2] >>> >>> diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt >>> index 2558d9e..1d1a613 100644 >>> --- a/source/CMakeLists.txt >>> +++ b/source/CMakeLists.txt >>> @@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CPU" OFF) >>> option(STATIC_LINK_CRT "Statically link C runtime for release builds" >>> OFF) >>> mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD) >>> # X265_BUILD must be incremented each time the public API is changed >>> -set(X265_BUILD 191) >>> +set(X265_BUILD 192) >>> configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" >>> "${PROJECT_BINARY_DIR}/x265.def") >>> configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" >>> diff --git a/source/common/param.cpp b/source/common/param.cpp >>> index 908400f..b4965ce 100644 >>> --- a/source/common/param.cpp >>> +++ b/source/common/param.cpp >>> @@ -1122,7 +1122,7 @@ int x265_param_parse(x265_param* p, const char* >>> name, const char* value) >>> p->vui.bEnableOverscanInfoPresentFlag = 1; >>> p->vui.bEnableOverscanAppropriateFlag = 1; >>> } >>> -else if (!strcmp(value, "undef")) >>> +else if (!strcmp(value, "unknown")) >>> p->vui.bEnableOverscanInfoPresentFlag = 0; >>> else >>> bError = true; >>> @@ -1643,23 +1643,23 @@ int x265_check_params(x265_param* param) >>>"Sample Aspect Ratio height must be greater than 0"); >>> CHECK(param->vui.videoFormat < 0 || param->vui.videoFormat > 5, >>>"Video Format must be component," >>> - " pal, ntsc, secam, mac or undef"); >>> + " pal, ntsc, secam, mac or unknown"); >>> CHECK(param->vui.colorPrimaries < 0 >>>|| param->vui.colorPrimaries > 12 >>>|| param->vui.colorPrimaries == 3, >>> - "Color Primaries must be undef, bt709, bt470m," >>> + "Color Primaries must be unknown, bt709, bt470m," >>>" bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, >>> smpte-rp-431 or smpte-eg-432"); >>> CHECK(param->vui.transferCharacteristics < 0 >>>|| param->vui.transferCharacteristics > 18 >>>|| param->vui.transferCharacteristics == 3, >>> - "Transfer Characteristics must be undef, bt709, bt470m, >>> bt470bg," >>> + "Transfer Characteristics must be unknown, bt709, bt470m, >>> bt470bg," >>>" smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, >>> bt1361e," >>>" iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, >>> smpte-st-428 or arib-std-b67"); >>> CHECK(param->vui.matrixCoeffs < 0 >>>|| param->vui.matrixCoeffs > 14 >>>|| param->vui.matrixCoeffs == 3, >>> - "Matrix Coefficients must be undef, bt709, fcc, bt470bg, >>> smpte170m," >>> - " smpte240m, GBR, YCgCo, bt2020nc, bt2020c, smpte-st-2085, >>> chroma-nc, chroma-c or ictcp"); >>> + "Matrix Coefficients must be unknown, bt709, fcc, bt470bg, >>> smpte170m," >>> + " smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, >>> chroma-nc, chroma-c or ictcp"); >>> CHECK(param->vui.chromaSampleLocTypeTopField < 0 >>>|| param->vui.chromaSampleLocTypeTopField > 5, >>>"Chroma Sample Location Type Top Field must be 0-5"); >>> diff --git a/source/x265cli.cpp b/source/x265cli.cpp >>> index 05f16b7..9772a1a 100644 >>> --- a/source/x265cli.cpp >>> +++ b/source/x265cli.cpp >>> @@ -291,16 +291,16 @
Re: [x265] [PATCH] SVT-HEVC: Fix build errors
Pushed to Release_3.4 and default. On Thu, May 21, 2020 at 7:22 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > # HG changeset patch > # User Aruna Matheswaran > # Date 1590069012 -19800 > # Thu May 21 19:20:12 2020 +0530 > # Node ID 04275ae5803060c61bdc99567580f817d31332fa > # Parent 516a5796ccdce45aaea5b052efcb26dc950889be > SVT-HEVC: Fix build errors. > > diff -r 516a5796ccdc -r 04275ae58030 source/x265cli.cpp > --- a/source/x265cli.cppTue Apr 21 11:04:30 2020 +0530 > +++ b/source/x265cli.cppThu May 21 19:20:12 2020 +0530 > @@ -26,6 +26,7 @@ > #endif > > #include "x265cli.h" > +#include "svt.h" > > #define START_CODE 0x0001 > #define START_CODE_BYTES 4 > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] SVT-HEVC: Fix build errors
# HG changeset patch # User Aruna Matheswaran # Date 1590069012 -19800 # Thu May 21 19:20:12 2020 +0530 # Node ID 04275ae5803060c61bdc99567580f817d31332fa # Parent 516a5796ccdce45aaea5b052efcb26dc950889be SVT-HEVC: Fix build errors. diff -r 516a5796ccdc -r 04275ae58030 source/x265cli.cpp --- a/source/x265cli.cppTue Apr 21 11:04:30 2020 +0530 +++ b/source/x265cli.cppThu May 21 19:20:12 2020 +0530 @@ -26,6 +26,7 @@ #endif #include "x265cli.h" +#include "svt.h" #define START_CODE 0x0001 #define START_CODE_BYTES 4 # HG changeset patch # User Aruna Matheswaran # Date 1590069012 -19800 # Thu May 21 19:20:12 2020 +0530 # Node ID 04275ae5803060c61bdc99567580f817d31332fa # Parent 516a5796ccdce45aaea5b052efcb26dc950889be SVT-HEVC: Fix build errors. diff -r 516a5796ccdc -r 04275ae58030 source/x265cli.cpp --- a/source/x265cli.cpp Tue Apr 21 11:04:30 2020 +0530 +++ b/source/x265cli.cpp Thu May 21 19:20:12 2020 +0530 @@ -26,6 +26,7 @@ #endif #include "x265cli.h" +#include "svt.h" #define START_CODE 0x0001 #define START_CODE_BYTES 4 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] app: Limit the size of the picture buffer in non abr-ladder encodes to 1
# HG changeset patch # User Aruna Matheswaran # Date 1589441456 -19800 # Thu May 14 13:00:56 2020 +0530 # Node ID 31e6d0119997a99e5fa1d69398b211c1cab9ee62 # Parent 9335f5b5795a06b584e182efbd840b3d5ddb8e30 app: Limit the size of the picture buffer in non abr-ladder encodes to 1 diff -r 9335f5b5795a -r 31e6d0119997 source/abrEncApp.cpp --- a/source/abrEncApp.cpp Tue May 12 11:40:21 2020 +0530 +++ b/source/abrEncApp.cpp Thu May 14 13:00:56 2020 +0530 @@ -49,7 +49,7 @@ { m_numEncodes = numEncodes; m_numActiveEncodes.set(numEncodes); -m_queueSize = X265_INPUT_QUEUE_SIZE; +m_queueSize = (numEncodes > 1) ? X265_INPUT_QUEUE_SIZE : 1; m_passEnc = X265_MALLOC(PassEncoder*, m_numEncodes); for (uint8_t i = 0; i < m_numEncodes; i++) # HG changeset patch # User Aruna Matheswaran # Date 1589441456 -19800 # Thu May 14 13:00:56 2020 +0530 # Node ID 31e6d0119997a99e5fa1d69398b211c1cab9ee62 # Parent 9335f5b5795a06b584e182efbd840b3d5ddb8e30 app: Limit the size of the picture buffer in non abr-ladder encodes to 1 diff -r 9335f5b5795a -r 31e6d0119997 source/abrEncApp.cpp --- a/source/abrEncApp.cpp Tue May 12 11:40:21 2020 +0530 +++ b/source/abrEncApp.cpp Thu May 14 13:00:56 2020 +0530 @@ -49,7 +49,7 @@ { m_numEncodes = numEncodes; m_numActiveEncodes.set(numEncodes); -m_queueSize = X265_INPUT_QUEUE_SIZE; +m_queueSize = (numEncodes > 1) ? X265_INPUT_QUEUE_SIZE : 1; m_passEnc = X265_MALLOC(PassEncoder*, m_numEncodes); for (uint8_t i = 0; i < m_numEncodes; i++) ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] csv: Fix corrupted command field in CSV summary with --abr-ladder option
Pushed to Release_3.4 and grafted the same into default. On Tue, May 12, 2020 at 2:38 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > # HG changeset patch > # User Aruna Matheswaran > # Date 1589263821 -19800 > # Tue May 12 11:40:21 2020 +0530 > # Node ID 50a7224c6a17fb6946dcaa5b8389359c388b8c84 > # Parent 1e3dbf09ee4f138c3bee6bf5a4bc3c9167b8f5e3 > csv: Fix corrupted command field in CSV summary with --abr-ladder option > > diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265.cpp > --- a/source/x265.cpp Wed May 06 18:40:34 2020 +0530 > +++ b/source/x265.cpp Tue May 12 11:40:21 2020 +0530 > @@ -173,7 +173,8 @@ > char *id = strtok(header, ":"); > char *head[X265_HEAD_ENTRIES]; > cliopt[i].encId = i; > - > +cliopt[i].isAbrLadderConfig = true; > + > while (id && (idCount <= X265_HEAD_ENTRIES)) > { > head[idCount] = id; > @@ -195,7 +196,7 @@ > char* token = strtok(start, " "); > while (token) > { > -argv[argc++] = token; > +argv[argc++] = strdup(token); > token = strtok(NULL, " "); > } > argv[argc] = NULL; > diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.cpp > --- a/source/x265cli.cppWed May 06 18:40:34 2020 +0530 > +++ b/source/x265cli.cppTue May 12 11:40:21 2020 +0530 > @@ -370,6 +370,13 @@ > > void CLIOptions::destroy() > { > +if (isAbrLadderConfig) > +{ > +for (int idx = 1; idx < argCnt; idx++) > +free(argString[idx]); > +free(argString); > +} > + > if (input) > input->release(); > input = NULL; > diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.h > --- a/source/x265cli.h Wed May 06 18:40:34 2020 +0530 > +++ b/source/x265cli.h Tue May 12 11:40:21 2020 +0530 > @@ -405,6 +405,7 @@ > char** argString; > > /* ABR ladder settings */ > +bool isAbrLadderConfig; > bool enableScaler; > char*encName; > char*reuseName; > @@ -435,6 +436,7 @@ > startTime = x265_mdate(); > prevUpdateTime = 0; > bDither = false; > +isAbrLadderConfig = false; > enableScaler = false; > encName = NULL; > reuseName = NULL; > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] csv: Fix corrupted command field in CSV summary with --abr-ladder option
# HG changeset patch # User Aruna Matheswaran # Date 1589263821 -19800 # Tue May 12 11:40:21 2020 +0530 # Node ID 50a7224c6a17fb6946dcaa5b8389359c388b8c84 # Parent 1e3dbf09ee4f138c3bee6bf5a4bc3c9167b8f5e3 csv: Fix corrupted command field in CSV summary with --abr-ladder option diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265.cpp --- a/source/x265.cpp Wed May 06 18:40:34 2020 +0530 +++ b/source/x265.cpp Tue May 12 11:40:21 2020 +0530 @@ -173,7 +173,8 @@ char *id = strtok(header, ":"); char *head[X265_HEAD_ENTRIES]; cliopt[i].encId = i; - +cliopt[i].isAbrLadderConfig = true; + while (id && (idCount <= X265_HEAD_ENTRIES)) { head[idCount] = id; @@ -195,7 +196,7 @@ char* token = strtok(start, " "); while (token) { -argv[argc++] = token; +argv[argc++] = strdup(token); token = strtok(NULL, " "); } argv[argc] = NULL; diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.cpp --- a/source/x265cli.cppWed May 06 18:40:34 2020 +0530 +++ b/source/x265cli.cppTue May 12 11:40:21 2020 +0530 @@ -370,6 +370,13 @@ void CLIOptions::destroy() { +if (isAbrLadderConfig) +{ +for (int idx = 1; idx < argCnt; idx++) +free(argString[idx]); +free(argString); +} + if (input) input->release(); input = NULL; diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.h --- a/source/x265cli.h Wed May 06 18:40:34 2020 +0530 +++ b/source/x265cli.h Tue May 12 11:40:21 2020 +0530 @@ -405,6 +405,7 @@ char** argString; /* ABR ladder settings */ +bool isAbrLadderConfig; bool enableScaler; char*encName; char*reuseName; @@ -435,6 +436,7 @@ startTime = x265_mdate(); prevUpdateTime = 0; bDither = false; +isAbrLadderConfig = false; enableScaler = false; encName = NULL; reuseName = NULL; # HG changeset patch # User Aruna Matheswaran # Date 1589263821 -19800 # Tue May 12 11:40:21 2020 +0530 # Node ID 50a7224c6a17fb6946dcaa5b8389359c388b8c84 # Parent 1e3dbf09ee4f138c3bee6bf5a4bc3c9167b8f5e3 csv: Fix corrupted command field in CSV summary with --abr-ladder option diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265.cpp --- a/source/x265.cpp Wed May 06 18:40:34 2020 +0530 +++ b/source/x265.cpp Tue May 12 11:40:21 2020 +0530 @@ -173,7 +173,8 @@ char *id = strtok(header, ":"); char *head[X265_HEAD_ENTRIES]; cliopt[i].encId = i; - +cliopt[i].isAbrLadderConfig = true; + while (id && (idCount <= X265_HEAD_ENTRIES)) { head[idCount] = id; @@ -195,7 +196,7 @@ char* token = strtok(start, " "); while (token) { -argv[argc++] = token; +argv[argc++] = strdup(token); token = strtok(NULL, " "); } argv[argc] = NULL; diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.cpp --- a/source/x265cli.cpp Wed May 06 18:40:34 2020 +0530 +++ b/source/x265cli.cpp Tue May 12 11:40:21 2020 +0530 @@ -370,6 +370,13 @@ void CLIOptions::destroy() { +if (isAbrLadderConfig) +{ +for (int idx = 1; idx < argCnt; idx++) +free(argString[idx]); +free(argString); +} + if (input) input->release(); input = NULL; diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.h --- a/source/x265cli.h Wed May 06 18:40:34 2020 +0530 +++ b/source/x265cli.h Tue May 12 11:40:21 2020 +0530 @@ -405,6 +405,7 @@ char** argString; /* ABR ladder settings */ +bool isAbrLadderConfig; bool enableScaler; char*encName; char*reuseName; @@ -435,6 +436,7 @@ startTime = x265_mdate(); prevUpdateTime = 0; bDither = false; +isAbrLadderConfig = false; enableScaler = false; encName = NULL; reuseName = NULL; ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH x265] save-load-tests: Fix CLI
Pushed into Release_3.4 and grafted the same into default. On Wed, May 6, 2020 at 6:43 PM Aruna Matheswaran wrote: > # HG changeset patch > # User Aruna Matheswaran > # Date 1588770634 -19800 > # Wed May 06 18:40:34 2020 +0530 > # Branch Release_3.4 > # Node ID 6005a1b65970307985f1a5ddad0240f01da2955f > # Parent e088c878723204541f3f4e2c13860864a3195b8e > save-load-tests: Fix CLI > > diff -r e088c8787232 -r 6005a1b65970 source/test/save-load-tests.txt > --- a/source/test/save-load-tests.txt Wed May 06 16:52:27 2020 +0530 > +++ b/source/test/save-load-tests.txt Wed May 06 18:40:34 2020 +0530 > @@ -18,4 +18,4 @@ > RaceHorses_416x240_30.y4m, --preset slow --no-cutree --ctu 16 > --analysis-save x265_analysis.dat --analysis-save-reuse-level 10 > --scale-factor 2 --crf 22 --vbv-maxrate 1000 --vbv-bufsize > 1000::RaceHorses_832x480_30.y4m,--preset slow --no-cutree --ctu 32 > --analysis-load x265_analysis.dat --analysis-save x265_analysis_2.dat > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --crf 16 --vbv-maxrate 4000 --vbv-bufsize 4000 > --refine-intra 0 --refine-inter 1::RaceHorses_1664x960_30.y4m, --preset > slow --no-cutree --ctu 64 --analysis-load x265_analysis_2.dat > --analysis-load-reuse-level 10 --scale-factor 2 --crf 12 --vbv-maxrate 7000 > --vbv-bufsize 7000 --refine-intra 2 --refine-inter 2 > crowd_run_540p50.y4m, --preset veryslow --no-cutree --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_1080.dat --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_1080.dat --analysis-load > x265_analysis_540.dat --refine-intra 4 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_2160p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset veryslow --no-cutree > --analysis-load x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > crowd_run_540p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra > 4 --dynamic-refine --analysis-load-reuse-level 10 > --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 > --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset > medium --no-cutree --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset medium --no-cutree --analysis-load > x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > -News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat > --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate > 12000::News-4k.y4m --analysis-load x265_analysis_fdup.dat --frame-dup --hrd > --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 > +News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat > --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate > 12000::News-4k.y4m, --analysis-load x265_analysis_fdup.dat --frame-dup > --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH x265] save-load-tests: Fix CLI
# HG changeset patch # User Aruna Matheswaran # Date 1588770634 -19800 # Wed May 06 18:40:34 2020 +0530 # Branch Release_3.4 # Node ID 6005a1b65970307985f1a5ddad0240f01da2955f # Parent e088c878723204541f3f4e2c13860864a3195b8e save-load-tests: Fix CLI diff -r e088c8787232 -r 6005a1b65970 source/test/save-load-tests.txt --- a/source/test/save-load-tests.txt Wed May 06 16:52:27 2020 +0530 +++ b/source/test/save-load-tests.txt Wed May 06 18:40:34 2020 +0530 @@ -18,4 +18,4 @@ RaceHorses_416x240_30.y4m, --preset slow --no-cutree --ctu 16 --analysis-save x265_analysis.dat --analysis-save-reuse-level 10 --scale-factor 2 --crf 22 --vbv-maxrate 1000 --vbv-bufsize 1000::RaceHorses_832x480_30.y4m, --preset slow --no-cutree --ctu 32 --analysis-load x265_analysis.dat --analysis-save x265_analysis_2.dat --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 --scale-factor 2 --crf 16 --vbv-maxrate 4000 --vbv-bufsize 4000 --refine-intra 0 --refine-inter 1::RaceHorses_1664x960_30.y4m, --preset slow --no-cutree --ctu 64 --analysis-load x265_analysis_2.dat --analysis-load-reuse-level 10 --scale-factor 2 --crf 12 --vbv-maxrate 7000 --vbv-bufsize 7000 --refine-intra 2 --refine-inter 2 crowd_run_540p50.y4m, --preset veryslow --no-cutree --analysis-save x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate 9000::crowd_run_1080p50.y4m, --preset veryslow --no-cutree --analysis-save x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_1080p50.y4m, --preset veryslow --no-cutree --analysis-save x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra 4 --dynamic-refine --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset veryslow --no-cutree --analysis-save x265_analysis_2160.dat --analysis-load x265_analysis_1080.dat --refine-intra 3 --dynamic-refine --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate 49000::crowd_run_2160p50.y4m, --preset veryslow --no-cutree --analysis-load x265_analysis_2160.dat --refine-intra 2 --dynamic-refine --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate 49000 crowd_run_540p50.y4m, --preset medium --no-cutree --analysis-save x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate 9000::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra 4 --dynamic-refine --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset medium --no-cutree --analysis-save x265_analysis_2160.dat --analysis-load x265_analysis_1080.dat --refine-intra 3 --dynamic-refine --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate 49000::crowd_run_2160p50.y4m, --preset medium --no-cutree --analysis-load x265_analysis_2160.dat --refine-intra 2 --dynamic-refine --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate 49000 -News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000::News-4k.y4m --analysis-load x265_analysis_fdup.dat --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 +News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000::News-4k.y4m, --analysis-load x265_analysis_fdup.dat --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 # HG changeset patch # User Aruna Matheswaran # Date 1588770634 -19800 # Wed May 06 18:40:34 2020 +0530 # Branch Release_3.4 # Node ID 6005a1b65970307985f1a5ddad0240f01da2955f # Parent e088c878723204541f3f4e2c13860864a3195b8e save-load-tests: Fix CLI diff -r e088c8787232 -r 6005a1b65970 source/test/save-load-tests.txt --- a/source/test/save-load-tests.txt Wed May 06 16:52:27 2020 +0530 +++ b/source/test/save-load-tests.txt Wed May 06 18:40:34 2020 +0530 @@ -18,4 +18,4 @@ RaceHorses_416x240_30.y4m, --preset slow --no-cutree --ctu 16 --analysis-save x265_analysis.dat --analysis-save-reuse-level 10 --scale-factor 2 --crf 22 --vbv-maxrate 1000 --vbv-bufsize 1000::RaceHorses_832x480_30.y4m,--preset slow --no-cutree --ctu 32
Re: [x265] [PATCH] EQT Updates
> if (param->searchRange < encParam->searchRange) > @@ -3413,7 +3413,7 @@ > p->maxNumReferences = zone->maxNumReferences; > p->bEnableFastIntra = zone->bEnableFastIntra; > p->bEnableEarlySkip = zone->bEnableEarlySkip; > -p->enableRecursionSkip = zone->enableRecursionSkip; > +p->recursionSkipMode = zone->recursionSkipMode; > p->searchMethod = zone->searchMethod; > p->searchRange = zone->searchRange; > p->subpelRefine = zone->subpelRefine; > @@ -5715,7 +5715,7 @@ > TOOLCMP(oldParam->maxNumReferences, newParam->maxNumReferences, > "ref=%d to %d\n"); > TOOLCMP(oldParam->bEnableFastIntra, newParam->bEnableFastIntra, > "fast-intra=%d to %d\n"); > TOOLCMP(oldParam->bEnableEarlySkip, newParam->bEnableEarlySkip, > "early-skip=%d to %d\n"); > -TOOLCMP(oldParam->enableRecursionSkip, newParam->enableRecursionSkip, > "rskip=%d to %d\n"); > +TOOLCMP(oldParam->recursionSkipMode, newParam->recursionSkipMode, > "rskip=%d to %d\n"); > TOOLCMP(oldParam->searchMethod, newParam->searchMethod, "me=%d to > %d\n"); > TOOLCMP(oldParam->searchRange, newParam->searchRange, "merange=%d to > %d\n"); > TOOLCMP(oldParam->subpelRefine, newParam->subpelRefine, "subme= %d to > %d\n"); > diff -r 303ff9e4546d -r df0886d58b86 source/encoder/frameencoder.cpp > --- a/source/encoder/frameencoder.cpp Wed Apr 15 18:44:54 2020 +0530 > +++ b/source/encoder/frameencoder.cpp Wed May 06 13:37:29 2020 +0530 > @@ -448,7 +448,7 @@ > m_ssimCnt = 0; > memset(&(m_frame->m_encData->m_frameStats), 0, > sizeof(m_frame->m_encData->m_frameStats)); > > -if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != > X265_AQ_EDGE && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP) > +if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != > X265_AQ_EDGE && m_param->recursionSkipMode == EDGE_BASED_RSKIP) > { > int height = m_frame->m_fencPic->m_picHeight; > int width = m_frame->m_fencPic->m_picWidth; > diff -r 303ff9e4546d -r df0886d58b86 source/encoder/slicetype.cpp > --- a/source/encoder/slicetype.cpp Wed Apr 15 18:44:54 2020 +0530 > +++ b/source/encoder/slicetype.cpp Wed May 06 13:37:29 2020 +0530 > @@ -519,7 +519,7 @@ > if (param->rc.aqMode == X265_AQ_EDGE) > edgeFilter(curFrame, param); > > -if (param->rc.aqMode == X265_AQ_EDGE && > !param->bHistBasedSceneCut && param->enableRecursionSkip >= > EDGE_BASED_RSKIP) > +if (param->rc.aqMode == X265_AQ_EDGE && > !param->bHistBasedSceneCut && param->recursionSkipMode == EDGE_BASED_RSKIP) > { > pixel* src = curFrame->m_edgePic + > curFrame->m_fencPic->m_lumaMarginY * curFrame->m_fencPic->m_stride + > curFrame->m_fencPic->m_lumaMarginX; > primitives.planecopy_pp_shr(src, > curFrame->m_fencPic->m_stride, curFrame->m_edgeBitPic, > diff -r 303ff9e4546d -r df0886d58b86 source/test/regression-tests.txt > --- a/source/test/regression-tests.txt Wed Apr 15 18:44:54 2020 +0530 > +++ b/source/test/regression-tests.txt Wed May 06 13:37:29 2020 +0530 > @@ -166,10 +166,6 @@ > crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 2 > --rskip-edge-threshold 5 --aq-mode 4 > crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 2 > --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 > crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 2 > --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4 > -crowd_run_1920x1080_50.yuv, --preset faster --ctu 32 --rskip 3 > --rskip-edge-threshold 5 > -crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 3 > --rskip-edge-threshold 5 --aq-mode 4 > -crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 3 > --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 > -crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 3 > --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4 > > # Main12 intraCost overflow bug test > 720p50_parkrun_ter.y4m,--preset medium > diff -r 303ff9e4546d -r df0886d58b86 source/x265.h > --- a/source/x265.h Wed Apr 15 18:44:54 2020 +0530 > +++ b/source/x265.h Wed May 06 13:37:29 2020 +0530 > @@ -1259,7 +1259,7 @@ > > /* Enable early CU size decisions to avoid recursing to higher depths. > * Default is enabled */ > -int enableRecursionSkip; > +int recursionSkipMode; > > /* Use a faster search method to find the best intra mode. Default is > 0 */ > int bEnableFastIntra; > diff -r 303ff9e4546d -r df0886d58b86 source/x265cli.cpp > --- a/source/x265cli.cppWed Apr 15 18:44:54 2020 +0530 > +++ b/source/x265cli.cppWed May 06 13:37:29 2020 +0530 > @@ -126,9 +126,9 @@ > H0(" --[no-]ssim-rdEnable ssim rate distortion > optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd)); > H0(" --[no-]rd-refine Enable QP based RD > refinement for rd levels 5 and 6. Default %s\n", > OPT(param->bEnableRdRefine)); > H0(" --[no-]early-skip Enable early SKIP detection. > Default %s\n", OPT(param->bEnableEarlySkip)); > -H0(" --rskip Set mode for early exit from > recursion. Mode 1: exit using rdcost. Mode 2: exit using edge density. Mode > 3: exit using edge density with forceful skip for small sized CU's." > -" Mode 0: disabled. > Default %s\n", OPT(param->enableRecursionSkip)); > -H1(" --rskip-edge-thresholdThreshold in terms of > percentage (integer of range [0,100]) for minimum edge density in CUs to > prun the recursion depth. Applicable only for rskip modes 2 and 3. Default: > %.f\n", param->edgeVarThreshold*100.0f); > +H0(" --rskip Set mode for early exit from > recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit using CU > edge density.\n" > +" Mode 0: disabled. Default > %d\n", param->recursionSkipMode); > +H1(" --rskip-edge-thresholdThreshold in terms of > percentage (integer of range [0,100]) for minimum edge density in CUs used > to prun the recursion depth. Applicable only for rskip mode 2. Value is > preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); > H1(" --[no-]tskip-fast Enable fast intra transform > skipping. Default %s\n", OPT(param->bEnableTSkipFast)); > H1(" --[no-]splitrd-skip Enable skipping split RD > analysis when sum of split CU rdCost larger than one split CU rdCost for > Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip)); > H1(" --nr-intra An integer value in range of > 0 to 2000, which denotes strength of noise reduction in intra CUs. Default > 0\n"); > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH]: EQT feature updates
{ > -int blockType = bestMode.cu.m_log2CUSize[0] - 2; > -int shift = bestMode.cu.m_log2CUSize[0] * 2; > +int blockType = bestMode.cu.m_log2CUSize[0] - LOG2_UNIT_SIZE; > +int shift = bestMode.cu.m_log2CUSize[0] * LOG2_UNIT_SIZE; > intptr_t stride = m_frame->m_fencPic->m_stride; > intptr_t blockOffsetLuma = bestMode.cu.m_cuPelX + > bestMode.cu.m_cuPelY * stride; > uint64_t sum_ss = primitives.cu[blockType].var(m_frame->m_edgeBitPic > + blockOffsetLuma, stride); > diff -r 37916f420742 -r 0aa429b15668 source/encoder/encoder.cpp > --- a/source/encoder/encoder.cpp Mon Jan 06 12:06:48 2020 +0530 > +++ b/source/encoder/encoder.cpp Mon May 04 14:59:04 2020 +0530 > @@ -1757,7 +1757,7 @@ > } > } > } > -if (m_param->enableRecursionSkip >= EDGE_BASED_RSKIP && > m_param->bHistBasedSceneCut) > +if (m_param->recursionSkipMode == EDGE_BASED_RSKIP && > m_param->bHistBasedSceneCut) > { > pixel* src = m_edgePic; > primitives.planecopy_pp_shr(src, > inFrame->m_fencPic->m_picWidth, inFrame->m_edgeBitPic, > inFrame->m_fencPic->m_stride, > @@ -2425,7 +2425,7 @@ > encParam->maxNumReferences = param->maxNumReferences; // never > uses more refs than specified in stream headers > encParam->bEnableFastIntra = param->bEnableFastIntra; > encParam->bEnableEarlySkip = param->bEnableEarlySkip; > -encParam->enableRecursionSkip = param->enableRecursionSkip; > +encParam->recursionSkipMode = param->recursionSkipMode; > encParam->searchMethod = param->searchMethod; > /* Scratch buffer prevents me_range from being increased for > esa/tesa */ > if (param->searchRange < encParam->searchRange) > @@ -3413,7 +3413,7 @@ > p->maxNumReferences = zone->maxNumReferences; > p->bEnableFastIntra = zone->bEnableFastIntra; > p->bEnableEarlySkip = zone->bEnableEarlySkip; > -p->enableRecursionSkip = zone->enableRecursionSkip; > +p->recursionSkipMode = zone->recursionSkipMode; > p->searchMethod = zone->searchMethod; > p->searchRange = zone->searchRange; > p->subpelRefine = zone->subpelRefine; > @@ -5714,7 +5714,7 @@ > TOOLCMP(oldParam->maxNumReferences, newParam->maxNumReferences, > "ref=%d to %d\n"); > TOOLCMP(oldParam->bEnableFastIntra, newParam->bEnableFastIntra, > "fast-intra=%d to %d\n"); > TOOLCMP(oldParam->bEnableEarlySkip, newParam->bEnableEarlySkip, > "early-skip=%d to %d\n"); > -TOOLCMP(oldParam->enableRecursionSkip, newParam->enableRecursionSkip, > "rskip=%d to %d\n"); > +TOOLCMP(oldParam->recursionSkipMode, newParam->recursionSkipMode, > "rskip=%d to %d\n"); > TOOLCMP(oldParam->searchMethod, newParam->searchMethod, "me=%d to > %d\n"); > TO
Re: [x265] [PATCH x265] Cleanup
Pushed to default. On Tue, May 5, 2020 at 7:02 PM Aruna Matheswaran wrote: > # HG changeset patch > # User Aruna Matheswaran > # Date 1586956494 -19800 > # Wed Apr 15 18:44:54 2020 +0530 > # Node ID 303ff9e4546d0052e7a4d359323f0aca84eedd68 > # Parent 193db4916b9f3fb0a0f97d78229c245e7dda1928 > Cleanup > > diff -r 193db4916b9f -r 303ff9e4546d source/abrEncApp.cpp > --- a/source/abrEncApp.cpp Mon May 04 11:50:39 2020 +0530 > +++ b/source/abrEncApp.cpp Wed Apr 15 18:44:54 2020 +0530 > @@ -41,62 +41,6 @@ > b_ctrl_c = 1; > } > > -#define START_CODE 0x0001 > -#define START_CODE_BYTES 4 > - > -/* Parse the RPU file and extract the RPU corresponding to the current > picture > -* and fill the rpu field of the input picture */ > -static int rpuParser(x265_picture * pic, FILE * ptr) > -{ > -uint8_t byteVal; > -uint32_t code = 0; > -int bytesRead = 0; > -pic->rpu.payloadSize = 0; > - > -if (!pic->pts) > -{ > -while (bytesRead++ < 4 && fread(, sizeof(uint8_t), 1, > ptr)) > -code = (code << 8) | byteVal; > - > -if (code != START_CODE) > -{ > -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU > startcode in POC %d\n", pic->pts); > -return 1; > -} > -} > - > -bytesRead = 0; > -while (fread(, sizeof(uint8_t), 1, ptr)) > -{ > -code = (code << 8) | byteVal; > -if (bytesRead++ < 3) > -continue; > -if (bytesRead >= 1024) > -{ > -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU size > in POC %d\n", pic->pts); > -return 1; > -} > - > -if (code != START_CODE) > -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) > & 0xFF; > -else > -return 0; > -} > - > -int ShiftBytes = START_CODE_BYTES - (bytesRead - > pic->rpu.payloadSize); > -int bytesLeft = bytesRead - pic->rpu.payloadSize; > -code = (code << ShiftBytes * 8); > -for (int i = 0; i < bytesLeft; i++) > -{ > -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & > 0xFF; > -code = (code << 8); > -} > -if (!pic->rpu.payloadSize) > -x265_log(NULL, X265_LOG_WARNING, "Dolby Vision RPU not found for > POC %d\n", pic->pts); > -return 0; > -} > - > - > namespace X265_NS { > // private namespace > #define X265_INPUT_QUEUE_SIZE 250 > @@ -150,8 +94,10 @@ > m_inputPicBuffer[pass] = X265_MALLOC(x265_picture*, > m_queueSize); > for (uint32_t idx = 0; idx < m_queueSize; idx++) > { > -m_inputPicBuffer[pass][idx] = NULL; > +m_inputPicBuffer[pass][idx] = x265_picture_alloc(); > +x265_picture_init(m_passEnc[pass]->m_param, > m_inputPicBuffer[pass][idx]); > } > + > m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, > m_queueSize); > m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; > m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; > @@ -161,32 +107,25 @@ > return true; > } > > -void AbrEncoder::closeEncoder() > -{ > -for (uint8_t pidx = 0; pidx < m_numEncodes; pidx++) > -{ > -PassEncoder *passWorker = m_passEnc[pidx]; > -if (passWorker) > -passWorker->close(); > -} > -} > - > void AbrEncoder::destroy() > { > -closeEncoder(); > x265_cleanup(); /* Free library singletons */ > for (uint8_t pass = 0; pass < m_numEncodes; pass++) > { > for (uint32_t index = 0; index < m_queueSize; index++) > { > +X265_FREE(m_inputPicBuffer[pass][index]->planes[0]); > x265_picture_free(m_inputPicBuffer[pass][index]); > } > + > X265_FREE(m_inputPicBuffer[pass]); > X265_FREE(m_analysisBuffer[pass]); > +X265_FREE(m_readFlag[pass]); > delete[] m_picIdxReadCnt[pass]; > delete[] m_analysisWrite[pass]; > delete[] m_analysisRead[pass]; > m_passEnc[pass]->destroy(); > +delete m_passEnc[pass]; > } > X265_FREE(m_inputPicBuffer); > X265_FREE(m_analysisBuffer); > @@ -211,13 +150,13 @@ > m_parent = parent; >
Re: [x265] [PATCH x265] Cleanup
Pushed the updated patch into default. On Mon, May 4, 2020 at 11:17 AM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > > > On Mon, May 4, 2020 at 8:42 AM Kavitha Sampath < > kavi...@multicorewareinc.com> wrote: > >> Looks good to me overall. One suggestion - since encoder open is now a >> part of threadMain, can we also move the cliopt parse to threadMain? >> > yes, we shall do that. I'll update and resend the patch. > >> >> On Tue, Apr 28, 2020 at 3:23 PM Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> # HG changeset patch >>> # User Aruna Matheswaran >>> # Date 1586956494 -19800 >>> # Wed Apr 15 18:44:54 2020 +0530 >>> # Node ID 23da64aedc8e5dcbed9ecd6e531f5649e6906c91 >>> # Parent 94bfe7f2c0c12616145f8fc1a1762ed55204a0a6 >>> Cleanup >>> >>> diff -r 94bfe7f2c0c1 -r 23da64aedc8e source/abrEncApp.cpp >>> --- a/source/abrEncApp.cpp Thu Apr 16 18:48:56 2020 +0530 >>> +++ b/source/abrEncApp.cpp Wed Apr 15 18:44:54 2020 +0530 >>> @@ -41,62 +41,6 @@ >>> b_ctrl_c = 1; >>> } >>> >>> -#define START_CODE 0x0001 >>> -#define START_CODE_BYTES 4 >>> - >>> -/* Parse the RPU file and extract the RPU corresponding to the current >>> picture >>> -* and fill the rpu field of the input picture */ >>> -static int rpuParser(x265_picture * pic, FILE * ptr) >>> -{ >>> -uint8_t byteVal; >>> -uint32_t code = 0; >>> -int bytesRead = 0; >>> -pic->rpu.payloadSize = 0; >>> - >>> -if (!pic->pts) >>> -{ >>> -while (bytesRead++ < 4 && fread(, sizeof(uint8_t), 1, >>> ptr)) >>> -code = (code << 8) | byteVal; >>> - >>> -if (code != START_CODE) >>> -{ >>> -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU >>> startcode in POC %d\n", pic->pts); >>> -return 1; >>> -} >>> -} >>> - >>> -bytesRead = 0; >>> -while (fread(, sizeof(uint8_t), 1, ptr)) >>> -{ >>> -code = (code << 8) | byteVal; >>> -if (bytesRead++ < 3) >>> -continue; >>> -if (bytesRead >= 1024) >>> -{ >>> -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU >>> size in POC %d\n", pic->pts); >>> -return 1; >>> -} >>> - >>> -if (code != START_CODE) >>> -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * >>> 8)) & 0xFF; >>> -else >>> -return 0; >>> -} >>> - >>> -int ShiftBytes = START_CODE_BYTES - (bytesRead - >>> pic->rpu.payloadSize); >>> -int bytesLeft = bytesRead - pic->rpu.payloadSize; >>> -code = (code << ShiftBytes * 8); >>> -for (int i = 0; i < bytesLeft; i++) >>> -{ >>> -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & >>> 0xFF; >>> -code = (code << 8); >>> -} >>> -if (!pic->rpu.payloadSize) >>> -x265_log(NULL, X265_LOG_WARNING, "Dolby Vision RPU not found >>> for POC %d\n", pic->pts); >>> -return 0; >>> -} >>> - >>> - >>> namespace X265_NS { >>> // private namespace >>> #define X265_INPUT_QUEUE_SIZE 250 >>> @@ -150,8 +94,10 @@ >>> m_inputPicBuffer[pass] = X265_MALLOC(x265_picture*, >>> m_queueSize); >>> for (uint32_t idx = 0; idx < m_queueSize; idx++) >>> { >>> -m_inputPicBuffer[pass][idx] = NULL; >>> +m_inputPicBuffer[pass][idx] = x265_picture_alloc(); >>> +x265_picture_init(m_passEnc[pass]->m_param, >>> m_inputPicBuffer[pass][idx]); >>> } >>> + >>> m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, >>> m_queueSize); >>> m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; >>> m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; >>> @@ -161,32 +107,25 @@ >>> return true; >>> } >>> >>> -void AbrEn
[x265] [PATCH x265] Cleanup
# HG changeset patch # User Aruna Matheswaran # Date 1586956494 -19800 # Wed Apr 15 18:44:54 2020 +0530 # Node ID 303ff9e4546d0052e7a4d359323f0aca84eedd68 # Parent 193db4916b9f3fb0a0f97d78229c245e7dda1928 Cleanup diff -r 193db4916b9f -r 303ff9e4546d source/abrEncApp.cpp --- a/source/abrEncApp.cpp Mon May 04 11:50:39 2020 +0530 +++ b/source/abrEncApp.cpp Wed Apr 15 18:44:54 2020 +0530 @@ -41,62 +41,6 @@ b_ctrl_c = 1; } -#define START_CODE 0x0001 -#define START_CODE_BYTES 4 - -/* Parse the RPU file and extract the RPU corresponding to the current picture -* and fill the rpu field of the input picture */ -static int rpuParser(x265_picture * pic, FILE * ptr) -{ -uint8_t byteVal; -uint32_t code = 0; -int bytesRead = 0; -pic->rpu.payloadSize = 0; - -if (!pic->pts) -{ -while (bytesRead++ < 4 && fread(, sizeof(uint8_t), 1, ptr)) -code = (code << 8) | byteVal; - -if (code != START_CODE) -{ -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU startcode in POC %d\n", pic->pts); -return 1; -} -} - -bytesRead = 0; -while (fread(, sizeof(uint8_t), 1, ptr)) -{ -code = (code << 8) | byteVal; -if (bytesRead++ < 3) -continue; -if (bytesRead >= 1024) -{ -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU size in POC %d\n", pic->pts); -return 1; -} - -if (code != START_CODE) -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & 0xFF; -else -return 0; -} - -int ShiftBytes = START_CODE_BYTES - (bytesRead - pic->rpu.payloadSize); -int bytesLeft = bytesRead - pic->rpu.payloadSize; -code = (code << ShiftBytes * 8); -for (int i = 0; i < bytesLeft; i++) -{ -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & 0xFF; -code = (code << 8); -} -if (!pic->rpu.payloadSize) -x265_log(NULL, X265_LOG_WARNING, "Dolby Vision RPU not found for POC %d\n", pic->pts); -return 0; -} - - namespace X265_NS { // private namespace #define X265_INPUT_QUEUE_SIZE 250 @@ -150,8 +94,10 @@ m_inputPicBuffer[pass] = X265_MALLOC(x265_picture*, m_queueSize); for (uint32_t idx = 0; idx < m_queueSize; idx++) { -m_inputPicBuffer[pass][idx] = NULL; +m_inputPicBuffer[pass][idx] = x265_picture_alloc(); +x265_picture_init(m_passEnc[pass]->m_param, m_inputPicBuffer[pass][idx]); } + m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, m_queueSize); m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; @@ -161,32 +107,25 @@ return true; } -void AbrEncoder::closeEncoder() -{ -for (uint8_t pidx = 0; pidx < m_numEncodes; pidx++) -{ -PassEncoder *passWorker = m_passEnc[pidx]; -if (passWorker) -passWorker->close(); -} -} - void AbrEncoder::destroy() { -closeEncoder(); x265_cleanup(); /* Free library singletons */ for (uint8_t pass = 0; pass < m_numEncodes; pass++) { for (uint32_t index = 0; index < m_queueSize; index++) { +X265_FREE(m_inputPicBuffer[pass][index]->planes[0]); x265_picture_free(m_inputPicBuffer[pass][index]); } + X265_FREE(m_inputPicBuffer[pass]); X265_FREE(m_analysisBuffer[pass]); +X265_FREE(m_readFlag[pass]); delete[] m_picIdxReadCnt[pass]; delete[] m_analysisWrite[pass]; delete[] m_analysisRead[pass]; m_passEnc[pass]->destroy(); +delete m_passEnc[pass]; } X265_FREE(m_inputPicBuffer); X265_FREE(m_analysisBuffer); @@ -211,13 +150,13 @@ m_parent = parent; if(!(m_cliopt.enableScaler && m_id)) m_input = m_cliopt.input; -m_param = x265_param_alloc(); -x265_copy_params(m_param, cliopt.param); +m_param = cliopt.param; m_inputOver = false; m_lastIdx = -1; m_encoder = NULL; m_scaler = NULL; m_reader = NULL; +m_ret = 0; } int PassEncoder::init(int ) @@ -245,24 +184,22 @@ } } -if (m_cliopt.zoneFile) -{ -if (!m_cliopt.parseZoneFile()) -{ -x265_log(NULL, X265_LOG_ERROR, "Unable to parse zonefile\n"); -fclose(m_cliopt.zoneFile); -m_cliopt.zoneFile = NULL; -} -} +
Re: [x265] [x265 Patch] Add save-load regression test CLI for Frame Duplication
Pushed to Release_3.3 and grafted to default. On Mon, May 4, 2020 at 2:43 PM Akil wrote: > # HG changeset patch > # User Akil Ayyappan R > # Date 1588573239 -19800 > # Mon May 04 11:50:39 2020 +0530 > # Node ID addc709d7337b036d5176249c56450b2e3372943 > # Parent 8518472465d80f9a6648375fa0733050df366c5c > Add save-load regression test CLI for Frame Duplication > > diff -r 8518472465d8 -r addc709d7337 source/test/save-load-tests.txt > --- a/source/test/save-load-tests.txt Thu Apr 30 15:01:09 2020 +0530 > +++ b/source/test/save-load-tests.txt Mon May 04 11:50:39 2020 +0530 > @@ -18,3 +18,4 @@ > RaceHorses_416x240_30.y4m, --preset slow --no-cutree --ctu 16 > --analysis-save x265_analysis.dat --analysis-save-reuse-level 10 > --scale-factor 2 --crf 22 --vbv-maxrate 1000 --vbv-bufsize > 1000::RaceHorses_832x480_30.y4m,--preset slow --no-cutree --ctu 32 > --analysis-load x265_analysis.dat --analysis-save x265_analysis_2.dat > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --crf 16 --vbv-maxrate 4000 --vbv-bufsize 4000 > --refine-intra 0 --refine-inter 1::RaceHorses_1664x960_30.y4m, --preset > slow --no-cutree --ctu 64 --analysis-load x265_analysis_2.dat > --analysis-load-reuse-level 10 --scale-factor 2 --crf 12 --vbv-maxrate > 7000 --vbv-bufsize 7000 --refine-intra 2 --refine-inter 2 > crowd_run_540p50.y4m, --preset veryslow --no-cutree --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_1080.dat --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_1080.dat --analysis-load > x265_analysis_540.dat --refine-intra 4 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_2160p50.y4m, --preset veryslow --no-cutree > --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset veryslow --no-cutree > --analysis-load x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > crowd_run_540p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_540.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 5000 --vbv-bufsize 15000 --vbv-maxrate > 9000::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-save-reuse-level 10 --scale-factor 2 > --bitrate 1 --vbv-bufsize 3 --vbv-maxrate > 17500::crowd_run_1080p50.y4m, --preset medium --no-cutree --analysis-save > x265_analysis_1080.dat --analysis-load x265_analysis_540.dat --refine-intra > 4 --dynamic-refine --analysis-load-reuse-level 10 > --analysis-save-reuse-level 10 --scale-factor 2 --bitrate 1 > --vbv-bufsize 3 --vbv-maxrate 17500::crowd_run_2160p50.y4m, --preset > medium --no-cutree --analysis-save x265_analysis_2160.dat --analysis-load > x265_analysis_1080.dat --refine-intra 3 --dynamic-refine > --analysis-load-reuse-level 10 --analysis-save-reuse-level 10 > --scale-factor 2 --bitrate 24000 --vbv-bufsize 84000 --vbv-maxrate > 49000::crowd_run_2160p50.y4m, --preset medium --no-cutree --analysis-load > x265_analysis_2160.dat --refine-intra 2 --dynamic-refine > --analysis-load-reuse-level 10 --scale-factor 1 --bitrate 24000 > --vbv-bufsize 84000 --vbv-maxrate 49000 > +News-4k.y4m, --preset medium --analysis-save x265_analysis_fdup.dat > --frame-dup --hrd --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate > 12000::News-4k.y4m --analysis-load x265_analysis_fdup.dat --frame-dup --hrd > --bitrate 1 --vbv-bufsize 15000 --vbv-maxrate 12000 > > Thanks & Regards > *Akil R* > Video Codec Engineer > Media & AI Analytics > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [x265 Patch] Fix bug in frame-dup + multi pass
Pushed to Release_3.3 and grafted to default. On Mon, May 4, 2020 at 10:29 AM Akil wrote: > # HG changeset patch > # User Akil Ayyappan R > # Date 1588239069 -19800 > # Thu Apr 30 15:01:09 2020 +0530 > # Node ID 8518472465d80f9a6648375fa0733050df366c5c > # Parent 37916f420742078b8b1f5fe231d9e5d7d7449705 > Fix bug in frame-dup + multi pass > > diff -r 37916f420742 -r 8518472465d8 source/encoder/encoder.cpp > --- a/source/encoder/encoder.cpp Mon Jan 06 12:06:48 2020 +0530 > +++ b/source/encoder/encoder.cpp Thu Apr 30 15:01:09 2020 +0530 > @@ -5037,6 +5037,7 @@ > X265_PARAM_VALIDATE(saveParam->chunkStart, sizeof(int), 1, > _param->chunkStart, chunk-start); > X265_PARAM_VALIDATE(saveParam->chunkEnd, sizeof(int), 1, > _param->chunkEnd, chunk-end); > X265_PARAM_VALIDATE(saveParam->ctuDistortionRefine, sizeof(int), 1, > _param->ctuDistortionRefine, ctu - distortion); > +X265_PARAM_VALIDATE(saveParam->frameDuplication, sizeof(int), 1, > _param->bEnableFrameDuplication, frame - dup); > > int sourceHeight, sourceWidth; > if (writeFlag) > diff -r 37916f420742 -r 8518472465d8 source/encoder/ratecontrol.cpp > --- a/source/encoder/ratecontrol.cpp Mon Jan 06 12:06:48 2020 +0530 > +++ b/source/encoder/ratecontrol.cpp Thu Apr 30 15:01:09 2020 +0530 > @@ -509,6 +509,7 @@ > CMP_OPT_FIRST_PASS(" keyint", m_param->keyframeMax); > CMP_OPT_FIRST_PASS("scenecut", > m_param->scenecutThreshold); > CMP_OPT_FIRST_PASS("intra-refresh", > m_param->bIntraRefresh); > +CMP_OPT_FIRST_PASS("frame-dup", > m_param->bEnableFrameDuplication); > if (m_param->bMultiPassOptRPS) > { > CMP_OPT_FIRST_PASS("multi-pass-opt-rps", > m_param->bMultiPassOptRPS); > @@ -546,7 +547,7 @@ > x265_log(m_param, X265_LOG_WARNING, "2nd pass has fewer > frames than 1st pass (%d vs %d)\n", > m_param->totalFrames, m_numEntries); > } > -if (m_param->totalFrames > m_numEntries) > +if (m_param->totalFrames > m_numEntries && > !m_param->bEnableFrameDuplication) > { > x265_log(m_param, X265_LOG_ERROR, "2nd pass has more > frames than 1st pass (%d vs %d)\n", > m_param->totalFrames, m_numEntries); > diff -r 37916f420742 -r 8518472465d8 source/x265.h > --- a/source/x265.h Mon Jan 06 12:06:48 2020 +0530 > +++ b/source/x265.h Thu Apr 30 15:01:09 2020 +0530 > @@ -134,6 +134,7 @@ > int ctuDistortionRefine; > int rightOffset; > int bottomOffset; > +int frameDuplication; > }x265_analysis_validate; > > /* Stores intra analysis data for a single frame. This struct needs > better packing */ > > Thanks & Regards > *Akil R* > Video Codec Engineer > Media & AI Analytics > <https://multicorewareinc.com/> > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH x265] Cleanup
On Mon, May 4, 2020 at 8:42 AM Kavitha Sampath wrote: > Looks good to me overall. One suggestion - since encoder open is now a > part of threadMain, can we also move the cliopt parse to threadMain? > yes, we shall do that. I'll update and resend the patch. > > On Tue, Apr 28, 2020 at 3:23 PM Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> # HG changeset patch >> # User Aruna Matheswaran >> # Date 1586956494 -19800 >> # Wed Apr 15 18:44:54 2020 +0530 >> # Node ID 23da64aedc8e5dcbed9ecd6e531f5649e6906c91 >> # Parent 94bfe7f2c0c12616145f8fc1a1762ed55204a0a6 >> Cleanup >> >> diff -r 94bfe7f2c0c1 -r 23da64aedc8e source/abrEncApp.cpp >> --- a/source/abrEncApp.cpp Thu Apr 16 18:48:56 2020 +0530 >> +++ b/source/abrEncApp.cpp Wed Apr 15 18:44:54 2020 +0530 >> @@ -41,62 +41,6 @@ >> b_ctrl_c = 1; >> } >> >> -#define START_CODE 0x0001 >> -#define START_CODE_BYTES 4 >> - >> -/* Parse the RPU file and extract the RPU corresponding to the current >> picture >> -* and fill the rpu field of the input picture */ >> -static int rpuParser(x265_picture * pic, FILE * ptr) >> -{ >> -uint8_t byteVal; >> -uint32_t code = 0; >> -int bytesRead = 0; >> -pic->rpu.payloadSize = 0; >> - >> -if (!pic->pts) >> -{ >> -while (bytesRead++ < 4 && fread(, sizeof(uint8_t), 1, >> ptr)) >> -code = (code << 8) | byteVal; >> - >> -if (code != START_CODE) >> -{ >> -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU >> startcode in POC %d\n", pic->pts); >> -return 1; >> -} >> -} >> - >> -bytesRead = 0; >> -while (fread(, sizeof(uint8_t), 1, ptr)) >> -{ >> -code = (code << 8) | byteVal; >> -if (bytesRead++ < 3) >> -continue; >> -if (bytesRead >= 1024) >> -{ >> -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU >> size in POC %d\n", pic->pts); >> -return 1; >> -} >> - >> -if (code != START_CODE) >> -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) >> & 0xFF; >> -else >> -return 0; >> -} >> - >> -int ShiftBytes = START_CODE_BYTES - (bytesRead - >> pic->rpu.payloadSize); >> -int bytesLeft = bytesRead - pic->rpu.payloadSize; >> -code = (code << ShiftBytes * 8); >> -for (int i = 0; i < bytesLeft; i++) >> -{ >> -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & >> 0xFF; >> -code = (code << 8); >> -} >> -if (!pic->rpu.payloadSize) >> -x265_log(NULL, X265_LOG_WARNING, "Dolby Vision RPU not found for >> POC %d\n", pic->pts); >> -return 0; >> -} >> - >> - >> namespace X265_NS { >> // private namespace >> #define X265_INPUT_QUEUE_SIZE 250 >> @@ -150,8 +94,10 @@ >> m_inputPicBuffer[pass] = X265_MALLOC(x265_picture*, >> m_queueSize); >> for (uint32_t idx = 0; idx < m_queueSize; idx++) >> { >> -m_inputPicBuffer[pass][idx] = NULL; >> +m_inputPicBuffer[pass][idx] = x265_picture_alloc(); >> +x265_picture_init(m_passEnc[pass]->m_param, >> m_inputPicBuffer[pass][idx]); >> } >> + >> m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, >> m_queueSize); >> m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; >> m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; >> @@ -161,32 +107,25 @@ >> return true; >> } >> >> -void AbrEncoder::closeEncoder() >> -{ >> -for (uint8_t pidx = 0; pidx < m_numEncodes; pidx++) >> -{ >> -PassEncoder *passWorker = m_passEnc[pidx]; >> -if (passWorker) >> -passWorker->close(); >> -} >> -} >> - >> void AbrEncoder::destroy() >> { >> -closeEncoder(); >> x265_cleanup(); /* Free library singletons */ >> for (uint8_t pass = 0; pass < m_numEncodes; pass++) >> { >> for (uint32_t index = 0; index < m_queueSize; index
Re: [x265] [PATCH 1 of 4 x265] Fix the RC Pass2 ABR
Looks good. Pushed to default. On Wed, Apr 22, 2020 at 12:44 PM wrote: > # HG changeset patch > # User Kirithika > # Date 1571388480 -19800 > # Fri Oct 18 14:18:00 2019 +0530 > # Node ID 851a02eea935bacf74eb35655798f72892580880 > # Parent 6bb2d88029c2e13fa13b5b053aa725d4fa84a084 > Fix the RC Pass2 ABR > > This commit does the following changes: > 1. Fix the order of RC Pass 1 stats Analysis in Pass2 > 2. Fix the aggressive Qp tuning for I/P frames in Pass2 > > diff -r 6bb2d88029c2 -r 851a02eea935 source/encoder/ratecontrol.cpp > --- a/source/encoder/ratecontrol.cppThu Apr 09 13:09:15 2020 +0530 > +++ b/source/encoder/ratecontrol.cppFri Oct 18 14:18:00 2019 +0530 > @@ -833,7 +833,7 @@ > /* weighted average of cplx of future frames */ > for (int j = 1; j < cplxBlur * 2 && j < m_numEntries - i; j++) > { > -int index = m_encOrder[i + j]; > +int index = i+j; > RateControlEntry *rcj = _rce2Pass[index]; > weight *= 1 - pow(rcj->iCuCount / m_ncu, 2); > if (weight < 0.0001) > @@ -846,7 +846,7 @@ > weight = 1.0; > for (int j = 0; j <= cplxBlur * 2 && j <= i; j++) > { > -int index = m_encOrder[i - j]; > +int index = i-j; > RateControlEntry *rcj = _rce2Pass[index]; > gaussianWeight = weight * exp(-j * j / 200.0); > weightSum += gaussianWeight; > @@ -855,7 +855,7 @@ > if (weight < .0001) > break; > } > -m_rce2Pass[m_encOrder[i]].blurredComplexity = cplxSum / weightSum; > +m_rce2Pass[i].blurredComplexity= cplxSum / weightSum; > } > CHECKED_MALLOC(qScale, double, m_numEntries); > if (filterSize > 1) > @@ -874,7 +874,7 @@ > expectedBits = 1; > for (int i = 0; i < m_numEntries; i++) > { > -RateControlEntry* rce = _rce2Pass[m_encOrder[i]]; > +RateControlEntry* rce = _rce2Pass[i]; > double q = getQScale(rce, 1.0); > expectedBits += qScale2bits(rce, q); > m_lastQScaleFor[rce->sliceType] = q; > @@ -897,15 +897,15 @@ > /* find qscale */ > for (int i = 0; i < m_numEntries; i++) > { > -RateControlEntry *rce = _rce2Pass[m_encOrder[i]]; > +RateControlEntry *rce = _rce2Pass[i]; > qScale[i] = getQScale(rce, rateFactor); > m_lastQScaleFor[rce->sliceType] = qScale[i]; > } > > /* fixed I/B qscale relative to P */ > -for (int i = m_numEntries - 1; i >= 0; i--) > +for (int i = 0; i < m_numEntries; i++) > { > -qScale[i] = getDiffLimitedQScale(_rce2Pass[m_encOrder[i]], > qScale[i]); > +qScale[i] = getDiffLimitedQScale(_rce2Pass[i], qScale[i]); > X265_CHECK(qScale[i] >= 0, "qScale became negative\n"); > } > > @@ -916,7 +916,6 @@ > for (int i = 0; i < m_numEntries; i++) > { > double q = 0.0, sum = 0.0; > - > for (int j = 0; j < filterSize; j++) > { > int idx = i + j - filterSize / 2; > @@ -924,7 +923,7 @@ > double coeff = qBlur == 0 ? 1.0 : exp(-d * d / (qBlur > * qBlur)); > if (idx < 0 || idx >= m_numEntries) > continue; > -if (m_rce2Pass[m_encOrder[i]].sliceType != > m_rce2Pass[m_encOrder[idx]].sliceType) > +if (m_rce2Pass[i].sliceType != > m_rce2Pass[idx].sliceType) > continue; > q += qScale[idx] * coeff; > sum += coeff; > @@ -936,7 +935,7 @@ > /* find expected bits */ > for (int i = 0; i < m_numEntries; i++) > { > -RateControlEntry *rce = _rce2Pass[m_encOrder[i]]; > +RateControlEntry *rce = _rce2Pass[i]; > rce->newQScale = clipQscale(NULL, rce, blurredQscale[i]); // > check if needed > X265_CHECK(rce->newQScale >= 0, "new Qscale is negative\n"); > expectedBits += qScale2bits(rce, rce->newQScale); > @@ -1956,7 +1955,7 @@ > /* Adjust quant based on the difference between > * achieved and expected bitrate so far */ > double curTime = (double)rce->encodeOrder / m_numEntries; > -double w = x265_clip3(0.0, 1.0, curTime * 100); > + double w = x265_clip3(0.0, 1.0, curTime);
[x265] [PATCH x265] Cleanup
# HG changeset patch # User Aruna Matheswaran # Date 1586956494 -19800 # Wed Apr 15 18:44:54 2020 +0530 # Node ID 23da64aedc8e5dcbed9ecd6e531f5649e6906c91 # Parent 94bfe7f2c0c12616145f8fc1a1762ed55204a0a6 Cleanup diff -r 94bfe7f2c0c1 -r 23da64aedc8e source/abrEncApp.cpp --- a/source/abrEncApp.cpp Thu Apr 16 18:48:56 2020 +0530 +++ b/source/abrEncApp.cpp Wed Apr 15 18:44:54 2020 +0530 @@ -41,62 +41,6 @@ b_ctrl_c = 1; } -#define START_CODE 0x0001 -#define START_CODE_BYTES 4 - -/* Parse the RPU file and extract the RPU corresponding to the current picture -* and fill the rpu field of the input picture */ -static int rpuParser(x265_picture * pic, FILE * ptr) -{ -uint8_t byteVal; -uint32_t code = 0; -int bytesRead = 0; -pic->rpu.payloadSize = 0; - -if (!pic->pts) -{ -while (bytesRead++ < 4 && fread(, sizeof(uint8_t), 1, ptr)) -code = (code << 8) | byteVal; - -if (code != START_CODE) -{ -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU startcode in POC %d\n", pic->pts); -return 1; -} -} - -bytesRead = 0; -while (fread(, sizeof(uint8_t), 1, ptr)) -{ -code = (code << 8) | byteVal; -if (bytesRead++ < 3) -continue; -if (bytesRead >= 1024) -{ -x265_log(NULL, X265_LOG_ERROR, "Invalid Dolby Vision RPU size in POC %d\n", pic->pts); -return 1; -} - -if (code != START_CODE) -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & 0xFF; -else -return 0; -} - -int ShiftBytes = START_CODE_BYTES - (bytesRead - pic->rpu.payloadSize); -int bytesLeft = bytesRead - pic->rpu.payloadSize; -code = (code << ShiftBytes * 8); -for (int i = 0; i < bytesLeft; i++) -{ -pic->rpu.payload[pic->rpu.payloadSize++] = (code >> (3 * 8)) & 0xFF; -code = (code << 8); -} -if (!pic->rpu.payloadSize) -x265_log(NULL, X265_LOG_WARNING, "Dolby Vision RPU not found for POC %d\n", pic->pts); -return 0; -} - - namespace X265_NS { // private namespace #define X265_INPUT_QUEUE_SIZE 250 @@ -150,8 +94,10 @@ m_inputPicBuffer[pass] = X265_MALLOC(x265_picture*, m_queueSize); for (uint32_t idx = 0; idx < m_queueSize; idx++) { -m_inputPicBuffer[pass][idx] = NULL; +m_inputPicBuffer[pass][idx] = x265_picture_alloc(); +x265_picture_init(m_passEnc[pass]->m_param, m_inputPicBuffer[pass][idx]); } + m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, m_queueSize); m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; @@ -161,32 +107,25 @@ return true; } -void AbrEncoder::closeEncoder() -{ -for (uint8_t pidx = 0; pidx < m_numEncodes; pidx++) -{ -PassEncoder *passWorker = m_passEnc[pidx]; -if (passWorker) -passWorker->close(); -} -} - void AbrEncoder::destroy() { -closeEncoder(); x265_cleanup(); /* Free library singletons */ for (uint8_t pass = 0; pass < m_numEncodes; pass++) { for (uint32_t index = 0; index < m_queueSize; index++) { +X265_FREE(m_inputPicBuffer[pass][index]->planes[0]); x265_picture_free(m_inputPicBuffer[pass][index]); } + X265_FREE(m_inputPicBuffer[pass]); X265_FREE(m_analysisBuffer[pass]); +X265_FREE(m_readFlag[pass]); delete[] m_picIdxReadCnt[pass]; delete[] m_analysisWrite[pass]; delete[] m_analysisRead[pass]; m_passEnc[pass]->destroy(); +delete m_passEnc[pass]; } X265_FREE(m_inputPicBuffer); X265_FREE(m_analysisBuffer); @@ -211,13 +150,13 @@ m_parent = parent; if(!(m_cliopt.enableScaler && m_id)) m_input = m_cliopt.input; -m_param = x265_param_alloc(); -x265_copy_params(m_param, cliopt.param); +m_param = cliopt.param; m_inputOver = false; m_lastIdx = -1; m_encoder = NULL; m_scaler = NULL; m_reader = NULL; +m_ret = 0; } int PassEncoder::init(int ) @@ -244,25 +183,6 @@ } } } - -if (m_cliopt.zoneFile) -{ -if (!m_cliopt.parseZoneFile()) -{ -x265_log(NULL, X265_LOG_ERROR, "Unable to parse zonefile\n"); -fclose(m_cliopt.zoneFile); -m_cliopt.zoneFile = NULL; -
Re: [x265] [PATCH] app: fix broken input read
Pushed to default. On Thu, Apr 16, 2020 at 8:19 PM Aruna Matheswaran < ar...@multicorewareinc.com> wrote: > # HG changeset patch > # User Aruna Matheswaran > # Date 1587043136 -19800 > # Thu Apr 16 18:48:56 2020 +0530 > # Node ID 94bfe7f2c0c12616145f8fc1a1762ed55204a0a6 > # Parent 6bb2d88029c2e13fa13b5b053aa725d4fa84a084 > app: fix broken input read > > This patch fixes indefinite wait for input frames that led the encoder to > stuck after encoding all the frames. > > diff -r 6bb2d88029c2 -r 94bfe7f2c0c1 source/abrEncApp.cpp > --- a/source/abrEncApp.cpp Thu Apr 09 13:09:15 2020 +0530 > +++ b/source/abrEncApp.cpp Thu Apr 16 18:48:56 2020 +0530 > @@ -213,7 +213,7 @@ > m_input = m_cliopt.input; > m_param = x265_param_alloc(); > x265_copy_params(m_param, cliopt.param); > -m_doneReading = false; > +m_inputOver = false; > m_lastIdx = -1; > m_encoder = NULL; > m_scaler = NULL; > @@ -461,7 +461,7 @@ > int ipwrite = m_parent->m_picWriteCnt[m_id].get(); > > bool isAbrLoad = m_isAnalysisLoad && (m_parent->m_numEncodes > 1); > -while (m_threadActive && (ipread == ipwrite)) > +while (!m_inputOver && (ipread == ipwrite)) > { > ipwrite = > m_parent->m_picWriteCnt[m_id].waitForChange(ipwrite); > } > @@ -978,7 +978,7 @@ > /* unscaled picture is stored in the last index */ > uint32_t srcId = m_id - 1; > int QDepth = m_parentEnc->m_parent->m_queueSize; > -while (!m_parentEnc->m_doneReading) > +while (!m_parentEnc->m_inputOver) > { > > uint32_t scaledWritten = > m_parentEnc->m_parent->m_picWriteCnt[m_id].get(); > @@ -1092,7 +1092,7 @@ > x265_picture* src = x265_picture_alloc(); > x265_picture_init(m_parentEnc->m_param, src); > > -while (!m_parentEnc->m_doneReading) > +while (m_threadActive) > { > uint32_t written = > m_parentEnc->m_parent->m_picWriteCnt[m_id].get(); > uint32_t writeIdx = written % QDepth; > @@ -1141,11 +1141,11 @@ > } > else > { > +m_threadActive = false; > +m_parentEnc->m_inputOver = true; > m_parentEnc->m_parent->m_picWriteCnt[m_id].poke(); > -break; > } > } > x265_picture_free(src); > -m_threadActive = false; > } > } > diff -r 6bb2d88029c2 -r 94bfe7f2c0c1 source/abrEncApp.h > --- a/source/abrEncApp.hThu Apr 09 13:09:15 2020 +0530 > +++ b/source/abrEncApp.h Thu Apr 16 18:48:56 2020 +0530 > @@ -80,7 +80,7 @@ > bool m_isScaled; > bool m_isAnalysisSave; > bool m_isAnalysisLoad; > -bool m_doneReading; > +bool m_inputOver; > > int m_threadActive; > int m_lastIdx; > -- Regards, *Aruna Matheswaran,* Video Codec Engineer, Media & AI analytics BU, ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel