[x265-commits] [x265] asm-16bpp: code for addAvg luma and chroma all sizes

Dnyaneshwar G dnyaneshwar at multicorewareinc.com
Fri Feb 21 04:46:23 CET 2014


details:   http://hg.videolan.org/x265/rev/4670fed41ec7
branches:  
changeset: 6197:4670fed41ec7
user:      Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
date:      Wed Feb 19 16:21:32 2014 +0530
description:
asm-16bpp: code for addAvg luma and chroma all sizes
Subject: [x265] Added command line options to generate a VUI and add it to the coded bitstream

details:   http://hg.videolan.org/x265/rev/04a72988d48f
branches:  
changeset: 6198:04a72988d48f
user:      David T Yuen <dtyx265 at gmail.com>
date:      Wed Feb 19 10:00:22 2014 -0800
description:
Added command line options to generate a VUI and add it to the coded bitstream
Subject: [x265] api: bump up X265_BUILD to 7 (refer previous commit)

details:   http://hg.videolan.org/x265/rev/6cb88b30deef
branches:  
changeset: 6199:6cb88b30deef
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Feb 20 16:10:10 2014 +0530
description:
api: bump up X265_BUILD to 7 (refer previous commit)
Subject: [x265] reduce addClip

details:   http://hg.videolan.org/x265/rev/fe90b71dc775
branches:  
changeset: 6200:fe90b71dc775
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Thu Feb 20 13:59:41 2014 +0900
description:
reduce addClip
Subject: [x265] asm: modified the range of scale value in dequant

details:   http://hg.videolan.org/x265/rev/613fbb0687c9
branches:  
changeset: 6201:613fbb0687c9
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Thu Feb 20 11:42:31 2014 +0530
description:
asm: modified the range of scale value in dequant
Subject: [x265] remove unused code

details:   http://hg.videolan.org/x265/rev/2cede5a7c1bf
branches:  
changeset: 6202:2cede5a7c1bf
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Thu Feb 20 16:46:43 2014 +0900
description:
remove unused code
Subject: [x265] asm: correct improper macro

details:   http://hg.videolan.org/x265/rev/ce20bff2027e
branches:  
changeset: 6203:ce20bff2027e
user:      Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
date:      Thu Feb 20 14:05:26 2014 +0530
description:
asm: correct improper macro
Subject: [x265] cleanup useless getMvPred*(): always zero mv

details:   http://hg.videolan.org/x265/rev/cb3a2795a60e
branches:  
changeset: 6204:cb3a2795a60e
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Thu Feb 20 18:48:19 2014 +0900
description:
cleanup useless getMvPred*(): always zero mv
Subject: [x265] tcomrom: scaning order table g_sigLastScan replaced with g_scanOrder

details:   http://hg.videolan.org/x265/rev/d4669065e692
branches:  
changeset: 6205:d4669065e692
user:      Gopu Govindaswamy
date:      Thu Feb 20 10:35:39 2014 -0800
description:
tcomrom: scaning order table g_sigLastScan replaced with g_scanOrder

Scaning order table initialization moved into initRom() and same scaning order table
can be used for both 444 and 420
Subject: [x265] ratecontrol: fix bug in acEnergyVar with multiple color spaces

details:   http://hg.videolan.org/x265/rev/fec3cab87043
branches:  
changeset: 6206:fec3cab87043
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Feb 20 15:54:52 2014 +0530
description:
ratecontrol: fix bug in acEnergyVar with multiple color spaces
Subject: [x265] tcomrom: move ADI intraModeNumFast table to estIntraPredQT(), no need for global variable

details:   http://hg.videolan.org/x265/rev/3993d404361b
branches:  
changeset: 6207:3993d404361b
user:      Gopu Govindaswamy
date:      Thu Feb 20 15:53:12 2014 -0800
description:
tcomrom: move ADI intraModeNumFast table to estIntraPredQT(), no need for global variable
Subject: [x265] TComYuv: fix size of chroma partition copy (resolves placebo heap corruption)

details:   http://hg.videolan.org/x265/rev/a6eee111fd6f
branches:  
changeset: 6208:a6eee111fd6f
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 14:31:48 2014 -0600
description:
TComYuv: fix size of chroma partition copy (resolves placebo heap corruption)
Subject: [x265] TComYuv: remove unused copyPartToPartChroma() method

details:   http://hg.videolan.org/x265/rev/549f5bf10211
branches:  
changeset: 6209:549f5bf10211
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 14:47:41 2014 -0600
description:
TComYuv: remove unused copyPartToPartChroma() method
Subject: [x265] TComYuv: remove hungarian prefixes

details:   http://hg.videolan.org/x265/rev/3d89b437f7f7
branches:  
changeset: 6210:3d89b437f7f7
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 15:31:19 2014 -0600
description:
TComYuv: remove hungarian prefixes
Subject: [x265] TComYuv: make some methods private, for future optimizations

details:   http://hg.videolan.org/x265/rev/7afb7b6815c0
branches:  
changeset: 6211:7afb7b6815c0
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 15:52:13 2014 -0600
description:
TComYuv: make some methods private, for future optimizations
Subject: [x265] TComYuv: remove default argument values

details:   http://hg.videolan.org/x265/rev/9c79a713e9af
branches:  
changeset: 6212:9c79a713e9af
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 15:59:37 2014 -0600
description:
TComYuv: remove default argument values
Subject: [x265] TComYuv: merge methods together for clarity

details:   http://hg.videolan.org/x265/rev/873a5a72d85e
branches:  
changeset: 6213:873a5a72d85e
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 16:19:21 2014 -0600
description:
TComYuv: merge methods together for clarity
Subject: [x265] TComYuv: remove more default argument values

details:   http://hg.videolan.org/x265/rev/01dfbf18f791
branches:  
changeset: 6214:01dfbf18f791
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 16:20:44 2014 -0600
description:
TComYuv: remove more default argument values
Subject: [x265] TComYuv: remove unnecessary dup pointer checks

details:   http://hg.videolan.org/x265/rev/034b21f14834
branches:  
changeset: 6215:034b21f14834
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 16:34:34 2014 -0600
description:
TComYuv: remove unnecessary dup pointer checks
Subject: [x265] TComPrediction: add missing m_ prefixes to member variables

details:   http://hg.videolan.org/x265/rev/8a79a2a0433c
branches:  
changeset: 6216:8a79a2a0433c
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 16:58:47 2014 -0600
description:
TComPrediction: add missing m_ prefixes to member variables
Subject: [x265] TComPrediction: do not pass output pointer as deference

details:   http://hg.videolan.org/x265/rev/a090acec64cd
branches:  
changeset: 6217:a090acec64cd
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:00:18 2014 -0600
description:
TComPrediction: do not pass output pointer as deference

The function cannot change the pointer
Subject: [x265] TComPrediction: remove default argument values for internal functions

details:   http://hg.videolan.org/x265/rev/744553cfdaca
branches:  
changeset: 6218:744553cfdaca
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:02:23 2014 -0600
description:
TComPrediction: remove default argument values for internal functions
Subject: [x265] TComPrediction: remove trivial access methods, use pixel types

details:   http://hg.videolan.org/x265/rev/3bb5337cc665
branches:  
changeset: 6219:3bb5337cc665
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:08:56 2014 -0600
description:
TComPrediction: remove trivial access methods, use pixel types
Subject: [x265] TComPrediction: remove unused m_predAllAngsBuf, properly init pointers

details:   http://hg.videolan.org/x265/rev/125459e883c3
branches:  
changeset: 6220:125459e883c3
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:12:51 2014 -0600
description:
TComPrediction: remove unused m_predAllAngsBuf, properly init pointers
Subject: [x265] TComYuv: merge copyPartToPartChroma() with copyPartToPartYuv

details:   http://hg.videolan.org/x265/rev/1ed4cd65af19
branches:  
changeset: 6221:1ed4cd65af19
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:24:31 2014 -0600
description:
TComYuv: merge copyPartToPartChroma() with copyPartToPartYuv
Subject: [x265] TComYuv: merge copyPartToPartLuma

details:   http://hg.videolan.org/x265/rev/5b08cf274fd7
branches:  
changeset: 6222:5b08cf274fd7
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:32:21 2014 -0600
description:
TComYuv: merge copyPartToPartLuma
Subject: [x265] TEncSearch: rename m_qtTempTComYuv to m_qtTempShortYuv

details:   http://hg.videolan.org/x265/rev/6107faa8f8a6
branches:  
changeset: 6223:6107faa8f8a6
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 16:40:21 2014 -0600
description:
TEncSearch: rename m_qtTempTComYuv to m_qtTempShortYuv

It was always stupid to have the member variable include the full type name,
and it has been the wrong type name for more than 10 months.
Subject: [x265] TEncSearch: nits

details:   http://hg.videolan.org/x265/rev/f32bbe3ab4f8
branches:  
changeset: 6224:f32bbe3ab4f8
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:32:32 2014 -0600
description:
TEncSearch: nits
Subject: [x265] TEncSearch: rename m_qtTempTransformSkipTComYuv to m_qtTempTransformSkipYuv

details:   http://hg.videolan.org/x265/rev/894bde574bc1
branches:  
changeset: 6225:894bde574bc1
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 20 17:18:42 2014 -0600
description:
TEncSearch: rename m_qtTempTransformSkipTComYuv to m_qtTempTransformSkipYuv
Subject: [x265] temp fix for out-of-range tmvp (prevents hash mismatch with slower presets)

details:   http://hg.videolan.org/x265/rev/a78935e92bf9
branches:  
changeset: 6226:a78935e92bf9
user:      Min Chen <chenm003 at 163.com>
date:      Thu Feb 20 20:19:12 2014 -0600
description:
temp fix for out-of-range tmvp (prevents hash mismatch with slower presets)

we're not sure why this is necessary, so it must be investigated further.
Subject: [x265] Added vui parameter checking

details:   http://hg.videolan.org/x265/rev/6ade3939ef2d
branches:  
changeset: 6227:6ade3939ef2d
user:      David T Yuen <dtyx265 at gmail.com>
date:      Thu Feb 20 14:11:08 2014 -0800
description:
Added vui parameter checking
Subject: [x265] asm: update count_nonzero, add testbench

details:   http://hg.videolan.org/x265/rev/0c19c44af2d3
branches:  
changeset: 6228:0c19c44af2d3
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Fri Feb 21 12:23:22 2014 +0900
description:
asm: update count_nonzero, add testbench

diffstat:

 source/CMakeLists.txt                    |    2 +-
 source/Lib/TLibCommon/CommonDef.h        |    2 +-
 source/Lib/TLibCommon/TComDataCU.h       |   11 +-
 source/Lib/TLibCommon/TComPrediction.cpp |   92 +-
 source/Lib/TLibCommon/TComPrediction.h   |   32 +-
 source/Lib/TLibCommon/TComRom.cpp        |  143 -----
 source/Lib/TLibCommon/TComRom.h          |    3 -
 source/Lib/TLibCommon/TComSlice.h        |    6 +
 source/Lib/TLibCommon/TComYuv.cpp        |  250 +------
 source/Lib/TLibCommon/TComYuv.h          |   26 +-
 source/Lib/TLibEncoder/TEncCfg.h         |   24 +
 source/Lib/TLibEncoder/TEncCu.cpp        |    6 +
 source/Lib/TLibEncoder/TEncSbac.cpp      |    2 +-
 source/Lib/TLibEncoder/TEncSearch.cpp    |  297 +++------
 source/Lib/TLibEncoder/TEncSearch.h      |    9 +-
 source/common/common.cpp                 |  274 +++++++++
 source/common/x86/asm-primitives.cpp     |   10 +-
 source/common/x86/const-a.asm            |    2 +
 source/common/x86/dct8.asm               |    4 +-
 source/common/x86/intrapred16.asm        |    2 +-
 source/common/x86/mc-a.asm               |  871 +++++++++++++++++++++++++++++++
 source/common/x86/pixel-util8.asm        |   25 +-
 source/encoder/compress.cpp              |   20 +-
 source/encoder/encoder.cpp               |   61 +-
 source/encoder/ratecontrol.cpp           |   16 +-
 source/test/mbdstharness.cpp             |   53 +
 source/test/mbdstharness.h               |    1 +
 source/test/pixelharness.cpp             |   13 +
 source/x265.cpp                          |   46 +
 source/x265.h                            |  141 +++++
 30 files changed, 1742 insertions(+), 702 deletions(-)

diffs (truncated from 3600 to 300 lines):

diff -r 3389061b75a4 -r 0c19c44af2d3 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Wed Feb 19 17:03:21 2014 -0600
+++ b/source/CMakeLists.txt	Fri Feb 21 12:23:22 2014 +0900
@@ -17,7 +17,7 @@ include(CheckFunctionExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 6)
+set(X265_BUILD 7)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 3389061b75a4 -r 0c19c44af2d3 source/Lib/TLibCommon/CommonDef.h
--- a/source/Lib/TLibCommon/CommonDef.h	Wed Feb 19 17:03:21 2014 -0600
+++ b/source/Lib/TLibCommon/CommonDef.h	Fri Feb 21 12:23:22 2014 +0900
@@ -108,7 +108,7 @@
 #define NUM_CHROMA_MODE             5 // total number of chroma modes
 #define DM_CHROMA_IDX               36 // chroma mode index for derived from luma intra mode
 
-#define FULL_NBIT 0 ///< When enabled, compute costs using full sample bitdepth.  When disabled, compute costs as if it is 8-bit source video.
+#define FULL_NBIT 1 ///< When enabled, compute costs using full sample bitdepth.  When disabled, compute costs as if it is 8-bit source video.
 #if FULL_NBIT || !HIGH_BIT_DEPTH
 # define DISTORTION_PRECISION_ADJUSTMENT(x) 0
 #else
diff -r 3389061b75a4 -r 0c19c44af2d3 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Wed Feb 19 17:03:21 2014 -0600
+++ b/source/Lib/TLibCommon/TComDataCU.h	Fri Feb 21 12:23:22 2014 +0900
@@ -135,9 +135,6 @@ private:
     TComDataCU*   m_cuAbove;         ///< pointer of above CU
     TComDataCU*   m_cuLeft;          ///< pointer of left CU
     TComDataCU*   m_cuColocated[2];  ///< pointer of temporally colocated CU's for both directions
-    TComMvField   m_mvFieldA;        ///< motion vector of position A
-    TComMvField   m_mvFieldB;        ///< motion vector of position B
-    TComMvField   m_mvFieldC;        ///< motion vector of position C
 
     // -------------------------------------------------------------------------------------------------------------------
     // coding tool information
@@ -312,7 +309,7 @@ public:
 
     void          setCbf(uint32_t idx, TextType ttype, UChar uh)     { m_cbf[ttype][idx] = uh; }
 
-    UChar         getQtRootCbf(uint32_t idx)           { return getCbf(idx, TEXT_LUMA, 0) || getCbf(idx, TEXT_CHROMA_U, 0) || getCbf(idx, TEXT_CHROMA_V, 0); }
+    UChar         getQtRootCbf(uint32_t idx)           { return getCbf(idx, TEXT_LUMA) || getCbf(idx, TEXT_CHROMA_U) || getCbf(idx, TEXT_CHROMA_V); }
 
     void          setCbfSubParts(uint32_t cbfY, uint32_t cbfU, uint32_t cbfV, uint32_t absPartIdx, uint32_t depth);
     void          setCbfSubParts(uint32_t cbf, TextType ttype, uint32_t absPartIdx, uint32_t depth);
@@ -388,12 +385,6 @@ public:
 
     void          clipMv(MV& outMV);
 
-    void          getMvPredLeft(MV& mvPred)       { mvPred = m_mvFieldA.mv; }
-
-    void          getMvPredAbove(MV& mvPred)      { mvPred = m_mvFieldB.mv; }
-
-    void          getMvPredAboveRight(MV& mvPred) { mvPred = m_mvFieldC.mv; }
-
     // -------------------------------------------------------------------------------------------------------------------
     // utility functions for neighboring information
     // -------------------------------------------------------------------------------------------------------------------
diff -r 3389061b75a4 -r 0c19c44af2d3 source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Wed Feb 19 17:03:21 2014 -0600
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Fri Feb 21 12:23:22 2014 +0900
@@ -58,28 +58,29 @@ static const UChar intraFilterThreshold[
 // ====================================================================================================================
 
 TComPrediction::TComPrediction()
-    : m_predBuf(NULL)
-    , m_predAllAngsBuf(NULL)
-{}
+{
+    m_predBuf = NULL;
+    m_refAbove = NULL;
+    m_refAboveFlt = NULL;
+    m_refLeft = NULL;
+    m_refLeftFlt = NULL;
+    m_immedVals = NULL;
+}
 
 TComPrediction::~TComPrediction()
 {
     X265_FREE(m_predBuf);
-    X265_FREE(m_predAllAngsBuf);
-
-    X265_FREE(refAbove);
-    X265_FREE(refAboveFlt);
-    X265_FREE(refLeft);
-    X265_FREE(refLeftFlt);
+    X265_FREE(m_refAbove);
+    X265_FREE(m_refAboveFlt);
+    X265_FREE(m_refLeft);
+    X265_FREE(m_refLeftFlt);
+    X265_FREE(m_immedVals);
 
     m_predYuv[0].destroy();
     m_predYuv[1].destroy();
     m_predShortYuv[0].destroy();
     m_predShortYuv[1].destroy();
-
     m_predTempYuv.destroy();
-
-    X265_FREE(m_immedVals);
 }
 
 void TComPrediction::initTempBuff(int csp)
@@ -91,13 +92,12 @@ void TComPrediction::initTempBuff(int cs
     {
         m_predBufHeight = ((MAX_CU_SIZE + 2) << 4);
         m_predBufStride = ((MAX_CU_SIZE + 8) << 4);
-        m_predBuf = X265_MALLOC(Pel, m_predBufStride * m_predBufHeight);
-        m_predAllAngsBuf = X265_MALLOC(Pel, 33 * MAX_CU_SIZE * MAX_CU_SIZE);
+        m_predBuf = X265_MALLOC(pixel, m_predBufStride * m_predBufHeight);
 
-        refAbove = X265_MALLOC(Pel, 3 * MAX_CU_SIZE);
-        refAboveFlt = X265_MALLOC(Pel, 3 * MAX_CU_SIZE);
-        refLeft = X265_MALLOC(Pel, 3 * MAX_CU_SIZE);
-        refLeftFlt = X265_MALLOC(Pel, 3 * MAX_CU_SIZE);
+        m_refAbove = X265_MALLOC(pixel, 3 * MAX_CU_SIZE);
+        m_refAboveFlt = X265_MALLOC(pixel, 3 * MAX_CU_SIZE);
+        m_refLeft = X265_MALLOC(pixel, 3 * MAX_CU_SIZE);
+        m_refLeftFlt = X265_MALLOC(pixel, 3 * MAX_CU_SIZE);
 
         m_predYuv[0].create(MAX_CU_SIZE, MAX_CU_SIZE, csp);
         m_predYuv[1].create(MAX_CU_SIZE, MAX_CU_SIZE, csp);
@@ -119,7 +119,7 @@ bool TComPrediction::filteringIntraRefer
 
     if (dirMode == DC_IDX)
     {
-        bFilter = false; //no smoothing for DC or LM chroma
+        bFilter = false; // no smoothing for DC or LM chroma
     }
     else
     {
@@ -131,24 +131,22 @@ bool TComPrediction::filteringIntraRefer
     return bFilter;
 }
 
-void TComPrediction::predIntraLumaAng(uint32_t dirMode, Pel* dst, intptr_t stride, int width)
+void TComPrediction::predIntraLumaAng(uint32_t dirMode, pixel* dst, intptr_t stride, int width)
 {
+    assert(width >= 4 && width <= 64);
     int log2BlkSize = g_convertToBit[width];
-
-    Pel *src = m_predBuf;
-
-    assert(width >= 4 && width < 128);
     bool bUseFilteredPredictions = TComPrediction::filteringIntraReferenceSamples(dirMode, width);
 
-    Pel *refLft, *refAbv;
-    refLft = refLeft + width - 1;
-    refAbv = refAbove + width - 1;
+    pixel *refLft, *refAbv;
+    refLft = m_refLeft + width - 1;
+    refAbv = m_refAbove + width - 1;
 
+    pixel *src = m_predBuf;
     if (bUseFilteredPredictions)
     {
         src += ADI_BUF_STRIDE * (2 * width + 1);
-        refLft = refLeftFlt + width - 1;
-        refAbv = refAboveFlt + width - 1;
+        refLft = m_refLeftFlt + width - 1;
+        refAbv = m_refAboveFlt + width - 1;
     }
 
     bool bFilter = width <= 16 && dirMode != PLANAR_IDX;
@@ -156,13 +154,13 @@ void TComPrediction::predIntraLumaAng(ui
 }
 
 // Angular chroma
-void TComPrediction::predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* dst, intptr_t stride, int width, int height, int chFmt)
+void TComPrediction::predIntraChromaAng(pixel* src, uint32_t dirMode, pixel* dst, intptr_t stride, int width, int height, int chFmt)
 {
     int log2BlkSize = g_convertToBit[width];
 
     // Create the prediction
-    Pel refAbv[3 * MAX_CU_SIZE];
-    Pel refLft[3 * MAX_CU_SIZE];
+    pixel refAbv[3 * MAX_CU_SIZE];
+    pixel refLft[3 * MAX_CU_SIZE];
 
     bool bUseFilteredPredictions = true;
 
@@ -185,10 +183,10 @@ void TComPrediction::predIntraChromaAng(
         int bufSize = cuHeight2 + cuWidth2 + 1;
         uint32_t wh = ADI_BUF_STRIDE * height;         // number of elements in one buffer
 
-        Pel* filteredBuf1 = src + 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 = src + 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
@@ -223,7 +221,7 @@ void TComPrediction::predIntraChromaAng(
 
         int limit = (2 * width + 1);
         src += wh;
-        memcpy(refAbv + width - 1, src, (limit) * sizeof(Pel));
+        memcpy(refAbv + width - 1, src, (limit) * sizeof(pixel));
         for (int k = 0; k < limit; k++)
         {
             refLft[k + width - 1] = src[k * ADI_BUF_STRIDE];
@@ -232,7 +230,7 @@ void TComPrediction::predIntraChromaAng(
     else
     {
         int limit = (dirMode <= 25 && dirMode >= 11) ? (width + 1 + 1) : (2 * width + 1);
-        memcpy(refAbv + width - 1, src, (limit) * sizeof(Pel));
+        memcpy(refAbv + width - 1, src, (limit) * sizeof(pixel));
         for (int k = 0; k < limit; k++)
         {
             refLft[k + width - 1] = src[k * ADI_BUF_STRIDE];
@@ -470,12 +468,12 @@ void TComPrediction::xPredInterBi(TComDa
 void TComPrediction::xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic)
 {
     int dstStride = dstPic->getStride();
-    Pel *dst      = dstPic->getLumaAddr(partAddr);
+    pixel *dst      = dstPic->getLumaAddr(partAddr);
 
     int srcStride = refPic->getStride();
     int srcOffset = (mv->x >> 2) + (mv->y >> 2) * srcStride;
     int partEnum = partitionFromSizes(width, height);
-    Pel* src = refPic->getLumaAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + srcOffset;
+    pixel* src = refPic->getLumaAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + srcOffset;
 
     int xFrac = mv->x & 0x3;
     int yFrac = mv->y & 0x3;
@@ -563,11 +561,11 @@ void TComPrediction::xPredInterChromaBlk
 
     int refOffset = (mv->x >> shiftHor) + (mv->y >> shiftVer) * refStride;
 
-    Pel* refCb = refPic->getCbAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
-    Pel* refCr = refPic->getCrAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
+    pixel* refCb = refPic->getCbAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
+    pixel* refCr = refPic->getCrAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
 
-    Pel* dstCb = dstPic->getCbAddr(partAddr);
-    Pel* dstCr = dstPic->getCrAddr(partAddr);
+    pixel* dstCb = dstPic->getCbAddr(partAddr);
+    pixel* dstCr = dstPic->getCrAddr(partAddr);
 
     int xFrac = mv->x & ((1 << shiftHor) - 1);
     int yFrac = mv->y & ((1 << shiftVer) - 1);
@@ -615,8 +613,8 @@ void TComPrediction::xPredInterChromaBlk
 
     int refOffset = (mv->x >> shiftHor) + (mv->y >> shiftVer) * refStride;
 
-    Pel* refCb = refPic->getCbAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
-    Pel* refCr = refPic->getCrAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
+    pixel* refCb = refPic->getCbAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
+    pixel* refCr = refPic->getCrAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
 
     int16_t* dstCb = dstPic->getCbAddr(partAddr);
     int16_t* dstCr = dstPic->getCrAddr(partAddr);
@@ -659,7 +657,7 @@ void TComPrediction::xPredInterChromaBlk
     }
 }
 
-void TComPrediction::xWeightedAverage(TComYuv* srcYuv0, TComYuv* srcYuv1, int refIdx0, int refIdx1, uint32_t partIdx, int width, int height, TComYuv*& outDstYuv, bool bLuma, bool bChroma)
+void TComPrediction::xWeightedAverage(TComYuv* srcYuv0, TComYuv* srcYuv1, int refIdx0, int refIdx1, uint32_t partIdx, int width, int height, TComYuv* outDstYuv, bool bLuma, bool bChroma)
 {
     if (refIdx0 >= 0 && refIdx1 >= 0)
     {
diff -r 3389061b75a4 -r 0c19c44af2d3 source/Lib/TLibCommon/TComPrediction.h
--- a/source/Lib/TLibCommon/TComPrediction.h	Wed Feb 19 17:03:21 2014 -0600
+++ b/source/Lib/TLibCommon/TComPrediction.h	Fri Feb 21 12:23:22 2014 +0900
@@ -63,11 +63,6 @@ class TComPrediction : public TComWeight
 {
 protected:
 
-    Pel*      m_predBuf;
-    Pel*      m_predAllAngsBuf;
-    int       m_predBufStride;
-    int       m_predBufHeight;
-
     // references sample for IntraPrediction
     TComYuv   m_predYuv[2];
     TShortYUV m_predShortYuv[2];
@@ -78,23 +73,29 @@ protected:
     int       m_vChromaShift;
 
     // motion compensation functions
-    void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TComYuv* outPredYuv, bool bLuma = true, bool bChroma = true);
-    void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TShortYUV* outPredYuv, bool bLuma = true, bool bChroma = true);
+    void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TComYuv* outPredYuv, bool bLuma, bool bChroma);
+    void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TShortYUV* outPredYuv, bool bLuma, bool bChroma);
     void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic);
     void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic);
     void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic);
     void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic);
 
-    void xPredInterBi(TComDataCU* cu, uint32_t partAddr, int width, int height, TComYuv*& outPredYuv, bool bLuma = true, bool bChroma = true);
-    void xWeightedAverage(TComYuv* srcYuv0, TComYuv* srcYuv1, int refIdx0, int refIdx1, uint32_t partAddr, int width, int height, TComYuv*& outDstYuv, bool bLuma = true, bool bChroma = true);
+    void xPredInterBi(TComDataCU* cu, uint32_t partAddr, int width, int height, TComYuv*& outPredYuv, bool bLuma, bool bChroma);
+    void xWeightedAverage(TComYuv* srcYuv0, TComYuv* srcYuv1, int refIdx0, int refIdx1, uint32_t partAddr, int width, int height, TComYuv* outDstYuv, bool bLuma, bool bChroma);
 
-    void xGetLLSPrediction(TComPattern* pcPattern, int* src0, int srcstride, Pel* dst0, int dststride, uint32_t width, uint32_t height, uint32_t ext0);


More information about the x265-commits mailing list