[x265-commits] [x265] bpyramid: Support for b-pyramid with b-adapt 0

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Nov 20 20:18:01 CET 2013


details:   http://hg.videolan.org/x265/rev/8e9c965648f6
branches:  
changeset: 5174:8e9c965648f6
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Wed Nov 20 14:26:43 2013 +0530
description:
bpyramid: Support for b-pyramid with b-adapt 0

Test results for reference when enable and disable the b-pyramid with b-adapt=0

Cli option :  --bframes=10 --b-adapt=0 --b-pyramid=1 -f 100
Enable  B-references  : --b-pyramid=1
Disable B-references  : --b-pyramid=0

Results:
Enable / Disable

clip - BasketballDrive_1920x1080_50
Total time taken - 57.84s (1.73 fps) / 51.74s (1.93 fps)
Bitrates - 4725.37 / 5660.68
PSNR     - 37.178 / 37.178


Clip - Cactus_1920x1080_50
Total time taken - 41.90s (2.39 fps) / 47.08s (2.12 fps)
Bitrates - 3800.62 / 4838.73
PSNR     - 35.640 / 35.615


Clip - Johnny_1280x720_60
Total time taken - 10.41s (9.61 fps) / 10.34s (9.67 fps)
Bitrates - 327.21 / 383.25
PSNR     - 40.674 / 40.631

Clip - FourPeople_1280x720_60
Total time taken - 10.72s (9.33 fps) / 10.18s (9.82 fps)
Bitrates - 547.18 / 640.88
PSNR     - 39.808 / 39.789
Subject: [x265] asm: cleanup routines of transpose module for 4x4, 8x8 and 16x16

details:   http://hg.videolan.org/x265/rev/fe81ba733564
branches:  
changeset: 5175:fe81ba733564
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Wed Nov 20 15:13:48 2013 +0530
description:
asm: cleanup routines of transpose module for 4x4, 8x8 and 16x16
Subject: [x265] asm: code for transpose_32x32 routine

details:   http://hg.videolan.org/x265/rev/6c9d7641bdca
branches:  
changeset: 5176:6c9d7641bdca
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Wed Nov 20 17:51:20 2013 +0530
description:
asm: code for transpose_32x32 routine
Subject: [x265] asm: assembly code for quant

details:   http://hg.videolan.org/x265/rev/63b9ba51bac0
branches:  
changeset: 5177:63b9ba51bac0
user:      Min Chen <chenm003 at 163.com>
date:      Wed Nov 20 15:20:29 2013 +0800
description:
asm: assembly code for quant
Subject: [x265] vec: drop intrinsic transpose primitives, we have assembly code

details:   http://hg.videolan.org/x265/rev/7a154e9fccbd
branches:  
changeset: 5178:7a154e9fccbd
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 11:46:19 2013 -0600
description:
vec: drop intrinsic transpose primitives, we have assembly code
Subject: [x265] vec: drop intrinsic quant primitive, we have assembly code

details:   http://hg.videolan.org/x265/rev/5e18a1158c5f
branches:  
changeset: 5179:5e18a1158c5f
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 11:48:01 2013 -0600
description:
vec: drop intrinsic quant primitive, we have assembly code
Subject: [x265] primitive: remove unused cvt16to16_shl

details:   http://hg.videolan.org/x265/rev/174bd2b5e652
branches:  
changeset: 5180:174bd2b5e652
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 11:52:09 2013 -0600
description:
primitive: remove unused cvt16to16_shl
Subject: [x265] asm: assembly code for IntraPred_DC[4x4]

details:   http://hg.videolan.org/x265/rev/172b66a79401
branches:  
changeset: 5181:172b66a79401
user:      Min Chen <chenm003 at 163.com>
date:      Wed Nov 20 15:20:40 2013 +0800
description:
asm: assembly code for IntraPred_DC[4x4]
Subject: [x265] asm: assembly code for pixel_sa8d_32x32

details:   http://hg.videolan.org/x265/rev/357c693f8888
branches:  
changeset: 5182:357c693f8888
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 13:36:03 2013 +0530
description:
asm: assembly code for pixel_sa8d_32x32
Subject: [x265] asm: assembly code for pixel_sa8d_64x64

details:   http://hg.videolan.org/x265/rev/ef1a9a583c4a
branches:  
changeset: 5183:ef1a9a583c4a
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 17:08:22 2013 +0530
description:
asm: assembly code for pixel_sa8d_64x64
Subject: [x265] asm: assembly code for pixel_sa8d_32x16

details:   http://hg.videolan.org/x265/rev/bd44cdfcbba8
branches:  
changeset: 5184:bd44cdfcbba8
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 17:52:22 2013 +0530
description:
asm: assembly code for pixel_sa8d_32x16
Subject: [x265] asm: assembly code for pixel_sa8d_16x32

details:   http://hg.videolan.org/x265/rev/cbf8720197fb
branches:  
changeset: 5185:cbf8720197fb
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 18:34:34 2013 +0530
description:
asm: assembly code for pixel_sa8d_16x32
Subject: [x265] asm: assembly code for pixel_sa8d_64x32

details:   http://hg.videolan.org/x265/rev/aa44b552bdd4
branches:  
changeset: 5186:aa44b552bdd4
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 19:06:26 2013 +0530
description:
asm: assembly code for pixel_sa8d_64x32
Subject: [x265] asm: assembly code for pixel_sa8d_32x64

details:   http://hg.videolan.org/x265/rev/915bb51b6489
branches:  
changeset: 5187:915bb51b6489
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Nov 20 19:32:36 2013 +0530
description:
asm: assembly code for pixel_sa8d_32x64
Subject: [x265] asm: white-space nits

details:   http://hg.videolan.org/x265/rev/e3f82c9daafb
branches:  
changeset: 5188:e3f82c9daafb
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 12:06:55 2013 -0600
description:
asm: white-space nits
Subject: [x265] TypeDef: replace Int64 with int64_t

details:   http://hg.videolan.org/x265/rev/93f03580b998
branches:  
changeset: 5189:93f03580b998
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 12:27:36 2013 -0600
description:
TypeDef: replace Int64 with int64_t
Subject: [x265] TypeDef: replace UInt64 with uint64_t

details:   http://hg.videolan.org/x265/rev/58dfac0ab062
branches:  
changeset: 5190:58dfac0ab062
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 12:31:32 2013 -0600
description:
TypeDef: replace UInt64 with uint64_t
Subject: [x265] TEncBinCABAC: fix naming prefix convention of bIsCounter

details:   http://hg.videolan.org/x265/rev/0607aef383b7
branches:  
changeset: 5191:0607aef383b7
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 20 12:32:15 2013 -0600
description:
TEncBinCABAC: fix naming prefix convention of bIsCounter
Subject: [x265] added pixel_add_ps_c as a primitve

details:   http://hg.videolan.org/x265/rev/ec0758b3ecfa
branches:  
changeset: 5192:ec0758b3ecfa
user:      Praveen Tiwari
date:      Wed Nov 20 12:55:28 2013 +0530
description:
added pixel_add_ps_c as a primitve
Subject: [x265] unit test code for pixel_add_ps

details:   http://hg.videolan.org/x265/rev/59964c99aa17
branches:  
changeset: 5193:59964c99aa17
user:      Praveen Tiwari
date:      Wed Nov 20 12:57:57 2013 +0530
description:
unit test code for pixel_add_ps
Subject: [x265] asm code for pixeladd_ps_4x4 and testbench integration

details:   http://hg.videolan.org/x265/rev/a3e4cbbc63e1
branches:  
changeset: 5194:a3e4cbbc63e1
user:      Praveen Tiwari
date:      Wed Nov 20 17:15:15 2013 +0530
description:
asm code for pixeladd_ps_4x4 and testbench integration
Subject: [x265] asm code for pixel_add_ps, 4x8 and 4x16

details:   http://hg.videolan.org/x265/rev/2fe88d075204
branches:  
changeset: 5195:2fe88d075204
user:      Praveen Tiwari
date:      Wed Nov 20 17:37:14 2013 +0530
description:
asm code for pixel_add_ps, 4x8 and 4x16
Subject: [x265] pixeladd8.asm, int replaced with intptr_t for strides data type

details:   http://hg.videolan.org/x265/rev/0532a37e6a7e
branches:  
changeset: 5196:0532a37e6a7e
user:      Praveen Tiwari
date:      Wed Nov 20 18:36:02 2013 +0530
description:
pixeladd8.asm, int replaced with intptr_t for strides data type
Subject: [x265] added pixel_add_ps chroma function definitions

details:   http://hg.videolan.org/x265/rev/406c500c0b0d
branches:  
changeset: 5197:406c500c0b0d
user:      Praveen Tiwari
date:      Wed Nov 20 18:15:22 2013 +0530
description:
added pixel_add_ps chroma function definitions
Subject: [x265] pixel_add_pp: 4x8, 4x16, merged movd and pmovzxbw instructions

details:   http://hg.videolan.org/x265/rev/5fb3eae8a29d
branches:  
changeset: 5198:5fb3eae8a29d
user:      Praveen Tiwari
date:      Wed Nov 20 18:45:32 2013 +0530
description:
pixel_add_pp: 4x8, 4x16, merged movd and pmovzxbw instructions
Subject: [x265] pixel_add_pp_4x4, merged movd and pmovzxbw

details:   http://hg.videolan.org/x265/rev/bee92606b540
branches:  
changeset: 5199:bee92606b540
user:      Praveen Tiwari
date:      Wed Nov 20 18:40:59 2013 +0530
description:
pixel_add_pp_4x4, merged movd and pmovzxbw
Subject: [x265] asm code for pixel_add_ps_4x2

details:   http://hg.videolan.org/x265/rev/28e57d696b36
branches:  
changeset: 5200:28e57d696b36
user:      Praveen Tiwari
date:      Wed Nov 20 18:30:48 2013 +0530
description:
asm code for pixel_add_ps_4x2
Subject: [x265] pixel.h and primitives.h, int replaced with intptr_t

details:   http://hg.videolan.org/x265/rev/f07d8d18212b
branches:  
changeset: 5201:f07d8d18212b
user:      Praveen Tiwari
date:      Wed Nov 20 19:17:20 2013 +0530
description:
pixel.h and primitives.h, int replaced with intptr_t
Subject: [x265] pixel_add_ps_8x2, asm code

details:   http://hg.videolan.org/x265/rev/f65fbb5d2d44
branches:  
changeset: 5202:f65fbb5d2d44
user:      Praveen Tiwari
date:      Wed Nov 20 19:20:18 2013 +0530
description:
pixel_add_ps_8x2, asm code
Subject: [x265] pixel_add_ps_8x4, asm code

details:   http://hg.videolan.org/x265/rev/079864d97afc
branches:  
changeset: 5203:079864d97afc
user:      Praveen Tiwari
date:      Wed Nov 20 19:28:06 2013 +0530
description:
pixel_add_ps_8x4, asm code
Subject: [x265] pixel_add_ps_8x6, asm code

details:   http://hg.videolan.org/x265/rev/e2f8b18cd253
branches:  
changeset: 5204:e2f8b18cd253
user:      Praveen Tiwari
date:      Wed Nov 20 19:35:08 2013 +0530
description:
pixel_add_ps_8x6, asm code
Subject: [x265] pixel_add_ps, 8x8, 8x16, 8x32 asm code

details:   http://hg.videolan.org/x265/rev/c75b72fcd284
branches:  
changeset: 5205:c75b72fcd284
user:      Praveen Tiwari
date:      Wed Nov 20 19:48:22 2013 +0530
description:
pixel_add_ps, 8x8, 8x16, 8x32 asm code

diffstat:

 source/Lib/TLibCommon/TComDataCU.h                  |     4 +-
 source/Lib/TLibCommon/TComPic.h                     |     6 +-
 source/Lib/TLibCommon/TComPrediction.cpp            |     8 +-
 source/Lib/TLibCommon/TComRdCost.h                  |    28 +-
 source/Lib/TLibCommon/TComRom.cpp                   |     2 +-
 source/Lib/TLibCommon/TComRom.h                     |     4 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.h    |     2 +-
 source/Lib/TLibCommon/TComSlice.h                   |     4 +-
 source/Lib/TLibCommon/TComTrQuant.cpp               |    10 +-
 source/Lib/TLibCommon/TypeDef.h                     |    12 -
 source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp        |    12 +-
 source/Lib/TLibEncoder/TEncBinCoderCABAC.h          |    20 +-
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp |    74 +-
 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h   |    24 +-
 source/Lib/TLibEncoder/TEncSearch.cpp               |    68 +-
 source/Lib/TLibEncoder/TEncSearch.h                 |     4 +-
 source/Lib/TLibEncoder/WeightPredAnalysis.cpp       |    78 +-
 source/Lib/TLibEncoder/WeightPredAnalysis.h         |    16 +-
 source/common/CMakeLists.txt                        |     3 +-
 source/common/intrapred.cpp                         |     8 +-
 source/common/pixel.cpp                             |    26 +-
 source/common/primitives.h                          |     8 +-
 source/common/vec/dct-sse41.cpp                     |    78 -
 source/common/vec/intra-sse41.cpp                   |     8 +-
 source/common/vec/pixel-sse3.cpp                    |   189 --
 source/common/x86/asm-primitives.cpp                |    40 +-
 source/common/x86/intrapred.asm                     |    96 +
 source/common/x86/intrapred.h                       |    31 +
 source/common/x86/pixel-a.asm                       |  1619 +++++++++++++++++-
 source/common/x86/pixel-util.asm                    |   123 +-
 source/common/x86/pixel.h                           |     8 +-
 source/common/x86/pixeladd8.asm                     |   363 ++++
 source/encoder/compress.cpp                         |     6 +-
 source/encoder/encoder.cpp                          |     2 +-
 source/encoder/framefilter.cpp                      |    12 +-
 source/encoder/ratecontrol.cpp                      |     2 +-
 source/encoder/slicetype.cpp                        |    22 +-
 source/test/intrapredharness.cpp                    |    48 +-
 source/test/intrapredharness.h                      |     2 +-
 source/test/mbdstharness.cpp                        |    11 +-
 source/test/pixelharness.cpp                        |    59 +
 source/test/pixelharness.h                          |     1 +
 42 files changed, 2513 insertions(+), 628 deletions(-)

diffs (truncated from 4382 to 300 lines):

diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComDataCU.h	Wed Nov 20 19:48:22 2013 +0530
@@ -178,10 +178,10 @@ public:
     TComDataCU();
     virtual ~TComDataCU();
 
-    UInt64        m_totalCost;       ///< sum of partition RD costs
+    uint64_t      m_totalCost;       ///< sum of partition RD costs
     uint32_t      m_totalDistortion; ///< sum of partition distortion
     uint32_t      m_totalBits;       ///< sum of partition signal bits
-    UInt64        m_avgCost[4];      // stores the avg cost of CU's in frame for each depth
+    uint64_t      m_avgCost[4];      // stores the avg cost of CU's in frame for each depth
     uint32_t      m_count[4];
 
     // -------------------------------------------------------------------------------------------------------------------
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComPic.h
--- a/source/Lib/TLibCommon/TComPic.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComPic.h	Wed Nov 20 19:48:22 2013 +0530
@@ -87,9 +87,9 @@ public:
 
     TComPic*              m_next;
     TComPic*              m_prev;
-    UInt64                m_SSDY;
-    UInt64                m_SSDU;
-    UInt64                m_SSDV;
+    uint64_t              m_SSDY;
+    uint64_t              m_SSDU;
+    uint64_t              m_SSDV;
     double                m_elapsedCompressTime;
     double                m_frameTime;
     MD5Context            m_state[3];
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Wed Nov 20 19:48:22 2013 +0530
@@ -130,7 +130,7 @@ void TComPrediction::predIntraLumaAng(ui
     assert(g_convertToBit[size] >= 0);   //   4x  4
     assert(g_convertToBit[size] <= 5);   // 128x128
 
-    char log2BlkSize = g_convertToBit[size] + 2;
+    int log2BlkSize = g_convertToBit[size] + 2;
 
     Pel *src = m_predBuf;
     assert(log2BlkSize >= 2 && log2BlkSize < 7);
@@ -164,7 +164,7 @@ void TComPrediction::predIntraLumaAng(ui
     }
     else if (dirMode == DC_IDX)
     {
-        primitives.intra_pred_dc((pixel*)refAbv + 1, (pixel*)refLft + 1, (pixel*)dst, stride, size, bFilter);
+        primitives.intra_pred_dc[log2BlkSize - 2](refAbv + 1, refLft + 1, dst, stride, bFilter);
     }
     else
     {
@@ -175,6 +175,8 @@ void TComPrediction::predIntraLumaAng(ui
 // Angular chroma
 void TComPrediction::predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* dst, uint32_t stride, int width)
 {
+    int log2BlkSize = g_convertToBit[width];
+
     // Create the prediction
     Pel refAbv[3 * MAX_CU_SIZE];
     Pel refLft[3 * MAX_CU_SIZE];
@@ -193,7 +195,7 @@ void TComPrediction::predIntraChromaAng(
     }
     else if (dirMode == DC_IDX)
     {
-        primitives.intra_pred_dc(refAbv + width - 1 + 1, refLft + width - 1 + 1, dst, stride, width, false);
+        primitives.intra_pred_dc[log2BlkSize](refAbv + width - 1 + 1, refLft + width - 1 + 1, dst, stride, false);
     }
     else
     {
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComRdCost.h
--- a/source/Lib/TLibCommon/TComRdCost.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComRdCost.h	Wed Nov 20 19:48:22 2013 +0530
@@ -54,17 +54,17 @@ class TComRdCost
 {
 private:
 
-    double                  m_lambda2;
+    double    m_lambda2;
 
-    double                  m_lambda;
+    double    m_lambda;
 
-    UInt64                  m_lambdaMotionSSE;  // m_lambda2 w/ 16 bits of fraction
+    uint64_t  m_lambdaMotionSSE;  // m_lambda2 w/ 16 bits of fraction
 
-    UInt64                  m_lambdaMotionSAD;  // m_lambda w/ 16 bits of fraction
+    uint64_t  m_lambdaMotionSAD;  // m_lambda w/ 16 bits of fraction
 
-    uint32_t                    m_cbDistortionWeight;
+    uint32_t  m_cbDistortionWeight;
 
-    uint32_t                    m_crDistortionWeight;
+    uint32_t  m_crDistortionWeight;
 
 public:
 
@@ -72,8 +72,8 @@ public:
     {
         m_lambda2         = lambda;
         m_lambda          = sqrt(m_lambda2);
-        m_lambdaMotionSAD = (UInt64)floor(65536.0 * m_lambda);
-        m_lambdaMotionSSE = (UInt64)floor(65536.0 * m_lambda2);
+        m_lambdaMotionSAD = (uint64_t)floor(65536.0 * m_lambda);
+        m_lambdaMotionSSE = (uint64_t)floor(65536.0 * m_lambda2);
     }
 
     void setCbDistortionWeight(double cbDistortionWeight)
@@ -86,17 +86,17 @@ public:
         m_crDistortionWeight = (uint32_t)floor(256.0 * crDistortionWeight);
     }
 
-    inline UInt64  calcRdCost(uint32_t distortion, uint32_t bits) { return distortion + ((bits * m_lambdaMotionSSE + 32768) >> 16); }
+    inline uint64_t calcRdCost(uint32_t distortion, uint32_t bits) { return distortion + ((bits * m_lambdaMotionSSE + 32768) >> 16); }
 
-    inline UInt64  calcRdSADCost(uint32_t sadCost, uint32_t bits) { return sadCost + ((bits * m_lambdaMotionSAD + 32768) >> 16); }
+    inline uint64_t calcRdSADCost(uint32_t sadCost, uint32_t bits) { return sadCost + ((bits * m_lambdaMotionSAD + 32768) >> 16); }
 
-    inline uint32_t    getCost(uint32_t bits)                     { return (uint32_t)((bits * m_lambdaMotionSAD + 32768) >> 16); }
+    inline uint32_t getCost(uint32_t bits)                     { return (uint32_t)((bits * m_lambdaMotionSAD + 32768) >> 16); }
 
-    inline uint32_t    scaleChromaDistCb(uint32_t dist)           { return ((dist * m_cbDistortionWeight) + 128) >> 8; }
+    inline uint32_t scaleChromaDistCb(uint32_t dist)           { return ((dist * m_cbDistortionWeight) + 128) >> 8; }
 
-    inline uint32_t    scaleChromaDistCr(uint32_t dist)           { return ((dist * m_crDistortionWeight) + 128) >> 8; }
+    inline uint32_t scaleChromaDistCr(uint32_t dist)           { return ((dist * m_crDistortionWeight) + 128) >> 8; }
 
-    inline double  getSADLambda() const                   { return m_lambda; }
+    inline double   getSADLambda() const                       { return m_lambda; }
 };
 }
 //! \}
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComRom.cpp	Wed Nov 20 19:48:22 2013 +0530
@@ -317,7 +317,7 @@ const bool g_bEncDecTraceEnable  = true;
 const bool g_bEncDecTraceDisable = false;
 bool   g_HLSTraceEnable = true;
 bool   g_bJustDoIt = false;
-UInt64 g_nSymbolCounter = 0;
+uint64_t g_nSymbolCounter = 0;
 #endif
 
 // ====================================================================================================================
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComRom.h
--- a/source/Lib/TLibCommon/TComRom.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComRom.h	Wed Nov 20 19:48:22 2013 +0530
@@ -190,10 +190,10 @@ extern bool   g_bJustDoIt;
 extern const bool g_bEncDecTraceEnable;
 extern const bool g_bEncDecTraceDisable;
 extern bool   g_HLSTraceEnable;
-extern UInt64 g_nSymbolCounter;
+extern uint64_t g_nSymbolCounter;
 
 #define COUNTER_START    1
-#define COUNTER_END      0 //( UInt64(1) << 63 )
+#define COUNTER_END      0 //( uint64_t(1) << 63 )
 
 #define DTRACE_CABAC_F(x)     if ((g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END) || g_bJustDoIt) fprintf(g_hTrace, "%f", x);
 #define DTRACE_CABAC_V(x)     if ((g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END) || g_bJustDoIt) fprintf(g_hTrace, "%d", x);
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h	Wed Nov 20 19:48:22 2013 +0530
@@ -90,7 +90,7 @@ typedef struct _SaoQTPart
     //---- encoder only start -----//
     bool        bProcessed;
     double      minCost;
-    Int64       minDist;
+    int64_t     minDist;
     int         minRate;
     //---- encoder only end -----//
 } SAOQTPart;
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComSlice.h	Wed Nov 20 19:48:22 2013 +0530
@@ -1277,8 +1277,8 @@ typedef WpScalingParam wpScalingParam;
 
 typedef struct
 {
-    Int64 ac;
-    Int64 dc;
+    int64_t ac;
+    int64_t dc;
 } wpACDCParam;
 
 /// slice header class
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Wed Nov 20 19:48:22 2013 +0530
@@ -603,7 +603,7 @@ uint32_t TComTrQuant::xRateDistOptQuant(
             int Q = qCoef[blkPos];
             double scaleFactor = errScale[blkPos];
             int levelDouble    = srcCoeff[blkPos];
-            levelDouble        = (int)std::min<Int64>((Int64)abs((int)levelDouble) * Q, MAX_INT - (1 << (qbits - 1)));
+            levelDouble        = (int)std::min<int64_t>((int64_t)abs((int)levelDouble) * Q, MAX_INT - (1 << (qbits - 1)));
 
             uint32_t maxAbsLevel = (levelDouble + (1 << (qbits - 1))) >> qbits;
 
@@ -883,7 +883,7 @@ uint32_t TComTrQuant::xRateDistOptQuant(
 
     if (cu->getSlice()->getPPS()->getSignHideFlag() && absSum >= 2)
     {
-        Int64 rdFactor = (Int64)(
+        int64_t rdFactor = (int64_t)(
                 g_invQuantScales[m_qpParam.rem()] * g_invQuantScales[m_qpParam.rem()] * (1 << (2 * m_qpParam.m_per))
                 / m_lambda / 16 / (1 << DISTORTION_PRECISION_ADJUSTMENT(2 * (X265_DEPTH - 8)))
                 + 0.5);
@@ -931,7 +931,7 @@ uint32_t TComTrQuant::xRateDistOptQuant(
                 if (signbit != (tmpSum & 0x1)) // hide but need tune
                 {
                     // calculate the cost
-                    Int64 minCostInc = MAX_INT64, curCost = MAX_INT64;
+                    int64_t minCostInc = MAX_INT64, curCost = MAX_INT64;
                     int minPos = -1, finalChange = 0, curChange = 0;
 
                     for (n = (lastCG == 1 ? lastNZPosInCG : SCAN_SET_SIZE - 1); n >= 0; --n)
@@ -939,8 +939,8 @@ uint32_t TComTrQuant::xRateDistOptQuant(
                         uint32_t blkPos   = scan[n + subPos];
                         if (dstCoeff[blkPos] != 0)
                         {
-                            Int64 costUp   = rdFactor * (-deltaU[blkPos]) + rateIncUp[blkPos];
-                            Int64 costDown = rdFactor * (deltaU[blkPos]) + rateIncDown[blkPos] -
+                            int64_t costUp   = rdFactor * (-deltaU[blkPos]) + rateIncUp[blkPos];
+                            int64_t costDown = rdFactor * (deltaU[blkPos]) + rateIncDown[blkPos] -
                                 (abs(dstCoeff[blkPos]) == 1 ? ((1 << 15) + sigRateDelta[blkPos]) : 0);
 
                             if (lastCG == 1 && lastNZPosInCG == n && abs(dstCoeff[blkPos]) == 1)
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibCommon/TypeDef.h
--- a/source/Lib/TLibCommon/TypeDef.h	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibCommon/TypeDef.h	Wed Nov 20 19:48:22 2013 +0530
@@ -54,18 +54,6 @@ namespace x265 {
 typedef unsigned char  UChar;
 
 // ====================================================================================================================
-// 64-bit integer type
-// ====================================================================================================================
-
-#ifdef _MSC_VER
-typedef __int64             Int64;
-typedef unsigned __int64    UInt64;
-#else
-typedef long long           Int64;
-typedef unsigned long long  UInt64;
-#endif // ifdef _MSC_VER
-
-// ====================================================================================================================
 // Type definition
 // ====================================================================================================================
 
diff -r 108ddc9e5c6b -r c75b72fcd284 source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
--- a/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Tue Nov 19 23:45:52 2013 -0600
+++ b/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Wed Nov 20 19:48:22 2013 +0530
@@ -46,7 +46,7 @@ using namespace x265;
 TEncBinCABAC::TEncBinCABAC(bool isCounter)
     : m_bitIf(0)
     , m_fracBits(0)
-    , bIsCounter(isCounter)
+    , m_bIsCounter(isCounter)
 {}
 
 TEncBinCABAC::~TEncBinCABAC()
@@ -73,7 +73,7 @@ void TEncBinCABAC::start()
 
 void TEncBinCABAC::finish()
 {
-    if (bIsCounter)
+    if (m_bIsCounter)
     {
         // TODO: why write 0 bits?
         m_bitIf->write(0, uint32_t(m_fracBits >> 15));
@@ -187,7 +187,7 @@ void TEncBinCABAC::encodeBin(uint32_t bi
 
     ctxModel.m_state = sbacNext(ctxModel.m_state, binValue);
 
-    if (bIsCounter)
+    if (m_bIsCounter)
     {
         m_fracBits += sbacGetEntropyBits(mstate, binValue);
         return;
@@ -233,7 +233,7 @@ void TEncBinCABAC::encodeBinEP(uint32_t 
         DTRACE_CABAC_V(binValue)
         DTRACE_CABAC_T("\n")
     }
-    if (bIsCounter)
+    if (m_bIsCounter)
     {
         m_fracBits += 32768;
         return;
@@ -256,7 +256,7 @@ void TEncBinCABAC::encodeBinEP(uint32_t 
  */
 void TEncBinCABAC::encodeBinsEP(uint32_t binValues, int numBins)
 {
-    if (bIsCounter)
+    if (m_bIsCounter)
     {
         m_fracBits += 32768 * numBins;
         return;
@@ -296,7 +296,7 @@ void TEncBinCABAC::encodeBinsEP(uint32_t
  */


More information about the x265-commits mailing list