[x265-commits] [x265] CleanUps: Replacing Short with int16_t

Murugan murugan at multicorewareinc.com
Fri Oct 25 23:45:45 CEST 2013


details:   http://hg.videolan.org/x265/rev/2126b735949e
branches:  
changeset: 4684:2126b735949e
user:      Murugan <murugan at multicorewareinc.com>
date:      Fri Oct 25 14:11:53 2013 +0530
description:
CleanUps: Replacing Short with int16_t
Subject: [x265] Merged in mcwmurugan/x265 (pull request #5)

details:   http://hg.videolan.org/x265/rev/4ced02a9a5b2
branches:  
changeset: 4685:4ced02a9a5b2
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:11:30 2013 -0500
description:
Merged in mcwmurugan/x265 (pull request #5)

CleanUps: Replacing Short with int16_t
Subject: [x265] encoder: calculate encoded video time in floating point

details:   http://hg.videolan.org/x265/rev/9c26397ec80c
branches:  stable
changeset: 4686:9c26397ec80c
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 14:49:52 2013 -0500
description:
encoder: calculate encoded video time in floating point
Subject: [x265] cli: improve handling of unknown input frame count

details:   http://hg.videolan.org/x265/rev/0c8e2580b410
branches:  stable
changeset: 4687:0c8e2580b410
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 14:50:26 2013 -0500
description:
cli: improve handling of unknown input frame count
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/4cdd80a730ab
branches:  
changeset: 4688:4cdd80a730ab
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 14:51:15 2013 -0500
description:
Merge with stable
Subject: [x265] Merge

details:   http://hg.videolan.org/x265/rev/4d024982658d
branches:  
changeset: 4689:4d024982658d
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:14:15 2013 -0500
description:
Merge
Subject: [x265] cmake: improve .hg_archive parsing

details:   http://hg.videolan.org/x265/rev/7dff7b61898c
branches:  
changeset: 4690:7dff7b61898c
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:09:55 2013 -0500
description:
cmake: improve .hg_archive parsing

Patch submitted by HaaeeD via pull request
Subject: [x265] yuv: fix --skip behavior for stdin

details:   http://hg.videolan.org/x265/rev/565abe18280a
branches:  
changeset: 4691:565abe18280a
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:32:05 2013 -0500
description:
yuv: fix --skip behavior for stdin
Subject: [x265] input: prevent more deadlocks on file read errors

details:   http://hg.videolan.org/x265/rev/12d6ba61b235
branches:  
changeset: 4692:12d6ba61b235
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:47:03 2013 -0500
description:
input: prevent more deadlocks on file read errors
Subject: [x265] encoder: prevent divide by zero in elapsedVideoTime calculation

details:   http://hg.videolan.org/x265/rev/824ede6074a6
branches:  
changeset: 4693:824ede6074a6
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 15:49:46 2013 -0500
description:
encoder: prevent divide by zero in elapsedVideoTime calculation
Subject: [x265] cli: improve handling of encoder start failures; no pictures encoded

details:   http://hg.videolan.org/x265/rev/8606211480ea
branches:  
changeset: 4694:8606211480ea
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 16:12:06 2013 -0500
description:
cli: improve handling of encoder start failures; no pictures encoded
Subject: [x265] input: do not use ifstream.good(), use ifstream.ignore() for skipFrames

details:   http://hg.videolan.org/x265/rev/bc044398a2c1
branches:  
changeset: 4695:bc044398a2c1
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 16:14:30 2013 -0500
description:
input: do not use ifstream.good(), use ifstream.ignore() for skipFrames
Subject: [x265] yuv: set binary mode on stdin on Windows

details:   http://hg.videolan.org/x265/rev/34573a44f81d
branches:  
changeset: 4696:34573a44f81d
user:      Steve Borho <steve at borho.org>
date:      Fri Oct 25 16:44:42 2013 -0500
description:
yuv: set binary mode on stdin on Windows

diffstat:

 source/Lib/TLibCommon/NAL.h                        |   32 ---
 source/Lib/TLibCommon/TComLoopFilter.cpp           |   32 +-
 source/Lib/TLibCommon/TComPicYuv.cpp               |    2 +-
 source/Lib/TLibCommon/TComPrediction.cpp           |    8 +-
 source/Lib/TLibCommon/TComPrediction.h             |    2 +-
 source/Lib/TLibCommon/TComRom.cpp                  |   12 +-
 source/Lib/TLibCommon/TComRom.h                    |   12 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp |    2 +-
 source/Lib/TLibCommon/TComTrQuant.cpp              |   12 +-
 source/Lib/TLibCommon/TComTrQuant.h                |    8 +-
 source/Lib/TLibCommon/TComWeightPrediction.cpp     |   26 +-
 source/Lib/TLibCommon/TComYuv.cpp                  |   38 ++--
 source/Lib/TLibCommon/TypeDef.h                    |    2 +-
 source/Lib/TLibEncoder/TEncCu.cpp                  |    5 -
 source/Lib/TLibEncoder/TEncCu.h                    |    3 -
 source/Lib/TLibEncoder/TEncSearch.cpp              |   58 +++---
 source/Lib/TLibEncoder/TEncSearch.h                |    2 +-
 source/cmake/version.cmake                         |   10 +-
 source/common/TShortYUV.cpp                        |   92 ++++----
 source/common/TShortYUV.h                          |   24 +-
 source/common/dct.cpp                              |  196 ++++++++++----------
 source/common/intrapred.cpp                        |    2 +-
 source/common/ipfilter.cpp                         |   51 ++--
 source/common/pixel.cpp                            |   48 ++--
 source/common/primitives.h                         |   42 ++--
 source/common/vec/blockcopy-sse3.cpp               |   14 +-
 source/common/vec/dct-sse3.cpp                     |   16 +-
 source/common/vec/dct-sse41.cpp                    |    4 +-
 source/common/vec/dct-ssse3.cpp                    |   22 +-
 source/common/vec/intra-ssse3.cpp                  |    4 +-
 source/common/vec/ipfilter-sse41.cpp               |   36 +-
 source/common/vec/ipfilter-ssse3.cpp               |   18 +-
 source/common/vec/pixel-sse3.cpp                   |   28 +-
 source/common/vec/pixel-sse41.cpp                  |   34 +-
 source/common/x86/ipfilter8.h                      |    3 +-
 source/common/x86/pixel.h                          |    2 +-
 source/encoder/encoder.cpp                         |   10 +-
 source/encoder/motion.cpp                          |    2 +-
 source/encoder/motion.h                            |    2 +-
 source/encoder/ratecontrol.cpp                     |    4 +-
 source/input/y4m.cpp                               |   26 +-
 source/input/yuv.cpp                               |   85 ++++++--
 source/input/yuv.h                                 |    6 +-
 source/output/y4m.cpp                              |    6 +-
 source/output/yuv.cpp                              |    6 +-
 source/test/intrapredharness.cpp                   |    2 +-
 source/test/ipfilterharness.cpp                    |   30 +-
 source/test/ipfilterharness.h                      |    4 +-
 source/test/mbdstharness.cpp                       |   12 +-
 source/test/mbdstharness.h                         |    2 +-
 source/test/pixelharness.cpp                       |   76 ++++----
 source/test/pixelharness.h                         |    2 +-
 source/x265.cpp                                    |   61 +++--
 53 files changed, 633 insertions(+), 605 deletions(-)

diffs (truncated from 3810 to 300 lines):

diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/NAL.h
--- a/source/Lib/TLibCommon/NAL.h	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/NAL.h	Fri Oct 25 16:44:42 2013 -0500
@@ -63,38 +63,6 @@ struct NALUnit
 
     /** default constructor - no initialization; must be perfomed by user */
     NALUnit() {}
-
-    /** returns true if the NALunit is a slice NALunit */
-    bool isSlice()
-    {
-        return m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA_R
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_R
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_N
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N
-               || m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R;
-    }
-
-    bool isSei()
-    {
-        return m_nalUnitType == NAL_UNIT_PREFIX_SEI
-               || m_nalUnitType == NAL_UNIT_SUFFIX_SEI;
-    }
-
-    bool isVcl()
-    {
-        return (UInt)m_nalUnitType < 32;
-    }
 };
 
 struct OutputNALUnit;
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComLoopFilter.cpp
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -763,14 +763,14 @@ inline void TComLoopFilter::xPelFilterLu
 {
     int delta;
 
-    short m4  = (short)src[0];
-    short m3  = (short)src[-offset];
-    short m5  = (short)src[offset];
-    short m2  = (short)src[-offset * 2];
-    short m6  = (short)src[offset * 2];
-    short m1  = (short)src[-offset * 3];
-    short m7  = (short)src[offset * 3];
-    short m0  = (short)src[-offset * 4];
+    int16_t m4  = (int16_t)src[0];
+    int16_t m3  = (int16_t)src[-offset];
+    int16_t m5  = (int16_t)src[offset];
+    int16_t m2  = (int16_t)src[-offset * 2];
+    int16_t m6  = (int16_t)src[offset * 2];
+    int16_t m1  = (int16_t)src[-offset * 3];
+    int16_t m7  = (int16_t)src[offset * 3];
+    int16_t m0  = (int16_t)src[-offset * 4];
 
     if (sw)
     {
@@ -833,10 +833,10 @@ inline void TComLoopFilter::xPelFilterCh
 {
     int delta;
 
-    short m4  = (short)src[0];
-    short m3  = (short)src[-offset];
-    short m5  = (short)src[offset];
-    short m2  = (short)src[-offset * 2];
+    int16_t m4  = (int16_t)src[0];
+    int16_t m3  = (int16_t)src[-offset];
+    int16_t m5  = (int16_t)src[offset];
+    int16_t m2  = (int16_t)src[-offset * 2];
 
     delta = Clip3(-tc, tc, ((((m4 - m3) << 2) + m2 - m5 + 4) >> 3));
     src[-offset] = (Pel)ClipC(m3 + delta);
@@ -863,10 +863,10 @@ inline void TComLoopFilter::xPelFilterCh
  */
 inline bool TComLoopFilter::xUseStrongFiltering(int offset, int d, int beta, int tc, Pel* src)
 {
-    short m4  = (short)src[0];
-    short m3  = (short)src[-offset];
-    short m7  = (short)src[offset * 3];
-    short m0  = (short)src[-offset * 4];
+    int16_t m4  = (int16_t)src[0];
+    int16_t m3  = (int16_t)src[-offset];
+    int16_t m7  = (int16_t)src[offset * 3];
+    int16_t m0  = (int16_t)src[-offset * 4];
 
     int d_strong = abs(m0 - m3) + abs(m7 - m4);
 
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComPicYuv.cpp
--- a/source/Lib/TLibCommon/TComPicYuv.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComPicYuv.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -76,7 +76,7 @@ void TComPicYuv::create(int picWidth, in
     m_numCuInHeight = (m_picHeight + m_cuHeight - 1) / m_cuHeight;
 
     m_lumaMarginX = g_maxCUWidth  + 32; // search margin and 8-tap filter half-length, padded for 32-byte alignment
-    m_lumaMarginY = g_maxCUHeight + 4;  // search margin and 8-tap filter half-length
+    m_lumaMarginY = g_maxCUHeight + 16; // search margin plus 8 plus 8-tap filter half-length, rounded to 16
     m_stride = (m_numCuInWidth * g_maxCUWidth) + (m_lumaMarginX << 1);
 
     m_chromaMarginX = m_lumaMarginX;    // keep 16-byte alignment for chroma CTUs
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -131,7 +131,7 @@ void TComPrediction::initTempBuff()
         m_predShortYuv[1].create(MAX_CU_SIZE, MAX_CU_SIZE);
 
         m_predTempYuv.create(MAX_CU_SIZE, MAX_CU_SIZE);
-        m_immedVals = (short*)X265_MALLOC(short, 64 * (64 + NTAPS_LUMA - 1));
+        m_immedVals = (int16_t*)X265_MALLOC(int16_t, 64 * (64 + NTAPS_LUMA - 1));
     }
 
     if (m_lumaRecStride != (MAX_CU_SIZE >> 1) + 1)
@@ -511,7 +511,7 @@ void TComPrediction::xPredInterLumaBlk(T
     Pel *ref      =  refPic->getLumaAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
 
     int dstStride = dstPic->m_width;
-    short *dst    = dstPic->getLumaAddr(partAddr);
+    int16_t *dst    = dstPic->getLumaAddr(partAddr);
 
     int xFrac = mv->x & 0x3;
     int yFrac = mv->y & 0x3;
@@ -608,8 +608,8 @@ void TComPrediction::xPredInterChromaBlk
     Pel* refCb = refPic->getCbAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
     Pel* refCr = refPic->getCrAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;
 
-    short* dstCb = dstPic->getCbAddr(partAddr);
-    short* dstCr = dstPic->getCrAddr(partAddr);
+    int16_t* dstCb = dstPic->getCbAddr(partAddr);
+    int16_t* dstCr = dstPic->getCrAddr(partAddr);
 
     int xFrac = mv->x & 0x7;
     int yFrac = mv->y & 0x7;
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComPrediction.h
--- a/source/Lib/TLibCommon/TComPrediction.h	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComPrediction.h	Fri Oct 25 16:44:42 2013 -0500
@@ -79,7 +79,7 @@ protected:
     /* This holds intermediate values for filtering operations which need to maintain short precision */
     TShortYUV m_filteredBlockTmp[4];
 
-    short*    m_immedVals;
+    int16_t*    m_immedVals;
     Pel*      m_lumaRecBuffer; ///< array for down-sampled reconstructed luma sample
     int       m_lumaRecStride; ///< stride of m_lumaRecBuffer
 
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComRom.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -172,7 +172,7 @@ void initRasterToPelXY(UInt maxCUWidth, 
     }
 }
 
-const short g_lumaFilter[4][NTAPS_LUMA] =
+const int16_t g_lumaFilter[4][NTAPS_LUMA] =
 {
     {  0, 0,   0, 64,  0,   0, 0,  0 },
     { -1, 4, -10, 58, 17,  -5, 1,  0 },
@@ -180,7 +180,7 @@ const short g_lumaFilter[4][NTAPS_LUMA] 
     {  0, 1,  -5, 17, 58, -10, 4, -1 }
 };
 
-const short g_chromaFilter[8][NTAPS_CHROMA] =
+const int16_t g_chromaFilter[8][NTAPS_CHROMA] =
 {
     {  0, 64,  0,  0 },
     { -2, 58, 10, -2 },
@@ -202,7 +202,7 @@ int g_invQuantScales[6] =
     40, 45, 51, 57, 64, 72
 };
 
-const short g_t4[4][4] =
+const int16_t g_t4[4][4] =
 {
     { 64, 64, 64, 64 },
     { 83, 36, -36, -83 },
@@ -210,7 +210,7 @@ const short g_t4[4][4] =
     { 36, -83, 83, -36 }
 };
 
-const short g_t8[8][8] =
+const int16_t g_t8[8][8] =
 {
     { 64, 64, 64, 64, 64, 64, 64, 64 },
     { 89, 75, 50, 18, -18, -50, -75, -89 },
@@ -222,7 +222,7 @@ const short g_t8[8][8] =
     { 18, -50, 75, -89, 89, -75, 50, -18 }
 };
 
-const short g_t16[16][16] =
+const int16_t g_t16[16][16] =
 {
     { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 },
     { 90, 87, 80, 70, 57, 43, 25,  9, -9, -25, -43, -57, -70, -80, -87, -90 },
@@ -242,7 +242,7 @@ const short g_t16[16][16] =
     {  9, -25, 43, -57, 70, -80, 87, -90, 90, -87, 80, -70, 57, -43, 25, -9 }
 };
 
-const short g_t32[32][32] =
+const int16_t g_t32[32][32] =
 {
     { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 },
     { 90, 90, 88, 85, 82, 78, 73, 67, 61, 54, 46, 38, 31, 22, 13,  4, -4, -13, -22, -31, -38, -46, -54, -61, -67, -73, -78, -82, -85, -88, -90, -90 },
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComRom.h
--- a/source/Lib/TLibCommon/TComRom.h	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComRom.h	Fri Oct 25 16:44:42 2013 -0500
@@ -106,10 +106,10 @@ extern UInt g_puOffset[8];
 
 extern int g_quantScales[6];     // Q(QP%6)
 extern int g_invQuantScales[6];  // IQ(QP%6)
-extern const short g_t4[4][4];
-extern const short g_t8[8][8];
-extern const short g_t16[16][16];
-extern const short g_t32[32][32];
+extern const int16_t g_t4[4][4];
+extern const int16_t g_t8[8][8];
+extern const int16_t g_t16[16][16];
+extern const int16_t g_t32[32][32];
 
 // ====================================================================================================================
 // Subpel interpolation defines and constants
@@ -121,8 +121,8 @@ extern const short g_t32[32][32];
 #define IF_FILTER_PREC    6                            ///< Log2 of sum of filter taps
 #define IF_INTERNAL_OFFS (1 << (IF_INTERNAL_PREC - 1)) ///< Offset used internally
 
-extern const short g_lumaFilter[4][NTAPS_LUMA];     ///< Luma filter taps
-extern const short g_chromaFilter[8][NTAPS_CHROMA]; ///< Chroma filter taps
+extern const int16_t g_lumaFilter[4][NTAPS_LUMA];     ///< Luma filter taps
+extern const int16_t g_chromaFilter[8][NTAPS_CHROMA]; ///< Chroma filter taps
 
 // ====================================================================================================================
 // Luma QP to Chroma QP mapping
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -199,7 +199,7 @@ void TComSampleAdaptiveOffset::create(UI
     m_upBuff1++;
     m_upBuff2++;
     m_upBufft++;
-    short i;
+    int16_t i;
 
     UInt maxY  = (1 << X265_DEPTH) - 1;
     UInt minY  = 0;
diff -r 4ca4da7bdd36 -r 34573a44f81d source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Fri Oct 25 16:44:42 2013 -0500
@@ -339,7 +339,7 @@ void TComTrQuant::init(UInt maxTrSize, i
 }
 
 UInt TComTrQuant::transformNxN(TComDataCU* cu,
-                               short*      residual,
+                               int16_t*      residual,
                                UInt        stride,
                                TCoeff*     coeff,
                                UInt        width,
@@ -356,7 +356,7 @@ UInt TComTrQuant::transformNxN(TComDataC
         {
             for (UInt j = 0; j < width; j++)
             {
-                coeff[k * width + j] = ((short)residual[k * stride + j]);
+                coeff[k * width + j] = ((int16_t)residual[k * stride + j]);
                 absSum += abs(residual[k * stride + j]);
             }
         }
@@ -388,7 +388,7 @@ UInt TComTrQuant::transformNxN(TComDataC
     return xQuant(cu, m_tmpCoeff, coeff, width, height, ttype, absPartIdx, lastPos);
 }
 
-void TComTrQuant::invtransformNxN(bool transQuantBypass, UInt mode, short* residual, UInt stride, TCoeff* coeff, UInt width, UInt height, int scalingListType, bool useTransformSkip, int lastPos)
+void TComTrQuant::invtransformNxN(bool transQuantBypass, UInt mode, int16_t* residual, UInt stride, TCoeff* coeff, UInt width, UInt height, int scalingListType, bool useTransformSkip, int lastPos)
 {
     if (transQuantBypass)
     {
@@ -396,7 +396,7 @@ void TComTrQuant::invtransformNxN(bool t
         {
             for (UInt j = 0; j < width; j++)
             {
-                residual[k * stride + j] = (short)(coeff[k * width + j]);
+                residual[k * stride + j] = (int16_t)(coeff[k * width + j]);
             }
         }
 
@@ -450,7 +450,7 @@ void TComTrQuant::invtransformNxN(bool t
  *  \param stride stride of input residual data
  *  \param size transform size (size x size)
  */
-void TComTrQuant::xTransformSkip(short* resiBlock, UInt stride, int* coeff, int width, int height)
+void TComTrQuant::xTransformSkip(int16_t* resiBlock, UInt stride, int* coeff, int width, int height)
 {
     assert(width == height);
     UInt log2TrSize = g_convertToBit[width] + 2;


More information about the x265-commits mailing list