Extend the eob context model

Account for 1-D/2-D transform kernels for the eob modeling. To
maintain a smaller context cardinality, set the two 1-D transform
kernels in the same category. The difference in directions should
be largely covered by the scan order.

This and the previous CLs on nz_map context modeling together
improve the compression performance of level-map coefficient coding
system by 0.4% for lowres.

Change-Id: I8c4f03ca01ce3d248950d04bd1266f445b4227a0
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index b411421..9d672fc 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -257,57 +257,57 @@
 #else   // CONFIG_CTX1D
 static const aom_prob
     default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
-      { { 221, 233, 232, 221, 231, 233, 216, 196, 233, 226, 200, 133, 227,
-          206, 157, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
-        { 167, 197, 190, 182, 201, 199, 170, 145, 200, 183, 147, 84, 198,
-          166, 106, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
-      { { 236, 244, 246, 243, 232, 244, 247, 243, 241, 231, 212, 250, 248,
-          236, 206, 244, 236, 215, 158, 128, 128, 128, 128, 128, 128 },
-        { 146, 204, 212, 194, 176, 206, 220, 208, 201, 174, 139, 227, 221,
-          185, 149, 210, 190, 152, 93,  128, 128, 128, 128, 128, 128 } },
-      { { 231, 242, 243, 248, 248, 249, 251, 251, 249, 246, 250, 247, 242,
-          226, 252, 252, 248, 233, 249, 246, 240, 213, 128, 128, 128 },
-        { 95,  187, 199, 228, 231, 230, 245, 243, 231, 241, 238, 235, 220,
-          192, 244, 240, 230, 210, 217, 208, 170, 134, 128, 128, 128 } },
-      { { 181, 218, 219, 232, 234, 235, 243, 245, 247, 251, 251, 248, 253,
-          250, 252, 252, 250, 252, 253, 250, 233, 249, 247, 232, 202 },
-        { 92,  181, 200, 233, 232, 235, 249, 253, 253, 255, 254, 238, 228,
-          255, 251, 240, 128, 242, 233, 211, 171, 214, 179, 46,  128 } }
+      { { 225, 240, 225, 200, 128, 128, 128, 128, 128, 128, 128,
+          245, 246, 238, 203, 128, 128, 128, 128, 128, 128, 128 },
+        { 181, 219, 192, 144, 128, 128, 128, 128, 128, 128, 128,
+          218, 231, 199, 152, 128, 128, 128, 128, 128, 128, 128 } },
+      { { 233, 247, 240, 234, 211, 194, 128, 128, 128, 128, 128,
+          252, 252, 249, 242, 221, 208, 128, 128, 128, 128, 128 },
+        { 154, 222, 204, 180, 132, 128, 128, 128, 128, 128, 128,
+          216, 235, 206, 181, 121, 112, 128, 128, 128, 128, 128 } },
+      { { 233, 246, 241, 238, 231, 216, 186, 171, 128, 128, 128,
+          251, 252, 251, 244, 233, 218, 192, 191, 128, 128, 128 },
+        { 117, 221, 214, 223, 215, 202, 176, 116, 128, 128, 128,
+          205, 234, 219, 183, 195, 126, 76,  128, 128, 128, 128 } },
+      { { 194, 231, 213, 215, 207, 200, 183, 169, 135, 168, 128,
+          240, 246, 243, 238, 210, 201, 172, 133, 107, 128, 128 },
+        { 122, 232, 230, 244, 250, 247, 252, 253, 254, 52,  128,
+          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }
     };
 
 static const aom_prob
     default_eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
       { {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         },
         {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         } },
       { {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         },
         {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         } },
       { {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         },
         {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         } },
       { {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         },
         {
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+            145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
         } }
     };
 #endif  // CONFIG_CTX1D