[x265] [PATCH 2 of 3] psy-rd chroma: add chroma offset tables for lambda calculations

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Wed Jun 25 02:22:15 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1403606689 -19800
#      Tue Jun 24 16:14:49 2014 +0530
# Node ID 20611feb4a45e27a868af9609220aa7d6faf64ca
# Parent  812dc9f61549299e686e6e12c7c4770aad792eec
psy-rd chroma: add chroma offset tables for lambda calculations

diff -r 812dc9f61549 -r 20611feb4a45 source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp	Tue Jun 24 16:00:50 2014 +0530
+++ b/source/Lib/TLibCommon/TComRom.cpp	Tue Jun 24 16:14:49 2014 +0530
@@ -161,6 +161,17 @@
     176854.2222, 222822.4000, 280738.6627, 353708.5368, 445644.7459
 };
 
+const uint16_t x265_chroma_lambda2_offset_tab[MAX_CHROMA_LAMBDA_OFFSET+1] =
+{
+       16,    20,    25,    32,    40,    50,
+       64,    80,   101,   128,   161,   203,
+      256,   322,   406,   512,   645,   812,
+     1024,  1290,  1625,  2048,  2580,  3250,
+     4096,  5160,  6501,  8192, 10321, 13003,
+    16384, 20642, 26007, 32768, 41285, 52015,
+    65535
+};
+
 static int initialized /* = 0 */;
 
 // initialize ROM variables
diff -r 812dc9f61549 -r 20611feb4a45 source/Lib/TLibCommon/TComRom.h
--- a/source/Lib/TLibCommon/TComRom.h	Tue Jun 24 16:00:50 2014 +0530
+++ b/source/Lib/TLibCommon/TComRom.h	Tue Jun 24 16:14:49 2014 +0530
@@ -272,6 +272,7 @@
 
 extern const double x265_lambda_tab[MAX_MAX_QP + 1];
 extern const double x265_lambda2_tab[MAX_MAX_QP + 1];
+extern const uint16_t x265_chroma_lambda2_offset_tab[MAX_CHROMA_LAMBDA_OFFSET+1];
 
 // CABAC tables
 extern const uint8_t g_lpsTable[64][4];
diff -r 812dc9f61549 -r 20611feb4a45 source/common/common.h
--- a/source/common/common.h	Tue Jun 24 16:00:50 2014 +0530
+++ b/source/common/common.h	Tue Jun 24 16:14:49 2014 +0530
@@ -146,6 +146,7 @@
 #define X265_MIN4(a, b, c, d) X265_MIN((a), X265_MIN3((b), (c), (d)))
 #define X265_MAX4(a, b, c, d) X265_MAX((a), X265_MAX3((b), (c), (d)))
 #define QP_BD_OFFSET (6 * (X265_DEPTH - 8))
+#define MAX_CHROMA_LAMBDA_OFFSET 36
 
 // arbitrary, but low because SATD scores are 1/4 normal
 #define X265_LOOKAHEAD_QP (12 + QP_BD_OFFSET)


More information about the x265-devel mailing list