[x265] [PATCH 2 of 5] slicetype: B-frames analysis integrated

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


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1378462462 -19800
# Node ID 48a5452bc14e1d697d00e7d962cc475598314dfb
# Parent  9a51327a2d74cb48467efb21a6a099a0ad0625cf
slicetype: B-frames analysis integrated

diff -r 9a51327a2d74 -r 48a5452bc14e source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Fri Sep 06 15:35:18 2013 +0530
+++ b/source/encoder/slicetype.cpp	Fri Sep 06 15:44:22 2013 +0530
@@ -112,16 +112,18 @@
 #if 0
     slicetypeAnalyse(false);
 
-    // This will work only in all-P config
     int dframes;
+    TComPic* picsAnalysed[X265_LOOKAHEAD_MAX];  //Used for sorting the pics in encode order
+    int idx = 1;
+
     for (dframes = 0; (frames[dframes + 1] != NULL) && (frames[dframes + 1]->sliceType != X265_TYPE_AUTO); dframes++)
     {}
 
     TComPic *pic = NULL;
-    for (int i = 1; i <= dframes && i <= inputQueue.size(); i++)
+    for (int i = 1; i <= dframes && !inputQueue.empty(); i++)
     {
         pic = inputQueue.popFront();
-        outputQueue.pushBack(pic);
+        picsAnalysed[idx++] = pic;
         if ((pic->m_lowres.sliceType == X265_TYPE_I) && !(pic->getPOC() % cfg->param.keyframeMax))
         {
             lastKeyframe = pic->getPOC();


More information about the x265-devel mailing list