godot/thirdparty/libtheora/modedec.h

/*File generated by libtheora with OC_COLLECT_METRICS defined at compile time.*/
#if !defined(_modedec_H)
# define _modedec_H (1)
# include "encint.h"



/*The log of the average quantizer for each of the OC_MODE_RD table rows
   (e.g., for the represented qi's, and each pli and qti), in Q10 format.
  The actual statistics used by the encoder will be interpolated from
   that table based on log_plq for the actual quantization matrix used.*/
# if !defined(OC_COLLECT_METRICS)
static const
# endif
ogg_int16_t OC_MODE_LOGQ[OC_LOGQ_BINS][3][2]={
  { {0x1F05,0x2101},{0x206E,0x2101},{0x206E,0x2101} },
  { {0x1C9A,0x1EAC},{0x1E0E,0x1EAC},{0x1E0E,0x1EAC} },
  { {0x1A31,0x1C48},{0x1B6F,0x1C48},{0x1B6F,0x1C48} },
  { {0x17B0,0x19E7},{0x1938,0x19E7},{0x1938,0x19E7} },
  { {0x152F,0x178F},{0x16AB,0x178F},{0x16AB,0x178F} },
  { {0x12F1,0x1534},{0x145D,0x1534},{0x145D,0x1534} },
  { {0x0FF3,0x1321},{0x11BE,0x1321},{0x11BE,0x1321} },
  { {0x0E1F,0x1073},{0x0E93,0x1073},{0x0E93,0x1073} }
};

# if !defined(OC_COLLECT_METRICS)
static const
# endif
oc_mode_rd OC_MODE_RD_SATD[OC_LOGQ_BINS][3][2][OC_COMP_BINS]={
  {
    {
      /*Y'  qi=0  INTRA*/
      {
        {   57, 1550},{  121, 2460},{  185, 3901},{  336, 5189},
        {  406, 6243},{  501, 7329},{  565, 8292},{  674, 9257},
        {  746,10219},{  843,11056},{  961,11822},{ 1120,12512},
        { 1208,13233},{ 1394,13600},{ 1409,14381},{ 1492,15129},
        { 1593,15804},{ 1639,16573},{ 1731,17161},{ 1844,17707},
        { 1949,18300},{ 2073,18654},{ 2140,19465},{ 2278,19794}
      },
      /*Y'  qi=0  INTER*/
      {
        {  -18, 1274},{   23, 2505},{   32, 3612},{   57, 5153},
        {   79, 6636},{   97, 8082},{  109, 9505},{  122,10924},
        {  134,12293},{  145,13634},{  158,14942},{  172,16212},
        {  186,17422},{  198,18604},{  209,19757},{  218,20875},
        {  235,21980},{  253,23056},{  276,24121},{  305,25184},
        {  342,26202},{  393,27140},{  439,28140},{  556,28659}
      }
    },
    {
      /*Cb  qi=0  INTRA*/
      {
        {   32, 1763},{   56, 2150},{   78, 2336},{   88, 2608},
        {  105, 2975},{  121, 3297},{  113, 3460},{  126, 3993},
        {  142, 4432},{  177, 4733},{  185, 5058},{  194, 5447},
        {  220, 5812},{  227, 6202},{  246, 6415},{  269, 6821},
        {  279, 7026},{  313, 7313},{  321, 7708},{  316, 8021},
        {  370, 8203},{  389, 8573},{  410, 8607},{  431, 8816}
      },
      /*Cb  qi=0  INTER*/
      {
        {    3,  282},{    3, 1200},{    3, 1605},{    6, 2190},
        {   15, 2519},{   18, 2798},{   21, 3115},{   25, 3460},
        {   33, 3839},{   40, 4217},{   47, 4592},{   51, 4958},
        {   56, 5326},{   59, 5710},{   63, 6066},{   65, 6412},
        {   67, 6762},{   68, 7104},{   70, 7461},{   72, 7829},
        {   77, 8200},{   80, 8566},{   86, 8906},{   90, 9203}
      }
    },
    {
      /*Cr  qi=0  INTRA*/
      {
        {   27, 1720},{   44, 1920},{   66, 2255},{   73, 2429},
        {   95, 2988},{  103, 3279},{  123, 3691},{  129, 4012},
        {  151, 4415},{  150, 4760},{  183, 5008},{  193, 5351},
        {  211, 5788},{  235, 6134},{  263, 6400},{  276, 6711},
        {  291, 7100},{  346, 7285},{  329, 7616},{  387, 7827},
        {  361, 8214},{  430, 8534},{  429, 8608},{  450, 8823}
      },
      /*Cr  qi=0  INTER*/
      {
        {    4,  439},{    2, 1131},{    3, 1593},{    6, 2130},
        {   14, 2535},{   17, 2786},{   21, 3128},{   27, 3494},
        {   35, 3875},{   42, 4256},{   48, 4637},{   53, 5019},
        {   57, 5395},{   61, 5777},{   64, 6156},{   66, 6512},
        {   68, 6853},{   71, 7183},{   77, 7511},{   81, 7841},
        {   83, 8192},{   88, 8510},{   93, 8834},{   98, 9138}
      }
    }
  },
  {
    {
      /*Y'  qi=9  INTRA*/
      {
        {   76,  777},{  178, 1995},{  340, 3162},{  591, 4097},
        {  746, 4973},{  916, 5847},{ 1047, 6687},{ 1218, 7430},
        { 1385, 8079},{ 1566, 8685},{ 1755, 9167},{ 1992, 9572},
        { 2164,10023},{ 2395,10270},{ 2536,10755},{ 2694,11285},
        { 2895,11580},{ 3029,12143},{ 3182,12543},{ 3377,12800},
        { 3525,13228},{ 3718,13463},{ 3878,13852},{ 4077,14001}
      },
      /*Y'  qi=9  INTER*/
      {
        {   10,  770},{   45, 1845},{   59, 3227},{   99, 4708},
        {  135, 6092},{  164, 7425},{  190, 8729},{  218, 9991},
        {  246,11234},{  281,12427},{  315,13573},{  354,14678},
        {  402,15734},{  467,16728},{  543,17709},{  639,18610},
        {  736,19503},{  855,20312},{  995,21033},{ 1151,21656},
        { 1341,22130},{ 1525,22582},{ 1735,22922},{ 1922,23102}
      }
    },
    {
      /*Cb  qi=9  INTRA*/
      {
        {   41, 1227},{   70, 1452},{  102, 1697},{  110, 1967},
        {  134, 2326},{  153, 2695},{  160, 3007},{  196, 3393},
        {  232, 3769},{  266, 4067},{  297, 4376},{  326, 4728},
        {  351, 5040},{  390, 5299},{  398, 5538},{  443, 5900},
        {  448, 6107},{  506, 6370},{  519, 6636},{  525, 6953},
        {  567, 7177},{  625, 7386},{  622, 7613},{  654, 7764}
      },
      /*Cb  qi=9  INTER*/
      {
        {    7,  377},{    2, 1102},{    7, 1262},{   19, 1693},
        {   22, 1957},{   27, 2302},{   35, 2654},{   43, 3034},
        {   52, 3431},{   58, 3826},{   63, 4207},{   67, 4570},
        {   71, 4927},{   75, 5283},{   79, 5624},{   82, 5944},
        {   85, 6279},{   88, 6616},{   94, 6955},{  102, 7284},
        {  108, 7622},{  116, 7944},{  124, 8293},{  133, 8568}
      }
    },
    {
      /*Cr  qi=9  INTRA*/
      {
        {   38, 1217},{   61, 1473},{   88, 1650},{  100, 1908},
        {  137, 2400},{  147, 2777},{  176, 3149},{  205, 3433},
        {  227, 3772},{  249, 4092},{  286, 4370},{  313, 4746},
        {  342, 5053},{  368, 5261},{  411, 5530},{  442, 5859},
        {  494, 6061},{  526, 6340},{  532, 6646},{  580, 6799},
        {  567, 7203},{  649, 7357},{  625, 7559},{  660, 7709}
      },
      /*Cr  qi=9  INTER*/
      {
        {    5,  408},{    3, 1197},{    7, 1275},{   16, 1695},
        {   22, 1979},{   30, 2324},{   38, 2691},{   47, 3071},
        {   53, 3462},{   59, 3857},{   64, 4255},{   69, 4612},
        {   74, 4975},{   76, 5347},{   81, 5694},{   86, 6020},
        {   91, 6357},{   96, 6687},{  102, 7020},{  108, 7351},
        {  115, 7663},{  122, 7979},{  125, 8298},{  136, 8576}
      }
    }
  },
  {
    {
      /*Y'  qi=18  INTRA*/
      {
        {   83,  534},{  261, 1697},{  507, 2691},{  852, 3418},
        { 1127, 4094},{ 1378, 4775},{ 1626, 5442},{ 1905, 5975},
        { 2164, 6468},{ 2445, 6913},{ 2704, 7301},{ 3001, 7631},
        { 3285, 7934},{ 3536, 8217},{ 3837, 8489},{ 4076, 8814},
        { 4325, 9046},{ 4590, 9313},{ 4794, 9546},{ 5062, 9751},
        { 5285, 9963},{ 5578,10079},{ 5777,10302},{ 6054,10296}
      },
      /*Y'  qi=18  INTER*/
      {
        {   33,  490},{   62, 1599},{   96, 3015},{  164, 4378},
        {  225, 5633},{  285, 6831},{  351, 7999},{  427, 9133},
        {  526,10181},{  652,11141},{  829,11991},{ 1049,12732},
        { 1310,13367},{ 1592,13896},{ 1881,14350},{ 2207,14667},
        { 2529,14877},{ 2873,14980},{ 3231,14949},{ 3571,14926},
        { 3922,14816},{ 4246,14715},{ 4559,14579},{ 4778,14590}
      }
    },
    {
      /*Cb  qi=18  INTRA*/
      {
        {   55,  825},{   95, 1021},{  131, 1276},{  150, 1618},
        {  180, 1958},{  220, 2306},{  256, 2608},{  322, 2939},
        {  385, 3239},{  436, 3530},{  475, 3771},{  518, 4078},
        {  557, 4348},{  604, 4592},{  620, 4851},{  676, 5083},
        {  704, 5363},{  739, 5582},{  788, 5782},{  819, 6000},
        {  893, 6158},{  940, 6418},{  984, 6499},{ 1035, 6596}
      },
      /*Cb  qi=18  INTER*/
      {
        {   -2,  642},{   12,  771},{   20, 1054},{   29, 1394},
        {   35, 1721},{   45, 2080},{   53, 2450},{   63, 2835},
        {   73, 3225},{   81, 3596},{   87, 3952},{   95, 4300},
        {  102, 4634},{  109, 4959},{  115, 5283},{  120, 5608},
        {  130, 5931},{  139, 6254},{  152, 6571},{  163, 6887},
        {  179, 7204},{  191, 7508},{  198, 7834},{  224, 8066}
      }
    },
    {
      /*Cr  qi=18  INTRA*/
      {
        {   49,  780},{   86,  986},{  120, 1261},{  137, 1588},
        {  183, 1998},{  228, 2339},{  291, 2670},{  334, 2938},
        {  376, 3239},{  412, 3522},{  459, 3783},{  490, 4113},
        {  547, 4321},{  593, 4571},{  640, 4828},{  675, 5137},
        {  730, 5254},{  774, 5524},{  821, 5754},{  859, 5911},
        {  887, 6178},{  982, 6266},{  941, 6536},{  996, 6630}
      },
      /*Cr  qi=18  INTER*/
      {
        {    0,  741},{    9,  743},{   16, 1034},{   26, 1385},
        {   39, 1741},{   48, 2090},{   56, 2459},{   64, 2850},
        {   72, 3242},{   81, 3622},{   89, 3980},{   98, 4323},
        {  104, 4667},{  110, 5005},{  118, 5337},{  126, 5675},
        {  137, 5998},{  146, 6311},{  156, 6621},{  170, 6914},
        {  181, 7205},{  196, 7490},{  203, 7779},{  232, 8012}
      }
    }
  },
  {
    {
      /*Y'  qi=27  INTRA*/
      {
        {  121,  378},{  379, 1464},{  810, 2335},{ 1447, 2725},
        { 1851, 3194},{ 2311, 3655},{ 2747, 4081},{ 3211, 4393},
        { 3640, 4672},{ 4056, 4933},{ 4427, 5150},{ 4842, 5259},
        { 5220, 5381},{ 5584, 5443},{ 5925, 5648},{ 6233, 5783},
        { 6547, 5944},{ 6905, 6056},{ 7203, 6181},{ 7526, 6207},
        { 7800, 6330},{ 8175, 6312},{ 8415, 6437},{ 8705, 6459}
      },
      /*Y'  qi=27  INTER*/
      {
        {   48,  199},{   90, 1458},{  167, 2824},{  291, 4050},
        {  434, 5144},{  638, 6133},{  901, 7011},{ 1249, 7743},
        { 1726, 8280},{ 2317, 8616},{ 2957, 8789},{ 3561, 8896},
        { 4126, 8936},{ 4646, 8933},{ 5115, 8931},{ 5579, 8890},
        { 6008, 8804},{ 6411, 8744},{ 6774, 8646},{ 7153, 8549},
        { 7475, 8462},{ 7790, 8372},{ 8069, 8280},{ 8299, 8278}
      }
    },
    {
      /*Cb  qi=27  INTRA*/
      {
        {   75,  612},{  117,  751},{  160, 1068},{  195, 1406},
        {  240, 1741},{  305, 2066},{  364, 2359},{  454, 2639},
        {  538, 2899},{  609, 3149},{  664, 3384},{  730, 3625},
        {  785, 3860},{  836, 4094},{  872, 4312},{  948, 4507},
        { 1023, 4677},{ 1081, 4843},{ 1165, 4985},{ 1238, 5092},
        { 1316, 5235},{ 1418, 5345},{ 1430, 5478},{ 1505, 5538}
      },
      /*Cb  qi=27  INTER*/
      {
        {   16,  637},{   13,  634},{   32,  869},{   46, 1230},
        {   55, 1583},{   67, 1950},{   79, 2320},{   93, 2690},
        {  107, 3052},{  120, 3399},{  133, 3733},{  146, 4054},
        {  162, 4367},{  175, 4679},{  191, 4984},{  211, 5285},
        {  232, 5581},{  252, 5875},{  276, 6155},{  305, 6433},
        {  333, 6706},{  364, 6967},{  398, 7244},{  474, 7394}
      }
    },
    {
      /*Cr  qi=27  INTRA*/
      {
        {   64,  632},{  107,  763},{  147, 1054},{  176, 1411},
        {  255, 1770},{  324, 2079},{  411, 2359},{  475, 2621},
        {  545, 2880},{  590, 3158},{  647, 3425},{  709, 3648},
        {  766, 3878},{  831, 4082},{  911, 4260},{  960, 4493},
        { 1042, 4558},{ 1115, 4760},{ 1200, 4852},{ 1280, 4950},
        { 1327, 5186},{ 1445, 5157},{ 1443, 5431},{ 1518, 5493}
      },
      /*Cr  qi=27  INTER*/
      {
        {   12,  688},{   11,  660},{   28,  869},{   46, 1227},
        {   60, 1598},{   68, 1954},{   79, 2318},{   93, 2693},
        {  108, 3054},{  123, 3406},{  138, 3748},{  151, 4078},
        {  165, 4400},{  180, 4716},{  197, 5024},{  217, 5314},
        {  243, 5599},{  275, 5866},{  301, 6128},{  327, 6394},
        {  352, 6644},{  375, 6894},{  376, 7180},{  458, 7334}
      }
    }
  },
  {
    {
      /*Y'  qi=36  INTRA*/
      {
        {  156,  263},{  484, 1370},{ 1174, 2110},{ 1914, 2456},
        { 2601, 2695},{ 3221, 2984},{ 3865, 3284},{ 4450, 3530},
        { 4979, 3739},{ 5470, 3928},{ 5905, 4080},{ 6375, 4200},
        { 6761, 4373},{ 7175, 4429},{ 7615, 4616},{ 8069, 4687},
        { 8417, 4820},{ 8813, 4908},{ 9211, 5001},{ 9508, 5073},
        { 9888, 5133},{10209, 5140},{10529, 5196},{10830, 5173}
      },
      /*Y'  qi=36  INTER*/
      {
        {   68,  151},{  107, 1413},{  262, 2665},{  542, 3715},
        {  946, 4584},{ 1508, 5279},{ 2167, 5829},{ 2968, 6179},
        { 3758, 6392},{ 4481, 6517},{ 5139, 6577},{ 5706, 6636},
        { 6271, 6612},{ 6746, 6585},{ 7216, 6533},{ 7622, 6496},
        { 8045, 6403},{ 8393, 6389},{ 8799, 6272},{ 9062, 6281},
        { 9436, 6184},{ 9637, 6238},{ 9864, 6215},{10147, 6215}
      }
    },
    {
      /*Cb  qi=36  INTRA*/
      {
        {   91,  385},{  138,  613},{  205,  932},{  265, 1239},
        {  353, 1549},{  443, 1839},{  518, 2104},{  655, 2341},
        {  764, 2559},{  876, 2756},{  967, 2950},{ 1088, 3107},
        { 1184, 3266},{ 1295, 3396},{ 1375, 3548},{ 1502, 3664},
        { 1610, 3764},{ 1731, 3844},{ 1839, 3938},{ 1954, 4016},
        { 2069, 4100},{ 2207, 4167},{ 2274, 4253},{ 2374, 4289}
      },
      /*Cb  qi=36  INTER*/
      {
        {   59,   18},{   56,  463},{   50,  790},{   76, 1155},
        {   90, 1515},{  108, 1877},{  125, 2226},{  150, 2562},
        {  177, 2890},{  203, 3203},{  231, 3501},{  259, 3789},
        {  289, 4074},{  325, 4348},{  367, 4608},{  418, 4857},
        {  486, 5093},{  574, 5307},{  677, 5494},{  784, 5688},
        {  914, 5844},{ 1033, 6004},{ 1142, 6179},{ 1307, 6220}
      }
    },
    {
      /*Cr  qi=36  INTRA*/
      {
        {   87,  376},{  132,  616},{  190,  931},{  268, 1260},
        {  358, 1550},{  457, 1833},{  592, 2082},{  685, 2318},
        {  781, 2548},{  867, 2757},{  968, 2953},{ 1080, 3124},
        { 1173, 3255},{ 1282, 3390},{ 1410, 3477},{ 1528, 3593},
        { 1645, 3612},{ 1766, 3739},{ 1885, 3789},{ 1954, 3892},
        { 2115, 3987},{ 2202, 4052},{ 2280, 4172},{ 2379, 4213}
      },
      /*Cr  qi=36  INTER*/
      {
        {   53,   45},{   50,  467},{   45,  789},{   76, 1150},
        {   92, 1531},{  107, 1877},{  125, 2219},{  147, 2561},
        {  176, 2893},{  206, 3209},{  231, 3514},{  260, 3808},
        {  298, 4085},{  350, 4344},{  411, 4587},{  475, 4814},
        {  532, 5037},{  587, 5261},{  647, 5480},{  707, 5694},
        {  793, 5900},{  891, 6093},{ 1017, 6292},{ 1205, 6307}
      }
    }
  },
  {
    {
      /*Y'  qi=45  INTRA*/
      {
        {   47,  170},{  955, 1217},{ 1713, 2014},{ 3050, 2094},
        { 3954, 2179},{ 4801, 2357},{ 5629, 2494},{ 6313, 2614},
        { 6962, 2716},{ 7566, 2820},{ 8138, 2886},{ 8613, 2949},
        { 9097, 3031},{ 9574, 3044},{10053, 3142},{10514, 3134},
        {10897, 3241},{11397, 3275},{11775, 3297},{12200, 3350},
        {12527, 3350},{12959, 3393},{13246, 3401},{13573, 3397}
      },
      /*Y'  qi=45  INTER*/
      {
        {   53,   73},{  175, 1343},{  649, 2439},{ 1339, 3250},
        { 2297, 3837},{ 3395, 4203},{ 4438, 4400},{ 5401, 4529},
        { 6222, 4588},{ 7018, 4564},{ 7713, 4532},{ 8378, 4464},
        { 8959, 4414},{ 9464, 4364},{ 9980, 4315},{10401, 4291},
        {10805, 4260},{11172, 4260},{11501, 4231},{11798, 4248},
        {12082, 4254},{12381, 4262},{12572, 4285},{12877, 4289}
      }
    },
    {
      /*Cb  qi=45  INTRA*/
      {
        {  112,  -14},{  173,  495},{  260,  827},{  355, 1122},
        {  451, 1420},{  579, 1695},{  697, 1934},{  917, 2101},
        { 1104, 2244},{ 1266, 2381},{ 1417, 2520},{ 1609, 2611},
        { 1801, 2689},{ 1973, 2764},{ 2108, 2864},{ 2298, 2948},
        { 2452, 3008},{ 2588, 3080},{ 2732, 3161},{ 2888, 3203},
        { 3052, 3266},{ 3240, 3294},{ 3342, 3351},{ 3467, 3373}
      },
      /*Cb  qi=45  INTER*/
      {
        {   41,  -49},{   52,  385},{   87,  743},{  110, 1102},
        {  135, 1453},{  162, 1788},{  207, 2096},{  272, 2391},
        {  330, 2677},{  392, 2950},{  464, 3205},{  556, 3442},
        {  674, 3656},{  827, 3847},{ 1030, 4006},{ 1275, 4132},
        { 1544, 4234},{ 1809, 4317},{ 2089, 4408},{ 2377, 4456},
        { 2647, 4532},{ 2919, 4595},{ 3256, 4659},{ 3465, 4657}
      }
    },
    {
      /*Cr  qi=45  INTRA*/
      {
        {   99,  -14},{  164,  493},{  247,  832},{  358, 1123},
        {  468, 1416},{  599, 1680},{  795, 1886},{  958, 2063},
        { 1133, 2211},{ 1300, 2345},{ 1480, 2461},{ 1664, 2554},
        { 1807, 2656},{ 1995, 2742},{ 2146, 2799},{ 2331, 2856},
        { 2440, 2894},{ 2592, 2996},{ 2751, 3033},{ 2865, 3112},
        { 3073, 3162},{ 3210, 3208},{ 3330, 3306},{ 3454, 3332}
      },
      /*Cr  qi=45  INTER*/
      {
        {   39,  -33},{   48,  403},{   86,  744},{  110, 1101},
        {  134, 1461},{  165, 1779},{  205, 2095},{  259, 2401},
        {  318, 2686},{  386, 2958},{  481, 3204},{  610, 3415},
        {  753, 3603},{  908, 3780},{ 1055, 3959},{ 1220, 4132},
        { 1422, 4281},{ 1656, 4419},{ 1939, 4512},{ 2259, 4574},
        { 2593, 4593},{ 2950, 4569},{ 3339, 4505},{ 3542, 4497}
      }
    }
  },
  {
    {
      /*Y'  qi=54  INTRA*/
      {
        {  339,   30},{  785, 1251},{ 2395, 1971},{ 4075, 2063},
        { 4924, 2135},{ 5806, 2270},{ 6604, 2372},{ 7224, 2497},
        { 7879, 2608},{ 8400, 2729},{ 8951, 2829},{ 9379, 2864},
        { 9782, 2955},{10230, 3020},{10704, 3132},{11264, 3272},
        {11618, 3284},{12034, 3394},{12500, 3482},{12767, 3484},
        {13162, 3580},{13552, 3565},{13997, 3732},{14320, 3715}
      },
      /*Y'  qi=54  INTER*/
      {
        {   65,   95},{  269, 1312},{ 1152, 2242},{ 2336, 2863},
        { 3728, 3239},{ 4944, 3439},{ 6034, 3543},{ 7064, 3580},
        { 7991, 3586},{ 8849, 3568},{ 9605, 3561},{10306, 3550},
        {10919, 3544},{11466, 3530},{11972, 3528},{12401, 3536},
        {12818, 3511},{13185, 3522},{13523, 3505},{13827, 3505},
        {14114, 3522},{14395, 3521},{14625, 3533},{14909, 3532}
      }
    },
    {
      /*Cb  qi=54  INTRA*/
      {
        {  148,   -3},{  218,  480},{  351,  787},{  437, 1069},
        {  550, 1350},{  730, 1592},{  931, 1784},{ 1243, 1884},
        { 1499, 1984},{ 1680, 2115},{ 1864, 2244},{ 2062, 2334},
        { 2278, 2407},{ 2442, 2496},{ 2602, 2603},{ 2783, 2686},
        { 2928, 2771},{ 3073, 2856},{ 3207, 2938},{ 3368, 2998},
        { 3516, 3077},{ 3699, 3122},{ 3818, 3202},{ 3939, 3230}
      },
      /*Cb  qi=54  INTER*/
      {
        {   48,  -11},{   54,  407},{   86,  743},{  122, 1083},
        {  176, 1400},{  241, 1699},{  347, 1968},{  496, 2208},
        {  664, 2431},{  863, 2637},{ 1120, 2816},{ 1442, 2961},
        { 1835, 3066},{ 2261, 3140},{ 2676, 3203},{ 3092, 3245},
        { 3480, 3266},{ 3862, 3286},{ 4254, 3305},{ 4604, 3316},
        { 4989, 3335},{ 5306, 3351},{ 5654, 3339},{ 5855, 3345}
      }
    },
    {
      /*Cr  qi=54  INTRA*/
      {
        {  137,   10},{  212,  492},{  315,  795},{  470, 1061},
        {  612, 1333},{  821, 1539},{ 1105, 1680},{ 1335, 1811},
        { 1566, 1927},{ 1773, 2038},{ 1973, 2153},{ 2148, 2259},
        { 2311, 2352},{ 2474, 2460},{ 2647, 2516},{ 2810, 2607},
        { 2928, 2638},{ 3085, 2742},{ 3232, 2815},{ 3348, 2899},
        { 3533, 2993},{ 3679, 3029},{ 3803, 3138},{ 3925, 3170}
      },
      /*Cr  qi=54  INTER*/
      {
        {   46,    2},{   47,  419},{   87,  746},{  125, 1083},
        {  177, 1401},{  249, 1687},{  342, 1964},{  453, 2226},
        {  627, 2454},{  869, 2641},{ 1152, 2800},{ 1455, 2942},
        { 1776, 3077},{ 2135, 3187},{ 2524, 3287},{ 2984, 3325},
        { 3425, 3344},{ 3881, 3328},{ 4313, 3274},{ 4701, 3218},
        { 5027, 3171},{ 5299, 3130},{ 5597, 3107},{ 5791, 3120}
      }
    }
  },
  {
    {
      /*Y'  qi=63  INTRA*/
      {
        {  -86,  167},{ 2070, 1104},{ 5138, 1428},{ 7014, 1535},
        { 8430, 1629},{ 9663, 1690},{10576, 1745},{11277, 1809},
        {12003, 1869},{12663, 1925},{13258, 1983},{13701, 2016},
        {14228, 2073},{14756, 2088},{15203, 2164},{15993, 2175},
        {16378, 2256},{16917, 2240},{17361, 2332},{17782, 2312},
        {18376, 2381},{18728, 2362},{19224, 2408},{19705, 2392}
      },
      /*Y'  qi=63  INTER*/
      {
        { -529,  154},{  967, 1233},{ 4201, 1610},{ 6285, 1800},
        { 8058, 1908},{ 9439, 1968},{10737, 1987},{11999, 1979},
        {13003, 1972},{13854, 1963},{14584, 1965},{15217, 1955},
        {15773, 1956},{16229, 1949},{16735, 1952},{17085, 1956},
        {17508, 1956},{17821, 1961},{18191, 1961},{18465, 1982},
        {18792, 1975},{19158, 1995},{19378, 2010},{19817, 2021}
      }
    },
    {
      /*Cb  qi=63  INTRA*/
      {
        {  136,    4},{  338,  438},{  593,  730},{  835,  974},
        { 1168, 1188},{ 1602, 1345},{ 2004, 1467},{ 2465, 1505},
        { 2799, 1574},{ 3091, 1669},{ 3384, 1758},{ 3673, 1817},
        { 3950, 1861},{ 4190, 1924},{ 4444, 1993},{ 4701, 2051},
        { 4915, 2123},{ 5119, 2166},{ 5329, 2231},{ 5576, 2259},
        { 5793, 2310},{ 6001, 2334},{ 6198, 2384},{ 6344, 2401}
      },
      /*Cb  qi=63  INTER*/
      {
        {   49,    4},{   51,  403},{   98,  729},{  185, 1034},
        {  352, 1304},{  622, 1533},{ 1068, 1696},{ 1604, 1821},
        { 2203, 1924},{ 2890, 1988},{ 3622, 2017},{ 4359, 2019},
        { 5025, 2005},{ 5586, 2002},{ 6090, 1989},{ 6519, 1977},
        { 6927, 1977},{ 7305, 1968},{ 7730, 1984},{ 8087, 1981},
        { 8435, 1991},{ 8822, 1987},{ 9155, 2008},{ 9392, 2011}
      }
    },
    {
      /*Cr  qi=63  INTRA*/
      {
        {  131,   11},{  334,  448},{  569,  739},{  929,  946},
        { 1285, 1145},{ 1718, 1274},{ 2176, 1343},{ 2531, 1424},
        { 2866, 1504},{ 3176, 1580},{ 3475, 1657},{ 3736, 1728},
        { 3962, 1807},{ 4232, 1872},{ 4425, 1921},{ 4657, 1976},
        { 4817, 2009},{ 5063, 2082},{ 5281, 2129},{ 5480, 2199},
        { 5743, 2258},{ 5887, 2283},{ 6124, 2358},{ 6273, 2378}
      },
      /*Cr  qi=63  INTER*/
      {
        {   47,   15},{   40,  405},{  100,  730},{  189, 1037},
        {  351, 1303},{  625, 1526},{  984, 1719},{ 1512, 1862},
        { 2189, 1947},{ 2895, 2003},{ 3576, 2046},{ 4249, 2072},
        { 4901, 2068},{ 5514, 2043},{ 6079, 2009},{ 6528, 1977},
        { 6927, 1940},{ 7274, 1915},{ 7580, 1894},{ 7910, 1910},
        { 8211, 1902},{ 8472, 1920},{ 8742, 1926},{ 8981, 1930}
      }
    }
  }
};

# if !defined(OC_COLLECT_METRICS)
static const
# endif
oc_mode_rd OC_MODE_RD_SAD[OC_LOGQ_BINS][3][2][OC_COMP_BINS]={
  {
    {
      /*Y'  qi=0  INTRA*/
      {
        {   33,  122},{   57, 1297},{   13, 2226},{  157, 3890},
        {  227, 3682},{  169, 3084},{  197, 2700},{  227, 3238},
        {  290, 4294},{  354, 5230},{  406, 5615},{  417, 5322},
        {  452, 5462},{  455, 5683},{  493, 5938},{  553, 6374},
        {  558, 6464},{  606, 6493},{  616, 6417},{  643, 6557},
        {  641, 6664},{  716, 7285},{  748, 7518},{  747, 7502}
      },
      /*Y'  qi=0  INTER*/
      {
        {   16,  205},{    5, 1338},{   16, 2554},{    6, 3809},
        {    9, 5188},{   58, 6446},{   76, 7561},{   95, 8648},
        {  124, 9713},{  158,10787},{  193,11887},{  233,12991},
        {  270,14116},{  307,15236},{  341,16346},{  372,17426},
        {  398,18499},{  422,19594},{  448,20669},{  479,21732},
        {  526,22720},{  583,23572},{  655,24516},{  758,24647}
      }
    },
    {
      /*Cb  qi=0  INTRA*/
      {
        {   26,   40},{   23,  589},{   27,  784},{   27, 1079},
        {   24, 1186},{   25, 1641},{   25, 1915},{   29, 2207},
        {   39, 2361},{   39, 2746},{   32, 3020},{   16, 3387},
        {   31, 3604},{   36, 4076},{   69, 4426},{  102, 4724},
        {  139, 4923},{  196, 5061},{  211, 5103},{  214, 5063},
        {  161, 4466},{  208, 4793},{  218, 4537},{  219, 4539}
      },
      /*Cb  qi=0  INTER*/
      {
        {    3,  164},{    1,  535},{    1,  779},{    2, 1048},
        {    3, 1267},{    1, 1625},{    2, 1921},{    5, 2224},
        {    8, 2481},{    8, 2813},{    4, 3089},{   -2, 3386},
        {   -9, 3642},{  -14, 3993},{  -11, 4300},{   -6, 4628},
        {    4, 4929},{   25, 5299},{   44, 5623},{   83, 5915},
        {   93, 6186},{   91, 6483},{   90, 6775},{   95, 6952}
      }
    },
    {
      /*Cr  qi=0  INTRA*/
      {
        {   22,   49},{   26,  579},{   23,  762},{   15, 1050},
        {   20, 1191},{   24, 1608},{   26, 1875},{   35, 2173},
        {   39, 2359},{   30, 2736},{   16, 2987},{    0, 3334},
        {   14, 3625},{   11, 4095},{   57, 4512},{   95, 4793},
        {  141, 4949},{  206, 5242},{  230, 5191},{  242, 5177},
        {  178, 4775},{  237, 5010},{  223, 4656},{  224, 4657}
      },
      /*Cr  qi=0  INTER*/
      {
        {    3,  163},{    1,  536},{    1,  773},{    3, 1023},
        {    2, 1225},{    1, 1607},{    1, 1900},{    5, 2204},
        {    9, 2453},{    8, 2781},{    3, 3049},{   -5, 3338},
        {  -13, 3570},{  -17, 3950},{  -13, 4255},{   -6, 4596},
        {    7, 4893},{   33, 5300},{   53, 5632},{   97, 5942},
        {  103, 6216},{   96, 6522},{   91, 6849},{   98, 6995}
      }
    }
  },
  {
    {
      /*Y'  qi=9  INTRA*/
      {
        {   47,  152},{   50, 1213},{  144, 2543},{  242, 2332},
        {  210, 1894},{  250, 2386},{  328, 3094},{  407, 3419},
        {  464, 3507},{  522, 3770},{  613, 4194},{  657, 4618},
        {  753, 5137},{  796, 5248},{  842, 5110},{  927, 5330},
        {  994, 5487},{ 1008, 5463},{ 1101, 5794},{ 1169, 5966},
        { 1208, 6121},{ 1331, 6447},{ 1445, 6618},{ 1449, 6616}
      },
      /*Y'  qi=9  INTER*/
      {
        {    4,  218},{   16, 1314},{    4, 2563},{   37, 3882},
        {   83, 5058},{  109, 6184},{  161, 7292},{  224, 8389},
        {  287, 9485},{  349,10565},{  411,11608},{  464,12648},
        {  518,13664},{  575,14650},{  649,15585},{  742,16451},
        {  862,17214},{ 1003,17860},{ 1179,18325},{ 1372,18648},
        { 1576,18878},{ 1795,18903},{ 2040,18880},{ 2116,18759}
      }
    },
    {
      /*Cb  qi=9  INTRA*/
      {
        {   27,   42},{   23,  587},{   34,  782},{   37, 1079},
        {   34, 1204},{   42, 1630},{   37, 1887},{   25, 2210},
        {   40, 2455},{   71, 2880},{  112, 3193},{  156, 3427},
        {  168, 3403},{  217, 3488},{  203, 3335},{  224, 3200},
        {  191, 2742},{  195, 2810},{  207, 2665},{  201, 2661},
        {  169, 2078},{  211, 2720},{  226, 2813},{  228, 2824}
      },
      /*Cb  qi=9  INTER*/
      {
        {    4,  158},{    2,  537},{    3,  779},{    2, 1045},
        {    3, 1284},{    7, 1629},{    7, 1917},{    1, 2218},
        {   -4, 2497},{   -3, 2845},{    6, 3162},{   23, 3482},
        {   42, 3788},{   62, 4116},{   76, 4416},{   84, 4700},
        {   91, 4975},{   95, 5259},{   97, 5518},{   94, 5790},
        {   99, 6052},{  111, 6311},{  126, 6601},{  136, 6719}
      }
    },
    {
      /*Cr  qi=9  INTRA*/
      {
        {   25,   50},{   32,  576},{   32,  762},{   21, 1049},
        {   28, 1207},{   41, 1603},{   36, 1839},{   26, 2170},
        {   34, 2462},{   59, 2872},{  109, 3176},{  157, 3364},
        {  188, 3397},{  231, 3418},{  250, 3341},{  261, 3228},
        {  222, 2814},{  258, 3091},{  234, 2915},{  228, 3042},
        {  210, 2610},{  273, 3210},{  274, 3231},{  276, 3239}
      },
      /*Cr  qi=9  INTER*/
      {
        {    4,  156},{    2,  538},{    3,  772},{    2, 1028},
        {    3, 1254},{    7, 1613},{    7, 1893},{    0, 2191},
        {   -8, 2454},{   -4, 2811},{    7, 3121},{   27, 3442},
        {   48, 3749},{   72, 4101},{   88, 4410},{   91, 4698},
        {   99, 4988},{   99, 5279},{  101, 5542},{   95, 5813},
        {   99, 6088},{  114, 6367},{  125, 6683},{  137, 6761}
      }
    }
  },
  {
    {
      /*Y'  qi=18  INTRA*/
      {
        {   51,   88},{   88, 1344},{  258, 1643},{  228, 1325},
        {  372, 2208},{  443, 2371},{  520, 2382},{  584, 2477},
        {  739, 2906},{  859, 3348},{ 1008, 3697},{ 1131, 3884},
        { 1278, 4110},{ 1349, 4229},{ 1431, 4329},{ 1544, 4395},
        { 1602, 4439},{ 1669, 4535},{ 1814, 4656},{ 1883, 4716},
        { 1957, 4940},{ 2101, 5019},{ 2259, 5249},{ 2265, 5246}
      },
      /*Y'  qi=18  INTER*/
      {
        {   26,  195},{    1, 1317},{   45, 2595},{  103, 3750},
        {  168, 4903},{  281, 6007},{  397, 7062},{  513, 8064},
        {  630, 9010},{  758, 9902},{  906,10732},{ 1095,11463},
        { 1338,12060},{ 1629,12490},{ 1969,12724},{ 2313,12842},
        { 2666,12828},{ 2993,12747},{ 3294,12670},{ 3558,12553},
        { 3813,12440},{ 3990,12379},{ 4177,12291},{ 4226,12265}
      }
    },
    {
      /*Cb  qi=18  INTRA*/
      {
        {   31,   43},{   33,  585},{   40,  781},{   58, 1077},
        {   45, 1189},{   58, 1655},{   66, 1983},{  123, 2221},
        {  168, 2193},{  227, 2321},{  241, 2246},{  250, 2208},
        {  221, 1786},{  250, 2087},{  247, 2036},{  250, 2164},
        {  241, 2054},{  287, 2453},{  302, 2551},{  335, 2758},
        {  279, 2511},{  379, 2973},{  404, 3028},{  406, 3029}
      },
      /*Cb  qi=18  INTER*/
      {
        {    7,  153},{    4,  537},{    3,  777},{    9, 1034},
        {    6, 1282},{    0, 1630},{    0, 1943},{   21, 2252},
        {   48, 2567},{   67, 2881},{   83, 3178},{   89, 3463},
        {   92, 3738},{   99, 4024},{  114, 4289},{  131, 4552},
        {  153, 4814},{  179, 5081},{  207, 5333},{  241, 5581},
        {  273, 5822},{  303, 6068},{  335, 6368},{  353, 6432}
      }
    },
    {
      /*Cr  qi=18  INTRA*/
      {
        {   31,   49},{   42,  575},{   42,  763},{   38, 1045},
        {   41, 1184},{   56, 1631},{   87, 1968},{  163, 2177},
        {  191, 2188},{  236, 2264},{  240, 2101},{  234, 2047},
        {  206, 1651},{  222, 1966},{  238, 2013},{  240, 2176},
        {  229, 2098},{  321, 2592},{  341, 2748},{  378, 3025},
        {  367, 2849},{  442, 3283},{  453, 3315},{  455, 3313}
      },
      /*Cr  qi=18  INTER*/
      {
        {    6,  151},{    3,  539},{    3,  775},{    8, 1027},
        {    6, 1260},{   -3, 1619},{    0, 1927},{   24, 2238},
        {   58, 2558},{   76, 2871},{   92, 3173},{   96, 3461},
        {   98, 3742},{  104, 4032},{  116, 4306},{  136, 4578},
        {  158, 4839},{  185, 5123},{  217, 5383},{  250, 5642},
        {  279, 5910},{  306, 6169},{  333, 6502},{  350, 6522}
      }
    }
  },
  {
    {
      /*Y'  qi=27  INTRA*/
      {
        {   10,   85},{  280, 1349},{  278,  815},{  497, 1699},
        {  600, 1569},{  744, 1944},{  894, 2114},{ 1040, 2292},
        { 1216, 2484},{ 1485, 2816},{ 1778, 3065},{ 1990, 3243},
        { 2199, 3381},{ 2326, 3515},{ 2370, 3422},{ 2512, 3581},
        { 2548, 3526},{ 2656, 3615},{ 2803, 3679},{ 2946, 3766},
        { 3023, 3824},{ 3179, 3908},{ 3374, 4035},{ 3377, 4030}
      },
      /*Y'  qi=27  INTER*/
      {
        {   -2,  172},{   31, 1347},{  117, 2488},{  245, 3651},
        {  448, 4719},{  668, 5679},{  918, 6524},{ 1204, 7255},
        { 1557, 7848},{ 1998, 8281},{ 2511, 8531},{ 3055, 8642},
        { 3582, 8648},{ 4062, 8611},{ 4482, 8582},{ 4845, 8560},
        { 5140, 8560},{ 5423, 8581},{ 5645, 8596},{ 5855, 8586},
        { 6061, 8608},{ 6211, 8558},{ 6402, 8583},{ 6472, 8575}
      }
    },
    {
      /*Cb  qi=27  INTRA*/
      {
        {   47,   49},{   35,  580},{   64,  778},{   69, 1071},
        {   98, 1289},{  186, 1556},{  177, 1654},{  197, 1736},
        {  211, 1373},{  284, 1742},{  321, 1840},{  344, 2024},
        {  321, 1969},{  386, 2254},{  397, 2281},{  425, 2320},
        {  396, 2088},{  448, 2284},{  462, 2213},{  482, 2274},
        {  410, 1894},{  513, 2310},{  546, 2332},{  549, 2334}
      },
      /*Cb  qi=27  INTER*/
      {
        {   11,  145},{    5,  539},{   11,  771},{    0, 1033},
        {    9, 1334},{   44, 1644},{   70, 1934},{   87, 2227},
        {   96, 2508},{  113, 2812},{  139, 3085},{  174, 3352},
        {  216, 3614},{  261, 3873},{  305, 4123},{  349, 4372},
        {  396, 4611},{  442, 4853},{  493, 5088},{  543, 5313},
        {  600, 5537},{  662, 5752},{  737, 6018},{  775, 6037}
      }
    },
    {
      /*Cr  qi=27  INTRA*/
      {
        {   49,   52},{   57,  570},{   61,  762},{   44, 1048},
        {   80, 1291},{  196, 1513},{  224, 1522},{  242, 1532},
        {  213, 1293},{  260, 1639},{  253, 1691},{  291, 1915},
        {  294, 1897},{  367, 2178},{  395, 2258},{  432, 2310},
        {  407, 2105},{  503, 2369},{  492, 2293},{  552, 2421},
        {  496, 2099},{  598, 2549},{  624, 2531},{  627, 2532}
      },
      /*Cr  qi=27  INTER*/
      {
        {   10,  147},{    4,  538},{   11,  769},{    0, 1022},
        {    9, 1318},{   51, 1635},{   80, 1925},{   97, 2214},
        {  101, 2493},{  115, 2805},{  143, 3083},{  182, 3361},
        {  226, 3625},{  270, 3898},{  319, 4157},{  366, 4405},
        {  418, 4649},{  467, 4904},{  509, 5157},{  548, 5412},
        {  589, 5659},{  636, 5909},{  683, 6208},{  710, 6190}
      }
    }
  },
  {
    {
      /*Y'  qi=36  INTRA*/
      {
        {   86,  252},{  345,  662},{  476, 1143},{  698, 1169},
        {  894, 1457},{ 1218, 1728},{ 1465, 1849},{ 1731, 2019},
        { 2183, 2298},{ 2666, 2511},{ 3116, 2731},{ 3371, 2813},
        { 3621, 2923},{ 3675, 2949},{ 3710, 2921},{ 3740, 2896},
        { 3746, 2895},{ 3886, 2978},{ 4069, 2991},{ 4229, 3016},
        { 4338, 3102},{ 4530, 3124},{ 4751, 3248},{ 4753, 3244}
      },
      /*Y'  qi=36  INTER*/
      {
        {    0,  208},{   73, 1293},{  248, 2449},{  616, 3461},
        { 1061, 4329},{ 1601, 4986},{ 2189, 5447},{ 2875, 5723},
        { 3620, 5844},{ 4328, 5879},{ 4954, 5880},{ 5490, 5890},
        { 5934, 5901},{ 6353, 5926},{ 6706, 5924},{ 7036, 5930},
        { 7338, 5938},{ 7600, 5930},{ 7870, 5939},{ 8065, 5921},
        { 8318, 5914},{ 8451, 5912},{ 8648, 5923},{ 8734, 5926}
      }
    },
    {
      /*Cb  qi=36  INTRA*/
      {
        {   52,   54},{   52,  575},{  103,  776},{  185, 1072},
        {  172, 1069},{  211, 1302},{  217, 1413},{  285, 1586},
        {  330, 1463},{  453, 1694},{  500, 1741},{  545, 1852},
        {  501, 1650},{  584, 1874},{  587, 1856},{  638, 1919},
        {  581, 1742},{  670, 1953},{  688, 1934},{  731, 2030},
        {  637, 1794},{  806, 2123},{  840, 2091},{  843, 2091}
      },
      /*Cb  qi=36  INTER*/
      {
        {   19,  142},{   17,  534},{    6,  772},{   44, 1023},
        {   82, 1296},{   94, 1614},{  117, 1903},{  158, 2187},
        {  218, 2450},{  285, 2703},{  352, 2943},{  421, 3181},
        {  489, 3415},{  564, 3644},{  647, 3861},{  748, 4060},
        {  861, 4246},{  993, 4419},{ 1132, 4576},{ 1282, 4744},
        { 1445, 4894},{ 1600, 5034},{ 1782, 5211},{ 1837, 5200}
      }
    },
    {
      /*Cr  qi=36  INTRA*/
      {
        {   62,   55},{   90,  561},{   56,  767},{  148, 1014},
        {  207,  981},{  258, 1216},{  273, 1253},{  326, 1392},
        {  338, 1383},{  417, 1613},{  443, 1629},{  497, 1734},
        {  466, 1525},{  561, 1778},{  577, 1787},{  631, 1892},
        {  591, 1706},{  715, 1980},{  730, 1958},{  822, 2113},
        {  755, 1935},{  928, 2228},{  935, 2205},{  938, 2205}
      },
      /*Cr  qi=36  INTER*/
      {
        {   14,  145},{   16,  535},{    5,  772},{   44, 1017},
        {   91, 1296},{  100, 1605},{  122, 1891},{  163, 2174},
        {  225, 2443},{  294, 2707},{  362, 2962},{  436, 3210},
        {  518, 3437},{  607, 3664},{  702, 3876},{  795, 4094},
        {  886, 4310},{  980, 4538},{ 1089, 4749},{ 1216, 4927},
        { 1357, 5116},{ 1506, 5247},{ 1758, 5338},{ 1787, 5306}
      }
    }
  },
  {
    {
      /*Y'  qi=45  INTRA*/
      {
        {  185,  246},{  513,  647},{  883,  891},{ 1313, 1142},
        { 1760, 1351},{ 2368, 1595},{ 2828, 1718},{ 3097, 1780},
        { 3762, 1951},{ 4454, 2121},{ 4986, 2227},{ 5281, 2281},
        { 5477, 2299},{ 5431, 2288},{ 5425, 2283},{ 5439, 2290},
        { 5324, 2249},{ 5509, 2279},{ 5703, 2321},{ 5896, 2348},
        { 6049, 2370},{ 6253, 2425},{ 6415, 2432},{ 6419, 2430}
      },
      /*Y'  qi=45  INTER*/
      {
        {    6,  215},{  152, 1261},{  691, 2314},{ 1538, 3095},
        { 2505, 3632},{ 3475, 3935},{ 4355, 4084},{ 5209, 4139},
        { 5985, 4162},{ 6644, 4185},{ 7235, 4190},{ 7768, 4196},
        { 8266, 4200},{ 8736, 4210},{ 9143, 4207},{ 9511, 4215},
        { 9828, 4209},{10112, 4224},{10374, 4226},{10642, 4232},
        {10842, 4219},{10971, 4208},{11200, 4211},{11299, 4216}
      }
    },
    {
      /*Cb  qi=45  INTRA*/
      {
        {   58,   71},{   66,  548},{  155,  762},{  213,  944},
        {  192,  731},{  324, 1147},{  401, 1366},{  481, 1480},
        {  508, 1238},{  657, 1522},{  727, 1563},{  794, 1611},
        {  761, 1470},{  885, 1710},{  893, 1700},{  958, 1760},
        {  893, 1543},{  985, 1719},{ 1014, 1732},{ 1082, 1784},
        {  963, 1519},{ 1152, 1800},{ 1221, 1830},{ 1226, 1830}
      },
      /*Cb  qi=45  INTER*/
      {
        {   35,  135},{   12,  532},{   54,  769},{  106, 1007},
        {  127, 1258},{  198, 1565},{  289, 1832},{  398, 2082},
        {  520, 2302},{  653, 2511},{  800, 2705},{  956, 2897},
        { 1143, 3064},{ 1358, 3220},{ 1623, 3335},{ 1913, 3444},
        { 2198, 3534},{ 2502, 3626},{ 2787, 3711},{ 3114, 3783},
        { 3454, 3831},{ 3711, 3871},{ 4163, 3901},{ 4221, 3890}
      }
    },
    {
      /*Cr  qi=45  INTRA*/
      {
        {   93,   68},{   72,  541},{  154,  769},{  239,  848},
        {  214,  623},{  377, 1060},{  437, 1200},{  514, 1280},
        {  512, 1160},{  625, 1453},{  657, 1470},{  718, 1516},
        {  692, 1331},{  831, 1617},{  875, 1609},{  944, 1678},
        {  886, 1469},{ 1061, 1699},{ 1082, 1714},{ 1226, 1823},
        { 1113, 1581},{ 1324, 1872},{ 1370, 1925},{ 1374, 1924}
      },
      /*Cr  qi=45  INTER*/
      {
        {   31,  140},{   13,  533},{   52,  770},{  109, 1000},
        {  134, 1253},{  201, 1555},{  298, 1821},{  411, 2076},
        {  525, 2314},{  659, 2545},{  828, 2747},{ 1019, 2918},
        { 1205, 3082},{ 1405, 3266},{ 1609, 3443},{ 1847, 3606},
        { 2085, 3730},{ 2404, 3835},{ 2709, 3876},{ 3049, 3886},
        { 3381, 3821},{ 3708, 3780},{ 4026, 3663},{ 4043, 3646}
      }
    }
  },
  {
    {
      /*Y'  qi=54  INTRA*/
      {
        {  316,  203},{  720,  585},{ 1596, 1077},{ 2316, 1289},
        { 2687, 1439},{ 3133, 1593},{ 3495, 1706},{ 3836, 1775},
        { 4249, 1892},{ 4804, 2031},{ 5320, 2139},{ 5617, 2203},
        { 5726, 2199},{ 5726, 2176},{ 5682, 2146},{ 5677, 2127},
        { 5717, 2124},{ 5707, 2129},{ 5853, 2148},{ 6110, 2180},
        { 6454, 2247},{ 6714, 2287},{ 6845, 2304},{ 6854, 2303}
      },
      /*Y'  qi=54  INTER*/
      {
        {  -48,  217},{  314, 1261},{ 1450, 2126},{ 2761, 2728},
        { 4275, 3012},{ 5408, 3167},{ 6305, 3245},{ 7165, 3290},
        { 7966, 3325},{ 8698, 3359},{ 9352, 3377},{ 9907, 3391},
        {10389, 3390},{10856, 3395},{11170, 3385},{11530, 3385},
        {11780, 3362},{12018, 3362},{12266, 3361},{12443, 3339},
        {12683, 3342},{12713, 3317},{12967, 3325},{13082, 3332}
      }
    },
    {
      /*Cb  qi=54  INTRA*/
      {
        {   94,   73},{   83,  557},{  152,  818},{  304,  919},
        {  341,  819},{  506, 1128},{  593, 1281},{  700, 1389},
        {  714, 1225},{  907, 1502},{  981, 1549},{ 1062, 1641},
        { 1032, 1523},{ 1170, 1710},{ 1217, 1727},{ 1258, 1714},
        { 1216, 1575},{ 1309, 1682},{ 1331, 1656},{ 1393, 1712},
        { 1247, 1456},{ 1469, 1728},{ 1530, 1711},{ 1532, 1711}
      },
      /*Cb  qi=54  INTER*/
      {
        {   33,  133},{   12,  532},{   70,  770},{  171,  996},
        {  279, 1233},{  427, 1503},{  600, 1736},{  824, 1939},
        { 1101, 2097},{ 1411, 2237},{ 1735, 2374},{ 2097, 2493},
        { 2486, 2606},{ 2916, 2691},{ 3297, 2771},{ 3715, 2826},
        { 4088, 2855},{ 4460, 2886},{ 4849, 2911},{ 5198, 2932},
        { 5489, 2940},{ 5875, 2981},{ 6208, 3017},{ 6270, 3012}
      }
    },
    {
      /*Cr  qi=54  INTRA*/
      {
        {  103,   63},{   83,  580},{  258,  796},{  301,  802},
        {  361,  675},{  538, 1001},{  625, 1097},{  713, 1171},
        {  699, 1103},{  868, 1380},{  915, 1400},{  970, 1491},
        {  923, 1365},{ 1070, 1603},{ 1154, 1655},{ 1206, 1677},
        { 1157, 1541},{ 1366, 1736},{ 1391, 1723},{ 1506, 1797},
        { 1388, 1556},{ 1616, 1828},{ 1655, 1797},{ 1658, 1796}
      },
      /*Cr  qi=54  INTER*/
      {
        {   30,  138},{   14,  532},{   63,  771},{  176,  990},
        {  299, 1226},{  438, 1496},{  606, 1735},{  814, 1950},
        { 1089, 2127},{ 1417, 2281},{ 1761, 2421},{ 2104, 2571},
        { 2467, 2701},{ 2881, 2827},{ 3303, 2900},{ 3735, 2917},
        { 4183, 2913},{ 4529, 2882},{ 4915, 2844},{ 5168, 2796},
        { 5410, 2763},{ 5562, 2753},{ 5815, 2764},{ 5832, 2755}
      }
    }
  },
  {
    {
      /*Y'  qi=63  INTRA*/
      {
        {  421,  194},{ 1272,  564},{ 3016,  943},{ 3831, 1079},
        { 4282, 1174},{ 4799, 1290},{ 5166, 1348},{ 5259, 1350},
        { 5720, 1426},{ 6501, 1539},{ 7048, 1606},{ 7328, 1642},
        { 7374, 1622},{ 7349, 1612},{ 7192, 1578},{ 7207, 1571},
        { 7161, 1555},{ 7259, 1573},{ 7432, 1592},{ 7710, 1613},
        { 8167, 1672},{ 8425, 1697},{ 8597, 1710},{ 8602, 1710}
      },
      /*Y'  qi=63  INTER*/
      {
        { -584,  286},{ 1231, 1186},{ 3939, 1663},{ 6096, 1865},
        { 7849, 1929},{ 8934, 1995},{ 9962, 2039},{11038, 2078},
        {12016, 2092},{12889, 2100},{13617, 2096},{14221, 2089},
        {14743, 2083},{15240, 2081},{15619, 2074},{15992, 2065},
        {16314, 2065},{16529, 2059},{16822, 2056},{17041, 2049},
        {17321, 2052},{17408, 2043},{17670, 2051},{17801, 2053}
      }
    },
    {
      /*Cb  qi=63  INTRA*/
      {
        {  154,   55},{  280,  582},{  507,  731},{  788,  853},
        {  763,  738},{ 1141, 1008},{ 1323, 1090},{ 1540, 1220},
        { 1487, 1089},{ 1861, 1322},{ 1983, 1347},{ 2145, 1425},
        { 2047, 1317},{ 2334, 1475},{ 2352, 1413},{ 2458, 1467},
        { 2243, 1270},{ 2464, 1413},{ 2423, 1335},{ 2506, 1385},
        { 2182, 1180},{ 2565, 1376},{ 2555, 1321},{ 2557, 1321}
      },
      /*Cb  qi=63  INTER*/
      {
        {   34,  133},{    6,  531},{  139,  767},{  344,  975},
        {  608, 1180},{ 1048, 1367},{ 1651, 1495},{ 2376, 1572},
        { 3103, 1609},{ 3752, 1646},{ 4373, 1680},{ 4980, 1718},
        { 5540, 1744},{ 6023, 1764},{ 6431, 1766},{ 6800, 1769},
        { 7149, 1775},{ 7529, 1777},{ 7920, 1817},{ 8198, 1808},
        { 8691, 1848},{ 8965, 1845},{ 9372, 1865},{ 9459, 1863}
      }
    },
    {
      /*Cr  qi=63  INTRA*/
      {
        {  121,   59},{  392,  570},{  609,  654},{  800,  760},
        {  720,  598},{ 1192,  892},{ 1298,  897},{ 1470, 1027},
        { 1411,  962},{ 1761, 1184},{ 1826, 1197},{ 1981, 1308},
        { 1854, 1198},{ 2229, 1427},{ 2269, 1365},{ 2428, 1453},
        { 2217, 1265},{ 2558, 1435},{ 2541, 1356},{ 2660, 1417},
        { 2337, 1199},{ 2688, 1382},{ 2603, 1301},{ 2605, 1300}
      },
      /*Cr  qi=63  INTER*/
      {
        {   31,  137},{   10,  531},{  136,  768},{  360,  971},
        {  638, 1166},{ 1029, 1373},{ 1604, 1519},{ 2351, 1595},
        { 3129, 1640},{ 3861, 1691},{ 4491, 1751},{ 5101, 1783},
        { 5635, 1784},{ 6136, 1779},{ 6550, 1763},{ 6905, 1746},
        { 7172, 1726},{ 7495, 1732},{ 7738, 1735},{ 7949, 1735},
        { 8211, 1744},{ 8424, 1740},{ 8779, 1764},{ 8812, 1760}
      }
    }
  }
};

#endif