[x265-commits] [x265] interlace: set sourceScanType to 0 to indicate interlaced...

Deepthi Nandakumar deepthi at multicorewareinc.com
Fri May 2 21:40:05 CEST 2014


details:   http://hg.videolan.org/x265/rev/f3585fd81c3b
branches:  
changeset: 6798:f3585fd81c3b
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Fri May 02 15:52:27 2014 +0530
description:
interlace: set sourceScanType to 0 to indicate interlaced video
Subject: [x265] rdcost: use less fractional bits for lambda scale, and larger ints for chroma

details:   http://hg.videolan.org/x265/rev/b77ca886ef3b
branches:  stable
changeset: 6799:b77ca886ef3b
user:      Steve Borho <steve at borho.org>
date:      Fri May 02 13:10:30 2014 -0500
description:
rdcost: use less fractional bits for lambda scale, and larger ints for chroma

This fixes really bad mode decisions made with some Main10 encodes that were
apparently caused by integer overflow
Subject: [x265] fix g_chromaScale for 420 videos accordingly to the HEVC spec.

details:   http://hg.videolan.org/x265/rev/9b66012c93bb
branches:  stable
changeset: 6800:9b66012c93bb
user:      Aarthi Thirumalai
date:      Fri May 02 17:06:38 2014 +0530
description:
fix g_chromaScale for 420 videos accordingly to the HEVC spec.
Subject: [x265] interlace: set sourceScanType to 0 to indicate interlaced video

details:   http://hg.videolan.org/x265/rev/cea97c4d7945
branches:  stable
changeset: 6801:cea97c4d7945
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Fri May 02 15:52:27 2014 +0530
description:
interlace: set sourceScanType to 0 to indicate interlaced video
Subject: [x265] Added tag 1.0 for changeset cea97c4d7945

details:   http://hg.videolan.org/x265/rev/d3d47e3ef9c2
branches:  stable
changeset: 6802:d3d47e3ef9c2
user:      Steve Borho <steve at borho.org>
date:      Fri May 02 14:19:10 2014 -0500
description:
Added tag 1.0 for changeset cea97c4d7945
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/81aad858a830
branches:  
changeset: 6803:81aad858a830
user:      Steve Borho <steve at borho.org>
date:      Fri May 02 14:19:27 2014 -0500
description:
Merge with stable

diffstat:

 .hgtags                            |   1 +
 source/Lib/TLibCommon/TComRdCost.h |  18 +++++++++---------
 source/Lib/TLibCommon/TComRom.cpp  |   2 +-
 source/encoder/frameencoder.cpp    |   2 +-
 4 files changed, 12 insertions(+), 11 deletions(-)

diffs (78 lines):

diff -r 22eda589d8ca -r 81aad858a830 .hgtags
--- a/.hgtags	Thu May 01 00:26:43 2014 -0500
+++ b/.hgtags	Fri May 02 14:19:27 2014 -0500
@@ -11,3 +11,4 @@ b970ffbdd696e3ce45c93b315902eb6366ff085e
 d24e2a8c4326b0cd01bfa6c414c5378481af9018 0.7
 527d03c56d6860dc979ddea1196f7e94d13d3e82 0.8
 82bbd2bf3b49ba086be0f0922f91fe0084896351 0.9
+cea97c4d79456842e00ade6be6fd5ec34610e5f8 1.0
diff -r 22eda589d8ca -r 81aad858a830 source/Lib/TLibCommon/TComRdCost.h
--- a/source/Lib/TLibCommon/TComRdCost.h	Thu May 01 00:26:43 2014 -0500
+++ b/source/Lib/TLibCommon/TComRdCost.h	Fri May 02 14:19:27 2014 -0500
@@ -58,33 +58,33 @@ private:
 
     uint64_t  m_lambdaMotionSAD;  // m_lambda w/ 16 bits of fraction
 
-    uint32_t  m_cbDistortionWeight;
+    uint64_t  m_cbDistortionWeight;
 
-    uint32_t  m_crDistortionWeight;
+    uint64_t  m_crDistortionWeight;
 
 public:
 
     void setLambda(double lambda2, double lambda)
     {
-        m_lambdaMotionSSE = (uint64_t)floor(65536.0 * lambda2);
-        m_lambdaMotionSAD = (uint64_t)floor(65536.0 * lambda);
+        m_lambdaMotionSSE = (uint64_t)floor(256.0 * lambda2);
+        m_lambdaMotionSAD = (uint64_t)floor(256.0 * lambda);
     }
 
     void setCbDistortionWeight(double cbDistortionWeight)
     {
-        m_cbDistortionWeight = (uint32_t)floor(256.0 * cbDistortionWeight);
+        m_cbDistortionWeight = (uint64_t)floor(256.0 * cbDistortionWeight);
     }
 
     void setCrDistortionWeight(double crDistortionWeight)
     {
-        m_crDistortionWeight = (uint32_t)floor(256.0 * crDistortionWeight);
+        m_crDistortionWeight = (uint64_t)floor(256.0 * crDistortionWeight);
     }
 
-    inline uint64_t 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 + 128) >> 8); }
 
-    inline uint64_t 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 + 128) >> 8); }
 
-    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 + 128) >> 8); }
 
     inline uint32_t scaleChromaDistCb(uint32_t dist)           { return ((dist * m_cbDistortionWeight) + 128) >> 8; }
 
diff -r 22eda589d8ca -r 81aad858a830 source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp	Thu May 01 00:26:43 2014 -0500
+++ b/source/Lib/TLibCommon/TComRom.cpp	Fri May 02 14:19:27 2014 -0500
@@ -443,7 +443,7 @@ const int16_t g_t32[32][32] =
 const uint8_t g_chromaScale[NUM_CHROMA_FORMAT][chromaQPMappingTableSize] =
 {
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51 },
+    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 },
     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51 },
     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51 }
 };
diff -r 22eda589d8ca -r 81aad858a830 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Thu May 01 00:26:43 2014 -0500
+++ b/source/encoder/frameencoder.cpp	Fri May 02 14:19:27 2014 -0500
@@ -516,7 +516,7 @@ void FrameEncoder::compressFrame()
 
         SEIPictureTiming sei;
         sei.m_picStruct = (slice->getPOC() & 1) && m_cfg->param->interlaceMode == 2 ? 1 /* top */ : 2 /* bot */;
-        sei.m_sourceScanType = 1;
+        sei.m_sourceScanType = 0;
         sei.m_duplicateFlag = 0;
 
         entropyCoder->setBitstream(&nalu.m_bitstream);


More information about the x265-commits mailing list