[x265-commits] [x265] encoder: back-port VUI content fixes from default branch

Steve Borho steve at borho.org
Sat Mar 8 06:17:50 CET 2014


details:   http://hg.videolan.org/x265/rev/b7e2854cf1c4
branches:  stable
changeset: 6420:b7e2854cf1c4
user:      Steve Borho <steve at borho.org>
date:      Fri Mar 07 22:53:36 2014 -0600
description:
encoder: back-port VUI content fixes from default branch

Take values from param structure, which is where these fields are actually
configured.
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/93861c42b879
branches:  
changeset: 6421:93861c42b879
user:      Steve Borho <steve at borho.org>
date:      Fri Mar 07 22:54:00 2014 -0600
description:
Merge with stable

diffstat:

 source/CMakeLists.txt                               |    13 +-
 source/Lib/TLibCommon/CommonDef.h                   |     3 +-
 source/Lib/TLibCommon/ContextTables.h               |     2 +-
 source/Lib/TLibCommon/SEI.h                         |     2 +-
 source/Lib/TLibCommon/TComBitStream.cpp             |     4 -
 source/Lib/TLibCommon/TComBitStream.h               |     4 -
 source/Lib/TLibCommon/TComDataCU.cpp                |   315 +--
 source/Lib/TLibCommon/TComDataCU.h                  |    28 +-
 source/Lib/TLibCommon/TComLoopFilter.cpp            |    16 +-
 source/Lib/TLibCommon/TComMotionInfo.cpp            |     4 +-
 source/Lib/TLibCommon/TComMotionInfo.h              |     2 +-
 source/Lib/TLibCommon/TComPattern.cpp               |   292 +-
 source/Lib/TLibCommon/TComPattern.h                 |    20 +-
 source/Lib/TLibCommon/TComPic.cpp                   |    26 +-
 source/Lib/TLibCommon/TComPic.h                     |    10 +-
 source/Lib/TLibCommon/TComPicSym.cpp                |    24 +-
 source/Lib/TLibCommon/TComPicSym.h                  |    12 +-
 source/Lib/TLibCommon/TComPicYuv.cpp                |    38 +-
 source/Lib/TLibCommon/TComPicYuv.h                  |     2 +-
 source/Lib/TLibCommon/TComPrediction.cpp            |    10 +-
 source/Lib/TLibCommon/TComPrediction.h              |    10 +-
 source/Lib/TLibCommon/TComRdCost.h                  |     2 +-
 source/Lib/TLibCommon/TComRom.cpp                   |   113 +-
 source/Lib/TLibCommon/TComRom.h                     |     7 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp  |   219 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.h    |    32 +-
 source/Lib/TLibCommon/TComSlice.cpp                 |   101 +-
 source/Lib/TLibCommon/TComSlice.h                   |    30 +-
 source/Lib/TLibCommon/TComTrQuant.cpp               |   210 +-
 source/Lib/TLibCommon/TComTrQuant.h                 |    20 +-
 source/Lib/TLibCommon/TComWeightPrediction.cpp      |     8 +-
 source/Lib/TLibCommon/TComWeightPrediction.h        |     8 +-
 source/Lib/TLibCommon/TComYuv.cpp                   |   156 +-
 source/Lib/TLibCommon/TComYuv.h                     |    47 +-
 source/Lib/TLibCommon/TypeDef.h                     |    28 +-
 source/Lib/TLibEncoder/NALwrite.cpp                 |     4 +-
 source/Lib/TLibEncoder/SEIwrite.cpp                 |     8 +-
 source/Lib/TLibEncoder/TEncCfg.h                    |   336 ---
 source/Lib/TLibEncoder/TEncCu.cpp                   |   184 +-
 source/Lib/TLibEncoder/TEncCu.h                     |    12 +-
 source/Lib/TLibEncoder/TEncEntropy.cpp              |    34 +-
 source/Lib/TLibEncoder/TEncEntropy.h                |     6 +-
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp |   380 +---
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h   |     1 -
 source/Lib/TLibEncoder/TEncSbac.cpp                 |   150 +-
 source/Lib/TLibEncoder/TEncSbac.h                   |    10 +-
 source/Lib/TLibEncoder/TEncSearch.cpp               |   345 ++-
 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                            |     9 +-
 source/common/common.h                              |    42 +-
 source/common/cpu.cpp                               |     3 -
 source/common/cpu.h                                 |     2 +-
 source/common/dct.cpp                               |     2 +-
 source/common/intrapred.cpp                         |     2 -
 source/common/ipfilter.cpp                          |     3 -
 source/common/loopfilter.cpp                        |    52 +
 source/common/md5.cpp                               |     2 +-
 source/common/md5.h                                 |     2 +-
 source/common/mv.h                                  |     2 +-
 source/common/param.cpp                             |   457 +++-
 source/common/param.h                               |     5 +
 source/common/pixel.cpp                             |    18 +
 source/common/primitives.cpp                        |    75 +-
 source/common/primitives.h                          |    38 +-
 source/common/shortyuv.cpp                          |   277 +++
 source/common/shortyuv.h                            |   112 +
 source/common/threading.h                           |     5 -
 source/common/threadpool.cpp                        |     5 +-
 source/common/threadpool.h                          |     2 +-
 source/common/vec/blockcopy-sse3.cpp                |     1 -
 source/common/vec/dct-sse3.cpp                      |     3 -
 source/common/vec/dct-sse41.cpp                     |     3 -
 source/common/vec/dct-ssse3.cpp                     |     3 -
 source/common/wavefront.cpp                         |     2 -
 source/common/wavefront.h                           |     2 +-
 source/common/x86/asm-primitives.cpp                |   656 ++----
 source/common/x86/blockcopy8.asm                    |  1647 ++++++++++--------
 source/common/x86/blockcopy8.h                      |   203 +-
 source/common/x86/intrapred16.asm                   |    14 +-
 source/common/x86/intrapred8.asm                    |   878 ++++------
 source/common/x86/ipfilter16.asm                    |   533 ++++++-
 source/common/x86/ipfilter8.asm                     |   148 +-
 source/common/x86/ipfilter8.h                       |     2 +-
 source/common/x86/loopfilter.asm                    |    85 +
 source/common/x86/loopfilter.h                      |    29 +
 source/common/x86/mc-a.asm                          |    32 +-
 source/common/x86/pixel-util8.asm                   |    52 +-
 source/common/x86/pixeladd8.asm                     |    40 +-
 source/common/x86/sad-a.asm                         |    54 +-
 source/common/x86/ssd-a.asm                         |    24 +-
 source/dllmain.cpp                                  |    35 -
 source/encoder/CMakeLists.txt                       |     1 -
 source/encoder/api.cpp                              |     5 +-
 source/encoder/bitcost.cpp                          |     3 -
 source/encoder/bitcost.h                            |     3 +-
 source/encoder/compress.cpp                         |   103 +-
 source/encoder/cturow.cpp                           |    17 +-
 source/encoder/cturow.h                             |     2 +-
 source/encoder/dpb.cpp                              |    13 +-
 source/encoder/dpb.h                                |     8 +-
 source/encoder/encoder.cpp                          |   352 +--
 source/encoder/encoder.h                            |    89 +-
 source/encoder/frameencoder.cpp                     |   108 +-
 source/encoder/frameencoder.h                       |     4 +-
 source/encoder/framefilter.cpp                      |    74 +-
 source/encoder/framefilter.h                        |     2 +-
 source/encoder/motion.cpp                           |     4 -
 source/encoder/ratecontrol.cpp                      |   208 +-
 source/encoder/ratecontrol.h                        |     5 +-
 source/encoder/reference.cpp                        |    19 +-
 source/encoder/slicetype.cpp                        |   188 +-
 source/encoder/slicetype.h                          |    11 +-
 source/encoder/weightPrediction.cpp                 |   579 +++--
 source/input/input.cpp                              |     1 -
 source/input/y4m.cpp                                |    10 +-
 source/input/yuv.cpp                                |    13 +-
 source/output/output.cpp                            |     1 -
 source/output/y4m.cpp                               |     9 +-
 source/output/yuv.cpp                               |    10 +-
 source/output/yuv.h                                 |     3 +-
 source/test/intrapredharness.cpp                    |    41 +-
 source/test/ipfilterharness.cpp                     |    58 +-
 source/test/ipfilterharness.h                       |     2 +-
 source/test/mbdstharness.cpp                        |    62 +-
 source/test/pixelharness.cpp                        |   159 +-
 source/test/pixelharness.h                          |     4 +-
 source/test/testbench.cpp                           |    53 +-
 source/test/testharness.h                           |     2 -
 source/test/testpool.cpp                            |     5 +-
 source/x265.cpp                                     |   198 +-
 source/x265.h                                       |   313 +-
 135 files changed, 6089 insertions(+), 6063 deletions(-)

diffs (truncated from 22547 to 300 lines):

diff -r 91ada5e78ee1 -r 93861c42b879 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/CMakeLists.txt	Fri Mar 07 22:54:00 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 9)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
@@ -27,9 +28,9 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
 
 # System architecture detection
 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
-if("${SYSPROC}" STREQUAL "i386"   OR "${SYSPROC}" STREQUAL "amd64" OR
-   "${SYSPROC}" STREQUAL "x86_64" OR "${SYSPROC}" STREQUAL "x86"   OR
-   "${SYSPROC}" STREQUAL "")
+set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
     message(STATUS "Detected x86 system processor")
     set(X86 1)
     add_definitions(-DX265_ARCH_X86=1)
@@ -37,7 +38,7 @@ if("${SYSPROC}" STREQUAL "i386"   OR "${
         set(X64 1)
         add_definitions(-DX86_64=1)
     endif()
-elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv6l")
+elseif(${SYSPROC} STREQUAL "armv6l")
     message(STATUS "Detected ARM system processor")
     set(ARM 1)
     add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
@@ -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 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/CommonDef.h
--- a/source/Lib/TLibCommon/CommonDef.h	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/CommonDef.h	Fri Mar 07 22:54:00 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 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/ContextTables.h
--- a/source/Lib/TLibCommon/ContextTables.h	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/ContextTables.h	Fri Mar 07 22:54:00 2014 -0600
@@ -39,7 +39,7 @@
 #ifndef X265_CONTEXTTABLES_H
 #define X265_CONTEXTTABLES_H
 
-#include <stdint.h>
+#include "common.h"
 
 //! \ingroup TLibCommon
 //! \{
diff -r 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/SEI.h
--- a/source/Lib/TLibCommon/SEI.h	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/SEI.h	Fri Mar 07 22:54:00 2014 -0600
@@ -34,7 +34,7 @@
 #ifndef X265_SEI_H
 #define X265_SEI_H
 
-#include <cstring>
+#include "common.h"
 
 namespace x265 {
 // private namespace
diff -r 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/TComBitStream.cpp
--- a/source/Lib/TLibCommon/TComBitStream.cpp	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/TComBitStream.cpp	Fri Mar 07 22:54:00 2014 -0600
@@ -38,10 +38,6 @@
 #include "TComBitStream.h"
 #include "common.h"
 
-#include <stdint.h>
-#include <string.h>
-#include <memory.h>
-
 using namespace x265;
 
 //! \ingroup TLibCommon
diff -r 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/TComBitStream.h
--- a/source/Lib/TLibCommon/TComBitStream.h	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/TComBitStream.h	Fri Mar 07 22:54:00 2014 -0600
@@ -40,10 +40,6 @@
 
 #include "CommonDef.h"
 
-#include <stdint.h>
-#include <stdio.h>
-#include <assert.h>
-
 //! \ingroup TLibCommon
 //! \{
 
diff -r 91ada5e78ee1 -r 93861c42b879 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Tue Mar 04 08:20:34 2014 -0600
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Fri Mar 07 22:54:00 2014 -0600
@@ -67,11 +67,9 @@ TComDataCU::TComDataCU()
     m_partSizes = NULL;
     m_predModes = NULL;
     m_cuTransquantBypass = NULL;
-    m_width = NULL;
-    m_height = NULL;
+    m_cuSize = NULL;
     m_qp = NULL;
     m_bMergeFlags = NULL;
-    m_mergeIndex = NULL;
     m_lumaIntraDir = NULL;
     m_chromaIntraDir = NULL;
     m_interDir = NULL;
@@ -127,15 +125,13 @@ bool TComDataCU::create(uint32_t numPart
 
     CHECKED_MALLOC(m_qp, char,  numPartition);
     CHECKED_MALLOC(m_depth, UChar, numPartition);
-    CHECKED_MALLOC(m_width, UChar, numPartition);
-    CHECKED_MALLOC(m_height, UChar, numPartition);
+    CHECKED_MALLOC(m_cuSize, uint8_t, numPartition);
     CHECKED_MALLOC(m_skipFlag, bool, numPartition);
     CHECKED_MALLOC(m_partSizes, char, numPartition);
     CHECKED_MALLOC(m_predModes, char, numPartition);
     CHECKED_MALLOC(m_cuTransquantBypass, bool, numPartition);
 
     CHECKED_MALLOC(m_bMergeFlags, bool,  numPartition);
-    CHECKED_MALLOC(m_mergeIndex, UChar, numPartition);
     CHECKED_MALLOC(m_lumaIntraDir, UChar, numPartition);
     CHECKED_MALLOC(m_chromaIntraDir, UChar, numPartition);
     CHECKED_MALLOC(m_interDir, UChar, numPartition);
@@ -149,8 +145,8 @@ bool TComDataCU::create(uint32_t numPart
     CHECKED_MALLOC(m_cbf[1], UChar, numPartition);
     CHECKED_MALLOC(m_cbf[2], UChar, numPartition);
 
-    CHECKED_MALLOC(m_mvpIdx[0], char, numPartition);
-    CHECKED_MALLOC(m_mvpIdx[1], char, numPartition);
+    CHECKED_MALLOC(m_mvpIdx[0], uint8_t, numPartition * 2);
+    m_mvpIdx[1] = m_mvpIdx[0] + numPartition;
 
     CHECKED_MALLOC(m_trCoeffY, TCoeff, width * height);
     CHECKED_MALLOC(m_trCoeffCb, TCoeff, (width >> m_hChromaShift) * (height >> m_vChromaShift));
@@ -174,14 +170,12 @@ void TComDataCU::destroy()
     X265_FREE(m_pattern);
     X265_FREE(m_qp);
     X265_FREE(m_depth);
-    X265_FREE(m_width);
-    X265_FREE(m_height);
+    X265_FREE(m_cuSize);
     X265_FREE(m_cbf[0]);
     X265_FREE(m_cbf[1]);
     X265_FREE(m_cbf[2]);
     X265_FREE(m_interDir);
     X265_FREE(m_bMergeFlags);
-    X265_FREE(m_mergeIndex);
     X265_FREE(m_lumaIntraDir);
     X265_FREE(m_chromaIntraDir);
     X265_FREE(m_trIdx);
@@ -196,7 +190,6 @@ void TComDataCU::destroy()
     X265_FREE(m_iPCMSampleCb);
     X265_FREE(m_iPCMSampleCr);
     X265_FREE(m_mvpIdx[0]);
-    X265_FREE(m_mvpIdx[1]);
     X265_FREE(m_cuTransquantBypass);
     X265_FREE(m_skipFlag);
     X265_FREE(m_partSizes);
@@ -227,8 +220,8 @@ void TComDataCU::initCU(TComPic* pic, ui
     m_pic              = pic;
     m_slice            = pic->getSlice();
     m_cuAddr           = cuAddr;
-    m_cuPelX           = (cuAddr % pic->getFrameWidthInCU()) * g_maxCUWidth;
-    m_cuPelY           = (cuAddr / pic->getFrameWidthInCU()) * g_maxCUHeight;
+    m_cuPelX           = (cuAddr % pic->getFrameWidthInCU()) * g_maxCUSize;
+    m_cuPelY           = (cuAddr / pic->getFrameWidthInCU()) * g_maxCUSize;
     m_absIdxInLCU      = 0;
     m_totalCost        = MAX_INT64;
     m_sa8dCost         = MAX_INT64;
@@ -256,11 +249,9 @@ void TComDataCU::initCU(TComPic* pic, ui
         memset(m_transformSkip[0],   0,             numElements * sizeof(*m_transformSkip[0]));
         memset(m_transformSkip[1],   0,             numElements * sizeof(*m_transformSkip[1]));
         memset(m_transformSkip[2],   0,             numElements * sizeof(*m_transformSkip[2]));
-        memset(m_width,              g_maxCUWidth,  numElements * sizeof(*m_width));
-        memset(m_height,             g_maxCUHeight, numElements * sizeof(*m_height));
+        memset(m_cuSize,             g_maxCUSize,   numElements * sizeof(*m_cuSize));
         memset(m_qp,                 qp,            numElements * sizeof(*m_qp));
         memset(m_bMergeFlags,        false,         numElements * sizeof(*m_bMergeFlags));
-        memset(m_mergeIndex,         0,             numElements * sizeof(*m_mergeIndex));
         memset(m_lumaIntraDir,       DC_IDX,        numElements * sizeof(*m_lumaIntraDir));
         memset(m_chromaIntraDir,     0,             numElements * sizeof(*m_chromaIntraDir));
         memset(m_interDir,           0,             numElements * sizeof(*m_interDir));
@@ -270,8 +261,8 @@ void TComDataCU::initCU(TComPic* pic, ui
         memset(m_iPCMFlags,          false,         numElements * sizeof(*m_iPCMFlags));
     }
 
-    uint32_t y_tmp = g_maxCUWidth * g_maxCUHeight;
-    uint32_t c_tmp = (g_maxCUWidth >> m_hChromaShift) * (g_maxCUHeight >> m_vChromaShift);
+    uint32_t y_tmp = g_maxCUSize * g_maxCUSize;
+    uint32_t c_tmp = (g_maxCUSize >> m_hChromaShift) * (g_maxCUSize >> m_vChromaShift);
     {
         m_cuMvField[0].clearMvField();
         m_cuMvField[1].clearMvField();
@@ -340,14 +331,12 @@ void TComDataCU::initEstData(uint32_t de
     m_totalDistortion  = 0;
     m_totalBits        = 0;
 
-    UChar width  = g_maxCUWidth  >> depth;
-    UChar height = g_maxCUHeight >> depth;
+    UChar cuSize = g_maxCUSize >> depth;
 
     for (uint32_t i = 0; i < m_numPartitions; i++)
     {
         m_depth[i] = depth;
-        m_width[i] = width;
-        m_height[i] = height;
+        m_cuSize[i] = cuSize;
         m_trIdx[i] = 0;
         m_transformSkip[0][i] = 0;
         m_transformSkip[1][i] = 0;
@@ -383,8 +372,8 @@ void TComDataCU::initSubCU(TComDataCU* c
     m_cuAddr           = cu->getAddr();
     m_absIdxInLCU      = cu->getZorderIdxInCU() + partOffset;
 
-    m_cuPelX           = cu->getCUPelX() + (g_maxCUWidth >> depth) * (partUnitIdx &  1);
-    m_cuPelY           = cu->getCUPelY() + (g_maxCUHeight >> depth) * (partUnitIdx >> 1);
+    m_cuPelX           = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx &  1);
+    m_cuPelY           = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
 
     m_totalCost        = MAX_INT64;
     m_sa8dCost         = MAX_INT64;
@@ -417,10 +406,8 @@ void TComDataCU::initSubCU(TComDataCU* c
     memset(m_cbf[2],          0, iSizeInUchar);
     memset(m_depth, depth, iSizeInUchar);
 
-    UChar width  = g_maxCUWidth  >> depth;
-    UChar heigth = g_maxCUHeight >> depth;
-    memset(m_width,     width,  iSizeInUchar);
-    memset(m_height,    heigth, iSizeInUchar);
+    UChar cuSize = g_maxCUSize >> depth;
+    memset(m_cuSize,    cuSize,  iSizeInUchar);
     memset(m_iPCMFlags, 0, iSizeInBool);
     for (uint32_t i = 0; i < m_numPartitions; i++)
     {
@@ -453,8 +440,8 @@ void TComDataCU::copyToSubCU(TComDataCU*
     m_cuAddr           = cu->getAddr();
     m_absIdxInLCU      = cu->getZorderIdxInCU() + partOffset;
 
-    m_cuPelX           = cu->getCUPelX() + (g_maxCUWidth >> depth) * (partUnitIdx & 1);
-    m_cuPelY           = cu->getCUPelY() + (g_maxCUHeight >> depth) * (partUnitIdx >> 1);
+    m_cuPelX           = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
+    m_cuPelY           = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
 
     m_totalCost        = MAX_INT64;
     m_sa8dCost         = MAX_INT64;
@@ -474,8 +461,7 @@ void TComDataCU::copyToSubCU(TComDataCU*
 
     memcpy(m_lumaIntraDir, rpcCU->getLumaIntraDir() + m_absIdxInLCU, iSizeInUchar);
     memcpy(m_depth, rpcCU->getDepth() + m_absIdxInLCU, iSizeInUchar);
-    memcpy(m_width, rpcCU->getWidth() + m_absIdxInLCU, iSizeInUchar);
-    memcpy(m_height, rpcCU->getHeight() + m_absIdxInLCU, iSizeInUchar);
+    memcpy(m_cuSize, rpcCU->getCUSize() + m_absIdxInLCU, iSizeInUchar);
 }
 
 // --------------------------------------------------------------------------------------------------------------------
@@ -506,7 +492,6 @@ void TComDataCU::copyPartFrom(TComDataCU
     memcpy(m_predModes + offset, cu->getPredictionMode(), sizeof(*m_predModes) * numPartition);
     memcpy(m_cuTransquantBypass + offset, cu->getCUTransquantBypass(), sizeof(*m_cuTransquantBypass) * numPartition);
     memcpy(m_bMergeFlags      + offset, cu->getMergeFlag(),         iSizeInBool);
-    memcpy(m_mergeIndex       + offset, cu->getMergeIndex(),        iSizeInUchar);
     memcpy(m_lumaIntraDir     + offset, cu->getLumaIntraDir(),      iSizeInUchar);
     memcpy(m_chromaIntraDir   + offset, cu->getChromaIntraDir(),    iSizeInUchar);
     memcpy(m_interDir         + offset, cu->getInterDir(),          iSizeInUchar);
@@ -520,8 +505,7 @@ void TComDataCU::copyPartFrom(TComDataCU
     memcpy(m_cbf[2] + offset, cu->getCbf(TEXT_CHROMA_V), iSizeInUchar);
 
     memcpy(m_depth  + offset, cu->getDepth(),  iSizeInUchar);
-    memcpy(m_width  + offset, cu->getWidth(),  iSizeInUchar);
-    memcpy(m_height + offset, cu->getHeight(), iSizeInUchar);
+    memcpy(m_cuSize + offset, cu->getCUSize(), iSizeInUchar);
 
     memcpy(m_mvpIdx[0] + offset, cu->getMVPIdx(REF_PIC_LIST_0), iSizeInUchar);
     memcpy(m_mvpIdx[1] + offset, cu->getMVPIdx(REF_PIC_LIST_1), iSizeInUchar);
@@ -539,12 +523,12 @@ void TComDataCU::copyPartFrom(TComDataCU
     m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cu->getTotalNumPart(), offset);
     m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cu->getTotalNumPart(), offset);
 
-    uint32_t tmp  = g_maxCUWidth * g_maxCUHeight >> (depth << 1);


More information about the x265-commits mailing list