[x265-commits] [x265] primitive: remove dead ipfilter_ps

Steve Borho steve at borho.org
Fri Jan 24 02:15:37 CET 2014


details:   http://hg.videolan.org/x265/rev/688f3951c90c
branches:  
changeset: 5869:688f3951c90c
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 12:51:58 2014 -0600
description:
primitive: remove dead ipfilter_ps
Subject: [x265] primitive: remove dead ipfilter_sp and ipfilter_ss

details:   http://hg.videolan.org/x265/rev/ee36ffef7648
branches:  
changeset: 5870:ee36ffef7648
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 13:00:43 2014 -0600
description:
primitive: remove dead ipfilter_sp and ipfilter_ss
Subject: [x265] primitive: remove two dead funcdefs

details:   http://hg.videolan.org/x265/rev/a4c0b6e35dd1
branches:  
changeset: 5871:a4c0b6e35dd1
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 13:01:31 2014 -0600
description:
primitive: remove two dead funcdefs
Subject: [x265] primitves: fix a comment

details:   http://hg.videolan.org/x265/rev/5bf76ded5209
branches:  
changeset: 5872:5bf76ded5209
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 13:03:07 2014 -0600
description:
primitves: fix a comment
Subject: [x265] primitives: move luma_addAvg close to other weight/avg functions

details:   http://hg.videolan.org/x265/rev/7aa3ea411568
branches:  
changeset: 5873:7aa3ea411568
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 13:06:21 2014 -0600
description:
primitives: move luma_addAvg close to other weight/avg functions
Subject: [x265] slicetype: issue EMMS before returning a thread to the work pool

details:   http://hg.videolan.org/x265/rev/a42dd0dfe90d
branches:  stable
changeset: 5874:a42dd0dfe90d
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 15:21:35 2014 -0600
description:
slicetype: issue EMMS before returning a thread to the work pool
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/cbd2ea65f87d
branches:  
changeset: 5875:cbd2ea65f87d
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 15:21:51 2014 -0600
description:
Merge with stable
Subject: [x265] reduce CI_NUM

details:   http://hg.videolan.org/x265/rev/6a12fc6e6fdc
branches:  
changeset: 5876:6a12fc6e6fdc
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Mon Jan 20 23:33:06 2014 +0900
description:
reduce CI_NUM
Subject: [x265] cleanup initPattern()

details:   http://hg.videolan.org/x265/rev/8732434ea913
branches:  
changeset: 5877:8732434ea913
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Wed Jan 22 22:45:28 2014 +0900
description:
cleanup initPattern()
Subject: [x265] slicetype: reorg to make frame cost estimates re-entrant (for RC and WP)

details:   http://hg.videolan.org/x265/rev/e9ec7787cf5e
branches:  stable
changeset: 5878:e9ec7787cf5e
user:      Steve Borho <steve at borho.org>
date:      Tue Jan 21 16:43:15 2014 -0600
description:
slicetype: reorg to make frame cost estimates re-entrant (for RC and WP)

* moves frame cost calculations into a separate class deriving from WaveFront
* frames[] array now always declared on stack for better re-entrant behavior
* re-orders functions in slicetype.cpp for clarity
* internal methods were made protected, for documentation purposes only
* fixes a few minor problems discovered during the reorg
* removes deprecated ReferencePlanes.unweightedFPelPlane
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/416713ab5821
branches:  
changeset: 5879:416713ab5821
user:      Steve Borho <steve at borho.org>
date:      Thu Jan 23 18:37:10 2014 -0600
description:
Merge with stable

diffstat:

 source/Lib/TLibCommon/TComPattern.cpp               |    98 -
 source/Lib/TLibCommon/TComPattern.h                 |    52 -
 source/Lib/TLibCommon/TypeDef.h                     |     2 +-
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp |     8 +-
 source/Lib/TLibEncoder/TEncSearch.cpp               |    10 -
 source/common/ipfilter.cpp                          |   164 +-
 source/common/lowres.h                              |     3 +-
 source/common/primitives.h                          |    26 +-
 source/common/x86/asm-primitives.cpp                |     1 -
 source/common/x86/ipfilter8.asm                     |   141 -
 source/common/x86/ipfilter8.h                       |     1 -
 source/encoder/compress.cpp                         |     2 -
 source/encoder/reference.cpp                        |     1 -
 source/encoder/slicetype.cpp                        |  1995 +++++++++---------
 source/encoder/slicetype.h                          |   113 +-
 source/test/ipfilterharness.cpp                     |   190 -
 source/test/ipfilterharness.h                       |     3 -
 17 files changed, 1140 insertions(+), 1670 deletions(-)

diffs (truncated from 3326 to 300 lines):

diff -r 177421068f53 -r 416713ab5821 source/Lib/TLibCommon/TComPattern.cpp
--- a/source/Lib/TLibCommon/TComPattern.cpp	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/Lib/TLibCommon/TComPattern.cpp	Thu Jan 23 18:37:10 2014 -0600
@@ -56,109 +56,11 @@ const UChar TComPattern::m_intraFilter[5
     0, //32x32
     10, //64x64
 };
-// ====================================================================================================================
-// Public member functions (TComPatternParam)
-// ====================================================================================================================
-
-/** \param  piTexture     pixel data
- \param  roiWidth     pattern width
- \param  roiHeight    pattern height
- \param  stride       buffer stride
- \param  offsetLeft   neighbor offset (left)
- \param  offsetAbove  neighbor offset (above)
- */
-void TComPatternParam::setPatternParamPel(Pel* texture, int roiWidth, int roiHeight,
-                                          int stride, int offsetLeft, int offsetAbove)
-{
-    m_patternOrigin  = texture;
-    m_roiWidth       = roiWidth;
-    m_roiHeight      = roiHeight;
-    m_patternStride  = stride;
-    m_offsetLeft     = offsetLeft;
-    m_offsetAbove    = offsetAbove;
-}
-
-/**
- \param  cu           CU data structure
- \param  comp         component index (0=Y, 1=Cb, 2=Cr)
- \param  roiWidth     pattern width
- \param  roiHeight    pattern height
- \param  stride       buffer stride
- \param  offsetLeft   neighbor offset (left)
- \param  offsetAbove  neighbor offset (above)
- \param  absPartIdx   part index
- */
-void TComPatternParam::setPatternParamCU(TComDataCU* cu, UChar comp, UChar roiWidth, UChar roiHeight,
-                                         int offsetLeft, int offsetAbove, uint32_t absPartIdx)
-{
-    m_offsetLeft   = offsetLeft;
-    m_offsetAbove  = offsetAbove;
-    m_roiWidth     = roiWidth;
-    m_roiHeight    = roiHeight;
-
-    uint32_t absZOrderIdx = cu->getZorderIdxInCU() + absPartIdx;
-
-    if (comp == 0)
-    {
-        m_patternStride  = cu->getPic()->getStride();
-        m_patternOrigin = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), absZOrderIdx) - m_offsetAbove * m_patternStride - m_offsetLeft;
-    }
-    else
-    {
-        m_patternStride = cu->getPic()->getCStride();
-        if (comp == 1)
-        {
-            m_patternOrigin = cu->getPic()->getPicYuvRec()->getCbAddr(cu->getAddr(), absZOrderIdx) - m_offsetAbove * m_patternStride - m_offsetLeft;
-        }
-        else
-        {
-            m_patternOrigin = cu->getPic()->getPicYuvRec()->getCrAddr(cu->getAddr(), absZOrderIdx) - m_offsetAbove * m_patternStride - m_offsetLeft;
-        }
-    }
-}
 
 // ====================================================================================================================
 // Public member functions (TComPattern)
 // ====================================================================================================================
 
-void TComPattern::initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, int stride,
-                              int offsetLeft, int offsetAbove)
-{
-    m_patternY.setPatternParamPel(y,  roiWidth,      roiHeight,      stride,      offsetLeft,      offsetAbove);
-    m_patternCb.setPatternParamPel(cb, roiWidth >> 1, roiHeight >> 1, stride >> 1, offsetLeft >> 1, offsetAbove >> 1);
-    m_patternCr.setPatternParamPel(cr, roiWidth >> 1, roiHeight >> 1, stride >> 1, offsetLeft >> 1, offsetAbove >> 1);
-}
-
-void TComPattern::initPattern(TComDataCU* cu, uint32_t partDepth, uint32_t absPartIdx)
-{
-    int offsetLeft  = 0;
-    int offsetAbove = 0;
-
-    UChar width        = cu->getWidth(0) >> partDepth;
-    UChar height       = cu->getHeight(0) >> partDepth;
-
-    int hChromaShift = cu->getHorzChromaShift();
-    int vChromaShift = cu->getVertChromaShift();
-
-    uint32_t absZOrderIdx  = cu->getZorderIdxInCU() + absPartIdx;
-    uint32_t uiCurrPicPelX = cu->getCUPelX() + g_rasterToPelX[g_zscanToRaster[absZOrderIdx]];
-    uint32_t uiCurrPicPelY = cu->getCUPelY() + g_rasterToPelY[g_zscanToRaster[absZOrderIdx]];
-
-    if (uiCurrPicPelX != 0)
-    {
-        offsetLeft = 1;
-    }
-
-    if (uiCurrPicPelY != 0)
-    {
-        offsetAbove = 1;
-    }
-
-    m_patternY.setPatternParamCU(cu, 0, width,      height,      offsetLeft, offsetAbove, absPartIdx);
-    m_patternCb.setPatternParamCU(cu, 1, width >> hChromaShift, height >> vChromaShift, offsetLeft, offsetAbove, absPartIdx);
-    m_patternCr.setPatternParamCU(cu, 2, width >> hChromaShift, height >> vChromaShift, offsetLeft, offsetAbove, absPartIdx);
-}
-
 void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,
                                  int strideOrig, int heightOrig)
 {
diff -r 177421068f53 -r 416713ab5821 source/Lib/TLibCommon/TComPattern.h
--- a/source/Lib/TLibCommon/TComPattern.h	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/Lib/TLibCommon/TComPattern.h	Thu Jan 23 18:37:10 2014 -0600
@@ -53,61 +53,15 @@ namespace x265 {
 
 class TComDataCU;
 
-/// neighboring pixel access class for one component
-class TComPatternParam
-{
-private:
-
-    int  m_offsetLeft;
-    int  m_offsetAbove;
-    Pel* m_patternOrigin;
-
-public:
-
-    int m_roiWidth;
-    int m_roiHeight;
-    int m_patternStride;
-
-    /// return starting position of buffer
-    Pel* getPatternOrigin()        { return m_patternOrigin; }
-
-    /// return starting position of ROI (ROI = &pattern[AboveOffset][LeftOffset])
-    inline Pel* getROIOrigin()
-    {
-        return m_patternOrigin + m_patternStride * m_offsetAbove + m_offsetLeft;
-    }
-
-    /// set parameters from Pel buffer for accessing neighboring pixels
-    void setPatternParamPel(Pel* piTexture, int roiWidth, int roiHeight, int stride,
-                            int offsetLeft, int offsetAbove);
-
-    /// set parameters of one color component from CU data for accessing neighboring pixels
-    void setPatternParamCU(TComDataCU* cu, UChar comp, UChar roiWidth, UChar roiHeight,
-                           int offsetLeft, int offsetAbove, uint32_t absZOrderIdx);
-};
-
 /// neighboring pixel access class for all components
 class TComPattern
 {
 private:
 
-    TComPatternParam  m_patternY;
-    TComPatternParam  m_patternCb;
-    TComPatternParam  m_patternCr;
-
     static const UChar m_intraFilter[5];
 
 public:
 
-    // ROI & pattern information, (ROI = &pattern[AboveOffset][LeftOffset])
-    Pel*  getROIY()                 { return m_patternY.getROIOrigin(); }
-
-    int   getROIYWidth()            { return m_patternY.m_roiWidth; }
-
-    int   getROIYHeight()           { return m_patternY.m_roiHeight; }
-
-    int   getPatternLStride()       { return m_patternY.m_patternStride; }
-
     // access functions of ADI buffers
     Pel*  getAdiOrgBuf(int cuWidth, int cuHeight, Pel* adiBuf);
     Pel*  getAdiCbBuf(int cuWidth, int cuHeight, Pel* adiBuf);
@@ -120,16 +74,10 @@ public:
     // -------------------------------------------------------------------------------------------------------------------
 
     /// set parameters from Pel buffers for accessing neighboring pixels
-    void initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, int stride,
-                     int offsetLeft, int offsetAbove);
-
     void initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,
                         int strideOrig, int heightOrig, Pel* refAbove, Pel* refLeft,
                         Pel* refAboveFlt, Pel* refLeftFlt);
 
-    /// set parameters from CU data for accessing neighboring pixels
-    void  initPattern(TComDataCU* cu, uint32_t partDepth, uint32_t absPartIdx);
-
     /// set luma parameters from CU data for accessing ADI data
     void  initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,
                          int strideOrig, int heightOrig);
diff -r 177421068f53 -r 416713ab5821 source/Lib/TLibCommon/TypeDef.h
--- a/source/Lib/TLibCommon/TypeDef.h	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/Lib/TLibCommon/TypeDef.h	Thu Jan 23 18:37:10 2014 -0600
@@ -120,10 +120,10 @@ enum CI_IDX
     CI_CURR_BEST = 0,   ///< best mode index
     CI_NEXT_BEST,       ///< next best index
     CI_TEMP_BEST,       ///< temporal index
-    CI_CHROMA_INTRA,    ///< chroma intra index
     CI_QT_TRAFO_TEST,
     CI_QT_TRAFO_ROOT,
     CI_NUM,             ///< total number
+    CI_NUM_SAO   = 3,
 };
 
 /// motion vector predictor direction used in AMVP
diff -r 177421068f53 -r 416713ab5821 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp	Thu Jan 23 18:37:10 2014 -0600
@@ -435,7 +435,7 @@ void TEncSampleAdaptiveOffset::destroyEn
     int maxDepth = 4;
     for (int d = 0; d < maxDepth + 1; d++)
     {
-        for (int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx++)
+        for (int iCIIdx = 0; iCIIdx < CI_NUM_SAO; iCIIdx++)
         {
             delete m_rdSbacCoders[d][iCIIdx];
             delete m_binCoderCABAC[d][iCIIdx];
@@ -502,9 +502,9 @@ void TEncSampleAdaptiveOffset::createEnc
 
     for (int d = 0; d < maxDepth + 1; d++)
     {
-        m_rdSbacCoders[d] = new TEncSbac*[CI_NUM];
-        m_binCoderCABAC[d] = new TEncBinCABAC*[CI_NUM];
-        for (int ciIdx = 0; ciIdx < CI_NUM; ciIdx++)
+        m_rdSbacCoders[d] = new TEncSbac*[CI_NUM_SAO];
+        m_binCoderCABAC[d] = new TEncBinCABAC*[CI_NUM_SAO];
+        for (int ciIdx = 0; ciIdx < CI_NUM_SAO; ciIdx++)
         {
             m_rdSbacCoders[d][ciIdx] = new TEncSbac;
             m_binCoderCABAC[d][ciIdx] = new TEncBinCABAC(true);
diff -r 177421068f53 -r 416713ab5821 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Jan 23 18:37:10 2014 -0600
@@ -442,7 +442,6 @@ void TEncSearch::xIntraCodingLumaBlk(TCo
 
     if (default0Save1Load2 != 2)
     {
-        cu->getPattern()->initPattern(cu, trDepth, absPartIdx);
         cu->getPattern()->initAdiPattern(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, refAbove, refLeft, refAboveFlt, refLeftFlt);
         //===== get prediction signal =====
         predIntraLumaAng(lumaPredMode, pred, stride, width);
@@ -563,8 +562,6 @@ void TEncSearch::xIntraCodingChromaBlk(T
     //===== init availability pattern =====
     if (default0Save1Load2 != 2)
     {
-        cu->getPattern()->initPattern(cu, trDepth, absPartIdx);
-
         cu->getPattern()->initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight);
         Pel* chromaPred = (chromaId > 0 ? cu->getPattern()->getAdiCrBuf(width, height, m_predBuf) : cu->getPattern()->getAdiCbBuf(width, height, m_predBuf));
 
@@ -1033,7 +1030,6 @@ void TEncSearch::residualTransformQuantI
 
         //===== init availability pattern =====
 
-        cu->getPattern()->initPattern(cu, trDepth, absPartIdx);
         cu->getPattern()->initAdiPattern(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, refAbove, refLeft, refAboveFlt, refLeftFlt);
         //===== get prediction signal =====
         predIntraLumaAng(lumaPredMode, pred, stride, width);
@@ -1649,7 +1645,6 @@ void TEncSearch::residualQTIntrachroma(T
                 chromaPredMode = cu->getLumaIntraDir(0);
             }
             //===== init availability pattern =====
-            cu->getPattern()->initPattern(cu, trDepth, absPartIdx);
             cu->getPattern()->initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight);
             Pel* chromaPred = (chromaId > 0 ? cu->getPattern()->getAdiCrBuf(width, height, m_predBuf) : cu->getPattern()->getAdiCbBuf(width, height, m_predBuf));
 
@@ -1740,7 +1735,6 @@ void TEncSearch::preestChromaPredMode(TC
 
     //===== init pattern =====
     assert(width == height);
-    cu->getPattern()->initPattern(cu, 0, 0);
     cu->getPattern()->initAdiPatternChroma(cu, 0, 0, m_predBuf, m_predBufStride, m_predBufHeight);
     Pel* patChromaU = cu->getPattern()->getAdiCbBuf(width, height, m_predBuf);
     Pel* patChromaV = cu->getPattern()->getAdiCrBuf(width, height, m_predBuf);
@@ -1801,9 +1795,6 @@ void TEncSearch::estIntraPredQT(TComData
     uint32_t partOffset = 0;
     for (uint32_t pu = 0; pu < numPU; pu++, partOffset += qNumParts)
     {
-        //===== init pattern for luma prediction =====
-        cu->getPattern()->initPattern(cu, initTrDepth, partOffset);
-
         // Reference sample smoothing
         cu->getPattern()->initAdiPattern(cu, partOffset, initTrDepth, m_predBuf, m_predBufStride, m_predBufHeight, refAbove, refLeft, refAboveFlt, refLeftFlt);
 
@@ -2136,7 +2127,6 @@ void TEncSearch::getBestIntraModeChroma(
         costMultiplier = 4;
     }
 
-    cu->getPattern()->initPattern(cu, trDepth, absPartIdx);
     cu->getPattern()->initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight);
 
     cu->getAllowedChromaDir(0, modeList);
diff -r 177421068f53 -r 416713ab5821 source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp	Thu Jan 23 12:45:30 2014 -0600
+++ b/source/common/ipfilter.cpp	Thu Jan 23 18:37:10 2014 -0600


More information about the x265-commits mailing list