[x265-commits] [x265] Fix for build error in ffmpeg

Ashok Kumar Mishra ashok at multicorewareinc.com
Thu Jul 26 01:03:03 CEST 2018


details:   http://hg.videolan.org/x265/rev/4536d8af0bc0
branches:  
changeset: 12401:4536d8af0bc0
user:      Ashok Kumar Mishra <ashok at multicorewareinc.com>
date:      Wed Jul 25 11:27:46 2018 +0530
description:
Fix for build error in ffmpeg
Subject: [x265] rest: typo

details:   http://hg.videolan.org/x265/rev/79c76e42cb28
branches:  
changeset: 12402:79c76e42cb28
user:      Ashok Kumar Mishra <ashok at multicorewareinc.com>
date:      Wed Jul 25 14:40:47 2018 +0530
description:
rest: typo

diffstat:

 doc/reST/cli.rst                    |   2 +-
 source/CMakeLists.txt               |   2 +-
 source/common/predict.cpp           |  10 +++++-----
 source/common/slice.cpp             |   2 +-
 source/common/slice.h               |   4 ++--
 source/encoder/encoder.cpp          |  16 ++++++++--------
 source/encoder/entropy.cpp          |  12 ++++++------
 source/encoder/frameencoder.cpp     |   2 +-
 source/encoder/reference.cpp        |   2 +-
 source/encoder/slicetype.cpp        |   4 ++--
 source/encoder/weightPrediction.cpp |  16 ++++++++--------
 source/x265.h                       |   2 +-
 12 files changed, 37 insertions(+), 37 deletions(-)

diffs (truncated from 301 to 300 lines):

diff -r c258d214c978 -r 79c76e42cb28 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Jul 23 15:36:44 2018 +0530
+++ b/doc/reST/cli.rst	Wed Jul 25 14:40:47 2018 +0530
@@ -1239,7 +1239,7 @@ Temporal / motion search options
 
 .. option:: --analyze-src-pics, --no-analyze-src-pics
 
-    Enalbe motion estimation with source frame pixels, in this mode, 
+    Enable motion estimation with source frame pixels, in this mode, 
     motion estimation can be computed independently. Default disabled.
 
 Spatial/intra options
diff -r c258d214c978 -r 79c76e42cb28 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Mon Jul 23 15:36:44 2018 +0530
+++ b/source/CMakeLists.txt	Wed Jul 25 14:40:47 2018 +0530
@@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CP
 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 79c76e42cb28 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 14:40:47 2018 +0530
@@ -91,7 +91,7 @@ void Predict::motionCompensation(const C
         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 @@ void Predict::motionCompensation(const C
             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 @@ void Predict::motionCompensation(const C
                 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 @@ void Predict::motionCompensation(const C
             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 @@ void Predict::motionCompensation(const C
             /* 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 79c76e42cb28 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 14:40:47 2018 +0530
@@ -138,7 +138,7 @@ void Slice::disableWeights()
             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 79c76e42cb28 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 14:40:47 2018 +0530
@@ -298,7 +298,7 @@ struct WeightParam
     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 @@ struct WeightParam
         (w).inputWeight = (s); \
         (w).log2WeightDenom = (d); \
         (w).inputOffset = (o); \
-        (w).bPresentFlag = (b); \
+        (w).wtPresent = (b); \
     }
 
 class Slice
diff -r c258d214c978 -r 79c76e42cb28 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 14:40:47 2018 +0530
@@ -1307,7 +1307,7 @@ int Encoder::encode(const x265_picture* 
             {
                 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 @@ int Encoder::encode(const x265_picture* 
                     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 @@ int Encoder::encode(const x265_picture* 
             {
                 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 @@ int Encoder::encode(const x265_picture* 
                     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 79c76e42cb28 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 14:40:47 2018 +0530
@@ -1369,8 +1369,8 @@ void Entropy::codePredWeightTable(const 
                     }
                     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 @@ void Entropy::codePredWeightTable(const 
                 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 @@ void Entropy::codePredWeightTable(const 
 
                 if (bChroma)
                 {
-                    if (wp[1].bPresentFlag)
+                    if (wp[1].wtPresent)
                     {
                         for (int plane = 1; plane < 3; plane++)
                         {
diff -r c258d214c978 -r 79c76e42cb28 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 14:40:47 2018 +0530
@@ -478,7 +478,7 @@ void FrameEncoder::compressFrame()
         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 79c76e42cb28 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 14:40:47 2018 +0530
@@ -89,7 +89,7 @@ int MotionReference::init(PicYuv* recPic
                 cuHeight >>= reconPic->m_vChromaShift;
             }
 
-            if (wp[c].bPresentFlag)
+            if (wp[c].wtPresent)
             {
                 if (!weightBuffer[c])
                 {
diff -r c258d214c978 -r 79c76e42cb28 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 14:40:47 2018 +0530
@@ -436,7 +436,7 @@ uint32_t LookaheadTLD::weightCostLuma(Lo
     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 @@ void LookaheadTLD::weightsAnalyse(Lowres
     int deltaIndex = fenc.frameNum - ref.frameNum;
 
     WeightParam wp;
-    wp.bPresentFlag = false;
+    wp.wtPresent = 0;
 
     if (!wbuffer[0])
     {
diff -r c258d214c978 -r 79c76e42cb28 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 14:40:47 2018 +0530
@@ -293,7 +293,7 @@ void weightAnalyse(Slice& slice, Frame& 
         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 @@ void weightAnalyse(Slice& slice, Frame& 
             }
         }
 
-        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 @@ void weightAnalyse(Slice& slice, Frame& 
         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 79c76e42cb28 source/x265.h
--- a/source/x265.h	Mon Jul 23 15:36:44 2018 +0530
+++ b/source/x265.h	Wed Jul 25 14:40:47 2018 +0530
@@ -169,7 +169,7 @@ typedef struct x265_weight_param
     uint32_t log2WeightDenom;
     int      inputWeight;
     int      inputOffset;
-    bool     bPresentFlag;
+    int      wtPresent;
 }x265_weight_param;
 


More information about the x265-commits mailing list