[x265] [PATCH] analysis: init depth and mode analysis buffer at the begining of CTU compression. Encoder nits

Sagar Kotecha sagar at multicorewareinc.com
Thu Mar 10 08:22:01 CET 2016


Yes. Thanks. Sending updated patch.

--
Sagar

On Thu, Mar 10, 2016 at 12:47 PM, Deepthi Nandakumar <
deepthi at multicorewareinc.com> wrote:

>
>
> On Wed, Mar 9, 2016 at 2:22 PM, <sagar at multicorewareinc.com> wrote:
>
>> # HG changeset patch
>> # User Sagar Kotecha<sagar at multicorewareinc.com>
>> # Date 1457442015 -19800
>> #      Tue Mar 08 18:30:15 2016 +0530
>> # Node ID 8999a30d29f479d8dc8425046c26af8581cfa2ba
>> # Parent  67b63012de821913ecde12c000d09a5a8e5c76fa
>> analysis: init depth and mode analysis buffer at the begining of CTU
>> compression. Encoder nits.
>>
>> diff -r 67b63012de82 -r 8999a30d29f4 source/encoder/analysis.cpp
>> --- a/source/encoder/analysis.cpp       Tue Mar 08 11:14:52 2016 +0530
>> +++ b/source/encoder/analysis.cpp       Tue Mar 08 18:30:15 2016 +0530
>> @@ -147,6 +147,8 @@
>>          int numPredDir = m_slice->isInterP() ? 1 : 2;
>>          m_reuseInterDataCTU =
>> (analysis_inter_data*)m_frame->m_analysisData.interData;
>>          m_reuseRef = &m_reuseInterDataCTU->ref[ctu.m_cuAddr *
>> X265_MAX_PRED_MODE_PER_CTU * numPredDir];
>> +        m_reuseDepth = &m_reuseInterDataCTU->depth[ctu.m_cuAddr *
>> ctu.m_numPartitions];
>> +        m_reuseModes = &m_reuseInterDataCTU->modes[ctu.m_cuAddr *
>> ctu.m_numPartitions];
>>
>
> You can modify this in rd5_6 also.
>
>
>>          if (m_param->analysisMode == X265_ANALYSIS_SAVE)
>>              for (int i = 0; i < X265_MAX_PRED_MODE_PER_CTU * numPredDir;
>> i++)
>>                  m_reuseRef[i] = -1;
>> @@ -900,9 +902,7 @@
>>      bool foundSkip = false;
>>      if (m_param->analysisMode == X265_ANALYSIS_LOAD)
>>      {
>> -        uint8_t* reuseDepth =
>> &m_reuseInterDataCTU->depth[parentCTU.m_cuAddr * parentCTU.m_numPartitions];
>> -        uint8_t* reuseModes =
>> &m_reuseInterDataCTU->modes[parentCTU.m_cuAddr * parentCTU.m_numPartitions];
>> -        if (mightNotSplit && depth == reuseDepth[cuGeom.absPartIdx] &&
>> reuseModes[cuGeom.absPartIdx] == MODE_SKIP)
>> +        if (mightNotSplit && depth == m_reuseDepth[cuGeom.absPartIdx] &&
>> m_reuseModes[cuGeom.absPartIdx] == MODE_SKIP)
>>          {
>>              md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);
>>              md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);
>> diff -r 67b63012de82 -r 8999a30d29f4 source/encoder/analysis.h
>> --- a/source/encoder/analysis.h Tue Mar 08 11:14:52 2016 +0530
>> +++ b/source/encoder/analysis.h Tue Mar 08 18:30:15 2016 +0530
>> @@ -117,9 +117,11 @@
>>      Mode& compressCTU(CUData& ctu, Frame& frame, const CUGeom& cuGeom,
>> const Entropy& initialContext);
>>
>>  protected:
>> -    /* Analysis data for load/save modes, keeps getting incremented as
>> CTU analysis proceeds and data is consumed or read */
>> +    /* Analysis data for save/load mode, writes/reads data based on
>> absPartIdx */
>>      analysis_inter_data* m_reuseInterDataCTU;
>>      int32_t*             m_reuseRef;
>> +    uint8_t*             m_reuseDepth;
>> +    uint8_t*             m_reuseModes;
>>
>>      uint32_t m_splitRefIdx[4];
>>      uint64_t* cacheCost;
>> diff -r 67b63012de82 -r 8999a30d29f4 source/encoder/encoder.cpp
>> --- a/source/encoder/encoder.cpp        Tue Mar 08 11:14:52 2016 +0530
>> +++ b/source/encoder/encoder.cpp        Tue Mar 08 18:30:15 2016 +0530
>> @@ -2122,10 +2122,8 @@
>>                  absPartIdx += ctu->m_numPartitions >> (depth * 2);
>>              }
>>          }
>> -
>>      }
>>
>> -
>>      /* calculate frameRecordSize */
>>      analysis->frameRecordSize = sizeof(analysis->frameRecordSize) +
>> sizeof(depthBytes) + sizeof(analysis->poc) + sizeof(analysis->sliceType) +
>>                        sizeof(analysis->numCUsInFrame) +
>> sizeof(analysis->numPartitions) + sizeof(analysis->bScenecut) +
>> sizeof(analysis->satdCost);
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>
>
>
> --
> Deepthi Nandakumar
> Engineering Manager, x265
> Multicoreware, Inc
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160310/1bf5e98b/attachment.html>


More information about the x265-devel mailing list