[x265] [PATCH 1 of 5] slicetype: Remove unnecessary initialization

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


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1378461918 -19800
# Node ID 9a51327a2d74cb48467efb21a6a099a0ad0625cf
# Parent  63364b91b72a183ed18d2e9d22a4e7070b3bae60
slicetype: Remove unnecessary initialization

diff -r 63364b91b72a -r 9a51327a2d74 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Fri Sep 06 01:45:16 2013 -0500
+++ b/source/encoder/slicetype.cpp	Fri Sep 06 15:35:18 2013 +0530
@@ -127,6 +127,13 @@
             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++)
+    {
+        outputQueue.pushBack(picsAnalysed[i]);
+    }
     if (pic)
         frames[0] = &(pic->m_lowres); // last nonb
 
@@ -447,10 +454,7 @@
         frames[framecnt + 1] = &((*iterPic++)->m_lowres);
         frames[framecnt + 1]->sliceType = X265_TYPE_AUTO;
     }
-    for (int i = framecnt; i < maxSearch; i++)
-    {
-        frames[i+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