[x265] [PATCH 3 of 5] slicetype: uncrustified

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Fri Sep 6 15:17:35 CEST 2013


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1378462535 -19800
# Node ID 491e4a95a6e4e6a94723cf5011fc69398278a102
# Parent  48a5452bc14e1d697d00e7d962cc475598314dfb
slicetype: uncrustified

diff -r 48a5452bc14e -r 491e4a95a6e4 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Fri Sep 06 15:44:22 2013 +0530
+++ b/source/encoder/slicetype.cpp	Fri Sep 06 15:45:35 2013 +0530
@@ -129,18 +129,20 @@
             lastKeyframe = pic->getPOC();
         }
     }
+
     picsAnalysed[0] = pic;  //Move the P-frame following B-frames to the beginning
 
     //Push pictures in encode order
-    for (int i = 0; i < dframes ; i++)
+    for (int i = 0; i < dframes; i++)
     {
         outputQueue.pushBack(picsAnalysed[i]);
     }
+
     if (pic)
         frames[0] = &(pic->m_lowres); // last nonb
 
 #else // if 0
-    // Fake lookahead
+      // Fake lookahead
     if (cfg->param.keyframeMax == 1)
     {
         TComPic *pic = inputQueue.popFront();
@@ -154,7 +156,7 @@
         TComPic *pic = inputQueue.popFront();
 
         bool forceIntra = (pic->getPOC() % cfg->param.keyframeMax) == 0;
-        pic->m_lowres.sliceType = forceIntra? X265_TYPE_I : X265_TYPE_P;
+        pic->m_lowres.sliceType = forceIntra ? X265_TYPE_I : X265_TYPE_P;
         outputQueue.pushBack(pic);
         numDecided++;
     }
@@ -456,7 +458,8 @@
         frames[framecnt + 1] = &((*iterPic++)->m_lowres);
         frames[framecnt + 1]->sliceType = X265_TYPE_AUTO;
     }
-    frames[framecnt+1] = NULL;
+
+    frames[framecnt + 1] = NULL;
 
     keyint_limit = cfg->param.keyframeMax - frames[1]->frameNum + lastKeyframe;
     origNumFrames = num_frames = X265_MIN(framecnt, keyint_limit);


More information about the x265-devel mailing list