On Wed, Jul 25, 2018 at 7:40 PM, <as...@multicorewareinc.com> wrote: > # HG changeset patch > # User Ashok Kumar Mishra <as...@multicorewareinc.com> > # Date 1532498266 -19800 > # Wed Jul 25 11:27:46 2018 +0530 > # Node ID 4536d8af0bc01b18aaeb21c45b3b1c2988b3021a > # Parent c258d214c978a5c64ec8dd3986a3b3cc3d2381ac > Fix for build error in ffmpeg > > diff -r c258d214c978 -r 4536d8af0bc0 source/CMakeLists.txt > --- a/source/CMakeLists.txt Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/CMakeLists.txt Wed Jul 25 11:27:46 2018 +0530 > @@ -29,7 +29,7 @@ > 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 163) > +set(X265_BUILD 164) > configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" > "${PROJECT_BINARY_DIR}/x265.def") > configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" > diff -r c258d214c978 -r 4536d8af0bc0 source/common/predict.cpp > --- a/source/common/predict.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/common/predict.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -91,7 +91,7 @@ > MV mv0 = cu.m_mv[0][pu.puAbsPartIdx]; > cu.clipMv(mv0); > > - if (cu.m_slice->m_pps->bUseWeightPred && wp0->bPresentFlag) > + if (cu.m_slice->m_pps->bUseWeightPred && wp0->wtPresent) > { > for (int plane = 0; plane < (bChroma ? 3 : 1); plane++) > { > @@ -133,7 +133,7 @@ > pwp0 = refIdx0 >= 0 ? cu.m_slice->m_weightPredTable[0][refIdx0] > : NULL; > pwp1 = refIdx1 >= 0 ? cu.m_slice->m_weightPredTable[1][refIdx1] > : NULL; > > - if (pwp0 && pwp1 && (pwp0->bPresentFlag || > pwp1->bPresentFlag)) > + if (pwp0 && pwp1 && (pwp0->wtPresent || pwp1->wtPresent)) > { > /* biprediction weighting */ > for (int plane = 0; plane < (bChroma ? 3 : 1); plane++) > @@ -183,7 +183,7 @@ > predInterChromaShort(pu, m_predShortYuv[1], > *cu.m_slice->m_refReconPicList[1][refIdx1], mv1); > } > > - if (pwp0 && pwp1 && (pwp0->bPresentFlag || > pwp1->bPresentFlag)) > + if (pwp0 && pwp1 && (pwp0->wtPresent || pwp1->wtPresent)) > addWeightBi(pu, predYuv, m_predShortYuv[0], > m_predShortYuv[1], wv0, wv1, bLuma, bChroma); > else > predYuv.addAvg(m_predShortYuv[0], m_predShortYuv[1], > pu.puAbsPartIdx, pu.width, pu.height, bLuma, bChroma); > @@ -193,7 +193,7 @@ > MV mv0 = cu.m_mv[0][pu.puAbsPartIdx]; > cu.clipMv(mv0); > > - if (pwp0 && pwp0->bPresentFlag) > + if (pwp0 && pwp0->wtPresent) > { > ShortYuv& shortYuv = m_predShortYuv[0]; > > @@ -220,7 +220,7 @@ > /* uniprediction to L1 */ > X265_CHECK(refIdx1 >= 0, "refidx1 was not positive\n"); > > - if (pwp1 && pwp1->bPresentFlag) > + if (pwp1 && pwp1->wtPresent) > { > ShortYuv& shortYuv = m_predShortYuv[0]; > > diff -r c258d214c978 -r 4536d8af0bc0 source/common/slice.cpp > --- a/source/common/slice.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/common/slice.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -138,7 +138,7 @@ > for (int yuv = 0; yuv < 3; yuv++) > { > WeightParam& wp = m_weightPredTable[l][i][yuv]; > - wp.bPresentFlag = false; > + wp.wtPresent = 0; > wp.log2WeightDenom = 0; > wp.inputWeight = 1; > wp.inputOffset = 0; > diff -r c258d214c978 -r 4536d8af0bc0 source/common/slice.h > --- a/source/common/slice.h Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/common/slice.h Wed Jul 25 11:27:46 2018 +0530 > @@ -298,7 +298,7 @@ > uint32_t log2WeightDenom; > int inputWeight; > int inputOffset; > - bool bPresentFlag; > + int wtPresent; > > /* makes a non-h265 weight (i.e. fix7), into an h265 weight */ > void setFromWeightAndOffset(int w, int o, int denom, bool bNormalize) > @@ -321,7 +321,7 @@ > (w).inputWeight = (s); \ > (w).log2WeightDenom = (d); \ > (w).inputOffset = (o); \ > - (w).bPresentFlag = (b); \ > + (w).wtPresent = (b); \ > } > > class Slice > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/encoder.cpp > --- a/source/encoder/encoder.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/encoder/encoder.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -1307,7 +1307,7 @@ > { > if (slice->m_sliceType == P_SLICE) > { > - if (slice->m_weightPredTable[0][0][0].bPresentFlag) > + if (slice->m_weightPredTable[0][0][0].wtPresent) > m_numLumaWPFrames++; > } > else if (slice->m_sliceType == B_SLICE) > @@ -1315,7 +1315,7 @@ > bool bLuma = false; > for (int l = 0; l < 2; l++) > { > - if (slice->m_weightPredTable[l][ > 0][0].bPresentFlag) > + if (slice->m_weightPredTable[l][0][0].wtPresent) > bLuma = true; > } > if (bLuma) > @@ -1326,10 +1326,10 @@ > { > if (slice->m_sliceType == P_SLICE) > { > - if (slice->m_weightPredTable[0][0][0].bPresentFlag) > + if (slice->m_weightPredTable[0][0][0].wtPresent) > m_numLumaWPFrames++; > - if (slice->m_weightPredTable[0][0][1].bPresentFlag || > - slice->m_weightPredTable[0][0][2].bPresentFlag) > + if (slice->m_weightPredTable[0][0][1].wtPresent || > + slice->m_weightPredTable[0][0][2].wtPresent) > m_numChromaWPFrames++; > } > else if (slice->m_sliceType == B_SLICE) > @@ -1337,10 +1337,10 @@ > bool bLuma = false, bChroma = false; > for (int l = 0; l < 2; l++) > { > - if (slice->m_weightPredTable[l][ > 0][0].bPresentFlag) > + if (slice->m_weightPredTable[l][0][0].wtPresent) > bLuma = true; > - if (slice->m_weightPredTable[l][0][1].bPresentFlag > || > - slice->m_weightPredTable[l][0] > [2].bPresentFlag) > + if (slice->m_weightPredTable[l][0][1].wtPresent > || > + slice->m_weightPredTable[l][0][2].wtPresent) > bChroma = true; > } > > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/entropy.cpp > --- a/source/encoder/entropy.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/encoder/entropy.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -1369,8 +1369,8 @@ > } > bDenomCoded = true; > } > - WRITE_FLAG(wp[0].bPresentFlag, "luma_weight_lX_flag"); > - totalSignalledWeightFlags += wp[0].bPresentFlag; > + WRITE_FLAG(!!wp[0].wtPresent, "luma_weight_lX_flag"); > + totalSignalledWeightFlags += wp[0].wtPresent; > } > > if (bChroma) > @@ -1378,15 +1378,15 @@ > for (int ref = 0; ref < slice.m_numRefIdx[list]; ref++) > { > wp = slice.m_weightPredTable[list][ref]; > - WRITE_FLAG(wp[1].bPresentFlag, > "chroma_weight_lX_flag"); > - totalSignalledWeightFlags += 2 * wp[1].bPresentFlag; > + WRITE_FLAG(!!wp[1].wtPresent, > "chroma_weight_lX_flag"); > + totalSignalledWeightFlags += 2 * wp[1].wtPresent; > } > } > > for (int ref = 0; ref < slice.m_numRefIdx[list]; ref++) > { > wp = slice.m_weightPredTable[list][ref]; > - if (wp[0].bPresentFlag) > + if (wp[0].wtPresent) > { > int deltaWeight = (wp[0].inputWeight - (1 << > wp[0].log2WeightDenom)); > WRITE_SVLC(deltaWeight, "delta_luma_weight_lX"); > @@ -1395,7 +1395,7 @@ > > if (bChroma) > { > - if (wp[1].bPresentFlag) > + if (wp[1].wtPresent) > { > for (int plane = 1; plane < 3; plane++) > { > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/frameencoder.cpp > --- a/source/encoder/frameencoder.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/encoder/frameencoder.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -478,7 +478,7 @@ > for (int ref = 0; ref < slice->m_numRefIdx[l]; ref++) > { > WeightParam *w = NULL; > - if ((bUseWeightP || bUseWeightB) && > slice->m_weightPredTable[l][ref][0].bPresentFlag) > + if ((bUseWeightP || bUseWeightB) && > slice->m_weightPredTable[l][ref][0].wtPresent) > w = slice->m_weightPredTable[l][ref]; > slice->m_refReconPicList[l][ref] = > slice->m_refFrameList[l][ref]->m_reconPic; > m_mref[l][ref].init(slice->m_refReconPicList[l][ref], w, > *m_param); > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/reference.cpp > --- a/source/encoder/reference.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/encoder/reference.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -89,7 +89,7 @@ > cuHeight >>= reconPic->m_vChromaShift; > } > > - if (wp[c].bPresentFlag) > + if (wp[c].wtPresent) > { > if (!weightBuffer[c]) > { > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/slicetype.cpp > --- a/source/encoder/slicetype.cpp Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/encoder/slicetype.cpp Wed Jul 25 11:27:46 2018 +0530 > @@ -436,7 +436,7 @@ > pixel *src = ref.fpelPlane[0]; > intptr_t stride = fenc.lumaStride; > > - if (wp.bPresentFlag) > + if (wp.wtPresent) > { > int offset = wp.inputOffset << (X265_DEPTH - 8); > int scale = wp.inputWeight; > @@ -490,7 +490,7 @@ > int deltaIndex = fenc.frameNum - ref.frameNum; > > WeightParam wp; > - wp.bPresentFlag = false; > + wp.wtPresent = 0; > > if (!wbuffer[0]) > { > diff -r c258d214c978 -r 4536d8af0bc0 source/encoder/weightPrediction.cpp > --- a/source/encoder/weightPrediction.cpp Mon Jul 23 15:36:44 2018 > +0530 > +++ b/source/encoder/weightPrediction.cpp Wed Jul 25 11:27:46 2018 > +0530 > @@ -293,7 +293,7 @@ > for (int plane = 0; plane < (param.internalCsp != X265_CSP_I400 ? > 3 : 1); plane++) > { > denom = plane ? chromaDenom : lumaDenom; > - if (plane && !weights[0].bPresentFlag) > + if (plane && !weights[0].wtPresent) > break; > > /* Early termination */ > @@ -476,12 +476,12 @@ > } > } > > - if (weights[0].bPresentFlag) > + if (weights[0].wtPresent) > { > // Make sure both chroma channels match > - if (weights[1].bPresentFlag != weights[2].bPresentFlag) > + if (weights[1].wtPresent != weights[2].wtPresent) > { > - if (weights[1].bPresentFlag) > + if (weights[1].wtPresent) > weights[2] = weights[1]; > else > weights[1] = weights[2]; > @@ -515,15 +515,15 @@ > for (int list = 0; list < numPredDir; list++) > { > WeightParam* w = &wp[list][0][0]; > - if (w[0].bPresentFlag || w[1].bPresentFlag || > w[2].bPresentFlag) > + if (w[0].wtPresent || w[1].wtPresent || w[2].wtPresent) > { > bWeighted = true; > p += sprintf(buf + p, " [L%d:R0 ", list); > - if (w[0].bPresentFlag) > + if (w[0].wtPresent) > p += sprintf(buf + p, "Y{%d/%d%+d}", > w[0].inputWeight, 1 << w[0].log2WeightDenom, w[0].inputOffset); > - if (w[1].bPresentFlag) > + if (w[1].wtPresent) > p += sprintf(buf + p, "U{%d/%d%+d}", > w[1].inputWeight, 1 << w[1].log2WeightDenom, w[1].inputOffset); > - if (w[2].bPresentFlag) > + if (w[2].wtPresent) > p += sprintf(buf + p, "V{%d/%d%+d}", > w[2].inputWeight, 1 << w[2].log2WeightDenom, w[2].inputOffset); > p += sprintf(buf + p, "]"); > } > diff -r c258d214c978 -r 4536d8af0bc0 source/x265.h > --- a/source/x265.h Mon Jul 23 15:36:44 2018 +0530 > +++ b/source/x265.h Wed Jul 25 11:27:46 2018 +0530 > @@ -169,7 +169,7 @@ > uint32_t log2WeightDenom; > int inputWeight; > int inputOffset; > - bool bPresentFlag; > + int wtPresent; > }x265_weight_param; > > #if X265_DEPTH < 10 >
Pushed.
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel