diff mbox series

[FFmpeg-devel,078/114] avcodec/vc1: Use a symbols table to decode interlaced MV vector VLCs

Message ID 20201110104851.321029-79-andreas.rheinhardt@gmail.com
State Superseded
Headers show
Series VLC, esp. init_vlc patches | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 10, 2020, 10:48 a.m. UTC
The VC1 decoder currently follows the spec very closely when decoding
interlaced MV vector variable-length codes: The spec uses tables with
contiguous indexes. The last of these is an escape code, for every other
two values are encoded via (index + 1) / 9 and (index + 1) % 9. The
decoder did exactly this. This necessitated a branch to find out what
the current escape code was as well as the actual division/modulo.

This commit changes this by using an explicit symbols table for the
VLCs. The symbols are chosen so that the escape code always has the
value 0 (obviating the branch) and so that for every other code the
low nibble of the corresponding symbol contains (index + 1) % 9 whereas
the high nibble contains (index + 1) / 9.

Furthermore, the VLCs are now initialized with ff_init_vlc_from_lengths();
this allows to replace the uint32_t tables of codes by uint8_t tables of
symbols, thereby saving space on top of all the other improvements.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/vc1.c       |  14 +-
 libavcodec/vc1_block.c |  16 +-
 libavcodec/vc1data.c   | 594 ++++++++++++++++++++---------------------
 libavcodec/vc1data.h   |  12 +-
 4 files changed, 313 insertions(+), 323 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 68855ae1d5..2e39870057 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1648,9 +1648,10 @@  av_cold int ff_vc1_init_common(VC1Context *v)
             /* initialize interlaced MVDATA tables (2-Ref) */
             ff_vc1_2ref_mvdata_vlc[i].table           = &vlc_table[vlc_offs[i * 2 + 22]];
             ff_vc1_2ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 2 + 23] - vlc_offs[i * 2 + 22];
-            init_vlc(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126,
-                     ff_vc1_2ref_mvdata_bits[i], 1, 1,
-                     ff_vc1_2ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC);
+            ff_init_vlc_from_lengths(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126,
+                                     &ff_vc1_2ref_mvdata_tabs[i][0][1], 2,
+                                     &ff_vc1_2ref_mvdata_tabs[i][0][0], 2, 1,
+                                     0, INIT_VLC_USE_NEW_STATIC);
         }
         for (i = 0; i < 4; i++) {
             /* initialize 4MV MBMODE VLC tables for interlaced frame P picture */
@@ -1668,9 +1669,10 @@  av_cold int ff_vc1_init_common(VC1Context *v)
             /* initialize interlaced MVDATA tables (1-Ref) */
             ff_vc1_1ref_mvdata_vlc[i].table           = &vlc_table[vlc_offs[i * 3 + 39]];
             ff_vc1_1ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 3 + 40] - vlc_offs[i * 3 + 39];
-            init_vlc(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72,
-                     ff_vc1_1ref_mvdata_bits[i], 1, 1,
-                     ff_vc1_1ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC);
+            ff_init_vlc_from_lengths(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72,
+                                     &ff_vc1_1ref_mvdata_tabs[i][0][1], 2,
+                                     &ff_vc1_1ref_mvdata_tabs[i][0][0], 2, 1,
+                                     0, INIT_VLC_USE_NEW_STATIC);
         }
         for (i = 0; i < 4; i++) {
             /* Initialize 2MV Block pattern VLC tables */
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index da58a0738f..ed6df541cf 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -265,20 +265,13 @@  static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,
     int index, index1;
     int extend_x, extend_y;
     GetBitContext *gb = &v->s.gb;
-    int bits, esc;
+    int bits = v->numref ? VC1_2REF_MVDATA_VLC_BITS : VC1_1REF_MVDATA_VLC_BITS;
     int val, sign;
 
-    if (v->numref) {
-        bits = VC1_2REF_MVDATA_VLC_BITS;
-        esc  = 125;
-    } else {
-        bits = VC1_1REF_MVDATA_VLC_BITS;
-        esc  = 71;
-    }
     extend_x = v->dmvrange & 1;
     extend_y = (v->dmvrange >> 1) & 1;
     index = get_vlc2(gb, v->imv_vlc->table, bits, 3);
-    if (index == esc) {
+    if (!index) {
         *dmv_x = get_bits(gb, v->k_x);
         *dmv_y = get_bits(gb, v->k_y);
         if (v->numref) {
@@ -288,15 +281,14 @@  static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,
         }
     }
     else {
-        av_assert0(index < esc);
-        index1 = (index + 1) % 9;
+        index1 = index & 0xF;
         if (index1 != 0) {
             val    = get_bits(gb, index1 + extend_x);
             sign   = 0 - (val & 1);
             *dmv_x = (sign ^ ((val >> 1) + offset_table[extend_x][index1])) - sign;
         } else
             *dmv_x = 0;
-        index1 = (index + 1) / 9;
+        index1 = index >> 4;
         if (index1 > v->numref) {
             val    = get_bits(gb, (index1 >> v->numref) + extend_y);
             sign   = 0 - (val & 1);
diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c
index ed5e680527..de41afdc81 100644
--- a/libavcodec/vc1data.c
+++ b/libavcodec/vc1data.c
@@ -333,309 +333,303 @@  const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6] = {
 /* Interlaced frame/field picture MVDATA VLC tables */
 
 /* 1-reference tables */
-const uint32_t ff_vc1_1ref_mvdata_codes[4][72] = { /* uint32_t may be too big */
-  {
-    0x00005, 0x0000C, 0x0001E, 0x00012, 0x0000C, 0x00034, 0x00075, 0x00070,
-    0x00000, 0x00008, 0x0001B, 0x00008, 0x0001D, 0x0007C, 0x000D6, 0x001DE,
-    0x001AF, 0x00005, 0x0001B, 0x00026, 0x0001E, 0x00012, 0x00076, 0x0004D,
-    0x001F6, 0x001F4, 0x00039, 0x0007F, 0x00027, 0x0006A, 0x00071, 0x00035,
-    0x00071, 0x00068, 0x001DC, 0x00027, 0x00073, 0x000FF, 0x000E8, 0x000E9,
-    0x0007E, 0x001F9, 0x001F5, 0x001FD, 0x0003E, 0x001CA, 0x003F9, 0x0004C,
-    0x00069, 0x001FA, 0x001DF, 0x001F7, 0x00070, 0x001DD, 0x00E4D, 0x00727,
-    0x00392, 0x001C8, 0x001CB, 0x003F8, 0x001AE, 0x001F8, 0x001FB, 0x0E4CE,
-    0x0E4CF, 0x07260, 0x07261, 0x07262, 0x07263, 0x07264, 0x07265, 0x07266
-  },
-  {
-    0x00007, 0x00001, 0x00007, 0x00016, 0x00001, 0x00045, 0x00018, 0x002B6,
-    0x00006, 0x00004, 0x00017, 0x00010, 0x00029, 0x0002C, 0x0015A, 0x00066,
-    0x0019E, 0x00009, 0x00028, 0x00017, 0x00000, 0x0002A, 0x00004, 0x0005B,
-    0x000B5, 0x000CE, 0x00006, 0x00044, 0x0000F, 0x00046, 0x0000E, 0x000AC,
-    0x00032, 0x00037, 0x011EB, 0x0000A, 0x0001A, 0x0011F, 0x00016, 0x00014,
-    0x0002B, 0x00168, 0x00055, 0x023D5, 0x00057, 0x0002F, 0x00036, 0x0002E,
-    0x00169, 0x00054, 0x0047B, 0x0019F, 0x02B7D, 0x0008E, 0x00ADE, 0x00479,
-    0x0056E, 0x008F4, 0x015BF, 0x00478, 0x023D4, 0x0ADF1, 0x056F9, 0xADF0E,
-    0xADF0F, 0x56F80, 0x56F81, 0x56F82, 0x56F83, 0x56F84, 0x56F85, 0x56F86
-  },
-  {
-    0x00002, 0x00006, 0x00007, 0x0000D, 0x00007, 0x00030, 0x000FF, 0x001F0,
-    0x00002, 0x00000, 0x00005, 0x00019, 0x0001E, 0x00007, 0x00063, 0x000FD,
-    0x00023, 0x0000E, 0x0001B, 0x0001A, 0x00006, 0x00009, 0x00018, 0x000C5,
-    0x00033, 0x001F1, 0x00002, 0x003FB, 0x001F3, 0x00022, 0x001FC, 0x00042,
-    0x00623, 0x00083, 0x00620, 0x0007D, 0x00040, 0x00043, 0x003E4, 0x003E5,
-    0x00191, 0x00FE9, 0x00105, 0x00208, 0x000FC, 0x00624, 0x00622, 0x00190,
-    0x00626, 0x007F5, 0x00C4B, 0x01FD0, 0x0104D, 0x00065, 0x00C42, 0x000C9,
-    0x00627, 0x00C43, 0x00C4A, 0x0104E, 0x01FD1, 0x0104F, 0x00412, 0x104CE,
-    0x104CF, 0x08260, 0x08261, 0x08262, 0x08263, 0x08264, 0x08265, 0x08266
-  },
-  {
-    0x0000D, 0x00001, 0x00004, 0x00000, 0x00017, 0x00005, 0x0007F, 0x0004D,
-    0x00003, 0x00011, 0x0003E, 0x0003B, 0x00017, 0x00067, 0x0004A, 0x000C3,
-    0x000F2, 0x0000A, 0x0002C, 0x00032, 0x0003D, 0x00015, 0x00028, 0x00093,
-    0x000CC, 0x00096, 0x00003, 0x00075, 0x00020, 0x0002D, 0x00021, 0x00029,
-    0x00090, 0x001D0, 0x001FB, 0x0001C, 0x0004C, 0x00060, 0x00009, 0x00008,
-    0x0002D, 0x0009F, 0x001FA, 0x0013D, 0x00031, 0x000FC, 0x00058, 0x00092,
-    0x000F0, 0x000F1, 0x000CD, 0x00185, 0x00165, 0x0004E, 0x00091, 0x000E9,
-    0x00184, 0x001D1, 0x001E6, 0x00097, 0x001E7, 0x000B3, 0x0013C, 0x0164E,
-    0x0164F, 0x00B20, 0x00B21, 0x00B22, 0x00B23, 0x00B24, 0x00B25, 0x00B26
-  }
-};
-
-const uint8_t ff_vc1_1ref_mvdata_bits[4][72] = {
-  {
-     3,  4,  5,  5,  5,  6,  7,  7,  2,  4,  5,  5,  6,  7,  8,  9,  9,  4,
-     6,  6,  6,  6,  7,  8,  9,  9,  6,  8,  7,  7,  7,  7,  8,  8,  9,  6,
-     8,  8,  8,  8,  8,  9,  9,  9,  7, 10, 10,  8,  8,  9,  9,  9,  8,  9,
-    13, 12, 11, 10, 10, 10,  9,  9,  9, 17, 17, 16, 16, 16, 16, 16, 16, 16
-  },
-  {
-     3,  3,  4,  5,  5,  7,  8, 10,  3,  4,  5,  5,  6,  7,  9, 10, 12,  4,
-     6,  6,  5,  6,  6,  8,  9, 11,  4,  7,  7,  7,  7,  8,  9,  9, 13,  5,
-     8,  9,  8,  8,  9, 10, 10, 14,  7,  9,  9,  9, 10, 10, 11, 12, 14,  8,
-    12, 11, 11, 12, 13, 11, 14, 16, 15, 20, 20, 19, 19, 19, 19, 19, 19, 19
-  },
-  {
-     3,  4,  4,  4,  5,  6,  8,  9,  2,  4,  5,  5,  5,  6,  7,  8,  8,  4,
-     7,  7,  6,  6,  7,  8,  8,  9,  5, 10,  9,  8,  9,  9, 11, 10, 11,  7,
-     9,  9, 10, 10, 11, 12, 11, 12,  8, 11, 11, 11, 11, 11, 12, 13, 15,  9,
-    12, 10, 11, 12, 12, 15, 13, 15, 13, 19, 19, 18, 18, 18, 18, 18, 18, 18
-  },
-  {
-     4,  4,  4,  4,  5,  5,  7,  7,  3,  5,  6,  6,  6,  7,  7,  8,  8,  4,
-     6,  6,  6,  6,  7,  8,  8,  8,  4,  7,  6,  6,  6,  7,  8,  9,  9,  5,
-     7,  7,  6,  6,  7,  8,  9,  9,  6,  8,  8,  8,  8,  8,  8,  9, 10,  7,
-     8,  8,  9,  9,  9,  8,  9,  9,  9, 14, 14, 13, 13, 13, 13, 13, 13, 13
-  }
+const uint8_t ff_vc1_1ref_mvdata_tabs[4][72][2] = {
+    {
+        { 0x10,  2 }, { 0x13,  5 }, { 0x24,  6 }, { 0x53,  8 }, { 0x26,  8 },
+        { 0x32,  7 }, { 0x20,  4 }, { 0x05,  5 }, { 0x37,  8 }, { 0x54,  8 },
+        { 0x35,  7 }, { 0x21,  6 }, { 0x58,  8 }, { 0x36,  8 }, { 0x64, 10 },
+        { 0x63, 11 }, { 0x73, 16 }, { 0x74, 16 }, { 0x75, 16 }, { 0x76, 16 },
+        { 0x77, 16 }, { 0x78, 16 }, {    0, 16 }, { 0x71, 17 }, { 0x72, 17 },
+        { 0x61, 13 }, { 0x62, 12 }, { 0x51, 10 }, { 0x65, 10 }, { 0x41,  8 },
+        { 0x14,  6 }, { 0x23,  6 }, { 0x50,  7 }, { 0x45,  8 }, { 0x31,  8 },
+        { 0x11,  4 }, { 0x04,  5 }, { 0x22,  6 }, { 0x40,  6 }, { 0x01,  3 },
+        { 0x02,  4 }, { 0x06,  6 }, { 0x33,  7 }, { 0x16,  8 }, { 0x67,  9 },
+        { 0x18,  9 }, { 0x12,  5 }, { 0x08,  7 }, { 0x34,  7 }, { 0x30,  6 },
+        { 0x43,  8 }, { 0x44,  8 }, { 0x07,  7 }, { 0x25,  7 }, { 0x38,  9 },
+        { 0x60,  9 }, { 0x17,  9 }, { 0x56,  9 }, { 0x03,  5 }, { 0x15,  7 },
+        { 0x28,  9 }, { 0x47,  9 }, { 0x27,  9 }, { 0x57,  9 }, { 0x68,  9 },
+        { 0x46,  9 }, { 0x55,  9 }, { 0x70,  9 }, { 0x66, 10 }, { 0x52, 10 },
+        { 0x48,  9 }, { 0x42,  8 },
+    },
+    {
+        { 0x23,  5 }, { 0x05,  5 }, { 0x25,  6 }, { 0x44,  8 }, { 0x55, 10 },
+        { 0x47, 10 }, { 0x45,  9 }, { 0x43,  8 }, { 0x53,  9 }, { 0x51,  9 },
+        { 0x07,  8 }, { 0x36,  9 }, { 0x17, 10 }, { 0x28, 11 }, { 0x18, 12 },
+        { 0x57, 12 }, { 0x41,  8 }, { 0x52,  9 }, { 0x37,  9 }, { 0x34,  7 },
+        { 0x32,  7 }, { 0x02,  3 }, { 0x11,  4 }, { 0x40,  5 }, { 0x15,  7 },
+        { 0x46, 10 }, { 0x54, 10 }, { 0x27,  9 }, { 0x26,  8 }, { 0x22,  6 },
+        { 0x30,  4 }, { 0x03,  4 }, { 0x13,  5 }, { 0x31,  7 }, { 0x06,  7 },
+        { 0x33,  7 }, { 0x60,  8 }, { 0x66, 11 }, { 0x62, 11 }, { 0x64, 12 },
+        { 0x67, 14 }, { 0x48, 14 }, { 0x38, 13 }, { 0x56, 11 }, { 0x42,  9 },
+        { 0x20,  4 }, { 0x21,  6 }, { 0x14,  6 }, { 0x24,  6 }, { 0x35,  8 },
+        { 0x16,  9 }, { 0x08, 10 }, { 0x63, 11 }, { 0x61, 12 }, { 0x73, 19 },
+        { 0x74, 19 }, { 0x75, 19 }, { 0x76, 19 }, { 0x77, 19 }, { 0x78, 19 },
+        {    0, 19 }, { 0x71, 20 }, { 0x72, 20 }, { 0x68, 16 }, { 0x70, 15 },
+        { 0x58, 14 }, { 0x65, 13 }, { 0x50,  7 }, { 0x04,  5 }, { 0x12,  5 },
+        { 0x10,  3 }, { 0x01,  3 },
+    },
+    {
+        { 0x11,  4 }, { 0x30,  5 }, { 0x23,  6 }, { 0x15,  6 }, { 0x41,  9 },
+        { 0x48, 12 }, { 0x70, 13 }, { 0x73, 18 }, { 0x74, 18 }, { 0x75, 18 },
+        { 0x76, 18 }, { 0x77, 18 }, { 0x78, 18 }, {    0, 18 }, { 0x71, 19 },
+        { 0x72, 19 }, { 0x58, 15 }, { 0x66, 15 }, { 0x68, 15 }, { 0x47, 11 },
+        { 0x37, 10 }, { 0x35,  9 }, { 0x42,  9 }, { 0x33,  8 }, { 0x18,  8 },
+        { 0x24,  6 }, { 0x12,  5 }, { 0x25,  7 }, { 0x53, 11 }, { 0x45, 11 },
+        { 0x62, 10 }, { 0x60,  9 }, { 0x27,  8 }, { 0x22,  7 }, { 0x21,  7 },
+        { 0x05,  5 }, { 0x01,  3 }, { 0x02,  4 }, { 0x03,  4 }, { 0x10,  2 },
+        { 0x06,  6 }, { 0x38, 11 }, { 0x61, 12 }, { 0x64, 12 }, { 0x52, 11 },
+        { 0x36, 11 }, { 0x51, 11 }, { 0x65, 12 }, { 0x56, 12 }, { 0x54, 11 },
+        { 0x63, 11 }, { 0x26,  8 }, { 0x16,  7 }, { 0x13,  5 }, { 0x04,  4 },
+        { 0x20,  4 }, { 0x14,  5 }, { 0x08,  9 }, { 0x28,  9 }, { 0x43, 10 },
+        { 0x44, 10 }, { 0x32,  9 }, { 0x40,  7 }, { 0x50,  8 }, { 0x17,  8 },
+        { 0x34,  9 }, { 0x57, 13 }, { 0x67, 13 }, { 0x46, 12 }, { 0x55, 11 },
+        { 0x31, 10 }, { 0x07,  8 },
+    },
+    {
+        { 0x04,  4 }, { 0x02,  4 }, { 0x44,  6 }, { 0x43,  6 }, { 0x06,  5 },
+        { 0x30,  4 }, { 0x03,  4 }, { 0x25,  7 }, { 0x35,  7 }, { 0x24,  6 },
+        { 0x52,  8 }, { 0x73, 13 }, { 0x74, 13 }, { 0x75, 13 }, { 0x76, 13 },
+        { 0x77, 13 }, { 0x78, 13 }, {    0, 13 }, { 0x71, 14 }, { 0x72, 14 },
+        { 0x58, 10 }, { 0x68,  9 }, { 0x45,  7 }, { 0x14,  6 }, { 0x10,  3 },
+        { 0x32,  6 }, { 0x34,  6 }, { 0x11,  5 }, { 0x36,  8 }, { 0x61,  8 },
+        { 0x53,  8 }, { 0x26,  8 }, { 0x16,  7 }, { 0x28,  8 }, { 0x66,  8 },
+        { 0x41,  7 }, { 0x08,  7 }, { 0x60,  7 }, { 0x70,  9 }, { 0x48,  9 },
+        { 0x46,  8 }, { 0x20,  4 }, { 0x21,  6 }, { 0x33,  6 }, { 0x05,  5 },
+        { 0x42,  7 }, { 0x63,  9 }, { 0x57,  9 }, { 0x17,  8 }, { 0x50,  6 },
+        { 0x22,  6 }, { 0x27,  8 }, { 0x56,  8 }, { 0x15,  7 }, { 0x01,  4 },
+        { 0x40,  5 }, { 0x37,  9 }, { 0x64,  9 }, { 0x62,  8 }, { 0x31,  7 },
+        { 0x13,  6 }, { 0x54,  8 }, { 0x55,  8 }, { 0x18,  8 }, { 0x65,  9 },
+        { 0x67,  9 }, { 0x23,  6 }, { 0x12,  6 }, { 0x51,  8 }, { 0x47,  9 },
+        { 0x38,  9 }, { 0x07,  7 },
+    },
 };
 
 /* 2-reference tables */
-const uint32_t ff_vc1_2ref_mvdata_codes[8][126] = { /* table 132 - table 139 */
-  {
-    0x0000C, 0x0001C, 0x0000B, 0x00000, 0x0000E, 0x0002A, 0x00050, 0x00368,
-    0x00002, 0x0001A, 0x00004, 0x0003A, 0x0001D, 0x0006C, 0x000EF, 0x001BC,
-    0x0015F, 0x0000F, 0x00003, 0x0001C, 0x0000D, 0x0000B, 0x0003E, 0x000A7,
-    0x00146, 0x00199, 0x00006, 0x0001F, 0x00004, 0x0003C, 0x00007, 0x001BE,
-    0x0008B, 0x0002C, 0x007B3, 0x00005, 0x000DB, 0x00056, 0x000EC, 0x00052,
-    0x001BD, 0x00078, 0x000CF, 0x00573, 0x00009, 0x00023, 0x000ED, 0x00018,
-    0x00006, 0x00044, 0x000F5, 0x00079, 0x006D2, 0x0006E, 0x0002B, 0x0015D,
-    0x00017, 0x0037F, 0x00144, 0x000CE, 0x00028, 0x000AB, 0x00010, 0x001B5,
-    0x000F7, 0x000A6, 0x0007B, 0x00028, 0x001ED, 0x001E9, 0x006FD, 0x00004,
-    0x000F5, 0x00029, 0x0028A, 0x0028B, 0x0028F, 0x00DF9, 0x00335, 0x01E85,
-    0x000EE, 0x002BD, 0x0002B, 0x003D8, 0x003D1, 0x00198, 0x001E9, 0x0051D,
-    0x000B4, 0x0003F, 0x00455, 0x0022B, 0x00229, 0x00451, 0x00578, 0x007B2,
-    0x00570, 0x00155, 0x00032, 0x003D0, 0x00054, 0x006D3, 0x00571, 0x00454,
-    0x00334, 0x01BF1, 0x000B7, 0x00029, 0x01E84, 0x0016C, 0x0019B, 0x01BF0,
-    0x00579, 0x00F43, 0x000B5, 0x008A1, 0x0002A, 0x0016D, 0x008A0, 0x007A0,
-    0x003D1, 0x00AE5, 0x00154, 0x00AE4, 0x00A39, 0x00A38
-  },
-  {
-    0x00003, 0x00009, 0x00016, 0x00010, 0x000D7, 0x00335, 0x00574, 0x00555,
-    0x00000, 0x0001D, 0x00009, 0x00017, 0x0002C, 0x000AD, 0x00374, 0x006B3,
-    0x00577, 0x0000F, 0x00018, 0x0000A, 0x0002E, 0x00022, 0x0017C, 0x00E7B,
-    0x01B89, 0x015D8, 0x00008, 0x00034, 0x0006D, 0x00023, 0x001C2, 0x00376,
-    0x002D3, 0x01C4A, 0x0330A, 0x00014, 0x0006A, 0x00072, 0x0006C, 0x000E3,
-    0x0019B, 0x0073F, 0x01CF0, 0x00B41, 0x00032, 0x000E6, 0x000E0, 0x000CF,
-    0x000AB, 0x0019C, 0x002AB, 0x00E2B, 0x015D9, 0x0006F, 0x001C3, 0x000AF,
-    0x000BF, 0x000AC, 0x0017D, 0x006E3, 0x00E29, 0x01984, 0x00054, 0x000B5,
-    0x0017A, 0x001AD, 0x00199, 0x00178, 0x00358, 0x002D2, 0x01C4B, 0x0005B,
-    0x002A8, 0x00331, 0x00388, 0x0038B, 0x00370, 0x00713, 0x00CC3, 0x01CF1,
-    0x001B9, 0x005EF, 0x00738, 0x002F2, 0x0033B, 0x002B9, 0x006EB, 0x00570,
-    0x00E24, 0x0039D, 0x005A2, 0x005A3, 0x00E7D, 0x005EE, 0x00739, 0x00554,
-    0x00AA5, 0x00AA4, 0x00377, 0x01CF5, 0x00BCE, 0x00E79, 0x00660, 0x00674,
-    0x006EA, 0x00E7C, 0x00D65, 0x002F6, 0x015DA, 0x01B88, 0x005A1, 0x01CF4,
-    0x005E6, 0x00E28, 0x00575, 0x00D64, 0x00334, 0x0330B, 0x015DB, 0x00B40,
-    0x00BCF, 0x00DC5, 0x00E2A, 0x00675, 0x00571, 0x00553
-  },
-  {
-    0x00004, 0x00002, 0x00010, 0x00003, 0x00017, 0x00045, 0x0003E, 0x0007E,
-    0x00003, 0x00002, 0x00028, 0x0001E, 0x00015, 0x00047, 0x00002, 0x0014D,
-    0x00060, 0x0000B, 0x00026, 0x00024, 0x00014, 0x00032, 0x0006F, 0x000C3,
-    0x00531, 0x006E5, 0x00015, 0x0003F, 0x0002D, 0x00001, 0x0013E, 0x000DD,
-    0x000F6, 0x00305, 0x00331, 0x0000E, 0x00003, 0x00034, 0x00033, 0x0001A,
-    0x0014A, 0x000C5, 0x000F4, 0x006E4, 0x00001, 0x0003C, 0x0007D, 0x0008D,
-    0x0009D, 0x00031, 0x0006E, 0x00296, 0x000CD, 0x00025, 0x00149, 0x00032,
-    0x00089, 0x00036, 0x00088, 0x0006F, 0x00003, 0x0031D, 0x0000E, 0x001AA,
-    0x0027E, 0x00061, 0x0014E, 0x0014F, 0x00067, 0x000FF, 0x00183, 0x00036,
-    0x00357, 0x000F5, 0x000C6, 0x000C2, 0x00299, 0x00119, 0x00231, 0x00350,
-    0x0002C, 0x0018F, 0x00530, 0x00297, 0x00004, 0x001B8, 0x000C0, 0x0027A,
-    0x00311, 0x0009C, 0x00621, 0x00199, 0x0031C, 0x000F7, 0x003E3, 0x00356,
-    0x00189, 0x00005, 0x0006B, 0x008C2, 0x00330, 0x004FF, 0x004F0, 0x00351,
-    0x004F2, 0x001F2, 0x00373, 0x00000, 0x00C41, 0x008C3, 0x009EC, 0x003E2,
-    0x00304, 0x004F7, 0x004F1, 0x001F0, 0x00148, 0x00C40, 0x009ED, 0x008C0,
-    0x008C1, 0x004F3, 0x004FE, 0x000FE, 0x001F3, 0x001A9
-  },
-  {
-    0x00000, 0x00004, 0x0002F, 0x00052, 0x00010, 0x000AD, 0x0050B, 0x00190,
-    0x00003, 0x00016, 0x00007, 0x0000D, 0x000BB, 0x00173, 0x000C9, 0x0050F,
-    0x0172C, 0x00003, 0x00011, 0x00005, 0x00043, 0x00023, 0x0004B, 0x0032E,
-    0x02E5B, 0x00482, 0x00009, 0x0002A, 0x00014, 0x0002A, 0x00108, 0x005CA,
-    0x0065A, 0x02136, 0x02132, 0x0000B, 0x00013, 0x00041, 0x000B8, 0x00174,
-    0x00100, 0x014DA, 0x0404E, 0x01437, 0x0002B, 0x00085, 0x000A7, 0x000A0,
-    0x0014C, 0x0029A, 0x0032C, 0x02133, 0x0142A, 0x00051, 0x00284, 0x000AC,
-    0x00102, 0x00045, 0x00044, 0x0081B, 0x0065E, 0x00CB7, 0x00018, 0x0050C,
-    0x00212, 0x002E4, 0x00203, 0x00094, 0x00122, 0x0081A, 0x00655, 0x00033,
-    0x002BA, 0x00246, 0x00242, 0x00A6E, 0x0040C, 0x00808, 0x02134, 0x0404F,
-    0x00175, 0x00405, 0x00247, 0x0012A, 0x00A14, 0x002BB, 0x00191, 0x0084F,
-    0x01438, 0x000AF, 0x00B97, 0x00483, 0x0143B, 0x0032B, 0x00243, 0x0142B,
-    0x00958, 0x029BF, 0x00049, 0x00A6C, 0x014DB, 0x004AD, 0x014DE, 0x0084E,
-    0x01434, 0x00257, 0x02E5A, 0x00207, 0x01435, 0x01439, 0x00CB6, 0x0143A,
-    0x00194, 0x00654, 0x02135, 0x0537C, 0x0015C, 0x00240, 0x01012, 0x0537D,
-    0x00959, 0x01098, 0x01436, 0x0065F, 0x02026, 0x02137
-  },
-  {
-    0x00005, 0x00019, 0x00016, 0x00011, 0x0003E, 0x0005E, 0x000EF, 0x000E2,
-    0x00000, 0x00039, 0x0002B, 0x00026, 0x00028, 0x00012, 0x000C2, 0x000ED,
-    0x0011D, 0x0000D, 0x00031, 0x0002A, 0x00025, 0x00020, 0x0005C, 0x001ED,
-    0x0024D, 0x00770, 0x00006, 0x0007A, 0x00060, 0x0004F, 0x00048, 0x00039,
-    0x00186, 0x00213, 0x00EC6, 0x0000F, 0x00026, 0x0005F, 0x00075, 0x00070,
-    0x00027, 0x001DB, 0x003C6, 0x0078F, 0x0003F, 0x000A6, 0x000F0, 0x0003A,
-    0x00052, 0x0004E, 0x000E3, 0x001D9, 0x0030F, 0x00010, 0x001DD, 0x000A7,
-    0x000F7, 0x00022, 0x00092, 0x003C4, 0x002EF, 0x00762, 0x00079, 0x0008F,
-    0x001DA, 0x00087, 0x000E8, 0x000BA, 0x00176, 0x000EE, 0x003B0, 0x00085,
-    0x00119, 0x0030E, 0x00108, 0x001D2, 0x0010C, 0x00773, 0x00424, 0x00434,
-    0x00071, 0x005DD, 0x001C1, 0x003A7, 0x00127, 0x0008D, 0x0021B, 0x007B2,
-    0x001DF, 0x003D8, 0x00764, 0x00EE4, 0x003B3, 0x0074D, 0x001D8, 0x005DC,
-    0x0084A, 0x00499, 0x003C5, 0x01D8E, 0x00765, 0x00435, 0x00771, 0x001C2,
-    0x00118, 0x003BC, 0x00381, 0x00387, 0x07B33, 0x01097, 0x01096, 0x01ECD,
-    0x00E99, 0x00F1C, 0x00F1D, 0x00EE5, 0x0011C, 0x07B32, 0x03D98, 0x01D8F,
-    0x00E98, 0x00F67, 0x003BD, 0x00380, 0x00498, 0x00386
-  },
-  {
-    0x0000D, 0x00010, 0x0002E, 0x00039, 0x0000D, 0x00074, 0x000ED, 0x000B6,
-    0x00001, 0x00002, 0x00000, 0x00030, 0x00029, 0x00070, 0x000F3, 0x0008C,
-    0x00166, 0x00009, 0x00033, 0x00078, 0x00006, 0x000C4, 0x0000B, 0x00163,
-    0x000CC, 0x005BE, 0x0001F, 0x0002F, 0x00064, 0x00018, 0x000C6, 0x0000A,
-    0x00162, 0x002C0, 0x00EF3, 0x00007, 0x0000F, 0x000E3, 0x000CA, 0x000B2,
-    0x0018F, 0x003AE, 0x0075F, 0x00C51, 0x00015, 0x00047, 0x000EE, 0x000E2,
-    0x000EA, 0x00009, 0x0016A, 0x002C3, 0x0059D, 0x0003D, 0x00008, 0x001D9,
-    0x00032, 0x0000E, 0x0016E, 0x0032C, 0x0065B, 0x0196B, 0x00002, 0x0000F,
-    0x001D8, 0x0008D, 0x000B4, 0x001E4, 0x00067, 0x00317, 0x00794, 0x00022,
-    0x003BE, 0x00315, 0x00034, 0x00037, 0x002DE, 0x0006C, 0x00EFE, 0x0066C,
-    0x00028, 0x003CB, 0x003AC, 0x00035, 0x0016B, 0x003BD, 0x002C1, 0x0062C,
-    0x01DFE, 0x0000E, 0x0059E, 0x005BF, 0x000DA, 0x00629, 0x00584, 0x00EB7,
-    0x00B0A, 0x0066D, 0x0000C, 0x0077E, 0x0059C, 0x00778, 0x0075E, 0x0075A,
-    0x0062D, 0x00337, 0x00334, 0x00197, 0x01E57, 0x01DE4, 0x0196A, 0x01E56,
-    0x00C50, 0x00B3F, 0x01E54, 0x00B0B, 0x0018E, 0x001B6, 0x01E55, 0x00CB4,
-    0x00B3E, 0x00EB6, 0x01DE5, 0x01DFF, 0x00335, 0x001B7
-  },
-  {
-    0x00001, 0x0000B, 0x00019, 0x0006F, 0x0002A, 0x00075, 0x007EB, 0x00163,
-    0x00001, 0x0000E, 0x0001A, 0x0003E, 0x0001C, 0x0002D, 0x00164, 0x007EC,
-    0x00165, 0x00004, 0x00006, 0x00036, 0x0007F, 0x000AE, 0x00158, 0x0015C,
-    0x0056D, 0xFD510, 0x00000, 0x00004, 0x0007B, 0x000F3, 0x0003B, 0x007ED,
-    0x002B3, 0x002CC, 0x0056E, 0x00018, 0x0003E, 0x00017, 0x0001E, 0x000AF,
-    0x003F7, 0x0056F, 0x002CD, 0xFD511, 0x00014, 0x000AD, 0x000AA, 0x00014,
-    0x000A8, 0x00153, 0x000E8, 0x001FE, 0x00DCF, 0x00078, 0x001B8, 0x00152,
-    0x000FE, 0x002B1, 0x0015D, 0x00160, 0xFD512, 0xFD513, 0x0007A, 0x002B0,
-    0x001E5, 0x000E9, 0x000FC, 0x006E6, 0x00DC8, 0x00584, 0xFD514, 0x000AB,
-    0x00DDE, 0x00159, 0x003F4, 0x00DC9, 0x00DCA, 0x001FA, 0xFD515, 0xFD516,
-    0x000FC, 0x001FF, 0x001E4, 0x000AF, 0x0015A, 0x00167, 0x00DCB, 0x00585,
-    0xFD517, 0x003F7, 0x03F55, 0xFD518, 0x00DDC, 0x00586, 0x03F56, 0xFD519,
-    0x03F57, 0xFD51A, 0x001BA, 0x00587, 0x00588, 0x00DDF, 0x002B2, 0xFD51B,
-    0x00DCE, 0x003F6, 0xFD51C, 0x00FD4, 0xFD51D, 0xFD51E, 0xFD51F, 0x7EA80,
-    0x7EA81, 0x0056C, 0x7EA82, 0x7EA83, 0x00376, 0x00589, 0x0058A, 0x7EA84,
-    0x7EA85, 0x00DDD, 0x7EA86, 0x7EA87, 0x0058B, 0x07EA9
-  },
-  {
-    0x00003, 0x0000E, 0x0000F, 0x0007E, 0x00062, 0x000C6, 0x00CD9, 0x0063E,
-    0x00002, 0x00002, 0x00000, 0x00018, 0x0000C, 0x00069, 0x00039, 0x00707,
-    0x00C7E, 0x00002, 0x0000D, 0x0001B, 0x0000F, 0x0019A, 0x00647, 0x01A37,
-    0x346C4, 0x0346D, 0x00001, 0x0001E, 0x0007F, 0x0000A, 0x000E1, 0x00661,
-    0x00CE4, 0x346C5, 0x346C6, 0x0001D, 0x00030, 0x0000D, 0x000CB, 0x00199,
-    0x00320, 0x0008E, 0x0652E, 0x346C7, 0x0003E, 0x00039, 0x00035, 0x00033,
-    0x0019F, 0x001C0, 0x00CDA, 0x346C8, 0x346C9, 0x0000B, 0x000D0, 0x0019E,
-    0x00022, 0x00038, 0x0018E, 0x0031E, 0x03294, 0x0023C, 0x00032, 0x00012,
-    0x00013, 0x00071, 0x0019D, 0x00020, 0x00C87, 0x00CC0, 0x346CA, 0x00338,
-    0x00653, 0x001A2, 0x0032A, 0x00322, 0x00CE7, 0x00084, 0x0011F, 0x346CB,
-    0x00325, 0x00649, 0x0032B, 0x00077, 0x00648, 0x00642, 0x00C86, 0x00C8C,
-    0x346CC, 0x0003A, 0x019B7, 0x00043, 0x00327, 0x0008C, 0x0008D, 0x00C8D,
-    0x346CD, 0x346CE, 0x00337, 0x00CE5, 0x00085, 0x00326, 0x00347, 0x00CA4,
-    0x00C7F, 0x00D1A, 0x346CF, 0x00328, 0x1A360, 0x1A361, 0x00CD8, 0x0068C,
-    0x03295, 0x03296, 0x0652F, 0x066D8, 0x00331, 0x00706, 0x0023D, 0x00076,
-    0x00CC1, 0x00382, 0x00CE6, 0x066D9, 0x066DA, 0x066DB
-  }
-};
-
-const uint8_t ff_vc1_2ref_mvdata_bits[8][126] = {
-  {
-     4,  5,  5,  5,  6,  7,  8, 10,  2,  5,  5,  6,  6,  7,  8,  9,
-    10,  4,  5,  6,  6,  7,  8,  9, 10, 11,  4,  6,  6,  7,  7,  9,
-     9, 10, 12,  5,  8,  8,  8,  8,  9,  9, 10, 12,  5,  7,  8,  7,
-     7,  8,  9,  9, 11,  7,  9, 10,  9, 10, 10, 10, 10, 12,  6,  9,
-     9,  9,  9,  9, 10, 10, 11,  7, 10, 10, 11, 11, 11, 12, 12, 14,
-     8, 11, 10, 11, 11, 11, 11, 12, 12,  8, 12, 11, 11, 12, 12, 12,
-    12, 13,  8, 12, 11, 11, 12, 12, 12, 13, 12,  9, 14, 13, 11, 13,
-    12, 13, 12, 13,  9, 13, 13, 12, 12, 13, 13, 13, 13, 13
-  },
-  {
-     3,  4,  5,  6,  8, 10, 11, 11,  2,  5,  5,  6,  7,  8, 10, 11,
-    11,  4,  5,  5,  6,  7,  9, 12, 13, 13,  4,  6,  7,  7,  9, 10,
-    11, 13, 14,  5,  7,  7,  7,  8,  9, 11, 13, 13,  6,  8,  8,  8,
-     8,  9, 10, 12, 13,  7,  9,  8,  8,  8,  9, 11, 12, 13,  7,  9,
-     9,  9,  9,  9, 10, 11, 13,  8, 10, 10, 10, 10, 10, 11, 12, 13,
-     9, 11, 11, 10, 10, 10, 11, 11, 12, 10, 12, 12, 12, 11, 11, 11,
-    12, 12, 10, 13, 12, 12, 11, 11, 11, 12, 12, 10, 13, 13, 12, 13,
-    11, 12, 11, 12, 10, 14, 13, 13, 12, 12, 12, 11, 11, 11
-  },
-  {
-     4,  4,  5,  5,  6,  7,  8,  9,  2,  5,  6,  6,  6,  7,  7,  9,
-     9,  4,  6,  6,  6,  7,  8,  9, 11, 12,  5,  7,  7,  7,  9,  9,
-    10, 11, 12,  5,  7,  7,  7,  7,  9,  9, 10, 12,  5,  8,  8,  8,
-     8,  8,  9, 10, 10,  6,  9,  8,  8,  8,  8,  9,  9, 11,  6, 10,
-    10,  9,  9,  9,  9, 10, 10,  7, 11, 10,  9,  9, 10,  9, 10, 11,
-     7, 10, 11, 10, 10, 10,  9, 10, 11,  8, 12, 11, 11, 10, 11, 11,
-    10, 10,  8, 12, 12, 11, 11, 11, 11, 10, 11,  8, 13, 12, 12, 11,
-    11, 11, 11, 10,  9, 13, 12, 12, 12, 11, 11, 10, 10, 10
-  },
-  {
-     3,  4,  6,  7,  7,  9, 11, 11,  2,  5,  5,  6,  8,  9, 10, 11,
-    13,  3,  5,  5,  7,  8,  9, 12, 14, 13,  4,  6,  6,  7,  9, 11,
-    13, 14, 14,  5,  7,  7,  8,  9,  9, 13, 15, 13,  6,  8,  8,  8,
-     9, 10, 12, 14, 13,  7, 10,  9,  9,  9,  9, 12, 13, 14,  7, 11,
-    10, 10, 10, 10, 11, 12, 13,  8, 11, 12, 12, 12, 11, 12, 14, 15,
-     9, 11, 12, 11, 12, 11, 11, 12, 13,  9, 12, 13, 13, 12, 12, 13,
-    14, 14,  9, 12, 13, 13, 13, 12, 13, 12, 14, 10, 13, 13, 14, 13,
-    11, 13, 14, 15, 10, 12, 13, 15, 14, 13, 13, 13, 14, 14
-  },
-  {
-     4,  5,  5,  5,  6,  7,  8,  8,  2,  6,  6,  6,  6,  6,  8,  9,
-    10,  4,  6,  6,  6,  6,  7,  9, 10, 11,  4,  7,  7,  7,  7,  7,
-     9, 10, 12,  5,  7,  7,  7,  7,  7,  9, 10, 11,  6,  8,  8,  7,
-     7,  7,  8,  9, 10,  6,  9,  8,  8,  7,  8, 10, 10, 11,  7,  9,
-     9,  8,  8,  8,  9,  9, 10,  8, 10, 10,  9,  9,  9, 11, 11, 11,
-     8, 11, 10, 10,  9,  9, 10, 11, 10, 10, 12, 12, 11, 11, 10, 11,
-    12, 11, 10, 13, 12, 11, 11, 10, 10, 11, 11, 11, 15, 13, 13, 13,
-    12, 12, 12, 12, 10, 15, 14, 13, 12, 12, 11, 11, 11, 11
-  },
-  {
-     4,  5,  6,  6,  6,  7,  8,  8,  2,  4,  5,  6,  6,  7,  8,  8,
-     9,  4,  6,  7,  7,  8,  8,  9, 10, 11,  5,  6,  7,  7,  8,  8,
-     9, 10, 12,  5,  7,  8,  8,  8,  9, 10, 11, 12,  5,  7,  8,  8,
-     8,  8,  9, 10, 11,  6,  8,  9,  8,  8,  9, 10, 11, 13,  5,  8,
-     9,  8,  8,  9,  9, 10, 11,  6, 10, 10,  9,  9, 10, 10, 12, 13,
-     6, 10, 10,  9,  9, 10, 10, 11, 13,  7, 11, 11, 11, 11, 11, 12,
-    12, 13,  7, 11, 11, 11, 11, 11, 11, 12, 12,  9, 13, 13, 13, 13,
-    12, 12, 13, 12,  9, 12, 13, 12, 12, 12, 13, 13, 12, 12
-  },
-  {
-     3,  5,  6,  8,  9, 10, 12, 12,  1,  5,  6,  7,  8,  9, 12, 12,
-    12,  4,  6,  7,  8,  9, 12, 12, 14, 21,  4,  6,  8,  9,  9, 12,
-    13, 13, 14,  6,  9,  8,  8,  9, 13, 14, 13, 21,  6,  9,  9,  8,
-     9, 10, 11, 12, 13,  8, 10, 10, 11, 11, 12, 12, 21, 21,  8, 11,
-    10, 11, 11, 12, 13, 14, 21,  9, 13, 10, 11, 13, 13, 12, 21, 21,
-     9, 12, 10, 11, 12, 12, 13, 14, 21, 11, 15, 21, 13, 14, 15, 21,
-    15, 21, 10, 14, 14, 13, 13, 21, 13, 13, 21, 13, 21, 21, 21, 20,
-    20, 14, 20, 20, 11, 14, 14, 20, 20, 13, 20, 20, 14, 16
-  },
-  {
-     2,  5,  6,  8,  9, 10, 13, 13,  2,  4,  5,  6,  8,  9, 10, 13,
-    14,  3,  5,  7,  8, 10, 12, 15, 20, 16,  4,  6,  8,  8, 10, 12,
-    13, 20, 20,  7,  8,  8,  9, 10, 11, 12, 16, 20,  7,  8,  8,  8,
-    10, 11, 13, 20, 20,  8, 10, 10, 10, 10, 11, 12, 15, 14,  8,  9,
-     9,  9, 10, 10, 13, 13, 20, 11, 12, 11, 11, 11, 13, 12, 13, 20,
-    11, 12, 11, 11, 12, 12, 13, 13, 20, 10, 14, 11, 11, 12, 12, 13,
-    20, 20, 11, 13, 12, 11, 12, 13, 14, 14, 20, 11, 19, 19, 13, 13,
-    15, 15, 16, 16, 11, 13, 14, 11, 13, 12, 13, 16, 16, 16
-  }
+const uint8_t ff_vc1_2ref_mvdata_tabs[8][126][2] = { /* tables 132 - 139 */
+    {
+        { 0x04,  5 }, { 0x80,  7 }, { 0x67, 10 }, { 0x82, 10 }, { 0xB2, 11 },
+        { 0xD6, 13 }, { 0xA8, 13 }, { 0x68, 12 }, { 0x92, 10 }, { 0x37, 10 },
+        { 0x98, 12 }, { 0xC7, 12 }, { 0xC2, 13 }, { 0xD1, 13 }, { 0xB8, 12 },
+        { 0x63,  9 }, { 0x54,  7 }, { 0x34,  7 }, { 0x32,  6 }, { 0x75,  9 },
+        { 0xC0,  9 }, { 0xD0,  9 }, { 0x61,  9 }, { 0x24,  7 }, { 0x21,  5 },
+        { 0x12,  5 }, { 0x40,  5 }, { 0x53,  7 }, { 0xB0,  8 }, { 0x95, 11 },
+        { 0x28, 11 }, { 0xB6, 12 }, { 0x87, 12 }, { 0xC3, 11 }, { 0x66, 10 },
+        { 0x47, 10 }, { 0x23,  6 }, { 0x05,  6 }, { 0x46,  9 }, { 0x57,  9 },
+        { 0xB1, 12 }, { 0xD4, 12 }, { 0x96, 11 }, { 0x81, 10 }, { 0x74,  9 },
+        { 0x25,  8 }, { 0xA0,  8 }, { 0x70,  6 }, { 0x55,  8 }, { 0xD2, 13 },
+        { 0xC8, 13 }, { 0xA4, 12 }, { 0xA3, 11 }, { 0xB5, 12 }, { 0xA1, 12 },
+        { 0xA2, 11 }, { 0x36,  9 }, { 0x51,  7 }, { 0x50,  5 }, { 0x07,  8 },
+        { 0x65, 10 }, { 0x83, 11 }, { 0x84, 11 }, { 0x27, 10 }, {    0, 13 },
+        { 0xD8, 13 }, { 0x97, 12 }, { 0x85, 11 }, { 0x44,  8 }, { 0x73,  9 },
+        { 0x26,  9 }, { 0x06,  7 }, { 0x42,  8 }, { 0xA7, 12 }, { 0xB4, 12 },
+        { 0xD7, 13 }, { 0xD5, 13 }, { 0x48, 12 }, { 0x62, 10 }, { 0xA5, 12 },
+        { 0xC5, 12 }, { 0x91, 11 }, { 0x18, 10 }, { 0x03,  5 }, { 0x30,  4 },
+        { 0x22,  6 }, { 0x14,  6 }, { 0x33,  7 }, { 0xD3, 12 }, { 0xC1, 14 },
+        { 0x88, 14 }, { 0xC6, 13 }, { 0x94, 11 }, { 0x77, 10 }, { 0x56,  9 },
+        { 0x93, 11 }, { 0xA6, 12 }, { 0x38, 12 }, { 0x76, 10 }, { 0x72,  9 },
+        { 0x31,  6 }, { 0x10,  2 }, { 0x01,  4 }, { 0x11,  5 }, { 0x15,  7 },
+        { 0x08, 10 }, { 0x58, 11 }, { 0xB3, 11 }, { 0x71,  9 }, { 0x41,  8 },
+        { 0x60,  7 }, { 0x17,  9 }, { 0x45,  9 }, { 0x35,  9 }, { 0xC4, 13 },
+        { 0xB7, 13 }, { 0x86, 12 }, { 0x78, 11 }, { 0x64, 10 }, { 0x02,  5 },
+        { 0x13,  6 }, { 0x43,  8 }, { 0x52,  8 }, { 0x90,  8 }, { 0x16,  8 },
+        { 0x20,  4 },
+    },
+    {
+        { 0x10,  2 }, { 0x04,  6 }, { 0x24,  7 }, { 0x33,  7 }, { 0x12,  5 },
+        { 0x22,  5 }, { 0x14,  7 }, { 0xD3, 13 }, { 0x48, 13 }, { 0xC3, 12 },
+        { 0xA1, 12 }, { 0xA2, 12 }, { 0x77, 11 }, { 0x36, 11 }, { 0x71,  9 },
+        { 0x80,  8 }, { 0x13,  6 }, { 0x01,  3 }, { 0x30,  4 }, { 0x02,  4 },
+        { 0x40,  5 }, { 0x70,  7 }, { 0x81, 10 }, { 0xA8, 12 }, { 0xA7, 12 },
+        {    0, 11 }, { 0xA6, 11 }, { 0x08, 11 }, { 0x56, 10 }, { 0x54,  8 },
+        { 0x64,  8 }, { 0x15,  8 }, { 0x97, 11 }, { 0xD8, 11 }, { 0x95, 10 },
+        { 0x07, 11 }, { 0xC7, 11 }, { 0x28, 13 }, { 0x58, 13 }, { 0xC1, 13 },
+        { 0xD2, 13 }, { 0x18, 11 }, { 0x62,  8 }, { 0x03,  5 }, { 0x23,  6 },
+        { 0x75,  9 }, { 0x93, 10 }, { 0xC5, 11 }, { 0xB2, 12 }, { 0xD4, 12 },
+        { 0x72,  9 }, { 0xC0, 10 }, { 0xA4, 11 }, { 0x91, 11 }, { 0x25,  9 },
+        { 0x65,  9 }, { 0x63,  8 }, { 0x21,  5 }, { 0x50,  6 }, { 0xB4, 11 },
+        { 0x68, 13 }, { 0x38, 14 }, { 0xD1, 14 }, { 0x87, 12 }, { 0x82, 10 },
+        { 0x74,  9 }, { 0xD0, 10 }, { 0x06, 10 }, { 0x45,  9 }, { 0x55,  9 },
+        { 0xB5, 11 }, { 0xD7, 11 }, { 0x94, 10 }, { 0x53,  8 }, { 0x31,  6 },
+        { 0x41,  7 }, { 0x76, 10 }, { 0xC8, 12 }, { 0xB8, 12 }, { 0x17, 11 },
+        { 0x73,  9 }, { 0x05,  8 }, { 0x43,  7 }, { 0x32,  7 }, { 0x85, 10 },
+        { 0xC2, 13 }, { 0x27, 13 }, { 0xD5, 12 }, { 0x66, 11 }, { 0x90,  9 },
+        { 0x16, 10 }, { 0xB6, 11 }, { 0x96, 11 }, { 0x35, 10 }, { 0xB0, 10 },
+        { 0x60,  7 }, { 0x52,  8 }, { 0x34,  9 }, { 0x61,  9 }, { 0x83, 10 },
+        { 0x98, 12 }, { 0x37, 13 }, { 0x78, 13 }, { 0x86, 11 }, { 0xC6, 12 },
+        { 0x67, 12 }, { 0xD6, 12 }, { 0x57, 12 }, { 0x84, 10 }, { 0x44,  8 },
+        { 0x42,  7 }, { 0x51,  8 }, { 0x92, 11 }, { 0xA5, 11 }, { 0xA0, 10 },
+        { 0x47, 13 }, { 0x88, 13 }, { 0xB3, 12 }, { 0xC4, 13 }, { 0xB1, 13 },
+        { 0x26, 12 }, { 0xB7, 12 }, { 0xA3, 12 }, { 0x46, 11 }, { 0x11,  5 },
+        { 0x20,  4 },
+    },
+    {
+        { 0xC0,  8 }, { 0x94, 10 }, { 0xA8, 10 }, { 0x67,  9 }, { 0x33,  7 },
+        { 0x16,  7 }, { 0x41,  7 }, { 0x50,  5 }, { 0x11,  5 }, { 0x04,  5 },
+        { 0x02,  4 }, { 0x18,  9 }, { 0x73,  9 }, { 0x55,  8 }, { 0x62,  8 },
+        { 0xB2, 12 }, { 0x38, 12 }, { 0xA2, 11 }, { 0x58, 10 }, { 0x76,  9 },
+        { 0x44,  7 }, { 0x64,  8 }, { 0x56,  9 }, { 0x66,  9 }, { 0x70,  6 },
+        { 0x51,  8 }, { 0x47, 10 }, { 0x82, 10 }, { 0x36, 10 }, { 0xA4, 10 },
+        { 0x07,  8 }, { 0x08,  9 }, { 0xD7, 10 }, { 0x77, 10 }, { 0x01,  4 },
+        { 0x23,  6 }, { 0x14,  6 }, { 0x90,  7 }, { 0x32,  7 }, { 0x05,  6 },
+        { 0x96,  9 }, { 0xC5, 11 }, { 0x37, 11 }, { 0x78, 10 }, { 0x84,  9 },
+        { 0x26,  9 }, { 0xD1, 13 }, { 0xC1, 13 }, { 0xA1, 12 }, { 0x98, 11 },
+        { 0xA7, 10 }, { 0x46,  9 }, { 0x83,  9 }, { 0xA3, 11 }, { 0x68, 11 },
+        { 0x91, 10 }, { 0x24,  7 }, { 0x43,  7 }, { 0x42,  7 }, { 0x88, 11 },
+        { 0xB5, 11 }, {    0, 10 }, { 0x71, 10 }, { 0xA6, 11 }, { 0x81, 11 },
+        { 0xB0,  8 }, { 0x80,  7 }, { 0x95, 10 }, { 0x48, 12 }, { 0x28, 12 },
+        { 0xB8, 11 }, { 0x35,  9 }, { 0x25,  8 }, { 0x40,  5 }, { 0x13,  6 },
+        { 0xC8, 10 }, { 0xC4, 11 }, { 0xA5, 11 }, { 0xB7, 10 }, { 0xD8, 10 },
+        { 0x52,  8 }, { 0x31,  7 }, { 0x03,  5 }, { 0x65,  8 }, { 0x63,  8 },
+        { 0x06,  7 }, { 0xD3, 12 }, { 0xD4, 12 }, { 0xB1, 12 }, { 0xC2, 12 },
+        { 0x87, 10 }, { 0x86,  9 }, { 0x53,  8 }, { 0x15,  7 }, { 0x22,  6 },
+        { 0x60,  6 }, { 0x21,  6 }, { 0xA0,  8 }, { 0x54,  8 }, { 0xB4, 11 },
+        { 0xC7, 11 }, { 0xB6, 11 }, { 0xD5, 11 }, { 0x97, 10 }, { 0xC3, 12 },
+        { 0xD2, 12 }, { 0xC6, 11 }, { 0x34,  9 }, { 0x72, 10 }, { 0xD6, 11 },
+        { 0xB3, 11 }, { 0x12,  6 }, { 0xD0,  9 }, { 0x61,  9 }, { 0x45,  9 },
+        { 0x57, 10 }, { 0x93, 10 }, { 0x92, 11 }, { 0x27, 11 }, { 0x85, 10 },
+        { 0x17,  9 }, { 0x74,  9 }, { 0x75,  9 }, { 0x30,  5 }, { 0x20,  4 },
+        { 0x10,  2 },
+    },
+    {
+        { 0x01,  3 }, { 0x05,  7 }, { 0x65,  9 }, { 0x64,  9 }, { 0x24,  8 },
+        { 0xD1, 12 }, { 0x28, 13 }, { 0xA2, 13 }, { 0x83, 12 }, { 0xA5, 12 },
+        { 0x76, 11 }, { 0x82, 12 }, { 0x92, 12 }, { 0xB0,  9 }, { 0x75, 10 },
+        { 0x93, 11 }, { 0xA7, 14 }, { 0xD4, 14 }, { 0xB3, 13 }, { 0xB7, 12 },
+        { 0x25,  9 }, { 0x41,  7 }, { 0x22,  5 }, { 0x70,  7 }, { 0x08, 11 },
+        { 0x96, 11 }, { 0x16, 10 }, { 0xC5, 11 }, { 0xC6, 13 }, { 0x78, 13 },
+        { 0xA4, 12 }, { 0x56, 12 }, { 0x36, 13 }, { 0xC3, 14 }, { 0x68, 14 },
+        { 0x26, 12 }, { 0x67, 13 }, { 0xD7, 13 }, { 0x80,  8 }, { 0x13,  6 },
+        { 0x12,  5 }, { 0x02,  4 }, { 0x32,  6 }, { 0x33,  7 }, { 0x62,  9 },
+        { 0x06,  9 }, { 0xD0, 10 }, { 0x81, 11 }, { 0x95, 11 }, { 0xA0,  9 },
+        { 0x40,  5 }, { 0x20,  3 }, { 0x45,  9 }, { 0x86, 12 }, { 0xD2, 13 },
+        { 0xD8, 14 }, { 0x47, 15 }, { 0x88, 15 }, { 0x91, 11 }, { 0x74, 10 },
+        { 0x63,  9 }, { 0x85, 11 }, { 0x77, 12 }, { 0x66, 12 }, { 0xC0, 10 },
+        { 0x42,  7 }, { 0x34,  9 }, { 0x72, 10 }, { 0xD5, 13 }, { 0x38, 14 },
+        { 0x57, 14 }, { 0x87, 14 }, { 0xC7, 14 }, { 0x37, 14 }, {    0, 14 },
+        { 0xB5, 12 }, { 0x97, 12 }, { 0x51,  8 }, { 0x23,  7 }, { 0x21,  5 },
+        { 0x30,  4 }, { 0x53,  8 }, { 0x61, 10 }, { 0x94, 12 }, { 0x58, 13 },
+        { 0xA6, 13 }, { 0x07, 11 }, { 0x71, 11 }, { 0xB6, 13 }, { 0xC1, 13 },
+        { 0xD6, 13 }, { 0x48, 13 }, { 0x98, 13 }, { 0xC2, 13 }, { 0xC4, 13 },
+        { 0xA3, 13 }, { 0x17, 11 }, { 0x60,  7 }, { 0x04,  7 }, { 0x54,  9 },
+        { 0x55, 10 }, { 0xB1, 12 }, { 0x46, 13 }, { 0xB2, 13 }, { 0x84, 12 },
+        { 0xB4, 13 }, { 0xC8, 15 }, { 0xD3, 15 }, { 0xA8, 14 }, { 0x52,  8 },
+        { 0x31,  6 }, { 0x50,  6 }, { 0x11,  5 }, { 0x43,  8 }, { 0x73, 10 },
+        { 0x35, 11 }, { 0x18, 13 }, { 0xB8, 14 }, { 0x27, 14 }, { 0xA1, 12 },
+        { 0x15,  9 }, { 0x44,  9 }, { 0x90,  9 }, { 0x14,  8 }, { 0x03,  6 },
+        { 0x10,  2 },
+    },
+    {
+        { 0x10,  2 }, { 0x60,  6 }, { 0x64,  7 }, { 0xB6, 10 }, { 0x81, 10 },
+        { 0x95,  9 }, { 0xD0, 10 }, { 0x18, 10 }, { 0x71,  9 }, { 0x15,  6 },
+        { 0x41,  7 }, { 0x45,  7 }, { 0x01,  4 }, { 0x30,  4 }, { 0xD7, 11 },
+        { 0xB8, 11 }, { 0x92, 10 }, { 0xB5, 10 }, {    0, 11 }, { 0xC0, 11 },
+        { 0x90,  8 }, { 0x35,  7 }, { 0x53,  7 }, { 0xA5, 10 }, { 0xA1, 12 },
+        { 0xB2, 12 }, { 0xA3, 11 }, { 0x17,  9 }, { 0x77,  9 }, { 0xB7, 11 },
+        { 0xD6, 11 }, { 0x98, 10 }, { 0x40,  5 }, { 0x24,  6 }, { 0x83,  9 },
+        { 0x87, 11 }, { 0xA7, 12 }, { 0xC3, 13 }, { 0xC2, 13 }, { 0x37, 10 },
+        { 0x80,  8 }, { 0x85,  9 }, { 0x88, 11 }, { 0xB3, 11 }, { 0x96, 10 },
+        { 0x73,  8 }, { 0x04,  5 }, { 0x34,  7 }, { 0x65,  8 }, { 0xD8, 11 },
+        { 0xA8, 11 }, { 0x27, 10 }, { 0x94,  9 }, { 0x23,  6 }, { 0x13,  6 },
+        { 0x55,  7 }, { 0x33,  7 }, { 0x14,  6 }, { 0x54,  7 }, { 0x51,  8 },
+        { 0x62,  8 }, { 0x22,  6 }, { 0x12,  6 }, { 0x03,  5 }, { 0x25,  7 },
+        { 0x75,  8 }, { 0x76,  9 }, { 0xA6, 11 }, { 0x91, 11 }, { 0x67, 10 },
+        { 0x06,  7 }, { 0x42,  7 }, { 0x32,  7 }, { 0x16,  8 }, { 0x36,  9 },
+        { 0x82, 10 }, { 0x58, 10 }, { 0x21,  6 }, { 0x02,  5 }, { 0x20,  4 },
+        { 0x44,  7 }, { 0x08,  8 }, { 0x56,  8 }, { 0x11,  6 }, { 0x74,  8 },
+        { 0x84,  9 }, { 0xD4, 12 }, { 0xC5, 12 }, { 0xA4, 11 }, { 0x93, 10 },
+        { 0x43,  7 }, { 0x78, 10 }, { 0x68, 11 }, { 0x38, 12 }, { 0xB1, 13 },
+        { 0xD3, 13 }, { 0x57,  9 }, { 0x72,  9 }, { 0x46,  9 }, { 0x28, 11 },
+        { 0xB4, 11 }, { 0xA2, 12 }, { 0xC8, 12 }, { 0x86, 11 }, { 0x61,  9 },
+        { 0x07,  8 }, { 0x52,  8 }, { 0x66, 10 }, { 0xB0, 10 }, { 0x47, 10 },
+        { 0xC6, 12 }, { 0xC7, 12 }, { 0x48, 11 }, { 0x70,  7 }, { 0x31,  7 },
+        { 0xA0, 10 }, { 0x97, 11 }, { 0xD2, 14 }, { 0xD1, 15 }, { 0xC1, 15 },
+        { 0xC4, 13 }, { 0xD5, 12 }, { 0x26,  9 }, { 0x63,  8 }, { 0x05,  6 },
+        { 0x50,  6 },
+    },
+    {
+        { 0x12,  5 }, { 0x61,  8 }, { 0x55,  8 }, { 0x35,  8 }, { 0x25,  8 },
+        { 0x23,  7 }, { 0x64,  8 }, { 0x71,  8 }, { 0x70,  5 }, { 0xB0,  7 },
+        { 0x83,  9 }, { 0x93,  9 }, { 0x86, 10 }, { 0xA3, 11 }, { 0xD1, 12 },
+        {    0, 12 }, { 0x84,  9 }, { 0xA0,  7 }, { 0x41,  7 }, { 0x11,  4 },
+        { 0x33,  7 }, { 0x63,  8 }, { 0x27, 10 }, { 0xB8, 12 }, { 0xD8, 12 },
+        { 0x88, 13 }, { 0xA8, 13 }, { 0xB7, 12 }, { 0x76,  9 }, { 0x05,  6 },
+        { 0x40,  5 }, { 0x10,  2 }, { 0x02,  5 }, { 0x80,  6 }, { 0x17,  8 },
+        { 0x73,  8 }, { 0x51,  7 }, { 0x20,  4 }, { 0x90,  6 }, { 0x14,  6 },
+        { 0x50,  5 }, { 0x37, 10 }, { 0x96, 10 }, { 0xA5, 11 }, { 0xA7, 12 },
+        { 0xC8, 12 }, { 0x57, 10 }, { 0x36,  9 }, { 0x26,  9 }, { 0x44,  8 },
+        { 0x18,  9 }, { 0xB2, 11 }, { 0x58, 11 }, { 0xA1, 11 }, { 0xD4, 12 },
+        { 0xC6, 12 }, { 0x74,  8 }, { 0x56,  9 }, { 0x94,  9 }, { 0x08,  8 },
+        { 0x65,  9 }, { 0x85, 10 }, { 0x28, 11 }, { 0xA2, 11 }, { 0x03,  6 },
+        { 0x31,  6 }, { 0x13,  6 }, { 0x24,  8 }, { 0xC5, 12 }, { 0x48, 12 },
+        { 0xA4, 11 }, { 0x82, 10 }, { 0x97, 11 }, { 0xB6, 11 }, { 0x77, 10 },
+        { 0x34,  8 }, { 0xD0,  9 }, { 0x45,  9 }, { 0x32,  7 }, { 0x43,  8 },
+        { 0x66, 10 }, { 0xD3, 12 }, { 0xC3, 13 }, { 0x68, 13 }, { 0x67, 11 },
+        { 0xC0,  9 }, { 0x21,  6 }, { 0x01,  4 }, { 0x15,  7 }, { 0x53,  8 },
+        { 0x42,  8 }, { 0x04,  6 }, { 0x06,  7 }, { 0x54,  8 }, { 0x92, 10 },
+        { 0xB5, 11 }, { 0xD5, 12 }, { 0xA6, 12 }, { 0x46, 10 }, { 0xB4, 11 },
+        { 0x47, 11 }, { 0x72,  9 }, { 0x62,  9 }, { 0x07,  8 }, { 0x52,  8 },
+        { 0xB3, 11 }, { 0xC2, 13 }, { 0xD6, 13 }, { 0x38, 12 }, { 0x95, 10 },
+        { 0x81, 10 }, { 0xB1, 11 }, { 0x87, 12 }, { 0x98, 13 }, { 0xD7, 13 },
+        { 0x22,  7 }, { 0x75,  9 }, { 0x78, 11 }, { 0xC7, 13 }, { 0xD2, 13 },
+        { 0xC4, 13 }, { 0xC1, 13 }, { 0x91, 10 }, { 0x16,  8 }, { 0x60,  6 },
+        { 0x30,  5 },
+    },
+    {
+        { 0x30,  4 }, { 0x31,  6 }, { 0x53,  8 }, { 0x05,  9 }, { 0x25, 12 },
+        { 0xB4, 13 }, { 0x36, 13 }, { 0x94, 12 }, { 0xC6, 14 }, { 0x27, 14 },
+        { 0x38, 14 }, { 0x46, 14 }, { 0x26, 12 }, { 0x65, 12 }, { 0x93, 11 },
+        { 0x66, 12 }, { 0x77, 14 }, { 0x97, 14 }, { 0xA4, 14 }, { 0xB1, 14 },
+        { 0xB2, 14 }, { 0xD1, 14 }, { 0xD2, 14 }, { 0xD8, 14 }, { 0x08, 12 },
+        { 0x16, 12 }, { 0x18, 12 }, { 0x37, 13 }, { 0x47, 13 }, { 0x95, 12 },
+        { 0x15,  9 }, { 0x42,  8 }, { 0x21,  6 }, { 0x14,  8 }, { 0x56, 11 },
+        { 0x73, 11 }, { 0x06, 10 }, { 0x34,  9 }, { 0x43,  8 }, { 0x41,  9 },
+        { 0x74, 11 }, { 0x86, 12 }, { 0xB7, 13 }, { 0x45, 13 }, { 0x63, 11 },
+        { 0x57, 12 }, { 0x91, 12 }, { 0x01,  3 }, { 0x20,  4 }, { 0x50,  6 },
+        { 0x54,  9 }, { 0x62, 10 }, { 0x55, 10 }, { 0x52,  9 }, { 0x80,  9 },
+        { 0x71, 11 }, { 0x64, 11 }, { 0x82, 10 }, { 0x51,  9 }, { 0x24,  9 },
+        { 0x44,  9 }, { 0x02,  5 }, { 0x40,  6 }, { 0x03,  6 }, { 0x12,  6 },
+        { 0x22,  7 }, { 0x61, 10 }, { 0x76, 13 }, { 0x84, 13 }, { 0x85, 13 },
+        { 0x96, 13 }, { 0x75, 12 }, { 0xB6, 13 }, { 0x58, 13 }, { 0xB0, 10 },
+        { 0xD0, 11 }, { 0xA3, 13 }, { 0xD5, 13 }, { 0x81, 13 }, { 0xB3, 13 },
+        { 0x04,  8 }, { 0x11,  5 }, { 0x60,  8 }, { 0x92, 10 }, { 0x72, 10 },
+        { 0x33,  9 }, { 0x70,  8 }, { 0x32,  8 }, { 0x13,  7 }, { 0x90,  9 },
+        { 0x83, 11 }, { 0xC0, 13 }, { 0xC4, 20 }, { 0xC5, 20 }, { 0xC7, 20 },
+        { 0xC8, 20 }, { 0xD3, 20 }, { 0xD4, 20 }, { 0xD6, 20 }, { 0xD7, 20 },
+        { 0x28, 21 }, { 0x48, 21 }, { 0x67, 21 }, { 0x68, 21 }, { 0x78, 21 },
+        { 0x87, 21 }, { 0x88, 21 }, { 0x98, 21 }, { 0xA2, 21 }, { 0xA6, 21 },
+        { 0xA8, 21 }, { 0xB5, 21 }, { 0xB8, 21 }, { 0xC1, 21 }, { 0xC2, 21 },
+        { 0xC3, 21 }, {    0, 16 }, { 0xA1, 15 }, { 0xA5, 15 }, { 0xA7, 15 },
+        { 0x07, 12 }, { 0x17, 12 }, { 0x35, 12 }, { 0xA0, 11 }, { 0x23,  8 },
+        { 0x10,  1 },
+    },
+    {
+        { 0x12,  5 }, { 0x75, 10 }, { 0x86, 12 }, { 0xB2, 12 }, { 0xA2, 11 },
+        { 0x63, 10 }, { 0xA4, 12 }, { 0xA5, 12 }, { 0x46, 12 }, { 0x68, 14 },
+        { 0xD2, 14 }, { 0x87, 13 }, { 0x71,  9 }, { 0x72,  9 }, { 0x33,  8 },
+        { 0x60,  8 }, { 0x14,  8 }, { 0x42,  8 }, { 0x64, 10 }, { 0x16, 10 },
+        { 0xA0, 10 }, { 0xD3, 11 }, { 0x93, 11 }, { 0x23,  8 }, { 0x30,  4 },
+        { 0x11,  4 }, { 0x41,  8 }, { 0x05,  9 }, { 0x06, 10 }, { 0x65, 11 },
+        { 0x66, 12 }, { 0x08, 13 }, { 0x18, 14 }, { 0xB6, 14 }, { 0x70,  8 },
+        { 0x53,  8 }, { 0x61, 10 }, { 0x82, 11 }, { 0xC4, 13 }, { 0xB7, 14 },
+        { 0xC1, 19 }, { 0xC2, 19 }, { 0x27, 20 }, { 0x37, 20 }, { 0x38, 20 },
+        { 0x48, 20 }, { 0x57, 20 }, { 0x58, 20 }, { 0x78, 20 }, { 0x88, 20 },
+        { 0x98, 20 }, { 0xA7, 20 }, { 0xA8, 20 }, { 0xB8, 20 }, { 0x28, 16 },
+        { 0x26, 15 }, { 0xB4, 12 }, { 0x15,  9 }, { 0x52,  8 }, { 0x22,  7 },
+        { 0x55, 11 }, { 0xD5, 12 }, { 0xD1, 13 }, { 0x17, 13 }, { 0x34, 10 },
+        { 0x73,  9 }, { 0x51,  8 }, { 0x40,  7 }, { 0x03,  6 }, { 0x20,  3 },
+        { 0x13,  6 }, { 0x45, 11 }, { 0x95, 12 }, { 0x96, 13 }, { 0x76, 13 },
+        { 0x84, 11 }, { 0x97, 13 }, { 0xA6, 13 }, { 0x25, 12 }, { 0x94, 12 },
+        { 0x91, 12 }, { 0x90, 11 }, { 0xB3, 11 }, { 0xA3, 11 }, { 0xC0, 11 },
+        { 0xB5, 13 }, { 0x67, 15 }, { 0xC5, 15 }, { 0xC6, 15 }, { 0x47, 16 },
+        { 0xC7, 16 }, { 0x81, 12 }, { 0x83, 11 }, { 0x92, 11 }, { 0x43,  9 },
+        { 0x77, 13 }, { 0xD4, 13 }, { 0x35, 12 }, { 0xD0, 11 }, { 0x44, 10 },
+        { 0x24, 10 }, { 0xC3, 13 }, { 0x07, 13 }, { 0x56, 13 }, { 0xC8, 16 },
+        { 0xD7, 16 }, { 0xD8, 16 }, {    0, 16 }, { 0xA1, 14 }, { 0xB0, 11 },
+        { 0x80, 11 }, { 0x36, 13 }, { 0xB1, 13 }, { 0xD6, 13 }, { 0x85, 13 },
+        { 0x74, 10 }, { 0x62, 10 }, { 0x54, 10 }, { 0x21,  5 }, { 0x02,  5 },
+        { 0x31,  6 }, { 0x50,  7 }, { 0x04,  8 }, { 0x32,  8 }, { 0x10,  2 },
+        { 0x01,  2 },
+    },
 };
 
 const uint8_t ff_wmv3_dc_scale_table[32] = {
diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h
index 92d6374cb2..e83385b5c6 100644
--- a/libavcodec/vc1data.h
+++ b/libavcodec/vc1data.h
@@ -167,13 +167,15 @@  extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8];
 extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6];
 extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6];
 
-/* Interlaced frame/field picture MVDATA VLC tables */
+/* Interlaced frame/field picture MVDATA VLC tables
+ * The escape value of each table has the symbol 0;
+ * for every other symbol the lower nibble contains
+ * (index + 1) % 9 and the higher nibble (index + 1) / 9
+ * with index being the index in the spec's interlace MV tables. */
 /* 1-reference tables */
-extern const uint32_t ff_vc1_1ref_mvdata_codes[4][72];
-extern const uint8_t ff_vc1_1ref_mvdata_bits[4][72];
+extern const uint8_t ff_vc1_1ref_mvdata_tabs[4][72][2];
 /* 2-reference tables */
-extern const uint32_t ff_vc1_2ref_mvdata_codes[8][126];
-extern const uint8_t ff_vc1_2ref_mvdata_bits[8][126];
+extern const uint8_t ff_vc1_2ref_mvdata_tabs[8][126][2];
 
 /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */