[x265] [PATCH 1 of 5] lowres: change int scenecut to bool bScenecut

Steve Borho steve at borho.org
Thu Sep 19 04:04:25 CEST 2013


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1379551091 18000
#      Wed Sep 18 19:38:11 2013 -0500
# Node ID 254e366afaed7a7bf3e0f7dbd6bd80a4e420eea2
# Parent  2531c630739e2df585aea1451c22ae92b053a3a1
lowres: change int scenecut to bool bScenecut

diff -r 2531c630739e -r 254e366afaed source/common/lowres.cpp
--- a/source/common/lowres.cpp	Wed Sep 18 21:02:49 2013 -0500
+++ b/source/common/lowres.cpp	Wed Sep 18 19:38:11 2013 -0500
@@ -108,7 +108,7 @@
 // (re) initialize lowres state
 void Lowres::init(TComPicYuv *orig, int bframes)
 {
-    scenecut = 1;
+    bScenecut = true;
     bIntraCalculated = false;
     memset(costEst, -1, sizeof(costEst));
     sliceType = X265_TYPE_AUTO;
diff -r 2531c630739e -r 254e366afaed source/common/lowres.h
--- a/source/common/lowres.h	Wed Sep 18 21:02:49 2013 -0500
+++ b/source/common/lowres.h	Wed Sep 18 19:38:11 2013 -0500
@@ -48,7 +48,7 @@
     int    lines;    // height of lowres frame in pixel lines
     bool   bIntraCalculated;
     int    frameNum;  // Presentation frame number 
-    int    scenecut;  // Set to zero if the frame cannot possibly be part of a real scenecut. 
+    bool   bScenecut; // Set to false if the frame cannot possibly be part of a real scenecut. 
 
     int    sliceType; // Slice type decided by lookahead
     int    keyframe;
diff -r 2531c630739e -r 254e366afaed source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Wed Sep 18 21:02:49 2013 -0500
+++ b/source/encoder/slicetype.cpp	Wed Sep 18 19:38:11 2013 -0500
@@ -678,7 +678,7 @@
                 /* Any frame in between p0 and cur_p1 cannot be a real scenecut. */
                 for (int i = curp1; i > p0; i--)
                 {
-                    frames[i]->scenecut = 0;
+                    frames[i]->bScenecut = false;
                 }
         }
 
@@ -691,12 +691,12 @@
         {
             if (origmaxp1 > maxSearch || (curp0 < maxp1 && scenecutInternal(curp0, maxp1, 0)))
                 /* If cur_p0 is the p0 of a scenecut, it cannot be the p1 of a scenecut. */
-                frames[curp0]->scenecut = 0;
+                frames[curp0]->bScenecut = false;
         }
     }
 
     /* Ignore frames that are part of a flash, i.e. cannot be real scenecuts. */
-    if (!frames[p1]->scenecut)
+    if (!frames[p1]->bScenecut)
         return 0;
     return scenecutInternal(p0, p1, bRealScenecut);
 }


More information about the x265-devel mailing list