[x265] [PATCH] slicetype: removed TComList(std::list) and used PicList to store the TComPic's

Steve Borho steve at borho.org
Wed Oct 9 08:03:58 CEST 2013


On Wed, Oct 9, 2013 at 12:30 AM, Gopu Govindaswamy <
gopu at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Gopu Govindaswamy <gopu at multicorewareinc.com>
> # Date 1381296647 -19800
> # Node ID 8348e1f887c0415b57430eddd7cbaef1826b52e7
> # Parent  fc7fbdd18bc0d6d7f98180332e065d83c054fe02
> slicetype: removed TComList(std::list) and used PicList to store the
> TComPic's
>
> diff -r fc7fbdd18bc0 -r 8348e1f887c0 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp      Wed Oct 09 00:00:10 2013 -0500
> +++ b/source/encoder/slicetype.cpp      Wed Oct 09 11:00:47 2013 +0530
> @@ -103,7 +103,7 @@
>  {
>      pic->m_lowres.init(pic->getPicYuvOrg(), pic->getSlice()->getPOC(),
> sliceType, cfg->param.bframes);
>
> -    inputQueue.pushBack(pic);
> +    inputQueue.pushBack(*pic);
>      if (inputQueue.size() >= (size_t)cfg->param.lookaheadDepth)
>          slicetypeDecide();
>  }
> @@ -123,7 +123,7 @@
>          pic->m_lowres.sliceType = X265_TYPE_I;
>          pic->m_lowres.bKeyframe = true;
>          lastKeyframe = 0;
> -        outputQueue.pushBack(pic);
> +        outputQueue.pushBack(*pic);
>          numDecided++;
>          frames[0] = &(pic->m_lowres);
>          return;
> @@ -167,7 +167,7 @@
>          //Push pictures in encode order
>          for (int i = 0; i < dframes; i++)
>          {
> -            outputQueue.pushBack(picsAnalysed[i]);
> +            outputQueue.pushBack(*picsAnalysed[i]);
>          }
>
>          if (pic)
> @@ -183,7 +183,7 @@
>          pic->m_lowres.sliceType = X265_TYPE_I;
>          pic->m_lowres.bKeyframe = true;
>          lastKeyframe = pic->m_lowres.frameNum;
> -        outputQueue.pushBack(pic);
> +        outputQueue.pushBack(*pic);
>          numDecided++;
>      }
>      else if (cfg->param.bframes == 0 || inputQueue.size() == 1)
> @@ -197,7 +197,7 @@
>              pic->m_lowres.bKeyframe = true;
>              lastKeyframe = pic->m_lowres.frameNum;
>          }
> -        outputQueue.pushBack(pic);
> +        outputQueue.pushBack(*pic);
>          numDecided++;
>      }
>      else
> @@ -222,14 +222,14 @@
>          TComPic *pic = list[j - 1];
>          if (pic->m_lowres.sliceType == X265_TYPE_AUTO)
>              pic->m_lowres.sliceType = X265_TYPE_P;
> -        outputQueue.pushBack(pic);
> +        outputQueue.pushBack(*pic);
>          numDecided++;
>          for (int i = 0; i < j - 1; i++)
>          {
>              pic = list[i];
>              if (pic->m_lowres.sliceType == X265_TYPE_AUTO)
>                  pic->m_lowres.sliceType = X265_TYPE_B;
> -            outputQueue.pushBack(pic);
> +            outputQueue.pushBack(*pic);
>              numDecided++;
>          }
>      }
> @@ -561,15 +561,16 @@
>      int reset_start;
>      int vbv_lookahead = 0;
>
> -    TComList<TComPic*>::iterator iterPic = inputQueue.begin();
> -    for (framecnt = 0; (framecnt < maxSearch) && (framecnt <
> (int)inputQueue.size()) && (*iterPic)->m_lowres.sliceType ==
> X265_TYPE_AUTO; framecnt++)
> +    TComPic* Pic = inputQueue.first();
> +    for (framecnt = 0; (framecnt < maxSearch) && (framecnt <
> (int)inputQueue.size()) && Pic->m_lowres.sliceType == X265_TYPE_AUTO;
> framecnt++)
>      {
> -        frames[framecnt + 1] = &((*iterPic++)->m_lowres);
> +        frames[framecnt + 1] = &Pic->m_lowres;
> +        Pic = Pic->m_next;
>      }
>

Queued, with a lower-cased pic variable name


>
>      if (!framecnt)
>      {
> -        frames[1] = &((*iterPic)->m_lowres);
> +        frames[1] = &Pic->m_lowres;
>          frames[2] = NULL;
>          return;
>      }
> diff -r fc7fbdd18bc0 -r 8348e1f887c0 source/encoder/slicetype.h
> --- a/source/encoder/slicetype.h        Wed Oct 09 00:00:10 2013 -0500
> +++ b/source/encoder/slicetype.h        Wed Oct 09 11:00:47 2013 +0530
> @@ -24,8 +24,8 @@
>  #ifndef X265_SLICETYPE_H
>  #define X265_SLICETYPE_H
>
> -#include "TLibCommon/TComList.h"
>  #include "motion.h"
> +#include "piclist.h"
>
>  // arbitrary, but low because SATD scores are 1/4 normal
>  #define X265_LOOKAHEAD_QP (12 + QP_BD_OFFSET)
> @@ -50,8 +50,8 @@
>      int              widthInCU;       // width of lowres frame in
> downscale CUs
>      int              heightInCU;      // height of lowres frame in
> downscale CUs
>
> -    TComList<TComPic*> inputQueue;  // input pictures in order received
> -    TComList<TComPic*> outputQueue; // pictures to be encoded, in encode
> order
> +    PicList inputQueue;  // input pictures in order received
> +    PicList outputQueue; // pictures to be encoded, in encode order
>
>      Lookahead(TEncCfg *);
>      ~Lookahead();
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131009/e25443a1/attachment.html>


More information about the x265-devel mailing list