[x265] [PATCH] Change the scope of MatrixType and MatrixType_DC

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Mon Sep 26 06:58:41 CEST 2016


# HG changeset patch
# User vignesh
# Date 1466577126 -19800
#      Wed Jun 22 12:02:06 2016 +0530
# Node ID dca8e5e40936ea1efc56be6813f377cb5a4ac1dc
# Parent  0653bfac639d6daf80f4c64926a19bc6a2a8d11f
Change the scope of MatrixType and MatrixType_DC

diff -r 0653bfac639d -r dca8e5e40936 source/common/scalinglist.cpp
--- a/source/common/scalinglist.cpp	Tue Sep 20 11:43:58 2016 +0530
+++ b/source/common/scalinglist.cpp	Wed Jun 22 12:02:06 2016 +0530
@@ -29,64 +29,6 @@
 // file-anonymous namespace
 
 /* Strings for scaling list file parsing */
-const char MatrixType[4][6][20] =
-{
-    {
-        "INTRA4X4_LUMA",
-        "INTRA4X4_CHROMAU",
-        "INTRA4X4_CHROMAV",
-        "INTER4X4_LUMA",
-        "INTER4X4_CHROMAU",
-        "INTER4X4_CHROMAV"
-    },
-    {
-        "INTRA8X8_LUMA",
-        "INTRA8X8_CHROMAU",
-        "INTRA8X8_CHROMAV",
-        "INTER8X8_LUMA",
-        "INTER8X8_CHROMAU",
-        "INTER8X8_CHROMAV"
-    },
-    {
-        "INTRA16X16_LUMA",
-        "INTRA16X16_CHROMAU",
-        "INTRA16X16_CHROMAV",
-        "INTER16X16_LUMA",
-        "INTER16X16_CHROMAU",
-        "INTER16X16_CHROMAV"
-    },
-    {
-        "INTRA32X32_LUMA",
-        "",
-        "",
-        "INTER32X32_LUMA",
-        "",
-        "",
-    },
-};
-const char MatrixType_DC[4][12][22] =
-{
-    {
-    },
-    {
-    },
-    {
-        "INTRA16X16_LUMA_DC",
-        "INTRA16X16_CHROMAU_DC",
-        "INTRA16X16_CHROMAV_DC",
-        "INTER16X16_LUMA_DC",
-        "INTER16X16_CHROMAU_DC",
-        "INTER16X16_CHROMAV_DC"
-    },
-    {
-        "INTRA32X32_LUMA_DC",
-        "",
-        "",
-        "INTER32X32_LUMA_DC",
-        "",
-        "",
-    },
-};
 
 static int quantTSDefault4x4[16] =
 {
@@ -124,6 +66,64 @@
 
 namespace X265_NS {
 // private namespace
+    const char ScalingList::MatrixType[4][6][20] =
+    {
+        {
+            "INTRA4X4_LUMA",
+            "INTRA4X4_CHROMAU",
+            "INTRA4X4_CHROMAV",
+            "INTER4X4_LUMA",
+            "INTER4X4_CHROMAU",
+            "INTER4X4_CHROMAV"
+        },
+        {
+            "INTRA8X8_LUMA",
+            "INTRA8X8_CHROMAU",
+            "INTRA8X8_CHROMAV",
+            "INTER8X8_LUMA",
+            "INTER8X8_CHROMAU",
+            "INTER8X8_CHROMAV"
+        },
+        {
+            "INTRA16X16_LUMA",
+            "INTRA16X16_CHROMAU",
+            "INTRA16X16_CHROMAV",
+            "INTER16X16_LUMA",
+            "INTER16X16_CHROMAU",
+            "INTER16X16_CHROMAV"
+        },
+        {
+            "INTRA32X32_LUMA",
+            "",
+            "",
+            "INTER32X32_LUMA",
+            "",
+            "",
+        },
+    };
+    const char ScalingList::MatrixType_DC[4][12][22] =
+    {
+        {
+        },
+        {
+        },
+        {
+            "INTRA16X16_LUMA_DC",
+            "INTRA16X16_CHROMAU_DC",
+            "INTRA16X16_CHROMAV_DC",
+            "INTER16X16_LUMA_DC",
+            "INTER16X16_CHROMAU_DC",
+            "INTER16X16_CHROMAV_DC"
+        },
+        {
+            "INTRA32X32_LUMA_DC",
+            "",
+            "",
+            "INTER32X32_LUMA_DC",
+            "",
+            "",
+        },
+    };
 
 const int     ScalingList::s_numCoefPerSize[NUM_SIZES] = { 16, 64, 256, 1024 };
 const int32_t ScalingList::s_quantScales[NUM_REM] = { 26214, 23302, 20560, 18396, 16384, 14564 };
diff -r 0653bfac639d -r dca8e5e40936 source/common/scalinglist.h
--- a/source/common/scalinglist.h	Tue Sep 20 11:43:58 2016 +0530
+++ b/source/common/scalinglist.h	Wed Jun 22 12:02:06 2016 +0530
@@ -42,6 +42,8 @@
     static const int     s_numCoefPerSize[NUM_SIZES];
     static const int32_t s_invQuantScales[NUM_REM];
     static const int32_t s_quantScales[NUM_REM];
+    static const char MatrixType[4][6][20];
+    static const char MatrixType_DC[4][12][22];
 
     int32_t  m_scalingListDC[NUM_SIZES][NUM_LISTS];   // the DC value of the matrix coefficient for 16x16
     int32_t* m_scalingListCoef[NUM_SIZES][NUM_LISTS]; // quantization matrix


More information about the x265-devel mailing list