[x265-commits] [x265] Added tag 0.8 for changeset 527d03c56d68

Steve Borho steve at borho.org
Wed Mar 5 00:54:12 CET 2014


details:   http://hg.videolan.org/x265/rev/91ada5e78ee1
branches:  stable
changeset: 6370:91ada5e78ee1
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 08:20:34 2014 -0600
description:
Added tag 0.8 for changeset 527d03c56d68
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/31731a78d994
branches:  
changeset: 6371:31731a78d994
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 08:20:57 2014 -0600
description:
Merge with stable
Subject: [x265] Merged TEncCfg into Encoder.  A few VUI tweaks and fixes.

details:   http://hg.videolan.org/x265/rev/1020e2ac9890
branches:  
changeset: 6372:1020e2ac9890
user:      David T Yuen <dtyx265 at gmail.com>
date:      Mon Mar 03 14:24:34 2014 -0800
description:
Merged TEncCfg into Encoder.  A few VUI tweaks and fixes.
Subject: [x265] cmake: TEncCfg.h is caput

details:   http://hg.videolan.org/x265/rev/58bbbdd0a699
branches:  
changeset: 6373:58bbbdd0a699
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:41:47 2014 -0600
description:
cmake: TEncCfg.h is caput
Subject: [x265] api: move VUI settings into vui sub-struct of x265_param

details:   http://hg.videolan.org/x265/rev/3825b0059d6c
branches:  
changeset: 6374:3825b0059d6c
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:16:27 2014 -0600
description:
api: move VUI settings into vui sub-struct of x265_param
Subject: [x265] api: move x265_ssim() to be an internal function, give a more descriptive name

details:   http://hg.videolan.org/x265/rev/8e1c69c0d4f1
branches:  
changeset: 6375:8e1c69c0d4f1
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:21:03 2014 -0600
description:
api: move x265_ssim() to be an internal function, give a more descriptive name

This function really shouldn't have been a public function, and it was never
added to the exports list.
Subject: [x265] api: move cpuid to x265_param, same as x264

details:   http://hg.videolan.org/x265/rev/e0bdcfc9e20b
branches:  
changeset: 6376:e0bdcfc9e20b
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:38:46 2014 -0600
description:
api: move cpuid to x265_param, same as x264
Subject: [x265] cli: do not call x265_setup_primitives() from printVersion()

details:   http://hg.videolan.org/x265/rev/5fd56621f2fe
branches:  
changeset: 6377:5fd56621f2fe
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 13:50:40 2014 -0600
description:
cli: do not call x265_setup_primitives() from printVersion()

It now leads to redundant console output and it was interfering with --asm
command line arguent functionality
Subject: [x265] cmake: dllmain is no longer necessary since use of object libraries

details:   http://hg.videolan.org/x265/rev/6a6bf84ad146
branches:  
changeset: 6378:6a6bf84ad146
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:42:49 2014 -0600
description:
cmake: dllmain is no longer necessary since use of object libraries
Subject: [x265] cmake: bump X265_BUILD to 8, many API changes

details:   http://hg.videolan.org/x265/rev/1bd1e6dbce28
branches:  
changeset: 6379:1bd1e6dbce28
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 12:50:21 2014 -0600
description:
cmake: bump X265_BUILD to 8, many API changes

These changes should be mostly harmless, I don't expect many API users have used
the VUI fields yet, so a recompile against the new x265.h should be sufficient.
Subject: [x265] weight: use correct round value for denom 0 [CHANGES OUTPUT]

details:   http://hg.videolan.org/x265/rev/cc64612d8e5e
branches:  
changeset: 6380:cc64612d8e5e
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 15:12:44 2014 -0600
description:
weight: use correct round value for denom 0 [CHANGES OUTPUT]

The denom -without the intermediate bit-depth factor applied- must be compared
with zero, else the output of weight_pp will not match the real output of pixel
weighting. This was done wrong in two different ways in three different places
Subject: [x265] weight: do not attempt chroma weights if luma was not weighted [CHANGES OUTPUT]

details:   http://hg.videolan.org/x265/rev/864ed3e0d82e
branches:  
changeset: 6381:864ed3e0d82e
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 17:11:02 2014 -0600
description:
weight: do not attempt chroma weights if luma was not weighted [CHANGES OUTPUT]

This heuristic seems to improve a number of clips, particularly when chroma
distortion is not considered in mode decision.  This could cause some odd colors
to be encoded, particularly noticable with large blocks.
Subject: [x265] weight: simplify and remove redundant logic

details:   http://hg.videolan.org/x265/rev/92c2f95b230b
branches:  
changeset: 6382:92c2f95b230b
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 17:11:19 2014 -0600
description:
weight: simplify and remove redundant logic
Subject: [x265] primitives: prevent multiple setup calls from reiniting primitive table

details:   http://hg.videolan.org/x265/rev/1a3d37f0a072
branches:  
changeset: 6383:1a3d37f0a072
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 04 17:45:31 2014 -0600
description:
primitives: prevent multiple setup calls from reiniting primitive table

We don't want the function table to change in the middle of an encode. Improve
logging so that --asm <SMALLINT> which does not result in any bitmap matches
still reports "none!"

diffstat:

 .hgtags                                             |    1 +
 source/CMakeLists.txt                               |    5 +-
 source/Lib/TLibCommon/CommonDef.h                   |    3 +-
 source/Lib/TLibCommon/TComDataCU.cpp                |   49 +-
 source/Lib/TLibCommon/TComDataCU.h                  |    2 +-
 source/Lib/TLibCommon/TComPattern.cpp               |  276 +++---
 source/Lib/TLibCommon/TComPattern.h                 |   19 +-
 source/Lib/TLibCommon/TComPic.cpp                   |   26 +-
 source/Lib/TLibCommon/TComPic.h                     |    6 +-
 source/Lib/TLibCommon/TComPicYuv.h                  |    2 +-
 source/Lib/TLibCommon/TComPrediction.cpp            |    8 +-
 source/Lib/TLibCommon/TComPrediction.h              |   10 +-
 source/Lib/TLibCommon/TComRom.cpp                   |  106 +-
 source/Lib/TLibCommon/TComRom.h                     |    2 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp  |  204 ++--
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.h    |   32 +-
 source/Lib/TLibCommon/TComSlice.cpp                 |    5 +-
 source/Lib/TLibCommon/TComSlice.h                   |    8 +-
 source/Lib/TLibCommon/TComTrQuant.cpp               |  206 ++--
 source/Lib/TLibCommon/TComTrQuant.h                 |   20 +-
 source/Lib/TLibCommon/TComWeightPrediction.cpp      |    8 +-
 source/Lib/TLibCommon/TComWeightPrediction.h        |    8 +-
 source/Lib/TLibCommon/TComYuv.cpp                   |  151 +-
 source/Lib/TLibCommon/TComYuv.h                     |   47 +-
 source/Lib/TLibCommon/TypeDef.h                     |   18 +-
 source/Lib/TLibEncoder/SEIwrite.cpp                 |    8 +-
 source/Lib/TLibEncoder/TEncCfg.h                    |  336 -------
 source/Lib/TLibEncoder/TEncCu.cpp                   |  113 +-
 source/Lib/TLibEncoder/TEncCu.h                     |   12 +-
 source/Lib/TLibEncoder/TEncEntropy.cpp              |   26 +-
 source/Lib/TLibEncoder/TEncEntropy.h                |    6 +-
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp |  366 +-------
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h   |    1 -
 source/Lib/TLibEncoder/TEncSbac.cpp                 |  127 +-
 source/Lib/TLibEncoder/TEncSbac.h                   |   10 +-
 source/Lib/TLibEncoder/TEncSearch.cpp               |  173 ++-
 source/Lib/TLibEncoder/TEncSearch.h                 |   37 +-
 source/common/CMakeLists.txt                        |   14 +-
 source/common/TShortYUV.cpp                         |  320 -------
 source/common/TShortYUV.h                           |  120 --
 source/common/bitstream.h                           |   70 +
 source/common/common.cpp                            |    3 +-
 source/common/common.h                              |    5 +-
 source/common/loopfilter.cpp                        |   52 +
 source/common/param.cpp                             |  417 ++++++---
 source/common/param.h                               |    2 +
 source/common/primitives.cpp                        |   69 +-
 source/common/primitives.h                          |    5 +-
 source/common/shortyuv.cpp                          |  282 ++++++
 source/common/shortyuv.h                            |  112 ++
 source/common/x86/asm-primitives.cpp                |   73 +-
 source/common/x86/intrapred8.asm                    |  862 ++++++++-----------
 source/common/x86/ipfilter16.asm                    |  513 +++++++++++
 source/common/x86/ipfilter8.asm                     |   58 -
 source/common/x86/ipfilter8.h                       |    2 +-
 source/common/x86/loopfilter.asm                    |   85 +
 source/common/x86/loopfilter.h                      |   29 +
 source/dllmain.cpp                                  |   35 -
 source/encoder/CMakeLists.txt                       |    1 -
 source/encoder/api.cpp                              |    5 +-
 source/encoder/compress.cpp                         |   81 +-
 source/encoder/cturow.cpp                           |   17 +-
 source/encoder/cturow.h                             |    2 +-
 source/encoder/dpb.cpp                              |    6 +-
 source/encoder/dpb.h                                |    8 +-
 source/encoder/encoder.cpp                          |  326 +++---
 source/encoder/encoder.h                            |   90 ++-
 source/encoder/frameencoder.cpp                     |  103 +-
 source/encoder/frameencoder.h                       |    4 +-
 source/encoder/framefilter.cpp                      |   60 +-
 source/encoder/framefilter.h                        |    2 +-
 source/encoder/ratecontrol.cpp                      |  208 ++--
 source/encoder/ratecontrol.h                        |    5 +-
 source/encoder/reference.cpp                        |    9 +-
 source/encoder/slicetype.cpp                        |  188 ++--
 source/encoder/slicetype.h                          |   11 +-
 source/encoder/weightPrediction.cpp                 |  569 +++++++-----
 source/test/intrapredharness.cpp                    |   36 +-
 source/test/ipfilterharness.cpp                     |   53 +-
 source/test/ipfilterharness.h                       |    2 +-
 source/test/mbdstharness.cpp                        |   57 +-
 source/test/pixelharness.cpp                        |  102 +-
 source/test/pixelharness.h                          |    3 +-
 source/test/testbench.cpp                           |   47 +-
 source/x265.cpp                                     |   56 +-
 source/x265.h                                       |  309 +++---
 86 files changed, 4048 insertions(+), 3877 deletions(-)

diffs (truncated from 14266 to 300 lines):

diff -r 527d03c56d68 -r 1a3d37f0a072 .hgtags
--- a/.hgtags	Tue Mar 04 03:13:00 2014 +0530
+++ b/.hgtags	Tue Mar 04 17:45:31 2014 -0600
@@ -9,3 +9,4 @@ 93707bc4fccdaa89a1f2da11db8808ca912a691c
 69acb3cb777f977f5edde908069ac565915dd366 0.5
 b970ffbdd696e3ce45c93b315902eb6366ff085e 0.6
 d24e2a8c4326b0cd01bfa6c414c5378481af9018 0.7
+527d03c56d6860dc979ddea1196f7e94d13d3e82 0.8
diff -r 527d03c56d68 -r 1a3d37f0a072 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Mar 04 03:13:00 2014 +0530
+++ b/source/CMakeLists.txt	Tue Mar 04 17:45:31 2014 -0600
@@ -14,10 +14,11 @@ project (x265)
 cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
+include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 7)
+set(X265_BUILD 8)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
@@ -267,7 +268,7 @@ endif()
 
 option(ENABLE_SHARED "Build shared library" ON)
 if(ENABLE_SHARED)
-    add_library(x265-shared SHARED dllmain.cpp "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
+    add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
                 ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
     target_link_libraries(x265-shared ${PLATFORM_LIBS})
     if(MSVC)
diff -r 527d03c56d68 -r 1a3d37f0a072 source/Lib/TLibCommon/CommonDef.h
--- a/source/Lib/TLibCommon/CommonDef.h	Tue Mar 04 03:13:00 2014 +0530
+++ b/source/Lib/TLibCommon/CommonDef.h	Tue Mar 04 17:45:31 2014 -0600
@@ -88,8 +88,7 @@
 
 #define MLS_GRP_NUM                 64 ///< G644 : Max number of coefficient groups, max(16, 64)
 #define MLS_CG_SIZE                 4 ///< G644 : Coefficient group size of 4x4
-#define MLS_CG_LOG2_WIDTH           2
-#define MLS_CG_LOG2_HEIGHT          2
+#define MLS_CG_LOG2_SIZE            2
 
 #define ARL_C_PRECISION             7 ///< G382: 7-bit arithmetic precision
 #define LEVEL_RANGE                 30 ///< G382: max coefficient level in statistics collection
diff -r 527d03c56d68 -r 1a3d37f0a072 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Tue Mar 04 03:13:00 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Tue Mar 04 17:45:31 2014 -0600
@@ -2833,7 +2833,7 @@ void TComDataCU::xDeriveCenterIdx(uint32
                                        + (partWidth / m_pic->getMinCUWidth()) / 2];
 }
 
-uint32_t TComDataCU::getCoefScanIdx(uint32_t absPartIdx, uint32_t width, uint32_t height, bool bIsLuma, bool bIsIntra)
+uint32_t TComDataCU::getCoefScanIdx(uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma, bool bIsIntra)
 {
     uint32_t scanIdx;
     uint32_t dirMode;
@@ -2846,57 +2846,28 @@ uint32_t TComDataCU::getCoefScanIdx(uint
 
     if (bIsLuma)
     {
-        const uint32_t maximumWidth  = MDCS_MAXIMUM_WIDTH;
-        const uint32_t maximumHeight = MDCS_MAXIMUM_HEIGHT;
-
-        if ((width > maximumWidth) || (height > maximumHeight)) return SCAN_DIAG;
+        if (log2TrSize > MDCS_LOG2_MAX_SIZE) return SCAN_DIAG;
 
         dirMode = getLumaIntraDir(absPartIdx);
     }
     else
     {
-        const uint32_t maximumWidth  = MDCS_MAXIMUM_WIDTH  >> m_hChromaShift;
-        const uint32_t maximumHeight = MDCS_MAXIMUM_HEIGHT >> m_vChromaShift;
-
-        if ((width > maximumWidth) || (height > maximumHeight)) return SCAN_DIAG;
+        if (log2TrSize > (MDCS_LOG2_MAX_SIZE - m_hChromaShift)) return SCAN_DIAG;
 
         dirMode  = getChromaIntraDir(absPartIdx);
         if (dirMode == DM_CHROMA_IDX)
         {
             dirMode = getLumaIntraDir(absPartIdx);
         }
+        // TODO: 4:2:2
     }
 
-    switch (MDCS_MODE)
-    {
-    case MDCS_BOTH_DIRECTIONS:
-        if (abs((int)dirMode - VER_IDX) <= MDCS_ANGLE_LIMIT)
-            scanIdx = SCAN_HOR;
-        else if (abs((int)dirMode - HOR_IDX) <= MDCS_ANGLE_LIMIT)
-            scanIdx = SCAN_VER;
-        else
-            scanIdx = SCAN_DIAG;
-        break;
-
-    case MDCS_VERTICAL_ONLY:
-        if (abs((int)dirMode - HOR_IDX) <= MDCS_ANGLE_LIMIT)
-            scanIdx = SCAN_VER;
-        break;
-
-    case MDCS_HORIZONTAL_ONLY:
-        if (abs((int)dirMode - VER_IDX) <= MDCS_ANGLE_LIMIT)
-            scanIdx = SCAN_HOR;
-        break;
-
-    case MDCS_DISABLED:
-        scanIdx = 0;
-        break;
-
-    default:
-        assert(false);
-        x265_log(NULL, X265_LOG_ERROR, "Unrecognised MDCS mode\n");
-        break;
-    }
+    if (abs((int)dirMode - VER_IDX) <= MDCS_ANGLE_LIMIT)
+        scanIdx = SCAN_HOR;
+    else if (abs((int)dirMode - HOR_IDX) <= MDCS_ANGLE_LIMIT)
+        scanIdx = SCAN_VER;
+    else
+        scanIdx = SCAN_DIAG;
 
     return scanIdx;
 }
diff -r 527d03c56d68 -r 1a3d37f0a072 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Tue Mar 04 03:13:00 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.h	Tue Mar 04 17:45:31 2014 -0600
@@ -472,7 +472,7 @@ public:
 
     uint32_t&     getTotalNumPart()               { return m_numPartitions; }
 
-    uint32_t      getCoefScanIdx(uint32_t absPartIdx, uint32_t width, uint32_t height, bool bIsLuma, bool bIsIntra);
+    uint32_t      getCoefScanIdx(uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma, bool bIsIntra);
 
     // -------------------------------------------------------------------------------------------------------------------
     // member functions to support multiple color space formats
diff -r 527d03c56d68 -r 1a3d37f0a072 source/Lib/TLibCommon/TComPattern.cpp
--- a/source/Lib/TLibCommon/TComPattern.cpp	Tue Mar 04 03:13:00 2014 +0530
+++ b/source/Lib/TLibCommon/TComPattern.cpp	Tue Mar 04 17:45:31 2014 -0600
@@ -48,11 +48,11 @@ using namespace x265;
 // Public member functions (TComPattern)
 // ====================================================================================================================
 
-void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,
+void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, pixel* adiBuf,
                                  int strideOrig, int heightOrig)
 {
-    Pel* roiOrigin;
-    Pel* adiTemp;
+    pixel* roiOrigin;
+    pixel* adiTemp;
     uint32_t cuWidth = cu->getWidth(0) >> partDepth;
     uint32_t cuHeight = cu->getHeight(0) >> partDepth;
     uint32_t cuWidth2  = cuWidth << 1;
@@ -100,10 +100,10 @@ void TComPattern::initAdiPattern(TComDat
     int bufSize = cuHeight2 + cuWidth2 + 1;
     uint32_t wh = ADI_BUF_STRIDE * height;         // number of elements in one buffer
 
-    Pel* filteredBuf1 = adiBuf + wh;         // 1. filter buffer
-    Pel* filteredBuf2 = filteredBuf1 + wh; // 2. filter buffer
-    Pel* filterBuf = filteredBuf2 + wh;    // buffer for 2. filtering (sequential)
-    Pel* filterBufN = filterBuf + bufSize; // buffer for 1. filtering (sequential)
+    pixel* filteredBuf1 = adiBuf + wh;         // 1. filter buffer
+    pixel* filteredBuf2 = filteredBuf1 + wh; // 2. filter buffer
+    pixel* filterBuf = filteredBuf2 + wh;    // buffer for 2. filtering (sequential)
+    pixel* filterBufN = filterBuf + bufSize; // buffer for 1. filtering (sequential)
 
     int l = 0;
     // left border from bottom to top
@@ -179,8 +179,8 @@ void TComPattern::initAdiPattern(TComDat
 }
 
 // Overloaded initialization of ADI buffers to support buffered references for xpredIntraAngBufRef
-void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, int strideOrig, int heightOrig,
-                                 Pel* refAbove, Pel* refLeft, Pel* refAboveFlt, Pel* refLeftFlt)
+void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, pixel* adiBuf, int strideOrig, int heightOrig,
+                                 pixel* refAbove, pixel* refLeft, pixel* refAboveFlt, pixel* refLeftFlt)
 {
     initAdiPattern(cu, zOrderIdxInPart, partDepth, adiBuf, strideOrig, heightOrig);
     uint32_t cuWidth   = cu->getWidth(0) >> partDepth;
@@ -194,8 +194,8 @@ void TComPattern::initAdiPattern(TComDat
     refLeftFlt += cuWidth - 1;
 
     //  ADI_BUF_STRIDE * (2 * height + 1);
-    memcpy(refAbove, adiBuf, (cuWidth2 + 1) * sizeof(Pel));
-    memcpy(refAboveFlt, adiBuf + ADI_BUF_STRIDE * (2 * cuHeight + 1), (cuWidth2 + 1) * sizeof(Pel));
+    memcpy(refAbove, adiBuf, (cuWidth2 + 1) * sizeof(pixel));
+    memcpy(refAboveFlt, adiBuf + ADI_BUF_STRIDE * (2 * cuHeight + 1), (cuWidth2 + 1) * sizeof(pixel));
 
     for (int k = 0; k < cuHeight2 + 1; k++)
     {
@@ -204,10 +204,10 @@ void TComPattern::initAdiPattern(TComDat
     }
 }
 
-void TComPattern::initAdiPatternChroma(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, int strideOrig, int heightOrig, int chromaId)
+void TComPattern::initAdiPatternChroma(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, pixel* adiBuf, int strideOrig, int heightOrig, int chromaId)
 {
-    Pel*  roiOrigin;
-    Pel*  adiTemp;
+    pixel*  roiOrigin;
+    pixel*  adiTemp;
     uint32_t  cuWidth  = cu->getWidth(0) >> partDepth;
     uint32_t  cuHeight = cu->getHeight(0) >> partDepth;
     uint32_t  width;
@@ -252,163 +252,163 @@ void TComPattern::initAdiPatternChroma(T
                          cuWidth, cuHeight, width, height, picStride);
 }
 
-void TComPattern::fillReferenceSamples(Pel* roiOrigin, Pel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, int picStride)
+void TComPattern::fillReferenceSamples(pixel* roiOrigin, pixel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, int picStride)
 {
-    Pel* piRoiTemp;
-    int  i, j;
-    int  iDCValue = 1 << (X265_DEPTH - 1);
+    pixel* roiTemp;
+    int i, j;
+    int dcValue = 1 << (X265_DEPTH - 1);
 
     if (numIntraNeighbor == 0)
     {
         // Fill border with DC value
         for (i = 0; i < width; i++)
         {
-            adiTemp[i] = iDCValue;
+            adiTemp[i] = dcValue;
         }
 
         for (i = 1; i < height; i++)
         {
-            adiTemp[i * ADI_BUF_STRIDE] = iDCValue;
+            adiTemp[i * ADI_BUF_STRIDE] = dcValue;
         }
     }
     else if (numIntraNeighbor == totalUnits)
     {
         // Fill top-left border with rec. samples
-        piRoiTemp = roiOrigin - picStride - 1;
-        adiTemp[0] = piRoiTemp[0];
+        roiTemp = roiOrigin - picStride - 1;
+        adiTemp[0] = roiTemp[0];
 
         // Fill left border with rec. samples
         // Fill below left border with rec. samples
-        piRoiTemp = roiOrigin - 1;
+        roiTemp = roiOrigin - 1;
 
         for (i = 0; i < 2 * cuHeight; i++)
         {
-            adiTemp[(1 + i) * ADI_BUF_STRIDE] = piRoiTemp[0];
-            piRoiTemp += picStride;
+            adiTemp[(1 + i) * ADI_BUF_STRIDE] = roiTemp[0];
+            roiTemp += picStride;
         }
 
         // Fill top border with rec. samples
         // Fill top right border with rec. samples
-        piRoiTemp = roiOrigin - picStride;
-        memcpy(&adiTemp[1], piRoiTemp, 2 * cuWidth * sizeof(*adiTemp));
+        roiTemp = roiOrigin - picStride;
+        memcpy(&adiTemp[1], roiTemp, 2 * cuWidth * sizeof(*adiTemp));
     }
     else // reference samples are partially available
     {
-        int  iNumUnits2 = numUnitsInCU << 1;
-        int  iTotalSamples = totalUnits * unitSize;
-        Pel  piAdiLine[5 * MAX_CU_SIZE];
-        Pel  *piAdiLineTemp;
-        bool *pbNeighborFlags;
-        int  iNext, iCurr;
-        Pel  piRef = 0;
+        int    numUnits2 = numUnitsInCU << 1;
+        int    totalSamples = totalUnits * unitSize;
+        pixel  adiLine[5 * MAX_CU_SIZE];
+        pixel* adiLineTemp;
+        bool*  neighborFlagPtr;
+        int    next, curr;
+        pixel  iRef = 0;
 
         // Initialize
-        for (i = 0; i < iTotalSamples; i++)
+        for (i = 0; i < totalSamples; i++)
         {
-            piAdiLine[i] = iDCValue;
+            adiLine[i] = dcValue;
         }
 
         // Fill top-left sample
-        piRoiTemp = roiOrigin - picStride - 1;
-        piAdiLineTemp = piAdiLine + (iNumUnits2 * unitSize);
-        pbNeighborFlags = bNeighborFlags + iNumUnits2;
-        if (*pbNeighborFlags)
+        roiTemp = roiOrigin - picStride - 1;
+        adiLineTemp = adiLine + (numUnits2 * unitSize);
+        neighborFlagPtr = bNeighborFlags + numUnits2;
+        if (*neighborFlagPtr)
         {
-            piAdiLineTemp[0] = piRoiTemp[0];
+            adiLineTemp[0] = roiTemp[0];


More information about the x265-commits mailing list