<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 12:30 AM, Gopu Govindaswamy <span dir="ltr"><<a href="mailto:gopu@multicorewareinc.com" target="_blank">gopu@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Gopu Govindaswamy <<a href="mailto:gopu@multicorewareinc.com">gopu@multicorewareinc.com</a>><br>
# Date 1381296647 -19800<br>
# Node ID 8348e1f887c0415b57430eddd7cbaef1826b52e7<br>
# Parent  fc7fbdd18bc0d6d7f98180332e065d83c054fe02<br>
slicetype: removed TComList(std::list) and used PicList to store the TComPic's<br>
<br>
diff -r fc7fbdd18bc0 -r 8348e1f887c0 source/encoder/slicetype.cpp<br>
--- a/source/encoder/slicetype.cpp      Wed Oct 09 00:00:10 2013 -0500<br>
+++ b/source/encoder/slicetype.cpp      Wed Oct 09 11:00:47 2013 +0530<br>
@@ -103,7 +103,7 @@<br>
 {<br>
     pic->m_lowres.init(pic->getPicYuvOrg(), pic->getSlice()->getPOC(), sliceType, cfg->param.bframes);<br>
<br>
-    inputQueue.pushBack(pic);<br>
+    inputQueue.pushBack(*pic);<br>
     if (inputQueue.size() >= (size_t)cfg->param.lookaheadDepth)<br>
         slicetypeDecide();<br>
 }<br>
@@ -123,7 +123,7 @@<br>
         pic->m_lowres.sliceType = X265_TYPE_I;<br>
         pic->m_lowres.bKeyframe = true;<br>
         lastKeyframe = 0;<br>
-        outputQueue.pushBack(pic);<br>
+        outputQueue.pushBack(*pic);<br>
         numDecided++;<br>
         frames[0] = &(pic->m_lowres);<br>
         return;<br>
@@ -167,7 +167,7 @@<br>
         //Push pictures in encode order<br>
         for (int i = 0; i < dframes; i++)<br>
         {<br>
-            outputQueue.pushBack(picsAnalysed[i]);<br>
+            outputQueue.pushBack(*picsAnalysed[i]);<br>
         }<br>
<br>
         if (pic)<br>
@@ -183,7 +183,7 @@<br>
         pic->m_lowres.sliceType = X265_TYPE_I;<br>
         pic->m_lowres.bKeyframe = true;<br>
         lastKeyframe = pic->m_lowres.frameNum;<br>
-        outputQueue.pushBack(pic);<br>
+        outputQueue.pushBack(*pic);<br>
         numDecided++;<br>
     }<br>
     else if (cfg->param.bframes == 0 || inputQueue.size() == 1)<br>
@@ -197,7 +197,7 @@<br>
             pic->m_lowres.bKeyframe = true;<br>
             lastKeyframe = pic->m_lowres.frameNum;<br>
         }<br>
-        outputQueue.pushBack(pic);<br>
+        outputQueue.pushBack(*pic);<br>
         numDecided++;<br>
     }<br>
     else<br>
@@ -222,14 +222,14 @@<br>
         TComPic *pic = list[j - 1];<br>
         if (pic->m_lowres.sliceType == X265_TYPE_AUTO)<br>
             pic->m_lowres.sliceType = X265_TYPE_P;<br>
-        outputQueue.pushBack(pic);<br>
+        outputQueue.pushBack(*pic);<br>
         numDecided++;<br>
         for (int i = 0; i < j - 1; i++)<br>
         {<br>
             pic = list[i];<br>
             if (pic->m_lowres.sliceType == X265_TYPE_AUTO)<br>
                 pic->m_lowres.sliceType = X265_TYPE_B;<br>
-            outputQueue.pushBack(pic);<br>
+            outputQueue.pushBack(*pic);<br>
             numDecided++;<br>
         }<br>
     }<br>
@@ -561,15 +561,16 @@<br>
     int reset_start;<br>
     int vbv_lookahead = 0;<br>
<br>
-    TComList<TComPic*>::iterator iterPic = inputQueue.begin();<br>
-    for (framecnt = 0; (framecnt < maxSearch) && (framecnt < (int)inputQueue.size()) && (*iterPic)->m_lowres.sliceType == X265_TYPE_AUTO; framecnt++)<br>
+    TComPic* Pic = inputQueue.first();<br>
+    for (framecnt = 0; (framecnt < maxSearch) && (framecnt < (int)inputQueue.size()) && Pic->m_lowres.sliceType == X265_TYPE_AUTO; framecnt++)<br>
     {<br>
-        frames[framecnt + 1] = &((*iterPic++)->m_lowres);<br>
+        frames[framecnt + 1] = &Pic->m_lowres;<br>
+        Pic = Pic->m_next;<br>
     }<br></blockquote><div><br></div><div>Queued, with a lower-cased pic variable name</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
     if (!framecnt)<br>
     {<br>
-        frames[1] = &((*iterPic)->m_lowres);<br>
+        frames[1] = &Pic->m_lowres;<br>
         frames[2] = NULL;<br>
         return;<br>
     }<br>
diff -r fc7fbdd18bc0 -r 8348e1f887c0 source/encoder/slicetype.h<br>
--- a/source/encoder/slicetype.h        Wed Oct 09 00:00:10 2013 -0500<br>
+++ b/source/encoder/slicetype.h        Wed Oct 09 11:00:47 2013 +0530<br>
@@ -24,8 +24,8 @@<br>
 #ifndef X265_SLICETYPE_H<br>
 #define X265_SLICETYPE_H<br>
<br>
-#include "TLibCommon/TComList.h"<br>
 #include "motion.h"<br>
+#include "piclist.h"<br>
<br>
 // arbitrary, but low because SATD scores are 1/4 normal<br>
 #define X265_LOOKAHEAD_QP (12 + QP_BD_OFFSET)<br>
@@ -50,8 +50,8 @@<br>
     int              widthInCU;       // width of lowres frame in downscale CUs<br>
     int              heightInCU;      // height of lowres frame in downscale CUs<br>
<br>
-    TComList<TComPic*> inputQueue;  // input pictures in order received<br>
-    TComList<TComPic*> outputQueue; // pictures to be encoded, in encode order<br>
+    PicList inputQueue;  // input pictures in order received<br>
+    PicList outputQueue; // pictures to be encoded, in encode order<br>
<br>
     Lookahead(TEncCfg *);<br>
     ~Lookahead();<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>