shithub: libvpx

Download patch

ref: 65a32cbbb10ee378b6d4db74ad8b9db972526de0
parent: 1f9943ab1aaeef91e54f05f0c096950b0a718e53
author: Ronald S. Bultje <rbultje@google.com>
date: Mon Jun 18 05:22:53 EDT 2012

Add comments to intra prediction probability tables.

Change-Id: Iec81423e8e6c50acd9e10f69bc99ad0e9058517d

--- a/vp8/common/entropymode.c
+++ b/vp8/common/entropymode.c
@@ -19,6 +19,7 @@
 const unsigned int kf_y_mode_cts[8][VP8_YMODES] =
 {
 #if CONFIG_NEWINTRAMODES
+    /* DC V   H  D45 135 117 153 D27 D63 TM i8x8 BPRED */
     {12,  6,  5,  5,  5,  5,  5,  5,  5,  2, 22, 200},
     {25, 13, 13,  7,  7,  7,  7,  7,  7,  6, 27, 160},
     {31, 17, 18,  8,  8,  8,  8,  8,  8,  9, 26, 139},
@@ -41,6 +42,7 @@
 
 static const unsigned int y_mode_cts  [VP8_YMODES] =
 #if CONFIG_NEWINTRAMODES
+    /* DC V   H  D45 135 117 153 D27 D63 TM i8x8 BPRED */
     {98, 19, 15, 14, 14, 14, 14, 12, 12, 13, 16, 70};
 #else
     {106, 25, 21, 13, 16, 74};
@@ -48,18 +50,19 @@
 
 static const unsigned int uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] ={
 #if CONFIG_NEWINTRAMODES
-    { 200, 15, 15, 10, 10, 10, 10, 10, 10,  6},
-    { 130, 75, 10, 10, 10, 10, 10, 10, 10,  6},
-    { 130, 10, 75, 10, 10, 10, 10, 10, 10,  6},
-    { 130, 15, 10, 75, 10, 10, 10, 10, 10,  6},
-    { 150, 15, 10, 10, 75, 10, 10, 10, 10,  6},
-    { 150, 15, 10, 10, 10, 75, 10, 10, 10,  6},
-    { 150, 15, 10, 10, 10, 10, 75, 10, 10,  6},
-    { 150, 15, 10, 10, 10, 10, 10, 75, 10,  6},
-    { 150, 15, 10, 10, 10, 10, 10, 10, 75,  6},
-    { 160, 30, 30, 10, 10, 10, 10, 10, 10, 16},
-    { 132, 46, 40, 10, 10, 10, 10, 10, 10, 18}, /* never used */
-    { 150, 35, 41, 10, 10, 10, 10, 10, 10, 10},
+    /* DC   V   H  D45 135 117 153 D27 D63 TM */
+    { 200, 15, 15, 10, 10, 10, 10, 10, 10,  6}, /* DC */
+    { 130, 75, 10, 10, 10, 10, 10, 10, 10,  6}, /* V */
+    { 130, 10, 75, 10, 10, 10, 10, 10, 10,  6}, /* H */
+    { 130, 15, 10, 75, 10, 10, 10, 10, 10,  6}, /* D45 */
+    { 150, 15, 10, 10, 75, 10, 10, 10, 10,  6}, /* D135 */
+    { 150, 15, 10, 10, 10, 75, 10, 10, 10,  6}, /* D117 */
+    { 150, 15, 10, 10, 10, 10, 75, 10, 10,  6}, /* D153 */
+    { 150, 15, 10, 10, 10, 10, 10, 75, 10,  6}, /* D27 */
+    { 150, 15, 10, 10, 10, 10, 10, 10, 75,  6}, /* D63 */
+    { 160, 30, 30, 10, 10, 10, 10, 10, 10, 16}, /* TM */
+    { 132, 46, 40, 10, 10, 10, 10, 10, 10, 18}, /* i8x8 - never used */
+    { 150, 35, 41, 10, 10, 10, 10, 10, 10, 10}, /* BPRED */
 #else
     { 210, 20, 20,  6},
     { 180, 60, 10,  6},
@@ -72,6 +75,7 @@
 
 static const unsigned int i8x8_mode_cts  [VP8_I8X8_MODES] =
 #if CONFIG_NEWINTRAMODES
+    /* DC V   H D45 135 117 153 D27 D63  TM */
     {73, 49, 61, 30, 30, 30, 30, 30, 30, 13};
 #else
     {93, 69, 81, 13};
@@ -79,18 +83,19 @@
 
 static const unsigned int kf_uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] ={
 #if CONFIG_NEWINTRAMODES
-    { 160, 24, 24, 20, 20, 20, 20, 20, 20,  8},
-    { 102, 64, 30, 20, 20, 20, 20, 20, 20, 10},
-    { 102, 30, 64, 20, 20, 20, 20, 20, 20, 10},
-    { 102, 33, 20, 64, 20, 20, 20, 20, 20, 14},
-    { 102, 33, 20, 20, 64, 20, 20, 20, 20, 14},
-    { 122, 33, 20, 20, 20, 64, 20, 20, 20, 14},
-    { 102, 33, 20, 20, 20, 20, 64, 20, 20, 14},
-    { 102, 33, 20, 20, 20, 20, 20, 64, 20, 14},
-    { 102, 33, 20, 20, 20, 20, 20, 20, 64, 14},
-    { 132, 36, 30, 20, 20, 20, 20, 20, 20, 18},
-    { 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* never used */
-    { 122, 41, 35, 20, 20, 20, 20, 20, 20, 18},
+    // DC   V   H  D45 135 117 153 D27 D63 TM
+    { 160, 24, 24, 20, 20, 20, 20, 20, 20,  8}, /* DC */
+    { 102, 64, 30, 20, 20, 20, 20, 20, 20, 10}, /* V */
+    { 102, 30, 64, 20, 20, 20, 20, 20, 20, 10}, /* H */
+    { 102, 33, 20, 64, 20, 20, 20, 20, 20, 14}, /* D45 */
+    { 102, 33, 20, 20, 64, 20, 20, 20, 20, 14}, /* D135 */
+    { 122, 33, 20, 20, 20, 64, 20, 20, 20, 14}, /* D117 */
+    { 102, 33, 20, 20, 20, 20, 64, 20, 20, 14}, /* D153 */
+    { 102, 33, 20, 20, 20, 20, 20, 64, 20, 14}, /* D27 */
+    { 102, 33, 20, 20, 20, 20, 20, 20, 64, 14}, /* D63 */
+    { 132, 36, 30, 20, 20, 20, 20, 20, 20, 18}, /* TM */
+    { 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* i8x8 - never used */
+    { 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* BPRED */
 #else
     { 180, 34, 34,  8},
     { 132, 74, 40, 10},
@@ -103,6 +108,7 @@
 
 static const unsigned int bmode_cts[VP8_BINTRAMODES] =
 {
+    /* DC    TM     VE     HE   LD    RD    VR    VL    HD    HU */
     43891, 17694, 10036, 3920, 3363, 2546, 5119, 3221, 2471, 1723
 };