[x265-commits] [x265] cmake: move assembly source into ASM source group in VS

Steve Borho steve at borho.org
Thu Mar 27 04:32:35 CET 2014


details:   http://hg.videolan.org/x265/rev/29efd2537b56
branches:  
changeset: 6605:29efd2537b56
user:      Steve Borho <steve at borho.org>
date:      Mon Mar 24 15:07:34 2014 -0500
description:
cmake: move assembly source into ASM source group in VS
Subject: [x265] replace UChar with uint8_t

details:   http://hg.videolan.org/x265/rev/bf2075b6e879
branches:  
changeset: 6606:bf2075b6e879
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 26 22:04:56 2014 -0500
description:
replace UChar with uint8_t
Subject: [x265] replace Pel with pixel

details:   http://hg.videolan.org/x265/rev/9c0419c1781b
branches:  
changeset: 6607:9c0419c1781b
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 26 22:19:19 2014 -0500
description:
replace Pel with pixel
Subject: [x265] common: move X265_DEPTH definition to common.h

details:   http://hg.videolan.org/x265/rev/9fd80b32a24e
branches:  
changeset: 6608:9fd80b32a24e
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 26 22:20:47 2014 -0500
description:
common: move X265_DEPTH definition to common.h
Subject: [x265] replace TCoeff with coeff_t

details:   http://hg.videolan.org/x265/rev/ca35d9b58b55
branches:  
changeset: 6609:ca35d9b58b55
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 26 22:29:25 2014 -0500
description:
replace TCoeff with coeff_t

diffstat:

 source/CMakeLists.txt                              |    5 +-
 source/Lib/TLibCommon/SEI.h                        |    6 +-
 source/Lib/TLibCommon/TComBitStream.cpp            |    2 +-
 source/Lib/TLibCommon/TComBitStream.h              |    4 +-
 source/Lib/TLibCommon/TComDataCU.cpp               |  148 +++++-----
 source/Lib/TLibCommon/TComDataCU.h                 |  103 +++---
 source/Lib/TLibCommon/TComLoopFilter.cpp           |   80 ++--
 source/Lib/TLibCommon/TComLoopFilter.h             |   24 +-
 source/Lib/TLibCommon/TComPic.h                    |    4 +-
 source/Lib/TLibCommon/TComPicSym.h                 |    2 +-
 source/Lib/TLibCommon/TComPicYuv.h                 |   46 +-
 source/Lib/TLibCommon/TComPicYuvMD5.cpp            |   26 +-
 source/Lib/TLibCommon/TComPrediction.cpp           |    2 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp |    2 +-
 source/Lib/TLibCommon/TComTrQuant.cpp              |   10 +-
 source/Lib/TLibCommon/TComTrQuant.h                |   10 +-
 source/Lib/TLibCommon/TComWeightPrediction.cpp     |   50 +-
 source/Lib/TLibCommon/TypeDef.h                    |   19 -
 source/Lib/TLibEncoder/TEncCu.cpp                  |   34 +-
 source/Lib/TLibEncoder/TEncCu.h                    |   12 +-
 source/Lib/TLibEncoder/TEncEntropy.cpp             |    2 +-
 source/Lib/TLibEncoder/TEncEntropy.h               |    4 +-
 source/Lib/TLibEncoder/TEncSbac.cpp                |  110 +++---
 source/Lib/TLibEncoder/TEncSbac.h                  |    2 +-
 source/Lib/TLibEncoder/TEncSearch.cpp              |  299 ++++++++++----------
 source/Lib/TLibEncoder/TEncSearch.h                |   22 +-
 source/common/common.h                             |    4 +
 source/common/vec/dct-sse3.cpp                     |    1 -
 source/common/vec/dct-sse41.cpp                    |    1 -
 source/encoder/compress.cpp                        |   64 ++--
 source/encoder/cturow.cpp                          |    2 +-
 31 files changed, 540 insertions(+), 560 deletions(-)

diffs (truncated from 2774 to 300 lines):

diff -r 7d37c06c80f4 -r ca35d9b58b55 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Wed Mar 26 19:48:18 2014 -0500
+++ b/source/CMakeLists.txt	Wed Mar 26 22:29:25 2014 -0500
@@ -231,8 +231,8 @@ if((MSVC_IDE OR XCODE) AND ENABLE_ASSEMB
     endif()
     foreach(ASM ${MSVC_ASMS})
         set(YASM_SRC ${CMAKE_CURRENT_SOURCE_DIR}/common/x86/${ASM})
-        set(YASM_SRCS ${YASM_SRCS} ${YASM_SRC})
-        set(YASM_OBJS ${YASM_OBJS} ${ASM}.${SUFFIX})
+        list(APPEND YASM_SRCS ${YASM_SRC})
+        list(APPEND YASM_OBJS ${ASM}.${SUFFIX})
         add_custom_command(
             OUTPUT ${ASM}.${SUFFIX}
             COMMAND ${YASM_EXECUTABLE} ARGS ${FLAGS} ${YASM_SRC} -o ${ASM}.${SUFFIX}
@@ -240,6 +240,7 @@ if((MSVC_IDE OR XCODE) AND ENABLE_ASSEMB
     endforeach()
 endif()
 
+source_group(ASM FILES ${YASM_SRCS})
 add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${YASM_OBJS} ${YASM_SRCS})
 if(NOT MSVC)
     set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
diff -r 7d37c06c80f4 -r ca35d9b58b55 source/Lib/TLibCommon/SEI.h
--- a/source/Lib/TLibCommon/SEI.h	Wed Mar 26 19:48:18 2014 -0500
+++ b/source/Lib/TLibCommon/SEI.h	Wed Mar 26 22:29:25 2014 -0500
@@ -99,9 +99,9 @@ public:
         delete userData;
     }
 
-    UChar uuid_iso_iec_11578[16];
+    uint8_t uuid_iso_iec_11578[16];
     uint32_t userDataLength;
-    UChar *userData;
+    uint8_t *userData;
 };
 
 class SEIDecodedPictureHash : public SEI
@@ -122,7 +122,7 @@ public:
         RESERVED,
     } method;
 
-    UChar digest[3][16];
+    uint8_t digest[3][16];
 };
 
 class SEIActiveParameterSets : public SEI
diff -r 7d37c06c80f4 -r ca35d9b58b55 source/Lib/TLibCommon/TComBitStream.cpp
--- a/source/Lib/TLibCommon/TComBitStream.cpp	Wed Mar 26 19:48:18 2014 -0500
+++ b/source/Lib/TLibCommon/TComBitStream.cpp	Wed Mar 26 22:29:25 2014 -0500
@@ -96,7 +96,7 @@ void TComOutputBitstream::write(uint32_t
      * len(H)=7, len(V)=1: ... ---- HHHH HHHV . 0000 0000, next_num_held_bits=0
      * len(H)=7, len(V)=2: ... ---- HHHH HHHV . V000 0000, next_num_held_bits=1
      * if total_bits < 8, the value of v_ is not used */
-    UChar next_held_bits = bits << (8 - next_num_held_bits);
+    uint8_t next_held_bits = bits << (8 - next_num_held_bits);
 
     if (!(num_total_bits >> 3))
     {
diff -r 7d37c06c80f4 -r ca35d9b58b55 source/Lib/TLibCommon/TComBitStream.h
--- a/source/Lib/TLibCommon/TComBitStream.h	Wed Mar 26 19:48:18 2014 -0500
+++ b/source/Lib/TLibCommon/TComBitStream.h	Wed Mar 26 22:29:25 2014 -0500
@@ -84,7 +84,7 @@ class TComOutputBitstream : public TComB
     uint32_t m_buffsize;
 
     uint32_t m_num_held_bits; /// number of bits not flushed to bytestream.
-    UChar m_held_bits; /// the bits held and not flushed to bytestream.
+    uint8_t m_held_bits; /// the bits held and not flushed to bytestream.
     /// this value is always msb-aligned, bigendian.
 
 public:
@@ -147,7 +147,7 @@ public:
      */
     uint8_t* getFIFO() { return m_fifo; }
 
-    UChar getHeldBits()          { return m_held_bits; }
+    uint8_t getHeldBits()          { return m_held_bits; }
 
     /** Return a reference to the internal fifo */
     uint8_t* getFIFO() const { return m_fifo; }
diff -r 7d37c06c80f4 -r ca35d9b58b55 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Wed Mar 26 19:48:18 2014 -0500
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Wed Mar 26 22:29:25 2014 -0500
@@ -124,7 +124,7 @@ bool TComDataCU::create(uint32_t numPart
     ok &= m_cuMvField[1].create(numPartition);
 
     CHECKED_MALLOC(m_qp, char,  numPartition);
-    CHECKED_MALLOC(m_depth, UChar, numPartition);
+    CHECKED_MALLOC(m_depth, uint8_t, numPartition);
     CHECKED_MALLOC(m_cuSize, uint8_t, numPartition);
     CHECKED_MALLOC(m_skipFlag, bool, numPartition);
     CHECKED_MALLOC(m_partSizes, char, numPartition);
@@ -132,30 +132,30 @@ bool TComDataCU::create(uint32_t numPart
     CHECKED_MALLOC(m_cuTransquantBypass, bool, numPartition);
 
     CHECKED_MALLOC(m_bMergeFlags, bool,  numPartition);
-    CHECKED_MALLOC(m_lumaIntraDir, UChar, numPartition);
-    CHECKED_MALLOC(m_chromaIntraDir, UChar, numPartition);
-    CHECKED_MALLOC(m_interDir, UChar, numPartition);
-
-    CHECKED_MALLOC(m_trIdx, UChar, numPartition);
-    CHECKED_MALLOC(m_transformSkip[0], UChar, numPartition);
-    CHECKED_MALLOC(m_transformSkip[1], UChar, numPartition);
-    CHECKED_MALLOC(m_transformSkip[2], UChar, numPartition);
-
-    CHECKED_MALLOC(m_cbf[0], UChar, numPartition);
-    CHECKED_MALLOC(m_cbf[1], UChar, numPartition);
-    CHECKED_MALLOC(m_cbf[2], UChar, numPartition);
+    CHECKED_MALLOC(m_lumaIntraDir, uint8_t, numPartition);
+    CHECKED_MALLOC(m_chromaIntraDir, uint8_t, numPartition);
+    CHECKED_MALLOC(m_interDir, uint8_t, numPartition);
+
+    CHECKED_MALLOC(m_trIdx, uint8_t, numPartition);
+    CHECKED_MALLOC(m_transformSkip[0], uint8_t, numPartition);
+    CHECKED_MALLOC(m_transformSkip[1], uint8_t, numPartition);
+    CHECKED_MALLOC(m_transformSkip[2], uint8_t, numPartition);
+
+    CHECKED_MALLOC(m_cbf[0], uint8_t, numPartition);
+    CHECKED_MALLOC(m_cbf[1], uint8_t, numPartition);
+    CHECKED_MALLOC(m_cbf[2], uint8_t, 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));
-    CHECKED_MALLOC(m_trCoeffCr, TCoeff, (width >> m_hChromaShift) * (height >> m_vChromaShift));
+    CHECKED_MALLOC(m_trCoeffY, coeff_t, width * height);
+    CHECKED_MALLOC(m_trCoeffCb, coeff_t, (width >> m_hChromaShift) * (height >> m_vChromaShift));
+    CHECKED_MALLOC(m_trCoeffCr, coeff_t, (width >> m_hChromaShift) * (height >> m_vChromaShift));
 
     CHECKED_MALLOC(m_iPCMFlags, bool, numPartition);
-    CHECKED_MALLOC(m_iPCMSampleY, Pel, width * height);
-    CHECKED_MALLOC(m_iPCMSampleCb, Pel, (width >> m_hChromaShift) * (height >> m_vChromaShift));
-    CHECKED_MALLOC(m_iPCMSampleCr, Pel, (width >> m_hChromaShift) * (height >> m_vChromaShift));
+    CHECKED_MALLOC(m_iPCMSampleY, pixel, width * height);
+    CHECKED_MALLOC(m_iPCMSampleCb, pixel, (width >> m_hChromaShift) * (height >> m_vChromaShift));
+    CHECKED_MALLOC(m_iPCMSampleCr, pixel, (width >> m_hChromaShift) * (height >> m_vChromaShift));
 
     memset(m_partSizes, SIZE_NONE, numPartition * sizeof(*m_partSizes));
     return ok;
@@ -269,9 +269,9 @@ void TComDataCU::initCU(TComPic* pic, ui
         // TODO: can be remove, but I haven't data to verify it, remove later
         if (getSlice()->getSPS()->getUsePCM())
         {
-            memset(m_iPCMSampleY, 0, sizeof(Pel) * y_tmp);
-            memset(m_iPCMSampleCb, 0, sizeof(Pel) * c_tmp);
-            memset(m_iPCMSampleCr, 0, sizeof(Pel) * c_tmp);
+            memset(m_iPCMSampleY, 0, sizeof(pixel) * y_tmp);
+            memset(m_iPCMSampleCb, 0, sizeof(pixel) * c_tmp);
+            memset(m_iPCMSampleCr, 0, sizeof(pixel) * c_tmp);
         }
     }
 
@@ -330,7 +330,7 @@ void TComDataCU::initEstData(uint32_t de
     m_totalDistortion  = 0;
     m_totalBits        = 0;
 
-    UChar cuSize = g_maxCUSize >> depth;
+    uint8_t cuSize = g_maxCUSize >> depth;
 
     for (uint32_t i = 0; i < m_numPartitions; i++)
     {
@@ -366,7 +366,7 @@ void TComDataCU::initEstData(uint32_t de
     m_totalDistortion  = 0;
     m_totalBits        = 0;
 
-    UChar cuSize = g_maxCUSize >> depth;
+    uint8_t cuSize = g_maxCUSize >> depth;
 
     for (uint32_t i = 0; i < m_numPartitions; i++)
     {
@@ -421,7 +421,7 @@ void TComDataCU::initSubCU(TComDataCU* c
         m_count[i] = cu->m_count[i];
     }
 
-    int iSizeInUchar = sizeof(UChar) * m_numPartitions;
+    int iSizeInUchar = sizeof(uint8_t) * m_numPartitions;
     int iSizeInBool  = sizeof(bool) * m_numPartitions;
 
     int sizeInChar = sizeof(char) * m_numPartitions;
@@ -440,7 +440,7 @@ void TComDataCU::initSubCU(TComDataCU* c
     memset(m_cbf[2],          0, iSizeInUchar);
     memset(m_depth, depth, iSizeInUchar);
 
-    UChar cuSize = g_maxCUSize >> depth;
+    uint8_t cuSize = g_maxCUSize >> depth;
     memset(m_cuSize,    cuSize,  iSizeInUchar);
     memset(m_iPCMFlags, 0, iSizeInBool);
     for (uint32_t i = 0; i < m_numPartitions; i++)
@@ -490,7 +490,7 @@ void TComDataCU::initSubCU(TComDataCU* c
         m_count[i] = cu->m_count[i];
     }
 
-    int iSizeInUchar = sizeof(UChar) * m_numPartitions;
+    int iSizeInUchar = sizeof(uint8_t) * m_numPartitions;
     int iSizeInBool  = sizeof(bool) * m_numPartitions;
 
     int sizeInChar = sizeof(char) * m_numPartitions;
@@ -509,7 +509,7 @@ void TComDataCU::initSubCU(TComDataCU* c
     memset(m_cbf[2],          0, iSizeInUchar);
     memset(m_depth, depth, iSizeInUchar);
 
-    UChar cuSize = g_maxCUSize >> depth;
+    uint8_t cuSize = g_maxCUSize >> depth;
     memset(m_cuSize,    cuSize,  iSizeInUchar);
     memset(m_iPCMFlags, 0, iSizeInBool);
     for (uint32_t i = 0; i < m_numPartitions; i++)
@@ -554,7 +554,7 @@ void TComDataCU::copyToSubCU(TComDataCU*
     m_numPartitions    = cu->getTotalNumPart() >> 2;
 
     TComDataCU* rpcCU = m_pic->getCU(m_cuAddr);
-    int iSizeInUchar  = sizeof(UChar) * m_numPartitions;
+    int iSizeInUchar  = sizeof(uint8_t) * m_numPartitions;
     int sizeInChar  = sizeof(char) * m_numPartitions;
 
     memcpy(m_skipFlag, rpcCU->getSkipFlag() + m_absIdxInLCU, sizeof(*m_skipFlag) * m_numPartitions);
@@ -586,7 +586,7 @@ void TComDataCU::copyPartFrom(TComDataCU
     uint32_t offset         = cu->getTotalNumPart() * partUnitIdx;
 
     uint32_t numPartition = cu->getTotalNumPart();
-    int iSizeInUchar  = sizeof(UChar) * numPartition;
+    int iSizeInUchar  = sizeof(uint8_t) * numPartition;
     int iSizeInBool   = sizeof(bool) * numPartition;
 
     int sizeInChar  = sizeof(char) * numPartition;
@@ -629,20 +629,20 @@ void TComDataCU::copyPartFrom(TComDataCU
 
     uint32_t tmp  = g_maxCUSize * g_maxCUSize >> (depth << 1);
     uint32_t tmp2 = partUnitIdx * tmp;
-    memcpy(m_trCoeffY  + tmp2, cu->getCoeffY(),  sizeof(TCoeff) * tmp);
-    memcpy(m_iPCMSampleY + tmp2, cu->getPCMSampleY(), sizeof(Pel) * tmp);
+    memcpy(m_trCoeffY  + tmp2, cu->getCoeffY(),  sizeof(coeff_t) * tmp);
+    memcpy(m_iPCMSampleY + tmp2, cu->getPCMSampleY(), sizeof(pixel) * tmp);
 
     tmp  = (g_maxCUSize >> m_hChromaShift) * (g_maxCUSize >> m_vChromaShift) >> (depth << 1);
     tmp2 = partUnitIdx * tmp;
-    memcpy(m_trCoeffCb + tmp2, cu->getCoeffCb(), sizeof(TCoeff) * tmp);
-    memcpy(m_trCoeffCr + tmp2, cu->getCoeffCr(), sizeof(TCoeff) * tmp);
-    memcpy(m_iPCMSampleCb + tmp2, cu->getPCMSampleCb(), sizeof(Pel) * tmp);
-    memcpy(m_iPCMSampleCr + tmp2, cu->getPCMSampleCr(), sizeof(Pel) * tmp);
+    memcpy(m_trCoeffCb + tmp2, cu->getCoeffCb(), sizeof(coeff_t) * tmp);
+    memcpy(m_trCoeffCr + tmp2, cu->getCoeffCr(), sizeof(coeff_t) * tmp);
+    memcpy(m_iPCMSampleCb + tmp2, cu->getPCMSampleCb(), sizeof(pixel) * tmp);
+    memcpy(m_iPCMSampleCr + tmp2, cu->getPCMSampleCr(), sizeof(pixel) * tmp);
 }
 
 // Copy current predicted part to a CU in picture.
 // It is used to predict for next part
-void TComDataCU::copyToPic(UChar uhDepth)
+void TComDataCU::copyToPic(uint8_t uhDepth)
 {
     TComDataCU* rpcCU = m_pic->getCU(m_cuAddr);
 
@@ -650,7 +650,7 @@ void TComDataCU::copyToPic(UChar uhDepth
     rpcCU->m_totalDistortion = m_totalDistortion;
     rpcCU->m_totalBits       = m_totalBits;
 
-    int iSizeInUchar  = sizeof(UChar) * m_numPartitions;
+    int iSizeInUchar  = sizeof(uint8_t) * m_numPartitions;
     int iSizeInBool   = sizeof(bool) * m_numPartitions;
 
     int sizeInChar  = sizeof(char) * m_numPartitions;
@@ -688,21 +688,21 @@ void TComDataCU::copyToPic(UChar uhDepth
 
     uint32_t tmp  = (g_maxCUSize * g_maxCUSize) >> (uhDepth << 1);
     uint32_t tmp2 = m_absIdxInLCU * m_pic->getMinCUSize() * m_pic->getMinCUSize();
-    memcpy(rpcCU->getCoeffY()     + tmp2, m_trCoeffY,    sizeof(TCoeff) * tmp);
-    memcpy(rpcCU->getPCMSampleY() + tmp2, m_iPCMSampleY, sizeof(Pel) * tmp);
+    memcpy(rpcCU->getCoeffY()     + tmp2, m_trCoeffY,    sizeof(coeff_t) * tmp);
+    memcpy(rpcCU->getPCMSampleY() + tmp2, m_iPCMSampleY, sizeof(pixel) * tmp);
     tmp  = ((g_maxCUSize >> m_hChromaShift) * (g_maxCUSize >> m_vChromaShift)) >> (uhDepth << 1);
     tmp2 = m_absIdxInLCU * (m_pic->getMinCUSize() >> m_hChromaShift) * (m_pic->getMinCUSize() >> m_vChromaShift);
-    memcpy(rpcCU->getCoeffCb() + tmp2, m_trCoeffCb, sizeof(TCoeff) * tmp);
-    memcpy(rpcCU->getCoeffCr() + tmp2, m_trCoeffCr, sizeof(TCoeff) * tmp);
-    memcpy(rpcCU->getPCMSampleCb() + tmp2, m_iPCMSampleCb, sizeof(Pel) * tmp);
-    memcpy(rpcCU->getPCMSampleCr() + tmp2, m_iPCMSampleCr, sizeof(Pel) * tmp);
+    memcpy(rpcCU->getCoeffCb() + tmp2, m_trCoeffCb, sizeof(coeff_t) * tmp);
+    memcpy(rpcCU->getCoeffCr() + tmp2, m_trCoeffCr, sizeof(coeff_t) * tmp);
+    memcpy(rpcCU->getPCMSampleCb() + tmp2, m_iPCMSampleCb, sizeof(pixel) * tmp);
+    memcpy(rpcCU->getPCMSampleCr() + tmp2, m_iPCMSampleCr, sizeof(pixel) * tmp);
 }
 
-void TComDataCU::copyCodedToPic(UChar depth)
+void TComDataCU::copyCodedToPic(uint8_t depth)
 {
     TComDataCU* rpcCU = m_pic->getCU(m_cuAddr);
 
-    int iSizeInUchar  = sizeof(UChar) * m_numPartitions;
+    int iSizeInUchar  = sizeof(uint8_t) * m_numPartitions;
 
     memcpy(rpcCU->getSkipFlag() + m_absIdxInLCU, m_skipFlag, sizeof(*m_skipFlag) * m_numPartitions);
     memcpy(rpcCU->getTransformIdx() + m_absIdxInLCU, m_trIdx, iSizeInUchar);
@@ -718,15 +718,15 @@ void TComDataCU::copyCodedToPic(UChar de
 
     uint32_t tmp  = (g_maxCUSize * g_maxCUSize) >> (depth << 1);
     uint32_t tmp2 = m_absIdxInLCU * m_pic->getMinCUSize() * m_pic->getMinCUSize();
-    memcpy(rpcCU->getCoeffY() + tmp2, m_trCoeffY, sizeof(TCoeff) * tmp);
+    memcpy(rpcCU->getCoeffY() + tmp2, m_trCoeffY, sizeof(coeff_t) * tmp);
 
     tmp  = ((g_maxCUSize >> m_hChromaShift) * (g_maxCUSize >> m_hChromaShift)) >> (depth << 1);


More information about the x265-commits mailing list