changeset 812:85be08903b70 trunk

[svn] - remove a lot of video codecs
author nenolod
date Mon, 12 Mar 2007 11:44:33 -0700
parents 3afe5701df41
children 1d03ded97d44
files ChangeLog src/ffmpeg/libavcodec/Makefile src/ffmpeg/libavcodec/cinepak.c src/ffmpeg/libavcodec/idcinvideo.c src/ffmpeg/libavcodec/indeo2.c src/ffmpeg/libavcodec/indeo2data.h src/ffmpeg/libavcodec/indeo3.c src/ffmpeg/libavcodec/indeo3data.h src/ffmpeg/libavcodec/interplayvideo.c src/ffmpeg/libavcodec/nuv.c src/ffmpeg/libavcodec/rv10.c src/ffmpeg/libavcodec/snow.c src/ffmpeg/libavcodec/vp3.c src/ffmpeg/libavcodec/vp3data.h src/ffmpeg/libavcodec/vp3dsp.c src/ffmpeg/libavcodec/vp5.c src/ffmpeg/libavcodec/vp56.c src/ffmpeg/libavcodec/vp56.h src/ffmpeg/libavcodec/vp56data.c src/ffmpeg/libavcodec/vp56data.h src/ffmpeg/libavcodec/vp5data.h src/ffmpeg/libavcodec/vp6.c src/ffmpeg/libavcodec/vp6data.h src/ffmpeg/libavcodec/vqavideo.c src/ffmpeg/libavcodec/xan.c src/ffmpeg/libavcodec/xl.c src/ffmpeg/libavcodec/xvmcvideo.c
diffstat 27 files changed, 31 insertions(+), 21373 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 12 11:38:51 2007 -0700
+++ b/ChangeLog	Mon Mar 12 11:44:33 2007 -0700
@@ -1,3 +1,19 @@
+2007-03-12 18:38:51 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1722]
+  - remove h261/h263/h264 stuff
+  
+  trunk/src/ffmpeg/libavcodec/Makefile   |   10 
+  trunk/src/ffmpeg/libavcodec/h261.c     | 1055 ----
+  trunk/src/ffmpeg/libavcodec/h261data.h |  157 
+  trunk/src/ffmpeg/libavcodec/h263.c     | 6291 -----------------------
+  trunk/src/ffmpeg/libavcodec/h263data.h |  308 -
+  trunk/src/ffmpeg/libavcodec/h263dec.c  |  913 ---
+  trunk/src/ffmpeg/libavcodec/h264.c     | 8655 ---------------------------------
+  trunk/src/ffmpeg/libavcodec/h264data.h | 1280 ----
+  trunk/src/ffmpeg/libavcodec/h264idct.c |  168 
+  9 files changed, 5 insertions(+), 18832 deletions(-)
+
+
 2007-03-12 18:37:35 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1720]
   - delete a lot of stuff
--- a/src/ffmpeg/libavcodec/Makefile	Mon Mar 12 11:38:51 2007 -0700
+++ b/src/ffmpeg/libavcodec/Makefile	Mon Mar 12 11:44:33 2007 -0700
@@ -10,12 +10,12 @@
 aasc.c                    roqvideo.c	\
 rpza.c	\
 ac3enc.c                  huffyuv.c                 rtjpeg.c	\
-adpcm.c                   idcinvideo.c              rv10.c	\
+adpcm.c                   \
 adx.c                     imgconvert.c              shorten.c	\
 alac.c                    imgresample.c             simple_idct.c \
-allcodecs.c               indeo2.c                  smacker.c	\
-indeo3.c                  smc.c	\
-apiexample.c              interplayvideo.c          snow.c	\
+allcodecs.c               smacker.c	\
+smc.c	\
+apiexample.c              \
 asv1.c                    jfdctfst.c                sonic.c	\
 audioconvert.c            jfdctint.c                svq1.c	\
 avs.c                     \
@@ -26,7 +26,7 @@
 cabac.c                   loco.c                    truemotion2.c	\
 cavs.c                    lzo.c                     truespeech.c	\
 cavsdsp.c                 mace.c                    tscc.c	\
-cinepak.c                 mdct.c                    tta.c	\
+mdct.c                    tta.c	\
 cljr.c                    ulti.c	\
 cook.c                    utils.c	\
 cscd.c                    mmvideo.c                 vc1.c	\
@@ -37,24 +37,24 @@
 dsputil.c                 vorbis.c	\
 mpegaudio.c               vorbis_data.c \
 dv.c                      mpegaudiodec.c            vorbis_enc.c \
-dvbsub.c                  mpegvideo.c               vp3.c	\
-dvbsubdec.c               vp3dsp.c	\
-dvdsub.c                  msrle.c                   vp5.c	\
-dvdsubenc.c               msvideo1.c                vp56.c	\
-error_resilience.c        nuv.c                     vp56data.c	\
-eval.c                    oggvorbis.c               vp6.c	\
-faac.c                    opt.c                     vqavideo.c	\
+dvbsub.c                  mpegvideo.c   \
+dvbsubdec.c	\
+dvdsub.c                  msrle.c                   \
+dvdsubenc.c               msvideo1.c                \
+error_resilience.c        \
+eval.c                    oggvorbis.c               \
+faac.c                    opt.c                     \
 faandct.c                 parser.c                  wavpack.c	\
 fdctref.c                 pcm.c                     wmadec.c	\
 fft-test.c                png.c                     \
 fft.c                     pnm.c                     wnv1.c	\
 ffv1.c                    pthread.c                 ws-snd1.c	\
 flac.c                    qdm2.c                    \
-flacenc.c                 qdrw.c                    xan.c	\
-flashsv.c                 qpeg.c                    xl.c	\
+flacenc.c                 qdrw.c                    \
+flashsv.c                 qpeg.c                    \
 flicvideo.c               qtrle.c                   \
 fraps.c                   ra144.c                   \
-g726.c                    ra288.c                   xvmcvideo.c	\
+g726.c                    ra288.c                   \
 gifdec.c                  rangecoder.c              zmbv.c	\
 golomb.c                  ratecontrol.c
 
--- a/src/ffmpeg/libavcodec/cinepak.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,453 +0,0 @@
-/*
- * Cinepak Video Decoder
- * Copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file cinepak.c
- * Cinepak video decoder
- * by Ewald Snel <ewald@rambo.its.tudelft.nl>
- * For more information on the Cinepak algorithm, visit:
- *   http://www.csse.monash.edu.au/~timf/
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-
-
-typedef struct {
-    uint8_t  y0, y1, y2, y3;
-    uint8_t  u, v;
-} cvid_codebook_t;
-
-#define MAX_STRIPS      32
-
-typedef struct {
-    uint16_t          id;
-    uint16_t          x1, y1;
-    uint16_t          x2, y2;
-    cvid_codebook_t   v4_codebook[256];
-    cvid_codebook_t   v1_codebook[256];
-} cvid_strip_t;
-
-typedef struct CinepakContext {
-
-    AVCodecContext *avctx;
-    DSPContext dsp;
-    AVFrame frame;
-
-    unsigned char *data;
-    int size;
-
-    int width, height;
-
-    int palette_video;
-    cvid_strip_t strips[MAX_STRIPS];
-
-} CinepakContext;
-
-static void cinepak_decode_codebook (cvid_codebook_t *codebook,
-                                     int chunk_id, int size, uint8_t *data)
-{
-    uint8_t *eod = (data + size);
-    uint32_t flag, mask;
-    int      i, n;
-
-    /* check if this chunk contains 4- or 6-element vectors */
-    n    = (chunk_id & 0x0400) ? 4 : 6;
-    flag = 0;
-    mask = 0;
-
-    for (i=0; i < 256; i++) {
-        if ((chunk_id & 0x0100) && !(mask >>= 1)) {
-            if ((data + 4) > eod)
-                break;
-
-            flag  = BE_32 (data);
-            data += 4;
-            mask  = 0x80000000;
-        }
-
-        if (!(chunk_id & 0x0100) || (flag & mask)) {
-            if ((data + n) > eod)
-                break;
-
-            if (n == 6) {
-                codebook[i].y0 = *data++;
-                codebook[i].y1 = *data++;
-                codebook[i].y2 = *data++;
-                codebook[i].y3 = *data++;
-                codebook[i].u  = 128 + *data++;
-                codebook[i].v  = 128 + *data++;
-            } else {
-                /* this codebook type indicates either greyscale or
-                 * palettized video; if palettized, U & V components will
-                 * not be used so it is safe to set them to 128 for the
-                 * benefit of greyscale rendering in YUV420P */
-                codebook[i].y0 = *data++;
-                codebook[i].y1 = *data++;
-                codebook[i].y2 = *data++;
-                codebook[i].y3 = *data++;
-                codebook[i].u  = 128;
-                codebook[i].v  = 128;
-            }
-        }
-    }
-}
-
-static int cinepak_decode_vectors (CinepakContext *s, cvid_strip_t *strip,
-                                   int chunk_id, int size, uint8_t *data)
-{
-    uint8_t         *eod = (data + size);
-    uint32_t         flag, mask;
-    cvid_codebook_t *codebook;
-    unsigned int     x, y;
-    uint32_t         iy[4];
-    uint32_t         iu[2];
-    uint32_t         iv[2];
-
-    flag = 0;
-    mask = 0;
-
-    for (y=strip->y1; y < strip->y2; y+=4) {
-
-        iy[0] = strip->x1 + (y * s->frame.linesize[0]);
-        iy[1] = iy[0] + s->frame.linesize[0];
-        iy[2] = iy[1] + s->frame.linesize[0];
-        iy[3] = iy[2] + s->frame.linesize[0];
-        iu[0] = (strip->x1/2) + ((y/2) * s->frame.linesize[1]);
-        iu[1] = iu[0] + s->frame.linesize[1];
-        iv[0] = (strip->x1/2) + ((y/2) * s->frame.linesize[2]);
-        iv[1] = iv[0] + s->frame.linesize[2];
-
-        for (x=strip->x1; x < strip->x2; x+=4) {
-            if ((chunk_id & 0x0100) && !(mask >>= 1)) {
-                if ((data + 4) > eod)
-                    return -1;
-
-                flag  = BE_32 (data);
-                data += 4;
-                mask  = 0x80000000;
-            }
-
-            if (!(chunk_id & 0x0100) || (flag & mask)) {
-                if (!(chunk_id & 0x0200) && !(mask >>= 1)) {
-                    if ((data + 4) > eod)
-                        return -1;
-
-                    flag  = BE_32 (data);
-                    data += 4;
-                    mask  = 0x80000000;
-                }
-
-                if ((chunk_id & 0x0200) || (~flag & mask)) {
-                    if (data >= eod)
-                        return -1;
-
-                    codebook = &strip->v1_codebook[*data++];
-                    s->frame.data[0][iy[0] + 0] = codebook->y0;
-                    s->frame.data[0][iy[0] + 1] = codebook->y0;
-                    s->frame.data[0][iy[1] + 0] = codebook->y0;
-                    s->frame.data[0][iy[1] + 1] = codebook->y0;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[0]] = codebook->u;
-                        s->frame.data[2][iv[0]] = codebook->v;
-                    }
-
-                    s->frame.data[0][iy[0] + 2] = codebook->y1;
-                    s->frame.data[0][iy[0] + 3] = codebook->y1;
-                    s->frame.data[0][iy[1] + 2] = codebook->y1;
-                    s->frame.data[0][iy[1] + 3] = codebook->y1;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[0] + 1] = codebook->u;
-                        s->frame.data[2][iv[0] + 1] = codebook->v;
-                    }
-
-                    s->frame.data[0][iy[2] + 0] = codebook->y2;
-                    s->frame.data[0][iy[2] + 1] = codebook->y2;
-                    s->frame.data[0][iy[3] + 0] = codebook->y2;
-                    s->frame.data[0][iy[3] + 1] = codebook->y2;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[1]] = codebook->u;
-                        s->frame.data[2][iv[1]] = codebook->v;
-                    }
-
-                    s->frame.data[0][iy[2] + 2] = codebook->y3;
-                    s->frame.data[0][iy[2] + 3] = codebook->y3;
-                    s->frame.data[0][iy[3] + 2] = codebook->y3;
-                    s->frame.data[0][iy[3] + 3] = codebook->y3;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[1] + 1] = codebook->u;
-                        s->frame.data[2][iv[1] + 1] = codebook->v;
-                    }
-
-                } else if (flag & mask) {
-                    if ((data + 4) > eod)
-                        return -1;
-
-                    codebook = &strip->v4_codebook[*data++];
-                    s->frame.data[0][iy[0] + 0] = codebook->y0;
-                    s->frame.data[0][iy[0] + 1] = codebook->y1;
-                    s->frame.data[0][iy[1] + 0] = codebook->y2;
-                    s->frame.data[0][iy[1] + 1] = codebook->y3;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[0]] = codebook->u;
-                        s->frame.data[2][iv[0]] = codebook->v;
-                    }
-
-                    codebook = &strip->v4_codebook[*data++];
-                    s->frame.data[0][iy[0] + 2] = codebook->y0;
-                    s->frame.data[0][iy[0] + 3] = codebook->y1;
-                    s->frame.data[0][iy[1] + 2] = codebook->y2;
-                    s->frame.data[0][iy[1] + 3] = codebook->y3;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[0] + 1] = codebook->u;
-                        s->frame.data[2][iv[0] + 1] = codebook->v;
-                    }
-
-                    codebook = &strip->v4_codebook[*data++];
-                    s->frame.data[0][iy[2] + 0] = codebook->y0;
-                    s->frame.data[0][iy[2] + 1] = codebook->y1;
-                    s->frame.data[0][iy[3] + 0] = codebook->y2;
-                    s->frame.data[0][iy[3] + 1] = codebook->y3;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[1]] = codebook->u;
-                        s->frame.data[2][iv[1]] = codebook->v;
-                    }
-
-                    codebook = &strip->v4_codebook[*data++];
-                    s->frame.data[0][iy[2] + 2] = codebook->y0;
-                    s->frame.data[0][iy[2] + 3] = codebook->y1;
-                    s->frame.data[0][iy[3] + 2] = codebook->y2;
-                    s->frame.data[0][iy[3] + 3] = codebook->y3;
-                    if (!s->palette_video) {
-                        s->frame.data[1][iu[1] + 1] = codebook->u;
-                        s->frame.data[2][iv[1] + 1] = codebook->v;
-                    }
-
-                }
-            }
-
-            iy[0] += 4;  iy[1] += 4;
-            iy[2] += 4;  iy[3] += 4;
-            iu[0] += 2;  iu[1] += 2;
-            iv[0] += 2;  iv[1] += 2;
-        }
-    }
-
-    return 0;
-}
-
-static int cinepak_decode_strip (CinepakContext *s,
-                                 cvid_strip_t *strip, uint8_t *data, int size)
-{
-    uint8_t *eod = (data + size);
-    int      chunk_id, chunk_size;
-
-    /* coordinate sanity checks */
-    if (strip->x1 >= s->width  || strip->x2 > s->width  ||
-        strip->y1 >= s->height || strip->y2 > s->height ||
-        strip->x1 >= strip->x2 || strip->y1 >= strip->y2)
-        return -1;
-
-    while ((data + 4) <= eod) {
-        chunk_id   = BE_16 (&data[0]);
-        chunk_size = BE_16 (&data[2]) - 4;
-        if(chunk_size < 0)
-            return -1;
-
-        data      += 4;
-        chunk_size = ((data + chunk_size) > eod) ? (eod - data) : chunk_size;
-
-        switch (chunk_id) {
-
-        case 0x2000:
-        case 0x2100:
-        case 0x2400:
-        case 0x2500:
-            cinepak_decode_codebook (strip->v4_codebook, chunk_id,
-                chunk_size, data);
-            break;
-
-        case 0x2200:
-        case 0x2300:
-        case 0x2600:
-        case 0x2700:
-            cinepak_decode_codebook (strip->v1_codebook, chunk_id,
-                chunk_size, data);
-            break;
-
-        case 0x3000:
-        case 0x3100:
-        case 0x3200:
-            return cinepak_decode_vectors (s, strip, chunk_id,
-                chunk_size, data);
-        }
-
-        data += chunk_size;
-    }
-
-    return -1;
-}
-
-static int cinepak_decode (CinepakContext *s)
-{
-    uint8_t      *eod = (s->data + s->size);
-    int           i, result, strip_size, frame_flags, num_strips;
-    int           y0 = 0;
-    int           encoded_buf_size;
-    /* if true, Cinepak data is from a Sega FILM/CPK file */
-    int           sega_film_data = 0;
-
-    if (s->size < 10)
-        return -1;
-
-    frame_flags = s->data[0];
-    num_strips  = BE_16 (&s->data[8]);
-    encoded_buf_size = ((s->data[1] << 16) | BE_16 (&s->data[2]));
-    if (encoded_buf_size != s->size)
-        sega_film_data = 1;
-    if (sega_film_data)
-        s->data    += 12;
-    else
-        s->data    += 10;
-
-    if (num_strips > MAX_STRIPS)
-        num_strips = MAX_STRIPS;
-
-    for (i=0; i < num_strips; i++) {
-        if ((s->data + 12) > eod)
-            return -1;
-
-        s->strips[i].id = BE_16 (s->data);
-        s->strips[i].y1 = y0;
-        s->strips[i].x1 = 0;
-        s->strips[i].y2 = y0 + BE_16 (&s->data[8]);
-        s->strips[i].x2 = s->avctx->width;
-
-        strip_size = BE_16 (&s->data[2]) - 12;
-        s->data   += 12;
-        strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size;
-
-        if ((i > 0) && !(frame_flags & 0x01)) {
-            memcpy (s->strips[i].v4_codebook, s->strips[i-1].v4_codebook,
-                sizeof(s->strips[i].v4_codebook));
-            memcpy (s->strips[i].v1_codebook, s->strips[i-1].v1_codebook,
-                sizeof(s->strips[i].v1_codebook));
-        }
-
-        result = cinepak_decode_strip (s, &s->strips[i], s->data, strip_size);
-
-        if (result != 0)
-            return result;
-
-        s->data += strip_size;
-        y0    = s->strips[i].y2;
-    }
-    return 0;
-}
-
-static int cinepak_decode_init(AVCodecContext *avctx)
-{
-    CinepakContext *s = (CinepakContext *)avctx->priv_data;
-
-    s->avctx = avctx;
-    s->width = (avctx->width + 3) & ~3;
-    s->height = (avctx->height + 3) & ~3;
-
-    // check for paletted data
-    if ((avctx->palctrl == NULL) || (avctx->bits_per_sample == 40)) {
-        s->palette_video = 0;
-        avctx->pix_fmt = PIX_FMT_YUV420P;
-    } else {
-        s->palette_video = 1;
-        avctx->pix_fmt = PIX_FMT_PAL8;
-    }
-
-    avctx->has_b_frames = 0;
-    dsputil_init(&s->dsp, avctx);
-
-    s->frame.data[0] = NULL;
-
-    return 0;
-}
-
-static int cinepak_decode_frame(AVCodecContext *avctx,
-                                void *data, int *data_size,
-                                uint8_t *buf, int buf_size)
-{
-    CinepakContext *s = (CinepakContext *)avctx->priv_data;
-
-    s->data = buf;
-    s->size = buf_size;
-
-    s->frame.reference = 1;
-    s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
-                            FF_BUFFER_HINTS_REUSABLE;
-    if (avctx->reget_buffer(avctx, &s->frame)) {
-        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
-        return -1;
-    }
-
-    cinepak_decode(s);
-
-    if (s->palette_video) {
-        memcpy (s->frame.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
-        if (avctx->palctrl->palette_changed) {
-            s->frame.palette_has_changed = 1;
-            avctx->palctrl->palette_changed = 0;
-        } else
-            s->frame.palette_has_changed = 0;
-    }
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = s->frame;
-
-    /* report that the buffer was completely consumed */
-    return buf_size;
-}
-
-static int cinepak_decode_end(AVCodecContext *avctx)
-{
-    CinepakContext *s = (CinepakContext *)avctx->priv_data;
-
-    if (s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    return 0;
-}
-
-AVCodec cinepak_decoder = {
-    "cinepak",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_CINEPAK,
-    sizeof(CinepakContext),
-    cinepak_decode_init,
-    NULL,
-    cinepak_decode_end,
-    cinepak_decode_frame,
-    CODEC_CAP_DR1,
-};
--- a/src/ffmpeg/libavcodec/idcinvideo.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
- * Id Quake II CIN Video Decoder
- * Copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file idcinvideo.c
- * Id Quake II Cin Video Decoder by Dr. Tim Ferguson
- * For more information about the Id CIN format, visit:
- *   http://www.csse.monash.edu.au/~timf/
- *
- * This video decoder outputs PAL8 colorspace data. Interacting with this
- * decoder is a little involved. During initialization, the demuxer must
- * transmit the 65536-byte Huffman table(s) to the decoder via extradata.
- * Then, whenever a palette change is encountered while demuxing the file,
- * the demuxer must use the same extradata space to transmit an
- * AVPaletteControl structure.
- *
- * Id CIN video is purely Huffman-coded, intraframe-only codec. It achieves
- * a little more compression by exploiting the fact that adjacent pixels
- * tend to be similar.
- *
- * Note that this decoder could use ffmpeg's optimized VLC facilities
- * rather than naive, tree-based Huffman decoding. However, there are 256
- * Huffman tables. Plus, the VLC bit coding order is right -> left instead
- * or left -> right, so all of the bits would have to be reversed. Further,
- * the original Quake II implementation likely used a similar naive
- * decoding algorithm and it worked fine on much lower spec machines.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-
-#define HUFFMAN_TABLE_SIZE 64 * 1024
-#define HUF_TOKENS 256
-#define PALETTE_COUNT 256
-
-typedef struct
-{
-  int count;
-  unsigned char used;
-  int children[2];
-} hnode_t;
-
-typedef struct IdcinContext {
-
-    AVCodecContext *avctx;
-    DSPContext dsp;
-    AVFrame frame;
-
-    unsigned char *buf;
-    int size;
-
-    hnode_t huff_nodes[256][HUF_TOKENS*2];
-    int num_huff_nodes[256];
-
-} IdcinContext;
-
-/*
- * Find the lowest probability node in a Huffman table, and mark it as
- * being assigned to a higher probability.
- * Returns the node index of the lowest unused node, or -1 if all nodes
- * are used.
- */
-static int huff_smallest_node(hnode_t *hnodes, int num_hnodes) {
-    int i;
-    int best, best_node;
-
-    best = 99999999;
-    best_node = -1;
-    for(i = 0; i < num_hnodes; i++) {
-        if(hnodes[i].used)
-            continue;
-        if(!hnodes[i].count)
-            continue;
-        if(hnodes[i].count < best) {
-            best = hnodes[i].count;
-            best_node = i;
-        }
-    }
-
-    if(best_node == -1)
-        return -1;
-    hnodes[best_node].used = 1;
-    return best_node;
-}
-
-/*
- * Build the Huffman tree using the generated/loaded probabilities histogram.
- *
- * On completion:
- *  huff_nodes[prev][i < HUF_TOKENS] - are the nodes at the base of the tree.
- *  huff_nodes[prev][i >= HUF_TOKENS] - are used to construct the tree.
- *  num_huff_nodes[prev] - contains the index to the root node of the tree.
- *    That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node.
- */
-static void huff_build_tree(IdcinContext *s, int prev) {
-    hnode_t *node, *hnodes;
-     int num_hnodes, i;
-
-    num_hnodes = HUF_TOKENS;
-    hnodes = s->huff_nodes[prev];
-    for(i = 0; i < HUF_TOKENS * 2; i++)
-        hnodes[i].used = 0;
-
-    while (1) {
-        node = &hnodes[num_hnodes];             /* next free node */
-
-        /* pick two lowest counts */
-        node->children[0] = huff_smallest_node(hnodes, num_hnodes);
-        if(node->children[0] == -1)
-            break;      /* reached the root node */
-
-        node->children[1] = huff_smallest_node(hnodes, num_hnodes);
-        if(node->children[1] == -1)
-            break;      /* reached the root node */
-
-        /* combine nodes probability for new node */
-        node->count = hnodes[node->children[0]].count +
-        hnodes[node->children[1]].count;
-        num_hnodes++;
-    }
-
-    s->num_huff_nodes[prev] = num_hnodes - 1;
-}
-
-static int idcin_decode_init(AVCodecContext *avctx)
-{
-    IdcinContext *s = (IdcinContext *)avctx->priv_data;
-    int i, j, histogram_index = 0;
-    unsigned char *histograms;
-
-    s->avctx = avctx;
-    avctx->pix_fmt = PIX_FMT_PAL8;
-    avctx->has_b_frames = 0;
-    dsputil_init(&s->dsp, avctx);
-
-    /* make sure the Huffman tables make it */
-    if (s->avctx->extradata_size != HUFFMAN_TABLE_SIZE) {
-        av_log(s->avctx, AV_LOG_ERROR, "  Id CIN video: expected extradata size of %d\n", HUFFMAN_TABLE_SIZE);
-        return -1;
-    }
-
-    /* build the 256 Huffman decode trees */
-    histograms = (unsigned char *)s->avctx->extradata;
-    for (i = 0; i < 256; i++) {
-        for(j = 0; j < HUF_TOKENS; j++)
-            s->huff_nodes[i][j].count = histograms[histogram_index++];
-        huff_build_tree(s, i);
-    }
-
-    s->frame.data[0] = NULL;
-
-    return 0;
-}
-
-static void idcin_decode_vlcs(IdcinContext *s)
-{
-    hnode_t *hnodes;
-    long x, y;
-    int prev;
-    unsigned char v = 0;
-    int bit_pos, node_num, dat_pos;
-
-    prev = bit_pos = dat_pos = 0;
-    for (y = 0; y < (s->frame.linesize[0] * s->avctx->height);
-        y += s->frame.linesize[0]) {
-        for (x = y; x < y + s->avctx->width; x++) {
-            node_num = s->num_huff_nodes[prev];
-            hnodes = s->huff_nodes[prev];
-
-            while(node_num >= HUF_TOKENS) {
-                if(!bit_pos) {
-                    if(dat_pos >= s->size) {
-                        av_log(s->avctx, AV_LOG_ERROR, "Huffman decode error.\n");
-                        return;
-                    }
-                    bit_pos = 8;
-                    v = s->buf[dat_pos++];
-                }
-
-                node_num = hnodes[node_num].children[v & 0x01];
-                v = v >> 1;
-                bit_pos--;
-            }
-
-            s->frame.data[0][x] = node_num;
-            prev = node_num;
-        }
-    }
-}
-
-static int idcin_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
-                              uint8_t *buf, int buf_size)
-{
-    IdcinContext *s = (IdcinContext *)avctx->priv_data;
-    AVPaletteControl *palette_control = avctx->palctrl;
-
-    s->buf = buf;
-    s->size = buf_size;
-
-    if (s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    if (avctx->get_buffer(avctx, &s->frame)) {
-        av_log(avctx, AV_LOG_ERROR, "  Id CIN Video: get_buffer() failed\n");
-        return -1;
-    }
-
-    idcin_decode_vlcs(s);
-
-    /* make the palette available on the way out */
-    memcpy(s->frame.data[1], palette_control->palette, PALETTE_COUNT * 4);
-    /* If palette changed inform application*/
-    if (palette_control->palette_changed) {
-        palette_control->palette_changed = 0;
-        s->frame.palette_has_changed = 1;
-    }
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = s->frame;
-
-    /* report that the buffer was completely consumed */
-    return buf_size;
-}
-
-static int idcin_decode_end(AVCodecContext *avctx)
-{
-    IdcinContext *s = (IdcinContext *)avctx->priv_data;
-
-    if (s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    return 0;
-}
-
-AVCodec idcin_decoder = {
-    "idcinvideo",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_IDCIN,
-    sizeof(IdcinContext),
-    idcin_decode_init,
-    NULL,
-    idcin_decode_end,
-    idcin_decode_frame,
-    CODEC_CAP_DR1,
-};
-
--- a/src/ffmpeg/libavcodec/indeo2.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
- * Intel Indeo 2 codec
- * Copyright (c) 2005 Konstantin Shishkov
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file indeo2.c
- * Intel Indeo 2 decoder.
- */
-#define ALT_BITSTREAM_READER_LE
-#include "avcodec.h"
-#include "bitstream.h"
-#include "indeo2data.h"
-
-typedef struct Ir2Context{
-    AVCodecContext *avctx;
-    AVFrame picture;
-    GetBitContext gb;
-    int decode_delta;
-} Ir2Context;
-
-#define CODE_VLC_BITS 14
-static VLC ir2_vlc;
-
-/* Indeo 2 codes are in range 0x01..0x7F and 0x81..0x90 */
-static inline int ir2_get_code(GetBitContext *gb)
-{
-    return get_vlc2(gb, ir2_vlc.table, CODE_VLC_BITS, 1) + 1;
-}
-
-static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride,
-                             const uint8_t *table)
-{
-    int i;
-    int j;
-    int out = 0;
-    int c;
-    int t;
-
-    if(width&1)
-        return -1;
-
-    /* first line contain absolute values, other lines contain deltas */
-    while (out < width){
-        c = ir2_get_code(&ctx->gb);
-        if(c >= 0x80) { /* we have a run */
-            c -= 0x7F;
-            if(out + c*2 > width)
-                return -1;
-            for (i = 0; i < c * 2; i++)
-                dst[out++] = 0x80;
-        } else { /* copy two values from table */
-            dst[out++] = table[c * 2];
-            dst[out++] = table[(c * 2) + 1];
-        }
-    }
-    dst += stride;
-
-    for (j = 1; j < height; j++){
-        out = 0;
-        while (out < width){
-            c = ir2_get_code(&ctx->gb);
-            if(c >= 0x80) { /* we have a skip */
-                c -= 0x7F;
-                if(out + c*2 > width)
-                    return -1;
-                for (i = 0; i < c * 2; i++) {
-                    dst[out] = dst[out - stride];
-                    out++;
-                }
-            } else { /* add two deltas from table */
-                t = dst[out - stride] + (table[c * 2] - 128);
-                t= clip_uint8(t);
-                dst[out] = t;
-                out++;
-                t = dst[out - stride] + (table[(c * 2) + 1] - 128);
-                t= clip_uint8(t);
-                dst[out] = t;
-                out++;
-            }
-        }
-        dst += stride;
-    }
-    return 0;
-}
-
-static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride,
-                             const uint8_t *table)
-{
-    int j;
-    int out = 0;
-    int c;
-    int t;
-
-    if(width&1)
-        return -1;
-
-    for (j = 0; j < height; j++){
-        out = 0;
-        while (out < width){
-            c = ir2_get_code(&ctx->gb);
-            if(c >= 0x80) { /* we have a skip */
-                c -= 0x7F;
-                out += c * 2;
-            } else { /* add two deltas from table */
-                t = dst[out] + (((table[c * 2] - 128)*3) >> 2);
-                t= clip_uint8(t);
-                dst[out] = t;
-                out++;
-                t = dst[out] + (((table[(c * 2) + 1] - 128)*3) >> 2);
-                t= clip_uint8(t);
-                dst[out] = t;
-                out++;
-            }
-        }
-        dst += stride;
-    }
-    return 0;
-}
-
-static int ir2_decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
-                        uint8_t *buf, int buf_size)
-{
-    Ir2Context * const s = avctx->priv_data;
-    AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&s->picture;
-    int start;
-
-    if(p->data[0])
-        avctx->release_buffer(avctx, p);
-
-    p->reference = 1;
-    p->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
-    if (avctx->reget_buffer(avctx, p)) {
-        av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
-        return -1;
-    }
-
-    s->decode_delta = buf[18];
-
-    /* decide whether frame uses deltas or not */
-#ifndef ALT_BITSTREAM_READER_LE
-    for (i = 0; i < buf_size; i++)
-        buf[i] = ff_reverse[buf[i]];
-#endif
-    start = 48; /* hardcoded for now */
-
-    init_get_bits(&s->gb, buf + start, buf_size - start);
-
-    if (s->decode_delta) { /* intraframe */
-        ir2_decode_plane(s, avctx->width, avctx->height,
-                         s->picture.data[0], s->picture.linesize[0], ir2_luma_table);
-        /* swapped U and V */
-        ir2_decode_plane(s, avctx->width >> 2, avctx->height >> 2,
-                         s->picture.data[2], s->picture.linesize[2], ir2_luma_table);
-        ir2_decode_plane(s, avctx->width >> 2, avctx->height >> 2,
-                         s->picture.data[1], s->picture.linesize[1], ir2_luma_table);
-    } else { /* interframe */
-        ir2_decode_plane_inter(s, avctx->width, avctx->height,
-                         s->picture.data[0], s->picture.linesize[0], ir2_luma_table);
-        /* swapped U and V */
-        ir2_decode_plane_inter(s, avctx->width >> 2, avctx->height >> 2,
-                         s->picture.data[2], s->picture.linesize[2], ir2_luma_table);
-        ir2_decode_plane_inter(s, avctx->width >> 2, avctx->height >> 2,
-                         s->picture.data[1], s->picture.linesize[1], ir2_luma_table);
-    }
-
-    *picture= *(AVFrame*)&s->picture;
-    *data_size = sizeof(AVPicture);
-
-    return buf_size;
-}
-
-static int ir2_decode_init(AVCodecContext *avctx){
-    Ir2Context * const ic = avctx->priv_data;
-
-    ic->avctx = avctx;
-
-    avctx->pix_fmt= PIX_FMT_YUV410P;
-
-    if (!ir2_vlc.table)
-        init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
-                 &ir2_codes[0][1], 4, 2,
-#ifdef ALT_BITSTREAM_READER_LE
-                 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC | INIT_VLC_LE);
-#else
-                 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC);
-#endif
-
-    return 0;
-}
-
-AVCodec indeo2_decoder = {
-    "indeo2",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_INDEO2,
-    sizeof(Ir2Context),
-    ir2_decode_init,
-    NULL,
-    NULL,
-    ir2_decode_frame,
-    CODEC_CAP_DR1,
-};
--- a/src/ffmpeg/libavcodec/indeo2data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
- * Intel Indeo 2 codec
- * copyright (c) 2005 Konstantin Shishkov
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#define IR2_CODES 143
-static const uint16_t ir2_codes[IR2_CODES][2] = {
-#ifdef ALT_BITSTREAM_READER_LE
-{0x0000,  3}, {0x0004,  3}, {0x0006,  3}, {0x0001,  5},
-{0x0009,  5}, {0x0019,  5}, {0x000D,  5}, {0x001D,  5},
-{0x0023,  6}, {0x0013,  6}, {0x0033,  6}, {0x000B,  6},
-{0x002B,  6}, {0x001B,  6}, {0x0007,  8}, {0x0087,  8},
-{0x0027,  8}, {0x00A7,  8}, {0x0067,  8}, {0x00E7,  8},
-{0x0097,  8}, {0x0057,  8}, {0x0037,  8}, {0x00B7,  8},
-{0x00F7,  8}, {0x000F,  9}, {0x008F,  9}, {0x018F,  9},
-{0x014F,  9}, {0x00CF,  9}, {0x002F,  9}, {0x012F,  9},
-{0x01AF,  9}, {0x006F,  9}, {0x00EF,  9}, {0x01EF,  9},
-{0x001F, 10}, {0x021F, 10}, {0x011F, 10}, {0x031F, 10},
-{0x009F, 10}, {0x029F, 10}, {0x019F, 10}, {0x039F, 10},
-{0x005F, 10}, {0x025F, 10}, {0x015F, 10}, {0x035F, 10},
-{0x00DF, 10}, {0x02DF, 10}, {0x01DF, 10}, {0x03DF, 10},
-{0x003F, 13}, {0x103F, 13}, {0x083F, 13}, {0x183F, 13},
-{0x043F, 13}, {0x143F, 13}, {0x0C3F, 13}, {0x1C3F, 13},
-{0x023F, 13}, {0x123F, 13}, {0x0A3F, 13}, {0x1A3F, 13},
-{0x063F, 13}, {0x163F, 13}, {0x0E3F, 13}, {0x1E3F, 13},
-{0x013F, 13}, {0x113F, 13}, {0x093F, 13}, {0x193F, 13},
-{0x053F, 13}, {0x153F, 13}, {0x0D3F, 13}, {0x1D3F, 13},
-{0x033F, 13}, {0x133F, 13}, {0x0B3F, 13}, {0x1B3F, 13},
-{0x073F, 13}, {0x173F, 13}, {0x0F3F, 13}, {0x1F3F, 13},
-{0x00BF, 13}, {0x10BF, 13}, {0x08BF, 13}, {0x18BF, 13},
-{0x04BF, 13}, {0x14BF, 13}, {0x0CBF, 13}, {0x1CBF, 13},
-{0x02BF, 13}, {0x12BF, 13}, {0x0ABF, 13}, {0x1ABF, 13},
-{0x06BF, 13}, {0x16BF, 13}, {0x0EBF, 13}, {0x1EBF, 13},
-{0x01BF, 13}, {0x11BF, 13}, {0x09BF, 13}, {0x19BF, 13},
-{0x05BF, 13}, {0x15BF, 13}, {0x0DBF, 13}, {0x1DBF, 13},
-{0x03BF, 13}, {0x13BF, 13}, {0x0BBF, 13}, {0x1BBF, 13},
-{0x07BF, 13}, {0x17BF, 13}, {0x0FBF, 13}, {0x1FBF, 13},
-{0x007F, 14}, {0x207F, 14}, {0x107F, 14}, {0x307F, 14},
-{0x087F, 14}, {0x287F, 14}, {0x187F, 14}, {0x387F, 14},
-{0x047F, 14}, {0x247F, 14}, {0x147F, 14}, {0x0002,  3},
-{0x0011,  5}, {0x0005,  5}, {0x0015,  5}, {0x0003,  6},
-{0x003B,  6}, {0x0047,  8}, {0x00C7,  8}, {0x0017,  8},
-{0x00D7,  8}, {0x0077,  8}, {0x010F,  9}, {0x004F,  9},
-{0x01CF,  9}, {0x00AF,  9}, {0x016F,  9},
-#else
-    {0x0000,  3}, {0x0001,  3}, {0x0003,  3}, {0x0010,  5},
-    {0x0012,  5}, {0x0013,  5}, {0x0016,  5}, {0x0017,  5},
-    {0x0031,  6}, {0x0032,  6}, {0x0033,  6}, {0x0034,  6},
-    {0x0035,  6}, {0x0036,  6}, {0x00E0,  8}, {0x00E1,  8},
-    {0x00E4,  8}, {0x00E5,  8}, {0x00E6,  8}, {0x00E7,  8},
-    {0x00E9,  8}, {0x00EA,  8}, {0x00EC,  8}, {0x00ED,  8},
-    {0x00EF,  8}, {0x01E0,  9}, {0x01E2,  9}, {0x01E3,  9},
-    {0x01E5,  9}, {0x01E6,  9}, {0x01E8,  9}, {0x01E9,  9},
-    {0x01EB,  9}, {0x01EC,  9}, {0x01EE,  9}, {0x01EF,  9},
-    {0x03E0, 10}, {0x03E1, 10}, {0x03E2, 10}, {0x03E3, 10},
-    {0x03E4, 10}, {0x03E5, 10}, {0x03E6, 10}, {0x03E7, 10},
-    {0x03E8, 10}, {0x03E9, 10}, {0x03EA, 10}, {0x03EB, 10},
-    {0x03EC, 10}, {0x03ED, 10}, {0x03EE, 10}, {0x03EF, 10},
-    {0x1F80, 13}, {0x1F81, 13}, {0x1F82, 13}, {0x1F83, 13},
-    {0x1F84, 13}, {0x1F85, 13}, {0x1F86, 13}, {0x1F87, 13},
-    {0x1F88, 13}, {0x1F89, 13}, {0x1F8A, 13}, {0x1F8B, 13},
-    {0x1F8C, 13}, {0x1F8D, 13}, {0x1F8E, 13}, {0x1F8F, 13},
-    {0x1F90, 13}, {0x1F91, 13}, {0x1F92, 13}, {0x1F93, 13},
-    {0x1F94, 13}, {0x1F95, 13}, {0x1F96, 13}, {0x1F97, 13},
-    {0x1F98, 13}, {0x1F99, 13}, {0x1F9A, 13}, {0x1F9B, 13},
-    {0x1F9C, 13}, {0x1F9D, 13}, {0x1F9E, 13}, {0x1F9F, 13},
-    {0x1FA0, 13}, {0x1FA1, 13}, {0x1FA2, 13}, {0x1FA3, 13},
-    {0x1FA4, 13}, {0x1FA5, 13}, {0x1FA6, 13}, {0x1FA7, 13},
-    {0x1FA8, 13}, {0x1FA9, 13}, {0x1FAA, 13}, {0x1FAB, 13},
-    {0x1FAC, 13}, {0x1FAD, 13}, {0x1FAE, 13}, {0x1FAF, 13},
-    {0x1FB0, 13}, {0x1FB1, 13}, {0x1FB2, 13}, {0x1FB3, 13},
-    {0x1FB4, 13}, {0x1FB5, 13}, {0x1FB6, 13}, {0x1FB7, 13},
-    {0x1FB8, 13}, {0x1FB9, 13}, {0x1FBA, 13}, {0x1FBB, 13},
-    {0x1FBC, 13}, {0x1FBD, 13}, {0x1FBE, 13}, {0x1FBF, 13},
-    {0x3F80, 14}, {0x3F81, 14}, {0x3F82, 14}, {0x3F83, 14},
-    {0x3F84, 14}, {0x3F85, 14}, {0x3F86, 14}, {0x3F87, 14},
-    {0x3F88, 14}, {0x3F89, 14}, {0x3F8A, 14}, {0x0002,  3},
-    {0x0011,  5}, {0x0014,  5}, {0x0015,  5}, {0x0030,  6},
-    {0x0037,  6}, {0x00E2,  8}, {0x00E3,  8}, {0x00E8,  8},
-    {0x00EB,  8}, {0x00EE,  8}, {0x01E1,  9}, {0x01E4,  9},
-    {0x01E7,  9}, {0x01EA,  9}, {0x01ED,  9}
-#endif
-};
-
-static const uint8_t ir2_luma_table[256] = {
- 0x80, 0x80, 0x84, 0x84, 0x7C, 0x7C, 0x7F, 0x85,
- 0x81, 0x7B, 0x85, 0x7F, 0x7B, 0x81, 0x8C, 0x8C,
- 0x74, 0x74, 0x83, 0x8D, 0x7D, 0x73, 0x8D, 0x83,
- 0x73, 0x7D, 0x77, 0x89, 0x89, 0x77, 0x89, 0x77,
- 0x77, 0x89, 0x8C, 0x95, 0x74, 0x6B, 0x95, 0x8C,
- 0x6B, 0x74, 0x7C, 0x90, 0x84, 0x70, 0x90, 0x7C,
- 0x70, 0x84, 0x96, 0x96, 0x6A, 0x6A, 0x82, 0x98,
- 0x7E, 0x68, 0x98, 0x82, 0x68, 0x7E, 0x97, 0xA2,
- 0x69, 0x5E, 0xA2, 0x97, 0x5E, 0x69, 0xA2, 0xA2,
- 0x5E, 0x5E, 0x8B, 0xA3, 0x75, 0x5D, 0xA3, 0x8B,
- 0x5D, 0x75, 0x71, 0x95, 0x8F, 0x6B, 0x95, 0x71,
- 0x6B, 0x8F, 0x78, 0x9D, 0x88, 0x63, 0x9D, 0x78,
- 0x63, 0x88, 0x7F, 0xA7, 0x81, 0x59, 0xA7, 0x7F,
- 0x59, 0x81, 0xA4, 0xB1, 0x5C, 0x4F, 0xB1, 0xA4,
- 0x4F, 0x5C, 0x96, 0xB1, 0x6A, 0x4F, 0xB1, 0x96,
- 0x4F, 0x6A, 0xB2, 0xB2, 0x4E, 0x4E, 0x65, 0x9B,
- 0x9B, 0x65, 0x9B, 0x65, 0x65, 0x9B, 0x89, 0xB4,
- 0x77, 0x4C, 0xB4, 0x89, 0x4C, 0x77, 0x6A, 0xA3,
- 0x96, 0x5D, 0xA3, 0x6A, 0x5D, 0x96, 0x73, 0xAC,
- 0x8D, 0x54, 0xAC, 0x73, 0x54, 0x8D, 0xB4, 0xC3,
- 0x4C, 0x3D, 0xC3, 0xB4, 0x3D, 0x4C, 0xA4, 0xC3,
- 0x5C, 0x3D, 0xC3, 0xA4, 0x3D, 0x5C, 0xC4, 0xC4,
- 0x3C, 0x3C, 0x96, 0xC6, 0x6A, 0x3A, 0xC6, 0x96,
- 0x3A, 0x6A, 0x7C, 0xBA, 0x84, 0x46, 0xBA, 0x7C,
- 0x46, 0x84, 0x5B, 0xAB, 0xA5, 0x55, 0xAB, 0x5B,
- 0x55, 0xA5, 0x63, 0xB4, 0x9D, 0x4C, 0xB4, 0x63,
- 0x4C, 0x9D, 0x86, 0xCA, 0x7A, 0x36, 0xCA, 0x86,
- 0x36, 0x7A, 0xB6, 0xD7, 0x4A, 0x29, 0xD7, 0xB6,
- 0x29, 0x4A, 0xC8, 0xD7, 0x38, 0x29, 0xD7, 0xC8,
- 0x29, 0x38, 0xA4, 0xD8, 0x5C, 0x28, 0xD8, 0xA4,
- 0x28, 0x5C, 0x6C, 0xC1, 0x94, 0x3F, 0xC1, 0x6C,
- 0x3F, 0x94, 0xD9, 0xD9, 0x27, 0x27, 0x80, 0x80
-};
--- a/src/ffmpeg/libavcodec/indeo3.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1153 +0,0 @@
-/*
- * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg
- * written, produced, and directed by Alan Smithee
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-#include "mpegvideo.h"
-
-#include "indeo3data.h"
-
-typedef struct
-{
-  unsigned char *Ybuf;
-  unsigned char *Ubuf;
-  unsigned char *Vbuf;
-  unsigned char *the_buf;
-  unsigned int the_buf_size;
-  unsigned short y_w, y_h;
-  unsigned short uv_w, uv_h;
-} YUVBufs;
-
-typedef struct Indeo3DecodeContext {
-    AVCodecContext *avctx;
-    int width, height;
-    AVFrame frame;
-
-    YUVBufs iv_frame[2];
-    YUVBufs *cur_frame;
-    YUVBufs *ref_frame;
-
-    unsigned char *ModPred;
-    unsigned short *corrector_type;
-} Indeo3DecodeContext;
-
-static int corrector_type_0[24] = {
-  195, 159, 133, 115, 101,  93,  87,  77,
-  195, 159, 133, 115, 101,  93,  87,  77,
-  128,  79,  79,  79,  79,  79,  79,  79
-};
-
-static int corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 };
-
-static void build_modpred(Indeo3DecodeContext *s)
-{
-  int i, j;
-
-  s->ModPred = (unsigned char *) av_malloc (8 * 128);
-
-  for (i=0; i < 128; ++i) {
-    s->ModPred[i+0*128] = (i > 126) ? 254 : 2*((i + 1) - ((i + 1) % 2));
-    s->ModPred[i+1*128] = (i == 7)  ?  20 : ((i == 119 || i == 120)
-                                 ? 236 : 2*((i + 2) - ((i + 1) % 3)));
-    s->ModPred[i+2*128] = (i > 125) ? 248 : 2*((i + 2) - ((i + 2) % 4));
-    s->ModPred[i+3*128] =                        2*((i + 1) - ((i - 3) % 5));
-    s->ModPred[i+4*128] = (i == 8)  ?  20 : 2*((i + 1) - ((i - 3) % 6));
-    s->ModPred[i+5*128] =                        2*((i + 4) - ((i + 3) % 7));
-    s->ModPred[i+6*128] = (i > 123) ? 240 : 2*((i + 4) - ((i + 4) % 8));
-    s->ModPred[i+7*128] =                        2*((i + 5) - ((i + 4) % 9));
-  }
-
-  s->corrector_type = (unsigned short *) av_malloc (24 * 256 * sizeof(unsigned short));
-
-  for (i=0; i < 24; ++i) {
-    for (j=0; j < 256; ++j) {
-      s->corrector_type[i*256+j] = (j < corrector_type_0[i])
-                                ? 1 : ((j < 248 || (i == 16 && j == 248))
-                                       ? 0 : corrector_type_2[j - 248]);
-    }
-  }
-}
-
-static void iv_Decode_Chunk(Indeo3DecodeContext *s, unsigned char *cur,
-  unsigned char *ref, int width, int height, unsigned char *buf1,
-  long fflags2, unsigned char *hdr,
-  unsigned char *buf2, int min_width_160);
-
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
-/* ---------------------------------------------------------------------- */
-static void iv_alloc_frames(Indeo3DecodeContext *s)
-{
-  int luma_width, luma_height, luma_pixels, chroma_width, chroma_height,
-      chroma_pixels, i;
-  unsigned int bufsize;
-
-  luma_width   = (s->width  + 3) & (~3);
-  luma_height  = (s->height + 3) & (~3);
-
-  s->iv_frame[0].y_w = s->iv_frame[0].y_h =
-    s->iv_frame[0].the_buf_size = 0;
-  s->iv_frame[1].y_w = s->iv_frame[1].y_h =
-    s->iv_frame[1].the_buf_size = 0;
-  s->iv_frame[1].the_buf = NULL;
-
-  chroma_width  = ((luma_width >> 2) + 3) & (~3);
-  chroma_height = ((luma_height>> 2) + 3) & (~3);
-  luma_pixels = luma_width * luma_height;
-  chroma_pixels = chroma_width * chroma_height;
-
-  bufsize = luma_pixels * 2 + luma_width * 3 +
-    (chroma_pixels + chroma_width) * 4;
-
-  if((s->iv_frame[0].the_buf =
-    (s->iv_frame[0].the_buf_size == 0 ? av_malloc(bufsize) :
-      av_realloc(s->iv_frame[0].the_buf, bufsize))) == NULL)
-    return;
-  s->iv_frame[0].y_w = s->iv_frame[1].y_w = luma_width;
-  s->iv_frame[0].y_h = s->iv_frame[1].y_h = luma_height;
-  s->iv_frame[0].uv_w = s->iv_frame[1].uv_w = chroma_width;
-  s->iv_frame[0].uv_h = s->iv_frame[1].uv_h = chroma_height;
-  s->iv_frame[0].the_buf_size = bufsize;
-
-  s->iv_frame[0].Ybuf = s->iv_frame[0].the_buf + luma_width;
-  i = luma_pixels + luma_width * 2;
-  s->iv_frame[1].Ybuf = s->iv_frame[0].the_buf + i;
-  i += (luma_pixels + luma_width);
-  s->iv_frame[0].Ubuf = s->iv_frame[0].the_buf + i;
-  i += (chroma_pixels + chroma_width);
-  s->iv_frame[1].Ubuf = s->iv_frame[0].the_buf + i;
-  i += (chroma_pixels + chroma_width);
-  s->iv_frame[0].Vbuf = s->iv_frame[0].the_buf + i;
-  i += (chroma_pixels + chroma_width);
-  s->iv_frame[1].Vbuf = s->iv_frame[0].the_buf + i;
-
-  for(i = 1; i <= luma_width; i++)
-    s->iv_frame[0].Ybuf[-i] = s->iv_frame[1].Ybuf[-i] =
-      s->iv_frame[0].Ubuf[-i] = 0x80;
-
-  for(i = 1; i <= chroma_width; i++) {
-    s->iv_frame[1].Ubuf[-i] = 0x80;
-    s->iv_frame[0].Vbuf[-i] = 0x80;
-    s->iv_frame[1].Vbuf[-i] = 0x80;
-    s->iv_frame[1].Vbuf[chroma_pixels+i-1] = 0x80;
-  }
-}
-
-/* ---------------------------------------------------------------------- */
-static void iv_free_func(Indeo3DecodeContext *s)
-{
-  int i;
-
-  for(i = 0 ; i < 2 ; i++) {
-    if(s->iv_frame[i].the_buf != NULL)
-      av_free(s->iv_frame[i].the_buf);
-    s->iv_frame[i].Ybuf = s->iv_frame[i].Ubuf =
-      s->iv_frame[i].Vbuf = NULL;
-    s->iv_frame[i].the_buf = NULL;
-    s->iv_frame[i].the_buf_size = 0;
-    s->iv_frame[i].y_w = s->iv_frame[i].y_h = 0;
-    s->iv_frame[i].uv_w = s->iv_frame[i].uv_h = 0;
-  }
-
-  av_free(s->ModPred);
-  av_free(s->corrector_type);
-}
-
-/* ---------------------------------------------------------------------- */
-static unsigned long iv_decode_frame(Indeo3DecodeContext *s,
-                                     unsigned char *buf, int buf_size)
-{
-  unsigned int hdr_width, hdr_height,
-    chroma_width, chroma_height;
-  unsigned long fflags1, fflags2, fflags3, offs1, offs2, offs3, offs;
-  unsigned char *hdr_pos, *buf_pos;
-
-  buf_pos = buf;
-  buf_pos += 18;
-
-  fflags1 = le2me_16(*(uint16_t *)buf_pos);
-  buf_pos += 2;
-  fflags3 = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-  fflags2 = *buf_pos++;
-  buf_pos += 3;
-  hdr_height = le2me_16(*(uint16_t *)buf_pos);
-  buf_pos += 2;
-  hdr_width = le2me_16(*(uint16_t *)buf_pos);
-
-  if(avcodec_check_dimensions(NULL, hdr_width, hdr_height))
-      return -1;
-
-  buf_pos += 2;
-  chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc;
-  chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc;
-  offs1 = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-  offs2 = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-  offs3 = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 8;
-  hdr_pos = buf_pos;
-  if(fflags3 == 0x80) return 4;
-
-  if(fflags1 & 0x200) {
-    s->cur_frame = s->iv_frame + 1;
-    s->ref_frame = s->iv_frame;
-  } else {
-    s->cur_frame = s->iv_frame;
-    s->ref_frame = s->iv_frame + 1;
-  }
-
-  buf_pos = buf + 16 + offs1;
-  offs = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-
-  iv_Decode_Chunk(s, s->cur_frame->Ybuf, s->ref_frame->Ybuf, hdr_width,
-    hdr_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos,
-    min(hdr_width, 160));
-
-  if (!(s->avctx->flags & CODEC_FLAG_GRAY))
-  {
-
-  buf_pos = buf + 16 + offs2;
-  offs = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-
-  iv_Decode_Chunk(s, s->cur_frame->Vbuf, s->ref_frame->Vbuf, chroma_width,
-    chroma_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos,
-    min(chroma_width, 40));
-
-  buf_pos = buf + 16 + offs3;
-  offs = le2me_32(*(uint32_t *)buf_pos);
-  buf_pos += 4;
-
-  iv_Decode_Chunk(s, s->cur_frame->Ubuf, s->ref_frame->Ubuf, chroma_width,
-    chroma_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos,
-    min(chroma_width, 40));
-
-  }
-
-  return 8;
-}
-
-typedef struct {
-  long xpos;
-  long ypos;
-  long width;
-  long height;
-  long split_flag;
-  long split_direction;
-  long usl7;
-} ustr_t;
-
-/* ---------------------------------------------------------------------- */
-
-#define LV1_CHECK(buf1,rle_v3,lv1,lp2)  \
-  if((lv1 & 0x80) != 0) {   \
-    if(rle_v3 != 0)         \
-      rle_v3 = 0;           \
-    else {                  \
-      rle_v3 = 1;           \
-      buf1 -= 2;            \
-    }                       \
-  }                         \
-  lp2 = 4;
-
-
-#define RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)  \
-  if(rle_v3 == 0) {         \
-    rle_v2 = *buf1;         \
-    rle_v1 = 1;             \
-    if(rle_v2 > 32) {       \
-      rle_v2 -= 32;         \
-      rle_v1 = 0;           \
-    }                       \
-    rle_v3 = 1;             \
-  }                         \
-  buf1--;
-
-
-#define LP2_CHECK(buf1,rle_v3,lp2)  \
-  if(lp2 == 0 && rle_v3 != 0)     \
-    rle_v3 = 0;           \
-  else {                  \
-    buf1--;               \
-    rle_v3 = 1;           \
-  }
-
-
-#define RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) \
-  rle_v2--;             \
-  if(rle_v2 == 0) {     \
-    rle_v3 = 0;         \
-    buf1 += 2;          \
-  }                     \
-  lp2 = 4;
-
-static void iv_Decode_Chunk(Indeo3DecodeContext *s,
-  unsigned char *cur, unsigned char *ref, int width, int height,
-  unsigned char *buf1, long fflags2, unsigned char *hdr,
-  unsigned char *buf2, int min_width_160)
-{
-  unsigned char bit_buf;
-  unsigned long bit_pos, lv, lv1, lv2;
-  long *width_tbl, width_tbl_arr[10];
-  signed char *ref_vectors;
-  unsigned char *cur_frm_pos, *ref_frm_pos, *cp, *cp2;
-  uint32_t *cur_lp, *ref_lp;
-  const uint32_t *correction_lp[2], *correctionloworder_lp[2], *correctionhighorder_lp[2];
-  unsigned short *correction_type_sp[2];
-  ustr_t strip_tbl[20], *strip;
-  int i, j, k, lp1, lp2, flag1, cmd, blks_width, blks_height, region_160_width,
-    rle_v1, rle_v2, rle_v3;
-  unsigned short res;
-
-  bit_buf = 0;
-  ref_vectors = NULL;
-
-  width_tbl = width_tbl_arr + 1;
-  i = (width < 0 ? width + 3 : width)/4;
-  for(j = -1; j < 8; j++)
-    width_tbl[j] = i * j;
-
-  strip = strip_tbl;
-
-  for(region_160_width = 0; region_160_width < (width - min_width_160); region_160_width += min_width_160);
-
-  strip->ypos = strip->xpos = 0;
-  for(strip->width = min_width_160; width > strip->width; strip->width *= 2);
-  strip->height = height;
-  strip->split_direction = 0;
-  strip->split_flag = 0;
-  strip->usl7 = 0;
-
-  bit_pos = 0;
-
-  rle_v1 = rle_v2 = rle_v3 = 0;
-
-  while(strip >= strip_tbl) {
-    if(bit_pos <= 0) {
-      bit_pos = 8;
-      bit_buf = *buf1++;
-    }
-
-    bit_pos -= 2;
-    cmd = (bit_buf >> bit_pos) & 0x03;
-
-    if(cmd == 0) {
-      strip++;
-      memcpy(strip, strip-1, sizeof(ustr_t));
-      strip->split_flag = 1;
-      strip->split_direction = 0;
-      strip->height = (strip->height > 8 ? ((strip->height+8)>>4)<<3 : 4);
-      continue;
-    } else if(cmd == 1) {
-      strip++;
-      memcpy(strip, strip-1, sizeof(ustr_t));
-      strip->split_flag = 1;
-      strip->split_direction = 1;
-      strip->width = (strip->width > 8 ? ((strip->width+8)>>4)<<3 : 4);
-      continue;
-    } else if(cmd == 2) {
-      if(strip->usl7 == 0) {
-        strip->usl7 = 1;
-        ref_vectors = NULL;
-        continue;
-      }
-    } else if(cmd == 3) {
-      if(strip->usl7 == 0) {
-        strip->usl7 = 1;
-        ref_vectors = (signed char*)buf2 + (*buf1 * 2);
-        buf1++;
-        continue;
-      }
-    }
-
-    cur_frm_pos = cur + width * strip->ypos + strip->xpos;
-
-    if((blks_width = strip->width) < 0)
-      blks_width += 3;
-    blks_width >>= 2;
-    blks_height = strip->height;
-
-    if(ref_vectors != NULL) {
-      ref_frm_pos = ref + (ref_vectors[0] + strip->ypos) * width +
-        ref_vectors[1] + strip->xpos;
-    } else
-      ref_frm_pos = cur_frm_pos - width_tbl[4];
-
-    if(cmd == 2) {
-      if(bit_pos <= 0) {
-        bit_pos = 8;
-        bit_buf = *buf1++;
-      }
-
-      bit_pos -= 2;
-      cmd = (bit_buf >> bit_pos) & 0x03;
-
-      if(cmd == 0 || ref_vectors != NULL) {
-        for(lp1 = 0; lp1 < blks_width; lp1++) {
-          for(i = 0, j = 0; i < blks_height; i++, j += width_tbl[1])
-            ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j];
-          cur_frm_pos += 4;
-          ref_frm_pos += 4;
-        }
-      } else if(cmd != 1)
-        return;
-    } else {
-      k = *buf1 >> 4;
-      j = *buf1 & 0x0f;
-      buf1++;
-      lv = j + fflags2;
-
-      if((lv - 8) <= 7 && (k == 0 || k == 3 || k == 10)) {
-        cp2 = s->ModPred + ((lv - 8) << 7);
-        cp = ref_frm_pos;
-        for(i = 0; i < blks_width << 2; i++) {
-            int v = *cp >> 1;
-            *(cp++) = cp2[v];
-        }
-      }
-
-      if(k == 1 || k == 4) {
-        lv = (hdr[j] & 0xf) + fflags2;
-        correction_type_sp[0] = s->corrector_type + (lv << 8);
-        correction_lp[0] = correction + (lv << 8);
-        lv = (hdr[j] >> 4) + fflags2;
-        correction_lp[1] = correction + (lv << 8);
-        correction_type_sp[1] = s->corrector_type + (lv << 8);
-      } else {
-        correctionloworder_lp[0] = correctionloworder_lp[1] = correctionloworder + (lv << 8);
-        correctionhighorder_lp[0] = correctionhighorder_lp[1] = correctionhighorder + (lv << 8);
-        correction_type_sp[0] = correction_type_sp[1] = s->corrector_type + (lv << 8);
-        correction_lp[0] = correction_lp[1] = correction + (lv << 8);
-      }
-
-      switch(k) {
-        case 1:
-        case 0:                    /********** CASE 0 **********/
-          for( ; blks_height > 0; blks_height -= 4) {
-            for(lp1 = 0; lp1 < blks_width; lp1++) {
-              for(lp2 = 0; lp2 < 4; ) {
-                k = *buf1++;
-                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2];
-                ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2];
-
-                switch(correction_type_sp[0][k]) {
-                  case 0:
-                    *cur_lp = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
-                    lp2++;
-                    break;
-                  case 1:
-                    res = ((le2me_16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
-                    ((unsigned short *)cur_lp)[0] = le2me_16(res);
-                    res = ((le2me_16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
-                    ((unsigned short *)cur_lp)[1] = le2me_16(res);
-                    buf1++;
-                    lp2++;
-                    break;
-                  case 2:
-                    if(lp2 == 0) {
-                      for(i = 0, j = 0; i < 2; i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-                      lp2 += 2;
-                    }
-                    break;
-                  case 3:
-                    if(lp2 < 2) {
-                      for(i = 0, j = 0; i < (3 - lp2); i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-                      lp2 = 3;
-                    }
-                    break;
-                  case 8:
-                    if(lp2 == 0) {
-                      RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
-
-                      if(rle_v1 == 1 || ref_vectors != NULL) {
-                        for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                          cur_lp[j] = ref_lp[j];
-                      }
-
-                      RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
-                      break;
-                    } else {
-                      rle_v1 = 1;
-                      rle_v2 = *buf1 - 1;
-                    }
-                  case 5:
-                      LP2_CHECK(buf1,rle_v3,lp2)
-                  case 4:
-                    for(i = 0, j = 0; i < (4 - lp2); i++, j += width_tbl[1])
-                      cur_lp[j] = ref_lp[j];
-                    lp2 = 4;
-                    break;
-
-                  case 7:
-                    if(rle_v3 != 0)
-                      rle_v3 = 0;
-                    else {
-                      buf1--;
-                      rle_v3 = 1;
-                    }
-                  case 6:
-                    if(ref_vectors != NULL) {
-                      for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-                    }
-                    lp2 = 4;
-                    break;
-
-                  case 9:
-                    lv1 = *buf1++;
-                    lv = (lv1 & 0x7F) << 1;
-                    lv += (lv << 8);
-                    lv += (lv << 16);
-                    for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                      cur_lp[j] = lv;
-
-                    LV1_CHECK(buf1,rle_v3,lv1,lp2)
-                    break;
-                  default:
-                    return;
-                }
-              }
-
-              cur_frm_pos += 4;
-              ref_frm_pos += 4;
-            }
-
-            cur_frm_pos += ((width - blks_width) * 4);
-            ref_frm_pos += ((width - blks_width) * 4);
-          }
-          break;
-
-        case 4:
-        case 3:                    /********** CASE 3 **********/
-          if(ref_vectors != NULL)
-            return;
-          flag1 = 1;
-
-          for( ; blks_height > 0; blks_height -= 8) {
-            for(lp1 = 0; lp1 < blks_width; lp1++) {
-              for(lp2 = 0; lp2 < 4; ) {
-                k = *buf1++;
-
-                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
-                ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
-
-                switch(correction_type_sp[lp2 & 0x01][k]) {
-                  case 0:
-                    cur_lp[width_tbl[1]] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
-                    if(lp2 > 0 || flag1 == 0 || strip->ypos != 0)
-                      cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                    else
-                      cur_lp[0] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
-                    lp2++;
-                    break;
-
-                  case 1:
-                    res = ((le2me_16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
-                    ((unsigned short *)cur_lp)[width_tbl[2]] = le2me_16(res);
-                    res = ((le2me_16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
-                    ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2me_16(res);
-
-                    if(lp2 > 0 || flag1 == 0 || strip->ypos != 0)
-                      cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                    else
-                      cur_lp[0] = cur_lp[width_tbl[1]];
-                    buf1++;
-                    lp2++;
-                    break;
-
-                  case 2:
-                    if(lp2 == 0) {
-                      for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                        cur_lp[j] = *ref_lp;
-                      lp2 += 2;
-                    }
-                    break;
-
-                  case 3:
-                    if(lp2 < 2) {
-                      for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1])
-                        cur_lp[j] = *ref_lp;
-                      lp2 = 3;
-                    }
-                    break;
-
-                  case 6:
-                    lp2 = 4;
-                    break;
-
-                  case 7:
-                    if(rle_v3 != 0)
-                      rle_v3 = 0;
-                    else {
-                      buf1--;
-                      rle_v3 = 1;
-                    }
-                    lp2 = 4;
-                    break;
-
-                  case 8:
-                    if(lp2 == 0) {
-                      RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
-
-                      if(rle_v1 == 1) {
-                        for(i = 0, j = 0; i < 8; i++, j += width_tbl[1])
-                          cur_lp[j] = ref_lp[j];
-                      }
-
-                      RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
-                      break;
-                    } else {
-                      rle_v2 = (*buf1) - 1;
-                      rle_v1 = 1;
-                    }
-                  case 5:
-                      LP2_CHECK(buf1,rle_v3,lp2)
-                  case 4:
-                    for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1])
-                      cur_lp[j] = *ref_lp;
-                    lp2 = 4;
-                    break;
-
-                  case 9:
-                    av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n");
-                    lv1 = *buf1++;
-                    lv = (lv1 & 0x7F) << 1;
-                    lv += (lv << 8);
-                    lv += (lv << 16);
-
-                    for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                      cur_lp[j] = lv;
-
-                    LV1_CHECK(buf1,rle_v3,lv1,lp2)
-                    break;
-
-                  default:
-                    return;
-                }
-              }
-
-              cur_frm_pos += 4;
-            }
-
-            cur_frm_pos += (((width * 2) - blks_width) * 4);
-            flag1 = 0;
-          }
-          break;
-
-        case 10:                    /********** CASE 10 **********/
-          if(ref_vectors == NULL) {
-            flag1 = 1;
-
-            for( ; blks_height > 0; blks_height -= 8) {
-              for(lp1 = 0; lp1 < blks_width; lp1 += 2) {
-                for(lp2 = 0; lp2 < 4; ) {
-                  k = *buf1++;
-                  cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
-                  ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
-                  lv1 = ref_lp[0];
-                  lv2 = ref_lp[1];
-                  if(lp2 == 0 && flag1 != 0) {
-#ifdef WORDS_BIGENDIAN
-                    lv1 = lv1 & 0xFF00FF00;
-                    lv1 = (lv1 >> 8) | lv1;
-                    lv2 = lv2 & 0xFF00FF00;
-                    lv2 = (lv2 >> 8) | lv2;
-#else
-                    lv1 = lv1 & 0x00FF00FF;
-                    lv1 = (lv1 << 8) | lv1;
-                    lv2 = lv2 & 0x00FF00FF;
-                    lv2 = (lv2 << 8) | lv2;
-#endif
-                  }
-
-                  switch(correction_type_sp[lp2 & 0x01][k]) {
-                    case 0:
-                      cur_lp[width_tbl[1]] = le2me_32(((le2me_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
-                      cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1);
-                      if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) {
-                        cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                        cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                      } else {
-                        cur_lp[0] = cur_lp[width_tbl[1]];
-                        cur_lp[1] = cur_lp[width_tbl[1]+1];
-                      }
-                      lp2++;
-                      break;
-
-                    case 1:
-                      cur_lp[width_tbl[1]] = le2me_32(((le2me_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1);
-                      cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
-                      if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) {
-                        cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                        cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                      } else {
-                        cur_lp[0] = cur_lp[width_tbl[1]];
-                        cur_lp[1] = cur_lp[width_tbl[1]+1];
-                      }
-                      buf1++;
-                      lp2++;
-                      break;
-
-                    case 2:
-                      if(lp2 == 0) {
-                        if(flag1 != 0) {
-                          for(i = 0, j = width_tbl[1]; i < 3; i++, j += width_tbl[1]) {
-                            cur_lp[j] = lv1;
-                            cur_lp[j+1] = lv2;
-                          }
-                          cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                          cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                        } else {
-                          for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) {
-                            cur_lp[j] = lv1;
-                            cur_lp[j+1] = lv2;
-                          }
-                        }
-                        lp2 += 2;
-                      }
-                      break;
-
-                    case 3:
-                      if(lp2 < 2) {
-                        if(lp2 == 0 && flag1 != 0) {
-                          for(i = 0, j = width_tbl[1]; i < 5; i++, j += width_tbl[1]) {
-                            cur_lp[j] = lv1;
-                            cur_lp[j+1] = lv2;
-                          }
-                          cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                          cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                        } else {
-                          for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) {
-                            cur_lp[j] = lv1;
-                            cur_lp[j+1] = lv2;
-                          }
-                        }
-                        lp2 = 3;
-                      }
-                      break;
-
-                    case 8:
-                      if(lp2 == 0) {
-                        RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
-                        if(rle_v1 == 1) {
-                          if(flag1 != 0) {
-                            for(i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) {
-                              cur_lp[j] = lv1;
-                              cur_lp[j+1] = lv2;
-                            }
-                            cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                            cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                          } else {
-                            for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) {
-                              cur_lp[j] = lv1;
-                              cur_lp[j+1] = lv2;
-                            }
-                          }
-                        }
-                        RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
-                        break;
-                      } else {
-                        rle_v1 = 1;
-                        rle_v2 = (*buf1) - 1;
-                      }
-                    case 5:
-                        LP2_CHECK(buf1,rle_v3,lp2)
-                    case 4:
-                      if(lp2 == 0 && flag1 != 0) {
-                        for(i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) {
-                          cur_lp[j] = lv1;
-                          cur_lp[j+1] = lv2;
-                        }
-                        cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
-                        cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
-                      } else {
-                        for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) {
-                          cur_lp[j] = lv1;
-                          cur_lp[j+1] = lv2;
-                        }
-                      }
-                      lp2 = 4;
-                      break;
-
-                    case 6:
-                      lp2 = 4;
-                      break;
-
-                    case 7:
-                      if(lp2 == 0) {
-                        if(rle_v3 != 0)
-                          rle_v3 = 0;
-                        else {
-                          buf1--;
-                          rle_v3 = 1;
-                        }
-                        lp2 = 4;
-                      }
-                      break;
-
-                    case 9:
-                      av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n");
-                      lv1 = *buf1;
-                      lv = (lv1 & 0x7F) << 1;
-                      lv += (lv << 8);
-                      lv += (lv << 16);
-                      for(i = 0, j = 0; i < 8; i++, j += width_tbl[1])
-                        cur_lp[j] = lv;
-                      LV1_CHECK(buf1,rle_v3,lv1,lp2)
-                      break;
-
-                    default:
-                      return;
-                  }
-                }
-
-                cur_frm_pos += 8;
-              }
-
-              cur_frm_pos += (((width * 2) - blks_width) * 4);
-              flag1 = 0;
-            }
-          } else {
-            for( ; blks_height > 0; blks_height -= 8) {
-              for(lp1 = 0; lp1 < blks_width; lp1 += 2) {
-                for(lp2 = 0; lp2 < 4; ) {
-                  k = *buf1++;
-                  cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
-                  ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2];
-
-                  switch(correction_type_sp[lp2 & 0x01][k]) {
-                    case 0:
-                      lv1 = correctionloworder_lp[lp2 & 0x01][k];
-                      lv2 = correctionhighorder_lp[lp2 & 0x01][k];
-                      cur_lp[0] = le2me_32(((le2me_32(ref_lp[0]) >> 1) + lv1) << 1);
-                      cur_lp[1] = le2me_32(((le2me_32(ref_lp[1]) >> 1) + lv2) << 1);
-                      cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
-                      cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
-                      lp2++;
-                      break;
-
-                    case 1:
-                      lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++];
-                      lv2 = correctionloworder_lp[lp2 & 0x01][k];
-                      cur_lp[0] = le2me_32(((le2me_32(ref_lp[0]) >> 1) + lv1) << 1);
-                      cur_lp[1] = le2me_32(((le2me_32(ref_lp[1]) >> 1) + lv2) << 1);
-                      cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
-                      cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
-                      lp2++;
-                      break;
-
-                    case 2:
-                      if(lp2 == 0) {
-                        for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) {
-                          cur_lp[j] = ref_lp[j];
-                          cur_lp[j+1] = ref_lp[j+1];
-                        }
-                        lp2 += 2;
-                      }
-                      break;
-
-                    case 3:
-                      if(lp2 < 2) {
-                        for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) {
-                          cur_lp[j] = ref_lp[j];
-                          cur_lp[j+1] = ref_lp[j+1];
-                        }
-                        lp2 = 3;
-                      }
-                      break;
-
-                    case 8:
-                      if(lp2 == 0) {
-                        RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
-                        for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) {
-                          ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j];
-                          ((uint32_t *)cur_frm_pos)[j+1] = ((uint32_t *)ref_frm_pos)[j+1];
-                        }
-                        RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
-                        break;
-                      } else {
-                        rle_v1 = 1;
-                        rle_v2 = (*buf1) - 1;
-                      }
-                    case 5:
-                    case 7:
-                        LP2_CHECK(buf1,rle_v3,lp2)
-                    case 6:
-                    case 4:
-                      for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) {
-                        cur_lp[j] = ref_lp[j];
-                        cur_lp[j+1] = ref_lp[j+1];
-                      }
-                      lp2 = 4;
-                      break;
-
-                    case 9:
-                      av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n");
-                      lv1 = *buf1;
-                      lv = (lv1 & 0x7F) << 1;
-                      lv += (lv << 8);
-                      lv += (lv << 16);
-                      for(i = 0, j = 0; i < 8; i++, j += width_tbl[1])
-                        ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)cur_frm_pos)[j+1] = lv;
-                      LV1_CHECK(buf1,rle_v3,lv1,lp2)
-                      break;
-
-                    default:
-                      return;
-                  }
-                }
-
-                cur_frm_pos += 8;
-                ref_frm_pos += 8;
-              }
-
-              cur_frm_pos += (((width * 2) - blks_width) * 4);
-              ref_frm_pos += (((width * 2) - blks_width) * 4);
-            }
-          }
-          break;
-
-        case 11:                    /********** CASE 11 **********/
-          if(ref_vectors == NULL)
-            return;
-
-          for( ; blks_height > 0; blks_height -= 8) {
-            for(lp1 = 0; lp1 < blks_width; lp1++) {
-              for(lp2 = 0; lp2 < 4; ) {
-                k = *buf1++;
-                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
-                ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2];
-
-                switch(correction_type_sp[lp2 & 0x01][k]) {
-                  case 0:
-                    cur_lp[0] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
-                    cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
-                    lp2++;
-                    break;
-
-                  case 1:
-                    lv1 = (unsigned short)(correction_lp[lp2 & 0x01][*buf1++]);
-                    lv2 = (unsigned short)(correction_lp[lp2 & 0x01][k]);
-                    res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1);
-                    ((unsigned short *)cur_lp)[0] = le2me_16(res);
-                    res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1);
-                    ((unsigned short *)cur_lp)[1] = le2me_16(res);
-                    res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1);
-                    ((unsigned short *)cur_lp)[width_tbl[2]] = le2me_16(res);
-                    res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1);
-                    ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2me_16(res);
-                    lp2++;
-                    break;
-
-                  case 2:
-                    if(lp2 == 0) {
-                      for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-                      lp2 += 2;
-                    }
-                    break;
-
-                  case 3:
-                    if(lp2 < 2) {
-                      for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-                      lp2 = 3;
-                    }
-                    break;
-
-                  case 8:
-                    if(lp2 == 0) {
-                      RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
-
-                      for(i = 0, j = 0; i < 8; i++, j += width_tbl[1])
-                        cur_lp[j] = ref_lp[j];
-
-                      RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
-                      break;
-                    } else {
-                      rle_v1 = 1;
-                      rle_v2 = (*buf1) - 1;
-                    }
-                  case 5:
-                  case 7:
-                      LP2_CHECK(buf1,rle_v3,lp2)
-                  case 4:
-                  case 6:
-                    for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1])
-                      cur_lp[j] = ref_lp[j];
-                    lp2 = 4;
-                    break;
-
-                case 9:
-                  av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n");
-                  lv1 = *buf1++;
-                  lv = (lv1 & 0x7F) << 1;
-                  lv += (lv << 8);
-                  lv += (lv << 16);
-                  for(i = 0, j = 0; i < 4; i++, j += width_tbl[1])
-                    cur_lp[j] = lv;
-                  LV1_CHECK(buf1,rle_v3,lv1,lp2)
-                  break;
-
-                  default:
-                    return;
-                }
-              }
-
-              cur_frm_pos += 4;
-              ref_frm_pos += 4;
-            }
-
-            cur_frm_pos += (((width * 2) - blks_width) * 4);
-            ref_frm_pos += (((width * 2) - blks_width) * 4);
-          }
-          break;
-
-        default:
-          return;
-      }
-    }
-
-    if(strip < strip_tbl)
-      return;
-
-    for( ; strip >= strip_tbl; strip--) {
-      if(strip->split_flag != 0) {
-        strip->split_flag = 0;
-        strip->usl7 = (strip-1)->usl7;
-
-        if(strip->split_direction) {
-          strip->xpos += strip->width;
-          strip->width = (strip-1)->width - strip->width;
-          if(region_160_width <= strip->xpos && width < strip->width + strip->xpos)
-            strip->width = width - strip->xpos;
-        } else {
-          strip->ypos += strip->height;
-          strip->height = (strip-1)->height - strip->height;
-        }
-        break;
-      }
-    }
-  }
-}
-
-static int indeo3_decode_init(AVCodecContext *avctx)
-{
-    Indeo3DecodeContext *s = avctx->priv_data;
-
-    s->avctx = avctx;
-    s->width = avctx->width;
-    s->height = avctx->height;
-    avctx->pix_fmt = PIX_FMT_YUV410P;
-    avctx->has_b_frames = 0;
-
-    build_modpred(s);
-    iv_alloc_frames(s);
-
-    return 0;
-}
-
-static int indeo3_decode_frame(AVCodecContext *avctx,
-                               void *data, int *data_size,
-                               unsigned char *buf, int buf_size)
-{
-    Indeo3DecodeContext *s=avctx->priv_data;
-    unsigned char *src, *dest;
-    int y;
-
-    iv_decode_frame(s, buf, buf_size);
-
-    if(s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    s->frame.reference = 0;
-    if(avctx->get_buffer(avctx, &s->frame) < 0) {
-        av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-        return -1;
-    }
-
-    src = s->cur_frame->Ybuf;
-    dest = s->frame.data[0];
-    for (y = 0; y < s->height; y++) {
-      memcpy(dest, src, s->cur_frame->y_w);
-      src += s->cur_frame->y_w;
-      dest += s->frame.linesize[0];
-    }
-
-    if (!(s->avctx->flags & CODEC_FLAG_GRAY))
-    {
-    src = s->cur_frame->Ubuf;
-    dest = s->frame.data[1];
-    for (y = 0; y < s->height / 4; y++) {
-      memcpy(dest, src, s->cur_frame->uv_w);
-      src += s->cur_frame->uv_w;
-      dest += s->frame.linesize[1];
-    }
-
-    src = s->cur_frame->Vbuf;
-    dest = s->frame.data[2];
-    for (y = 0; y < s->height / 4; y++) {
-      memcpy(dest, src, s->cur_frame->uv_w);
-      src += s->cur_frame->uv_w;
-      dest += s->frame.linesize[2];
-    }
-    }
-
-    *data_size=sizeof(AVFrame);
-    *(AVFrame*)data= s->frame;
-
-    return buf_size;
-}
-
-static int indeo3_decode_end(AVCodecContext *avctx)
-{
-    Indeo3DecodeContext *s = avctx->priv_data;
-
-    iv_free_func(s);
-
-    return 0;
-}
-
-AVCodec indeo3_decoder = {
-    "indeo3",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_INDEO3,
-    sizeof(Indeo3DecodeContext),
-    indeo3_decode_init,
-    NULL,
-    indeo3_decode_end,
-    indeo3_decode_frame,
-    0,
-    NULL
-};
--- a/src/ffmpeg/libavcodec/indeo3data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2335 +0,0 @@
-/*
- * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg
- * written, produced, and directed by Alan Smithee
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-static const uint32_t correction[] = {
-        0x00000000, 0x00000202, 0xfffffdfe, 0x000002ff, 0xfffffd01, 0xffffff03, 0x000000fd, 0x00000404,
-        0xfffffbfc, 0x00000501, 0xfffffaff, 0x00000105, 0xfffffefb, 0x000003fc, 0xfffffc04, 0x000005fe,
-        0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000904, 0xfffff6fc, 0x00000409, 0xfffffbf7, 0x00000909,
-        0xfffff6f7, 0x00000a01, 0xfffff5ff, 0x0000010a, 0xfffffef6, 0x000007fb, 0xfffff805, 0xfffffb08,
-        0x000004f8, 0x00000f09, 0xfffff0f7, 0x0000090f, 0xfffff6f1, 0x00000bfd, 0xfffff403, 0xfffffd0c,
-        0x000002f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200,
-        0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff7, 0xfffff009, 0xfffff710,
-        0x000008f0, 0x00001b0b, 0xffffe4f5, 0x00000b1b, 0xfffff4e5, 0x00001c13, 0xffffe3ed, 0x0000131c,
-        0xffffece4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001d04, 0xffffe2fc, 0x0000041d,
-        0xfffffbe3, 0x00001e1e, 0xffffe1e2, 0x000020fe, 0xffffdf02, 0xfffffe21, 0x000001df, 0x000016ee,
-        0xffffe912, 0xffffee17, 0x000011e9, 0x00001df1, 0xffffe20f, 0xfffff11e, 0x00000ee2, 0x00002e16,
-        0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003123,
-        0xffffcedd, 0x00002331, 0xffffdccf, 0x000028f5, 0xffffd70b, 0xfffff529, 0x00000ad7, 0x00003304,
-        0xffffccfc, 0x00000433, 0xfffffbcd, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e3,
-        0xffffd61d, 0xffffe32a, 0x00001cd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1b,
-        0xffffb3e5, 0x00001b4c, 0xffffe4b4, 0x00004d2b, 0xffffb2d5, 0x00002b4d, 0xffffd4b3, 0x000036e8,
-        0xffffc918, 0xffffe837, 0x000017c9, 0x00004f0e, 0xffffb0f2, 0x00000e4f, 0xfffff1b1, 0x0000533f,
-        0xffffacc1, 0x00003f53, 0xffffc0ad, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802,
-        0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005d5d, 0xffffa2a3, 0x00003ccc, 0xffffc334, 0xffffcc3d,
-        0x000033c3, 0x00007834, 0xffff87cc, 0x00003478, 0xffffcb88, 0x00004ad3, 0xffffb52d, 0xffffd34b,
-        0x00002cb5, 0x00007d4b, 0xffff82b5, 0x00004b7d, 0xffffb483, 0x00007a21, 0xffff85df, 0x0000217a,
-        0xffffde86, 0x000066f3, 0xffff990d, 0xfffff367, 0x00000c99, 0x00005fd8, 0xffffa028, 0xffffd860,
-        0x000027a0, 0x00007ede, 0xffff8122, 0xffffde7f, 0x00002181, 0x000058a7, 0xffffa759, 0x000068b2,
-        0xffff974e, 0xffffb269, 0x00004d97, 0x00000c0c, 0xfffff3f4, 0x00001717, 0xffffe8e9, 0x00002a2a,
-        0xffffd5d6, 0x00004949, 0xffffb6b7, 0x00000000, 0x02020000, 0xfdfe0000, 0x02ff0000, 0xfd010000,
-        0xff030000, 0x00fd0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02ff0202, 0xfd010202, 0xff030202,
-        0x00fd0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x02fefdfe, 0xfd00fdfe, 0xff02fdfe, 0x00fcfdfe,
-        0x000002ff, 0x020202ff, 0xfdfe02ff, 0x02ff02ff, 0xfd0102ff, 0xff0302ff, 0x00fd02ff, 0xfffffd01,
-        0x0201fd01, 0xfdfdfd01, 0x02fefd01, 0xfd00fd01, 0xff02fd01, 0x00fcfd01, 0xffffff03, 0x0201ff03,
-        0xfdfdff03, 0x02feff03, 0xfd00ff03, 0xff02ff03, 0x00fcff03, 0x000000fd, 0x020200fd, 0xfdfe00fd,
-        0x02ff00fd, 0xfd0100fd, 0xff0300fd, 0x00fd00fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000303, 0xfffffcfd, 0x000003ff, 0xfffffc01, 0xffffff04, 0x000000fc, 0x00000707,
-        0xfffff8f9, 0x00000802, 0xfffff7fe, 0x00000208, 0xfffffdf8, 0x000008fe, 0xfffff702, 0xfffffe09,
-        0x000001f7, 0x000005fa, 0xfffffa06, 0x00000d06, 0xfffff2fa, 0x0000060d, 0xfffff9f3, 0x00000d0d,
-        0xfffff2f3, 0x00000e01, 0xfffff1ff, 0x0000010e, 0xfffffef2, 0x00000bf8, 0xfffff408, 0xfffff80c,
-        0x000007f4, 0x0000170e, 0xffffe8f2, 0x00000e17, 0xfffff1e9, 0x000011fb, 0xffffee05, 0xfffffb12,
-        0x000004ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001aff,
-        0xffffe501, 0xffffff1b, 0x000000e5, 0x000010ef, 0xffffef11, 0x000016f3, 0xffffe90d, 0xfffff317,
-        0x00000ce9, 0x00002810, 0xffffd7f0, 0x00001028, 0xffffefd8, 0x0000291c, 0xffffd6e4, 0x00001c29,
-        0xffffe3d7, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002b06, 0xffffd4fa, 0x0000062b,
-        0xfffff9d5, 0x00002e2e, 0xffffd1d2, 0x000031fc, 0xffffce04, 0xfffffc32, 0x000003ce, 0x000021e5,
-        0xffffde1b, 0xffffe522, 0x00001ade, 0x00002cea, 0xffffd316, 0xffffea2d, 0x000015d3, 0x00004522,
-        0xffffbade, 0x00002245, 0xffffddbb, 0x00004613, 0xffffb9ed, 0x00001346, 0xffffecba, 0x00004935,
-        0xffffb6cb, 0x00003549, 0xffffcab7, 0x00003def, 0xffffc211, 0xffffef3e, 0x000010c2, 0x00004d05,
-        0xffffb2fb, 0x0000054d, 0xfffffab3, 0x00005252, 0xffffadae, 0x000032cd, 0xffffcd33, 0x00003fd5,
-        0xffffc02b, 0xffffd540, 0x00002ac0, 0x000059f6, 0xffffa60a, 0xfffff65a, 0x000009a6, 0x00007229,
-        0xffff8dd7, 0x00002972, 0xffffd68e, 0x00007440, 0xffff8bc0, 0x00004074, 0xffffbf8c, 0x000051db,
-        0xffffae25, 0xffffdb52, 0x000024ae, 0x00007716, 0xffff88ea, 0x00001677, 0xffffe989, 0x00007c5f,
-        0xffff83a1, 0x00005f7c, 0xffffa084, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005bb2,
-        0xffffa44e, 0xffffb25c, 0x00004da4, 0x000070bc, 0xffff8f44, 0xffffbc71, 0x0000438f, 0x00001212,
-        0xffffedee, 0x00002222, 0xffffddde, 0x00003f3f, 0xffffc0c1, 0x00006d6d, 0xffff9293, 0x00000000,
-        0x03030000, 0xfcfd0000, 0x03ff0000, 0xfc010000, 0xff040000, 0x00fc0000, 0x07070000, 0xf8f90000,
-        0x00000303, 0x03030303, 0xfcfd0303, 0x03ff0303, 0xfc010303, 0xff040303, 0x00fc0303, 0x07070303,
-        0xf8f90303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x03fefcfd, 0xfc00fcfd, 0xff03fcfd, 0x00fbfcfd,
-        0x0706fcfd, 0xf8f8fcfd, 0x000003ff, 0x030303ff, 0xfcfd03ff, 0x03ff03ff, 0xfc0103ff, 0xff0403ff,
-        0x00fc03ff, 0x070703ff, 0xf8f903ff, 0xfffffc01, 0x0302fc01, 0xfcfcfc01, 0x03fefc01, 0xfc00fc01,
-        0xff03fc01, 0x00fbfc01, 0x0706fc01, 0xf8f8fc01, 0xffffff04, 0x0302ff04, 0xfcfcff04, 0x03feff04,
-        0xfc00ff04, 0xff03ff04, 0x00fbff04, 0x0706ff04, 0xf8f8ff04, 0x000000fc, 0x030300fc, 0xfcfd00fc,
-        0x03ff00fc, 0xfc0100fc, 0xff0400fc, 0x00fc00fc, 0x070700fc, 0xf8f900fc, 0x00000707, 0x03030707,
-        0xfcfd0707, 0x03ff0707, 0xfc010707, 0xff040707, 0x00fc0707, 0x07070707, 0xf8f90707, 0xfffff8f9,
-        0x0302f8f9, 0xfcfcf8f9, 0x03fef8f9, 0xfc00f8f9, 0xff03f8f9, 0x00fbf8f9, 0x0706f8f9, 0xf8f8f8f9,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000404, 0xfffffbfc, 0x000004ff, 0xfffffb01, 0xffffff05, 0x000000fb, 0x00000a03,
-        0xfffff5fd, 0x0000030a, 0xfffffcf6, 0x00000909, 0xfffff6f7, 0x000006f9, 0xfffff907, 0x00000bfd,
-        0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001108, 0xffffeef8, 0x00000811, 0xfffff7ef, 0x00001111,
-        0xffffeeef, 0x00001301, 0xffffecff, 0x00000113, 0xfffffeed, 0x00000ff5, 0xfffff00b, 0xfffff510,
-        0x00000af0, 0x000016fa, 0xffffe906, 0xfffffa17, 0x000005e9, 0x00001f12, 0xffffe0ee, 0x0000121f,
-        0xffffede1, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002121, 0xffffdedf, 0x000023ff,
-        0xffffdc01, 0xffffff24, 0x000000dc, 0x000016e9, 0xffffe917, 0x00001eef, 0xffffe111, 0xffffef1f,
-        0x000010e1, 0x00003615, 0xffffc9eb, 0x00001536, 0xffffeaca, 0x00003725, 0xffffc8db, 0x00002537,
-        0xffffdac9, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003908, 0xffffc6f8, 0x00000839,
-        0xfffff7c7, 0x00003d3d, 0xffffc2c3, 0x000041fb, 0xffffbe05, 0xfffffb42, 0x000004be, 0x00002cdc,
-        0xffffd324, 0xffffdc2d, 0x000023d3, 0x00003be3, 0xffffc41d, 0xffffe33c, 0x00001cc4, 0x00005c2d,
-        0xffffa3d3, 0x00002d5c, 0xffffd2a4, 0x00005d19, 0xffffa2e7, 0x0000195d, 0xffffe6a3, 0x00006147,
-        0xffff9eb9, 0x00004761, 0xffffb89f, 0x000052ea, 0xffffad16, 0xffffea53, 0x000015ad, 0x00006607,
-        0xffff99f9, 0x00000766, 0xfffff89a, 0x00006d6d, 0xffff9293, 0x000043bc, 0xffffbc44, 0x000054c7,
-        0xffffab39, 0xffffc755, 0x000038ab, 0x000077f3, 0xffff880d, 0xfffff378, 0x00000c88, 0x00006dcf,
-        0xffff9231, 0xffffcf6e, 0x00003092, 0x00007a98, 0xffff8568, 0xffff987b, 0x00006785, 0x00001818,
-        0xffffe7e8, 0x00002e2e, 0xffffd1d2, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000,
-        0x04ff0000, 0xfb010000, 0xff050000, 0x00fb0000, 0x0a030000, 0xf5fd0000, 0x030a0000, 0x00000404,
-        0x04040404, 0xfbfc0404, 0x04ff0404, 0xfb010404, 0xff050404, 0x00fb0404, 0x0a030404, 0xf5fd0404,
-        0x030a0404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x04fefbfc, 0xfb00fbfc, 0xff04fbfc, 0x00fafbfc,
-        0x0a02fbfc, 0xf5fcfbfc, 0x0309fbfc, 0x000004ff, 0x040404ff, 0xfbfc04ff, 0x04ff04ff, 0xfb0104ff,
-        0xff0504ff, 0x00fb04ff, 0x0a0304ff, 0xf5fd04ff, 0x030a04ff, 0xfffffb01, 0x0403fb01, 0xfbfbfb01,
-        0x04fefb01, 0xfb00fb01, 0xff04fb01, 0x00fafb01, 0x0a02fb01, 0xf5fcfb01, 0x0309fb01, 0xffffff05,
-        0x0403ff05, 0xfbfbff05, 0x04feff05, 0xfb00ff05, 0xff04ff05, 0x00faff05, 0x0a02ff05, 0xf5fcff05,
-        0x0309ff05, 0x000000fb, 0x040400fb, 0xfbfc00fb, 0x04ff00fb, 0xfb0100fb, 0xff0500fb, 0x00fb00fb,
-        0x0a0300fb, 0xf5fd00fb, 0x030a00fb, 0x00000a03, 0x04040a03, 0xfbfc0a03, 0x04ff0a03, 0xfb010a03,
-        0xff050a03, 0x00fb0a03, 0x0a030a03, 0xf5fd0a03, 0x030a0a03, 0xfffff5fd, 0x0403f5fd, 0xfbfbf5fd,
-        0x04fef5fd, 0xfb00f5fd, 0xff04f5fd, 0x00faf5fd, 0x0a02f5fd, 0xf5fcf5fd, 0x0309f5fd, 0x0000030a,
-        0x0404030a, 0xfbfc030a, 0x04ff030a, 0xfb01030a, 0xff05030a, 0x00fb030a, 0x0a03030a, 0xf5fd030a,
-        0x030a030a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000505, 0xfffffafb, 0x000006fe, 0xfffff902, 0xfffffe07, 0x000001f9, 0x00000b0b,
-        0xfffff4f5, 0x00000d03, 0xfffff2fd, 0x0000030d, 0xfffffcf3, 0x000008f7, 0xfffff709, 0x00000efc,
-        0xfffff104, 0xfffffc0f, 0x000003f1, 0x0000160b, 0xffffe9f5, 0x00000b16, 0xfffff4ea, 0x00001515,
-        0xffffeaeb, 0x00001802, 0xffffe7fe, 0x00000218, 0xfffffde8, 0x000013f2, 0xffffec0e, 0xfffff214,
-        0x00000dec, 0x00002617, 0xffffd9e9, 0x00001726, 0xffffe8da, 0x00001cf8, 0xffffe308, 0xfffff81d,
-        0x000007e3, 0x0000270b, 0xffffd8f5, 0x00000b27, 0xfffff4d9, 0x00002929, 0xffffd6d7, 0x00002cff,
-        0xffffd301, 0xffffff2d, 0x000000d3, 0x00001ce3, 0xffffe31d, 0x000026ea, 0xffffd916, 0xffffea27,
-        0x000015d9, 0x0000431b, 0xffffbce5, 0x00001b43, 0xffffe4bd, 0x0000452f, 0xffffbad1, 0x00002f45,
-        0xffffd0bb, 0x000037f1, 0xffffc80f, 0xfffff138, 0x00000ec8, 0x0000470b, 0xffffb8f5, 0x00000b47,
-        0xfffff4b9, 0x00004c4c, 0xffffb3b4, 0x000052fa, 0xffffad06, 0xfffffa53, 0x000005ad, 0x000038d3,
-        0xffffc72d, 0xffffd339, 0x00002cc7, 0x00004adc, 0xffffb524, 0xffffdc4b, 0x000023b5, 0x00007338,
-        0xffff8cc8, 0x00003873, 0xffffc78d, 0x0000751f, 0xffff8ae1, 0x00001f75, 0xffffe08b, 0x00007a58,
-        0xffff85a8, 0x0000587a, 0xffffa786, 0x000067e4, 0xffff981c, 0xffffe468, 0x00001b98, 0x000054ab,
-        0xffffab55, 0x000069b8, 0xffff9648, 0xffffb86a, 0x00004796, 0x00001e1e, 0xffffe1e2, 0x00003a3a,
-        0xffffc5c6, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x06fe0000, 0xf9020000,
-        0xfe070000, 0x01f90000, 0x0b0b0000, 0xf4f50000, 0x0d030000, 0xf2fd0000, 0x00000505, 0x05050505,
-        0xfafb0505, 0x06fe0505, 0xf9020505, 0xfe070505, 0x01f90505, 0x0b0b0505, 0xf4f50505, 0x0d030505,
-        0xf2fd0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x06fdfafb, 0xf901fafb, 0xfe06fafb, 0x01f8fafb,
-        0x0b0afafb, 0xf4f4fafb, 0x0d02fafb, 0xf2fcfafb, 0x000006fe, 0x050506fe, 0xfafb06fe, 0x06fe06fe,
-        0xf90206fe, 0xfe0706fe, 0x01f906fe, 0x0b0b06fe, 0xf4f506fe, 0x0d0306fe, 0xf2fd06fe, 0xfffff902,
-        0x0504f902, 0xfafaf902, 0x06fdf902, 0xf901f902, 0xfe06f902, 0x01f8f902, 0x0b0af902, 0xf4f4f902,
-        0x0d02f902, 0xf2fcf902, 0xfffffe07, 0x0504fe07, 0xfafafe07, 0x06fdfe07, 0xf901fe07, 0xfe06fe07,
-        0x01f8fe07, 0x0b0afe07, 0xf4f4fe07, 0x0d02fe07, 0xf2fcfe07, 0x000001f9, 0x050501f9, 0xfafb01f9,
-        0x06fe01f9, 0xf90201f9, 0xfe0701f9, 0x01f901f9, 0x0b0b01f9, 0xf4f501f9, 0x0d0301f9, 0xf2fd01f9,
-        0x00000b0b, 0x05050b0b, 0xfafb0b0b, 0x06fe0b0b, 0xf9020b0b, 0xfe070b0b, 0x01f90b0b, 0x0b0b0b0b,
-        0xf4f50b0b, 0x0d030b0b, 0xf2fd0b0b, 0xfffff4f5, 0x0504f4f5, 0xfafaf4f5, 0x06fdf4f5, 0xf901f4f5,
-        0xfe06f4f5, 0x01f8f4f5, 0x0b0af4f5, 0xf4f4f4f5, 0x0d02f4f5, 0xf2fcf4f5, 0x00000d03, 0x05050d03,
-        0xfafb0d03, 0x06fe0d03, 0xf9020d03, 0xfe070d03, 0x01f90d03, 0x0b0b0d03, 0xf4f50d03, 0x0d030d03,
-        0xf2fd0d03, 0xfffff2fd, 0x0504f2fd, 0xfafaf2fd, 0x06fdf2fd, 0xf901f2fd, 0xfe06f2fd, 0x01f8f2fd,
-        0x0b0af2fd, 0xf4f4f2fd, 0x0d02f2fd, 0xf2fcf2fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000606, 0xfffff9fa, 0x000007fe, 0xfffff802, 0xfffffe08, 0x000001f8, 0x00000d0d,
-        0xfffff2f3, 0x00000f04, 0xfffff0fc, 0x0000040f, 0xfffffbf1, 0x00000af5, 0xfffff50b, 0x000011fb,
-        0xffffee05, 0xfffffb12, 0x000004ee, 0x00001a0d, 0xffffe5f3, 0x00000d1a, 0xfffff2e6, 0x00001a1a,
-        0xffffe5e6, 0x00001d02, 0xffffe2fe, 0x0000021d, 0xfffffde3, 0x000017f0, 0xffffe810, 0xfffff018,
-        0x00000fe8, 0x00002e1c, 0xffffd1e4, 0x00001c2e, 0xffffe3d2, 0x000022f7, 0xffffdd09, 0xfffff723,
-        0x000008dd, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003131, 0xffffcecf, 0x000035ff,
-        0xffffca01, 0xffffff36, 0x000000ca, 0x000022dd, 0xffffdd23, 0x00002ee6, 0xffffd11a, 0xffffe62f,
-        0x000019d1, 0x00005120, 0xffffaee0, 0x00002051, 0xffffdfaf, 0x00005338, 0xffffacc8, 0x00003853,
-        0xffffc7ad, 0x000042ee, 0xffffbd12, 0xffffee43, 0x000011bd, 0x0000560d, 0xffffa9f3, 0x00000d56,
-        0xfffff2aa, 0x00005b5b, 0xffffa4a5, 0x000062f9, 0xffff9d07, 0xfffff963, 0x0000069d, 0x000043ca,
-        0xffffbc36, 0xffffca44, 0x000035bc, 0x000059d4, 0xffffa62c, 0xffffd45a, 0x00002ba6, 0x00007bdf,
-        0xffff8421, 0xffffdf7c, 0x00002084, 0x00006699, 0xffff9967, 0x00007eaa, 0xffff8156, 0xffffaa7f,
-        0x00005581, 0x00002525, 0xffffdadb, 0x00004545, 0xffffbabb, 0x00000000, 0x06060000, 0xf9fa0000,
-        0x07fe0000, 0xf8020000, 0xfe080000, 0x01f80000, 0x0d0d0000, 0xf2f30000, 0x0f040000, 0xf0fc0000,
-        0x040f0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x07fe0606, 0xf8020606, 0xfe080606, 0x01f80606,
-        0x0d0d0606, 0xf2f30606, 0x0f040606, 0xf0fc0606, 0x040f0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa,
-        0x07fdf9fa, 0xf801f9fa, 0xfe07f9fa, 0x01f7f9fa, 0x0d0cf9fa, 0xf2f2f9fa, 0x0f03f9fa, 0xf0fbf9fa,
-        0x040ef9fa, 0x000007fe, 0x060607fe, 0xf9fa07fe, 0x07fe07fe, 0xf80207fe, 0xfe0807fe, 0x01f807fe,
-        0x0d0d07fe, 0xf2f307fe, 0x0f0407fe, 0xf0fc07fe, 0x040f07fe, 0xfffff802, 0x0605f802, 0xf9f9f802,
-        0x07fdf802, 0xf801f802, 0xfe07f802, 0x01f7f802, 0x0d0cf802, 0xf2f2f802, 0x0f03f802, 0xf0fbf802,
-        0x040ef802, 0xfffffe08, 0x0605fe08, 0xf9f9fe08, 0x07fdfe08, 0xf801fe08, 0xfe07fe08, 0x01f7fe08,
-        0x0d0cfe08, 0xf2f2fe08, 0x0f03fe08, 0xf0fbfe08, 0x040efe08, 0x000001f8, 0x060601f8, 0xf9fa01f8,
-        0x07fe01f8, 0xf80201f8, 0xfe0801f8, 0x01f801f8, 0x0d0d01f8, 0xf2f301f8, 0x0f0401f8, 0xf0fc01f8,
-        0x040f01f8, 0x00000d0d, 0x06060d0d, 0xf9fa0d0d, 0x07fe0d0d, 0xf8020d0d, 0xfe080d0d, 0x01f80d0d,
-        0x0d0d0d0d, 0xf2f30d0d, 0x0f040d0d, 0xf0fc0d0d, 0x040f0d0d, 0xfffff2f3, 0x0605f2f3, 0xf9f9f2f3,
-        0x07fdf2f3, 0xf801f2f3, 0xfe07f2f3, 0x01f7f2f3, 0x0d0cf2f3, 0xf2f2f2f3, 0x0f03f2f3, 0xf0fbf2f3,
-        0x040ef2f3, 0x00000f04, 0x06060f04, 0xf9fa0f04, 0x07fe0f04, 0xf8020f04, 0xfe080f04, 0x01f80f04,
-        0x0d0d0f04, 0xf2f30f04, 0x0f040f04, 0xf0fc0f04, 0x040f0f04, 0xfffff0fc, 0x0605f0fc, 0xf9f9f0fc,
-        0x07fdf0fc, 0xf801f0fc, 0xfe07f0fc, 0x01f7f0fc, 0x0d0cf0fc, 0xf2f2f0fc, 0x0f03f0fc, 0xf0fbf0fc,
-        0x040ef0fc, 0x0000040f, 0x0606040f, 0xf9fa040f, 0x07fe040f, 0xf802040f, 0xfe08040f, 0x01f8040f,
-        0x0d0d040f, 0xf2f3040f, 0x0f04040f, 0xf0fc040f, 0x040f040f, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000707, 0xfffff8f9, 0x000009fd, 0xfffff603, 0xfffffd0a, 0x000002f6, 0x00001010,
-        0xffffeff0, 0x00001205, 0xffffedfb, 0x00000512, 0xfffffaee, 0x00000cf3, 0xfffff30d, 0x000014fa,
-        0xffffeb06, 0xfffffa15, 0x000005eb, 0x00001e0f, 0xffffe1f1, 0x00000f1e, 0xfffff0e2, 0x00001e1e,
-        0xffffe1e2, 0x00002202, 0xffffddfe, 0x00000222, 0xfffffdde, 0x00001bed, 0xffffe413, 0xffffed1c,
-        0x000012e4, 0x00003620, 0xffffc9e0, 0x00002036, 0xffffdfca, 0x000028f5, 0xffffd70b, 0xfffff529,
-        0x00000ad7, 0x0000370f, 0xffffc8f1, 0x00000f37, 0xfffff0c9, 0x00003939, 0xffffc6c7, 0x00003eff,
-        0xffffc101, 0xffffff3f, 0x000000c1, 0x000027d8, 0xffffd828, 0x000036e2, 0xffffc91e, 0xffffe237,
-        0x00001dc9, 0x00005e25, 0xffffa1db, 0x0000255e, 0xffffdaa2, 0x00006041, 0xffff9fbf, 0x00004160,
-        0xffffbea0, 0x00004deb, 0xffffb215, 0xffffeb4e, 0x000014b2, 0x0000640f, 0xffff9bf1, 0x00000f64,
-        0xfffff09c, 0x00006a6a, 0xffff9596, 0x000073f8, 0xffff8c08, 0xfffff874, 0x0000078c, 0x00004ec1,
-        0xffffb13f, 0xffffc14f, 0x00003eb1, 0x000068cd, 0xffff9733, 0xffffcd69, 0x00003297, 0x00007788,
-        0xffff8878, 0x00002b2b, 0xffffd4d5, 0x00005050, 0xffffafb0, 0x00000000, 0x07070000, 0xf8f90000,
-        0x09fd0000, 0xf6030000, 0xfd0a0000, 0x02f60000, 0x10100000, 0xeff00000, 0x12050000, 0xedfb0000,
-        0x05120000, 0x00000707, 0x07070707, 0xf8f90707, 0x09fd0707, 0xf6030707, 0xfd0a0707, 0x02f60707,
-        0x10100707, 0xeff00707, 0x12050707, 0xedfb0707, 0x05120707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9,
-        0x09fcf8f9, 0xf602f8f9, 0xfd09f8f9, 0x02f5f8f9, 0x100ff8f9, 0xefeff8f9, 0x1204f8f9, 0xedfaf8f9,
-        0x0511f8f9, 0x000009fd, 0x070709fd, 0xf8f909fd, 0x09fd09fd, 0xf60309fd, 0xfd0a09fd, 0x02f609fd,
-        0x101009fd, 0xeff009fd, 0x120509fd, 0xedfb09fd, 0x051209fd, 0xfffff603, 0x0706f603, 0xf8f8f603,
-        0x09fcf603, 0xf602f603, 0xfd09f603, 0x02f5f603, 0x100ff603, 0xefeff603, 0x1204f603, 0xedfaf603,
-        0x0511f603, 0xfffffd0a, 0x0706fd0a, 0xf8f8fd0a, 0x09fcfd0a, 0xf602fd0a, 0xfd09fd0a, 0x02f5fd0a,
-        0x100ffd0a, 0xefeffd0a, 0x1204fd0a, 0xedfafd0a, 0x0511fd0a, 0x000002f6, 0x070702f6, 0xf8f902f6,
-        0x09fd02f6, 0xf60302f6, 0xfd0a02f6, 0x02f602f6, 0x101002f6, 0xeff002f6, 0x120502f6, 0xedfb02f6,
-        0x051202f6, 0x00001010, 0x07071010, 0xf8f91010, 0x09fd1010, 0xf6031010, 0xfd0a1010, 0x02f61010,
-        0x10101010, 0xeff01010, 0x12051010, 0xedfb1010, 0x05121010, 0xffffeff0, 0x0706eff0, 0xf8f8eff0,
-        0x09fceff0, 0xf602eff0, 0xfd09eff0, 0x02f5eff0, 0x100feff0, 0xefefeff0, 0x1204eff0, 0xedfaeff0,
-        0x0511eff0, 0x00001205, 0x07071205, 0xf8f91205, 0x09fd1205, 0xf6031205, 0xfd0a1205, 0x02f61205,
-        0x10101205, 0xeff01205, 0x12051205, 0xedfb1205, 0x05121205, 0xffffedfb, 0x0706edfb, 0xf8f8edfb,
-        0x09fcedfb, 0xf602edfb, 0xfd09edfb, 0x02f5edfb, 0x100fedfb, 0xefefedfb, 0x1204edfb, 0xedfaedfb,
-        0x0511edfb, 0x00000512, 0x07070512, 0xf8f90512, 0x09fd0512, 0xf6030512, 0xfd0a0512, 0x02f60512,
-        0x10100512, 0xeff00512, 0x12050512, 0xedfb0512, 0x05120512, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000808, 0xfffff7f8, 0x00000afd, 0xfffff503, 0xfffffd0b, 0x000002f5, 0x00001212,
-        0xffffedee, 0x00001405, 0xffffebfb, 0x00000514, 0xfffffaec, 0x00000ef1, 0xfffff10f, 0x000017f9,
-        0xffffe807, 0xfffff918, 0x000006e8, 0x00002311, 0xffffdcef, 0x00001123, 0xffffeedd, 0x00002222,
-        0xffffddde, 0x00002603, 0xffffd9fd, 0x00000326, 0xfffffcda, 0x00001fea, 0xffffe016, 0xffffea20,
-        0x000015e0, 0x00003d25, 0xffffc2db, 0x0000253d, 0xffffdac3, 0x00002ef3, 0xffffd10d, 0xfffff32f,
-        0x00000cd1, 0x00003f11, 0xffffc0ef, 0x0000113f, 0xffffeec1, 0x00004141, 0xffffbebf, 0x000047ff,
-        0xffffb801, 0xffffff48, 0x000000b8, 0x00002dd2, 0xffffd22e, 0x00003edd, 0xffffc123, 0xffffdd3f,
-        0x000022c1, 0x00006b2b, 0xffff94d5, 0x00002b6b, 0xffffd495, 0x00006e4b, 0xffff91b5, 0x00004b6e,
-        0xffffb492, 0x000058e8, 0xffffa718, 0xffffe859, 0x000017a7, 0x00007211, 0xffff8def, 0x00001172,
-        0xffffee8e, 0x00007979, 0xffff8687, 0x00005ab8, 0xffffa548, 0xffffb85b, 0x000047a5, 0x000077c6,
-        0xffff883a, 0xffffc678, 0x00003988, 0x00003131, 0xffffcecf, 0x00005c5c, 0xffffa3a4, 0x00000000,
-        0x08080000, 0xf7f80000, 0x0afd0000, 0xf5030000, 0xfd0b0000, 0x02f50000, 0x12120000, 0xedee0000,
-        0x14050000, 0xebfb0000, 0x05140000, 0x00000808, 0x08080808, 0xf7f80808, 0x0afd0808, 0xf5030808,
-        0xfd0b0808, 0x02f50808, 0x12120808, 0xedee0808, 0x14050808, 0xebfb0808, 0x05140808, 0xfffff7f8,
-        0x0807f7f8, 0xf7f7f7f8, 0x0afcf7f8, 0xf502f7f8, 0xfd0af7f8, 0x02f4f7f8, 0x1211f7f8, 0xededf7f8,
-        0x1404f7f8, 0xebfaf7f8, 0x0513f7f8, 0x00000afd, 0x08080afd, 0xf7f80afd, 0x0afd0afd, 0xf5030afd,
-        0xfd0b0afd, 0x02f50afd, 0x12120afd, 0xedee0afd, 0x14050afd, 0xebfb0afd, 0x05140afd, 0xfffff503,
-        0x0807f503, 0xf7f7f503, 0x0afcf503, 0xf502f503, 0xfd0af503, 0x02f4f503, 0x1211f503, 0xededf503,
-        0x1404f503, 0xebfaf503, 0x0513f503, 0xfffffd0b, 0x0807fd0b, 0xf7f7fd0b, 0x0afcfd0b, 0xf502fd0b,
-        0xfd0afd0b, 0x02f4fd0b, 0x1211fd0b, 0xededfd0b, 0x1404fd0b, 0xebfafd0b, 0x0513fd0b, 0x000002f5,
-        0x080802f5, 0xf7f802f5, 0x0afd02f5, 0xf50302f5, 0xfd0b02f5, 0x02f502f5, 0x121202f5, 0xedee02f5,
-        0x140502f5, 0xebfb02f5, 0x051402f5, 0x00001212, 0x08081212, 0xf7f81212, 0x0afd1212, 0xf5031212,
-        0xfd0b1212, 0x02f51212, 0x12121212, 0xedee1212, 0x14051212, 0xebfb1212, 0x05141212, 0xffffedee,
-        0x0807edee, 0xf7f7edee, 0x0afcedee, 0xf502edee, 0xfd0aedee, 0x02f4edee, 0x1211edee, 0xedededee,
-        0x1404edee, 0xebfaedee, 0x0513edee, 0x00001405, 0x08081405, 0xf7f81405, 0x0afd1405, 0xf5031405,
-        0xfd0b1405, 0x02f51405, 0x12121405, 0xedee1405, 0x14051405, 0xebfb1405, 0x05141405, 0xffffebfb,
-        0x0807ebfb, 0xf7f7ebfb, 0x0afcebfb, 0xf502ebfb, 0xfd0aebfb, 0x02f4ebfb, 0x1211ebfb, 0xededebfb,
-        0x1404ebfb, 0xebfaebfb, 0x0513ebfb, 0x00000514, 0x08080514, 0xf7f80514, 0x0afd0514, 0xf5030514,
-        0xfd0b0514, 0x02f50514, 0x12120514, 0xedee0514, 0x14050514, 0xebfb0514, 0x05140514, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000909, 0xfffff6f7, 0x00000bfd, 0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001414,
-        0xffffebec, 0x00001706, 0xffffe8fa, 0x00000617, 0xfffff9e9, 0x000010ef, 0xffffef11, 0x00001af9,
-        0xffffe507, 0xfffff91b, 0x000006e5, 0x00002713, 0xffffd8ed, 0x00001327, 0xffffecd9, 0x00002727,
-        0xffffd8d9, 0x00002b03, 0xffffd4fd, 0x0000032b, 0xfffffcd5, 0x000023e8, 0xffffdc18, 0xffffe824,
-        0x000017dc, 0x0000452a, 0xffffbad6, 0x00002a45, 0xffffd5bb, 0x000034f2, 0xffffcb0e, 0xfffff235,
-        0x00000dcb, 0x00004713, 0xffffb8ed, 0x00001347, 0xffffecb9, 0x00004949, 0xffffb6b7, 0x00004ffe,
-        0xffffb002, 0xfffffe50, 0x000001b0, 0x000033cc, 0xffffcc34, 0x000045d9, 0xffffba27, 0xffffd946,
-        0x000026ba, 0x00007930, 0xffff86d0, 0x00003079, 0xffffcf87, 0x00007c54, 0xffff83ac, 0x0000547c,
-        0xffffab84, 0x000063e5, 0xffff9c1b, 0xffffe564, 0x00001a9c, 0x000065af, 0xffff9a51, 0xffffaf66,
-        0x0000509a, 0x00003737, 0xffffc8c9, 0x00006868, 0xffff9798, 0x00000000, 0x09090000, 0xf6f70000,
-        0x0bfd0000, 0xf4030000, 0xfd0c0000, 0x02f40000, 0x14140000, 0xebec0000, 0x17060000, 0xe8fa0000,
-        0x06170000, 0xf9e90000, 0x00000909, 0x09090909, 0xf6f70909, 0x0bfd0909, 0xf4030909, 0xfd0c0909,
-        0x02f40909, 0x14140909, 0xebec0909, 0x17060909, 0xe8fa0909, 0x06170909, 0xf9e90909, 0xfffff6f7,
-        0x0908f6f7, 0xf6f6f6f7, 0x0bfcf6f7, 0xf402f6f7, 0xfd0bf6f7, 0x02f3f6f7, 0x1413f6f7, 0xebebf6f7,
-        0x1705f6f7, 0xe8f9f6f7, 0x0616f6f7, 0xf9e8f6f7, 0x00000bfd, 0x09090bfd, 0xf6f70bfd, 0x0bfd0bfd,
-        0xf4030bfd, 0xfd0c0bfd, 0x02f40bfd, 0x14140bfd, 0xebec0bfd, 0x17060bfd, 0xe8fa0bfd, 0x06170bfd,
-        0xf9e90bfd, 0xfffff403, 0x0908f403, 0xf6f6f403, 0x0bfcf403, 0xf402f403, 0xfd0bf403, 0x02f3f403,
-        0x1413f403, 0xebebf403, 0x1705f403, 0xe8f9f403, 0x0616f403, 0xf9e8f403, 0xfffffd0c, 0x0908fd0c,
-        0xf6f6fd0c, 0x0bfcfd0c, 0xf402fd0c, 0xfd0bfd0c, 0x02f3fd0c, 0x1413fd0c, 0xebebfd0c, 0x1705fd0c,
-        0xe8f9fd0c, 0x0616fd0c, 0xf9e8fd0c, 0x000002f4, 0x090902f4, 0xf6f702f4, 0x0bfd02f4, 0xf40302f4,
-        0xfd0c02f4, 0x02f402f4, 0x141402f4, 0xebec02f4, 0x170602f4, 0xe8fa02f4, 0x061702f4, 0xf9e902f4,
-        0x00001414, 0x09091414, 0xf6f71414, 0x0bfd1414, 0xf4031414, 0xfd0c1414, 0x02f41414, 0x14141414,
-        0xebec1414, 0x17061414, 0xe8fa1414, 0x06171414, 0xf9e91414, 0xffffebec, 0x0908ebec, 0xf6f6ebec,
-        0x0bfcebec, 0xf402ebec, 0xfd0bebec, 0x02f3ebec, 0x1413ebec, 0xebebebec, 0x1705ebec, 0xe8f9ebec,
-        0x0616ebec, 0xf9e8ebec, 0x00001706, 0x09091706, 0xf6f71706, 0x0bfd1706, 0xf4031706, 0xfd0c1706,
-        0x02f41706, 0x14141706, 0xebec1706, 0x17061706, 0xe8fa1706, 0x06171706, 0xf9e91706, 0xffffe8fa,
-        0x0908e8fa, 0xf6f6e8fa, 0x0bfce8fa, 0xf402e8fa, 0xfd0be8fa, 0x02f3e8fa, 0x1413e8fa, 0xebebe8fa,
-        0x1705e8fa, 0xe8f9e8fa, 0x0616e8fa, 0xf9e8e8fa, 0x00000617, 0x09090617, 0xf6f70617, 0x0bfd0617,
-        0xf4030617, 0xfd0c0617, 0x02f40617, 0x14140617, 0xebec0617, 0x17060617, 0xe8fa0617, 0x06170617,
-        0xf9e90617, 0xfffff9e9, 0x0908f9e9, 0xf6f6f9e9, 0x0bfcf9e9, 0xf402f9e9, 0xfd0bf9e9, 0x02f3f9e9,
-        0x1413f9e9, 0xebebf9e9, 0x1705f9e9, 0xe8f9f9e9, 0x0616f9e9, 0xf9e8f9e9, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404,
-        0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x000003fc, 0xfffffc04, 0x000005fe,
-        0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000804, 0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808,
-        0xfffff7f8, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000007fc, 0xfffff804, 0xfffffc08,
-        0x000003f8, 0x00000e08, 0xfffff1f8, 0x0000080e, 0xfffff7f2, 0x00000bfe, 0xfffff402, 0xfffffe0c,
-        0x000001f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200,
-        0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff8, 0xfffff008, 0xfffff810,
-        0x000007f0, 0x00001a0a, 0xffffe5f6, 0x00000a1a, 0xfffff5e6, 0x00001c12, 0xffffe3ee, 0x0000121c,
-        0xffffede4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001c04, 0xffffe3fc, 0x0000041c,
-        0xfffffbe4, 0x00001e1e, 0xffffe1e2, 0x00001ffe, 0xffffe002, 0xfffffe20, 0x000001e0, 0x000015ee,
-        0xffffea12, 0xffffee16, 0x000011ea, 0x00001df2, 0xffffe20e, 0xfffff21e, 0x00000de2, 0x00002e16,
-        0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002e0c, 0xffffd1f4, 0x00000c2e, 0xfffff3d2, 0x00003022,
-        0xffffcfde, 0x00002230, 0xffffddd0, 0x000027f6, 0xffffd80a, 0xfffff628, 0x000009d8, 0x00003204,
-        0xffffcdfc, 0x00000432, 0xfffffbce, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e4,
-        0xffffd61c, 0xffffe42a, 0x00001bd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1a,
-        0xffffb3e6, 0x00001a4c, 0xffffe5b4, 0x00004c2a, 0xffffb3d6, 0x00002a4c, 0xffffd5b4, 0x000035e8,
-        0xffffca18, 0xffffe836, 0x000017ca, 0x00004e0e, 0xffffb1f2, 0x00000e4e, 0xfffff1b2, 0x0000523e,
-        0xffffadc2, 0x00003e52, 0xffffc1ae, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802,
-        0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005c5c, 0xffffa3a4, 0x00003bcc, 0xffffc434, 0xffffcc3c,
-        0x000033c4, 0x00007634, 0xffff89cc, 0x00003476, 0xffffcb8a, 0x000049d4, 0xffffb62c, 0xffffd44a,
-        0x00002bb6, 0x0000764a, 0xffff89b6, 0x00004a76, 0xffffb58a, 0x00007620, 0xffff89e0, 0x00002076,
-        0xffffdf8a, 0x000065f4, 0xffff9a0c, 0xfffff466, 0x00000b9a, 0x00005fd8, 0xffffa028, 0xffffd860,
-        0x000027a0, 0x000075de, 0xffff8a22, 0xffffde76, 0x0000218a, 0x000057a8, 0xffffa858, 0x000067b2,
-        0xffff984e, 0xffffb268, 0x00004d98, 0x00000c0c, 0xfffff3f4, 0x00001616, 0xffffe9ea, 0x00002a2a,
-        0xffffd5d6, 0x00004848, 0xffffb7b8, 0x00000000, 0x02020000, 0xfdfe0000, 0x02000000, 0xfe000000,
-        0x00020000, 0xfffe0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02000202, 0xfe000202, 0x00020202,
-        0xfffe0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x01fffdfe, 0xfdfffdfe, 0x0001fdfe, 0xfffdfdfe,
-        0x00000200, 0x02020200, 0xfdfe0200, 0x02000200, 0xfe000200, 0x00020200, 0xfffe0200, 0xfffffe00,
-        0x0201fe00, 0xfdfdfe00, 0x01fffe00, 0xfdfffe00, 0x0001fe00, 0xfffdfe00, 0x00000002, 0x02020002,
-        0xfdfe0002, 0x02000002, 0xfe000002, 0x00020002, 0xfffe0002, 0xfffffffe, 0x0201fffe, 0xfdfdfffe,
-        0x01fffffe, 0xfdfffffe, 0x0001fffe, 0xfffdfffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000303, 0xfffffcfd, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,
-        0xfffff9fa, 0x00000903, 0xfffff6fd, 0x00000309, 0xfffffcf7, 0x000008fd, 0xfffff703, 0xfffffd09,
-        0x000002f7, 0x000005fa, 0xfffffa06, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000c0c,
-        0xfffff3f4, 0x00000f00, 0xfffff100, 0x0000000f, 0xfffffff1, 0x00000bf7, 0xfffff409, 0xfffff70c,
-        0x000008f4, 0x0000180f, 0xffffe7f1, 0x00000f18, 0xfffff0e8, 0x000011fa, 0xffffee06, 0xfffffa12,
-        0x000005ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001b00,
-        0xffffe500, 0x0000001b, 0xffffffe5, 0x000011ee, 0xffffee12, 0x000017f4, 0xffffe80c, 0xfffff418,
-        0x00000be8, 0x0000270f, 0xffffd8f1, 0x00000f27, 0xfffff0d9, 0x00002a1b, 0xffffd5e5, 0x00001b2a,
-        0xffffe4d6, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002a06, 0xffffd5fa, 0x0000062a,
-        0xfffff9d6, 0x00002d2d, 0xffffd2d3, 0x000032fd, 0xffffcd03, 0xfffffd33, 0x000002cd, 0x000020e5,
-        0xffffdf1b, 0xffffe521, 0x00001adf, 0x00002ceb, 0xffffd315, 0xffffeb2d, 0x000014d3, 0x00004521,
-        0xffffbadf, 0x00002145, 0xffffdebb, 0x00004512, 0xffffbaee, 0x00001245, 0xffffedbb, 0x00004836,
-        0xffffb7ca, 0x00003648, 0xffffc9b8, 0x00003eee, 0xffffc112, 0xffffee3f, 0x000011c1, 0x00004e06,
-        0xffffb1fa, 0x0000064e, 0xfffff9b2, 0x00005151, 0xffffaeaf, 0x000032cd, 0xffffcd33, 0x00003ed6,
-        0xffffc12a, 0xffffd63f, 0x000029c1, 0x000059f7, 0xffffa609, 0xfffff75a, 0x000008a6, 0x0000722a,
-        0xffff8dd6, 0x00002a72, 0xffffd58e, 0x0000753f, 0xffff8ac1, 0x00003f75, 0xffffc08b, 0x000050dc,
-        0xffffaf24, 0xffffdc51, 0x000023af, 0x00007815, 0xffff87eb, 0x00001578, 0xffffea88, 0x00007b60,
-        0xffff84a0, 0x0000607b, 0xffff9f85, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005cb2,
-        0xffffa34e, 0xffffb25d, 0x00004da3, 0x000071bb, 0xffff8e45, 0xffffbb72, 0x0000448e, 0x00001212,
-        0xffffedee, 0x00002121, 0xffffdedf, 0x00003f3f, 0xffffc0c1, 0x00006c6c, 0xffff9394, 0x00000000,
-        0x03030000, 0xfcfd0000, 0x03000000, 0xfd000000, 0x00030000, 0xfffd0000, 0x06060000, 0xf9fa0000,
-        0x00000303, 0x03030303, 0xfcfd0303, 0x03000303, 0xfd000303, 0x00030303, 0xfffd0303, 0x06060303,
-        0xf9fa0303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x02fffcfd, 0xfcfffcfd, 0x0002fcfd, 0xfffcfcfd,
-        0x0605fcfd, 0xf9f9fcfd, 0x00000300, 0x03030300, 0xfcfd0300, 0x03000300, 0xfd000300, 0x00030300,
-        0xfffd0300, 0x06060300, 0xf9fa0300, 0xfffffd00, 0x0302fd00, 0xfcfcfd00, 0x02fffd00, 0xfcfffd00,
-        0x0002fd00, 0xfffcfd00, 0x0605fd00, 0xf9f9fd00, 0x00000003, 0x03030003, 0xfcfd0003, 0x03000003,
-        0xfd000003, 0x00030003, 0xfffd0003, 0x06060003, 0xf9fa0003, 0xfffffffd, 0x0302fffd, 0xfcfcfffd,
-        0x02fffffd, 0xfcfffffd, 0x0002fffd, 0xfffcfffd, 0x0605fffd, 0xf9f9fffd, 0x00000606, 0x03030606,
-        0xfcfd0606, 0x03000606, 0xfd000606, 0x00030606, 0xfffd0606, 0x06060606, 0xf9fa0606, 0xfffff9fa,
-        0x0302f9fa, 0xfcfcf9fa, 0x02fff9fa, 0xfcfff9fa, 0x0002f9fa, 0xfffcf9fa, 0x0605f9fa, 0xf9f9f9fa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000404, 0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000804,
-        0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808, 0xfffff7f8, 0x000007f8, 0xfffff808, 0x00000bfc,
-        0xfffff404, 0xfffffc0c, 0x000003f4, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00001010,
-        0xffffeff0, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00000ff4, 0xfffff00c, 0xfffff410,
-        0x00000bf0, 0x000017fc, 0xffffe804, 0xfffffc18, 0x000003e8, 0x00002010, 0xffffdff0, 0x00001020,
-        0xffffefe0, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002020, 0xffffdfe0, 0x00002400,
-        0xffffdc00, 0x00000024, 0xffffffdc, 0x000017e8, 0xffffe818, 0x00001ff0, 0xffffe010, 0xfffff020,
-        0x00000fe0, 0x00003414, 0xffffcbec, 0x00001434, 0xffffebcc, 0x00003824, 0xffffc7dc, 0x00002438,
-        0xffffdbc8, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003808, 0xffffc7f8, 0x00000838,
-        0xfffff7c8, 0x00003c3c, 0xffffc3c4, 0x00003ffc, 0xffffc004, 0xfffffc40, 0x000003c0, 0x00002bdc,
-        0xffffd424, 0xffffdc2c, 0x000023d4, 0x00003be4, 0xffffc41c, 0xffffe43c, 0x00001bc4, 0x00005c2c,
-        0xffffa3d4, 0x00002c5c, 0xffffd3a4, 0x00005c18, 0xffffa3e8, 0x0000185c, 0xffffe7a4, 0x00006048,
-        0xffff9fb8, 0x00004860, 0xffffb7a0, 0x000053ec, 0xffffac14, 0xffffec54, 0x000013ac, 0x00006408,
-        0xffff9bf8, 0x00000864, 0xfffff79c, 0x00006c6c, 0xffff9394, 0x000043bc, 0xffffbc44, 0x000053c8,
-        0xffffac38, 0xffffc854, 0x000037ac, 0x000077f4, 0xffff880c, 0xfffff478, 0x00000b88, 0x00006bd0,
-        0xffff9430, 0xffffd06c, 0x00002f94, 0x00007b98, 0xffff8468, 0xffff987c, 0x00006784, 0x00001818,
-        0xffffe7e8, 0x00002c2c, 0xffffd3d4, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000,
-        0x04000000, 0xfc000000, 0x00040000, 0xfffc0000, 0x08040000, 0xf7fc0000, 0x04080000, 0x00000404,
-        0x04040404, 0xfbfc0404, 0x04000404, 0xfc000404, 0x00040404, 0xfffc0404, 0x08040404, 0xf7fc0404,
-        0x04080404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x03fffbfc, 0xfbfffbfc, 0x0003fbfc, 0xfffbfbfc,
-        0x0803fbfc, 0xf7fbfbfc, 0x0407fbfc, 0x00000400, 0x04040400, 0xfbfc0400, 0x04000400, 0xfc000400,
-        0x00040400, 0xfffc0400, 0x08040400, 0xf7fc0400, 0x04080400, 0xfffffc00, 0x0403fc00, 0xfbfbfc00,
-        0x03fffc00, 0xfbfffc00, 0x0003fc00, 0xfffbfc00, 0x0803fc00, 0xf7fbfc00, 0x0407fc00, 0x00000004,
-        0x04040004, 0xfbfc0004, 0x04000004, 0xfc000004, 0x00040004, 0xfffc0004, 0x08040004, 0xf7fc0004,
-        0x04080004, 0xfffffffc, 0x0403fffc, 0xfbfbfffc, 0x03fffffc, 0xfbfffffc, 0x0003fffc, 0xfffbfffc,
-        0x0803fffc, 0xf7fbfffc, 0x0407fffc, 0x00000804, 0x04040804, 0xfbfc0804, 0x04000804, 0xfc000804,
-        0x00040804, 0xfffc0804, 0x08040804, 0xf7fc0804, 0x04080804, 0xfffff7fc, 0x0403f7fc, 0xfbfbf7fc,
-        0x03fff7fc, 0xfbfff7fc, 0x0003f7fc, 0xfffbf7fc, 0x0803f7fc, 0xf7fbf7fc, 0x0407f7fc, 0x00000408,
-        0x04040408, 0xfbfc0408, 0x04000408, 0xfc000408, 0x00040408, 0xfffc0408, 0x08040408, 0xf7fc0408,
-        0x04080408, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000505, 0xfffffafb, 0x00000500, 0xfffffb00, 0x00000005, 0xfffffffb, 0x00000a0a,
-        0xfffff5f6, 0x00000f05, 0xfffff0fb, 0x0000050f, 0xfffffaf1, 0x000009f6, 0xfffff60a, 0x00000efb,
-        0xfffff105, 0xfffffb0f, 0x000004f1, 0x0000140a, 0xffffebf6, 0x00000a14, 0xfffff5ec, 0x00001414,
-        0xffffebec, 0x00001900, 0xffffe700, 0x00000019, 0xffffffe7, 0x000013f1, 0xffffec0f, 0xfffff114,
-        0x00000eec, 0x00002819, 0xffffd7e7, 0x00001928, 0xffffe6d8, 0x00001df6, 0xffffe20a, 0xfffff61e,
-        0x000009e2, 0x0000280a, 0xffffd7f6, 0x00000a28, 0xfffff5d8, 0x00002828, 0xffffd7d8, 0x00002d00,
-        0xffffd300, 0x0000002d, 0xffffffd3, 0x00001de2, 0xffffe21e, 0x000027ec, 0xffffd814, 0xffffec28,
-        0x000013d8, 0x00004119, 0xffffbee7, 0x00001941, 0xffffe6bf, 0x0000462d, 0xffffb9d3, 0x00002d46,
-        0xffffd2ba, 0x000036f1, 0xffffc90f, 0xfffff137, 0x00000ec9, 0x0000460a, 0xffffb9f6, 0x00000a46,
-        0xfffff5ba, 0x00004b4b, 0xffffb4b5, 0x000054fb, 0xffffab05, 0xfffffb55, 0x000004ab, 0x000036d3,
-        0xffffc92d, 0xffffd337, 0x00002cc9, 0x00004add, 0xffffb523, 0xffffdd4b, 0x000022b5, 0x00007337,
-        0xffff8cc9, 0x00003773, 0xffffc88d, 0x0000731e, 0xffff8ce2, 0x00001e73, 0xffffe18d, 0x0000785a,
-        0xffff87a6, 0x00005a78, 0xffffa588, 0x000068e2, 0xffff971e, 0xffffe269, 0x00001d97, 0x000054ab,
-        0xffffab55, 0x000068ba, 0xffff9746, 0xffffba69, 0x00004597, 0x00001e1e, 0xffffe1e2, 0x00003c3c,
-        0xffffc3c4, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x05000000, 0xfb000000,
-        0x00050000, 0xfffb0000, 0x0a0a0000, 0xf5f60000, 0x0f050000, 0xf0fb0000, 0x00000505, 0x05050505,
-        0xfafb0505, 0x05000505, 0xfb000505, 0x00050505, 0xfffb0505, 0x0a0a0505, 0xf5f60505, 0x0f050505,
-        0xf0fb0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x04fffafb, 0xfafffafb, 0x0004fafb, 0xfffafafb,
-        0x0a09fafb, 0xf5f5fafb, 0x0f04fafb, 0xf0fafafb, 0x00000500, 0x05050500, 0xfafb0500, 0x05000500,
-        0xfb000500, 0x00050500, 0xfffb0500, 0x0a0a0500, 0xf5f60500, 0x0f050500, 0xf0fb0500, 0xfffffb00,
-        0x0504fb00, 0xfafafb00, 0x04fffb00, 0xfafffb00, 0x0004fb00, 0xfffafb00, 0x0a09fb00, 0xf5f5fb00,
-        0x0f04fb00, 0xf0fafb00, 0x00000005, 0x05050005, 0xfafb0005, 0x05000005, 0xfb000005, 0x00050005,
-        0xfffb0005, 0x0a0a0005, 0xf5f60005, 0x0f050005, 0xf0fb0005, 0xfffffffb, 0x0504fffb, 0xfafafffb,
-        0x04fffffb, 0xfafffffb, 0x0004fffb, 0xfffafffb, 0x0a09fffb, 0xf5f5fffb, 0x0f04fffb, 0xf0fafffb,
-        0x00000a0a, 0x05050a0a, 0xfafb0a0a, 0x05000a0a, 0xfb000a0a, 0x00050a0a, 0xfffb0a0a, 0x0a0a0a0a,
-        0xf5f60a0a, 0x0f050a0a, 0xf0fb0a0a, 0xfffff5f6, 0x0504f5f6, 0xfafaf5f6, 0x04fff5f6, 0xfafff5f6,
-        0x0004f5f6, 0xfffaf5f6, 0x0a09f5f6, 0xf5f5f5f6, 0x0f04f5f6, 0xf0faf5f6, 0x00000f05, 0x05050f05,
-        0xfafb0f05, 0x05000f05, 0xfb000f05, 0x00050f05, 0xfffb0f05, 0x0a0a0f05, 0xf5f60f05, 0x0f050f05,
-        0xf0fb0f05, 0xfffff0fb, 0x0504f0fb, 0xfafaf0fb, 0x04fff0fb, 0xfafff0fb, 0x0004f0fb, 0xfffaf0fb,
-        0x0a09f0fb, 0xf5f5f0fb, 0x0f04f0fb, 0xf0faf0fb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000606, 0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x00000c0c,
-        0xfffff3f4, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000bf4, 0xfffff40c, 0x000011fa,
-        0xffffee06, 0xfffffa12, 0x000005ee, 0x0000180c, 0xffffe7f4, 0x00000c18, 0xfffff3e8, 0x00001818,
-        0xffffe7e8, 0x00001e00, 0xffffe200, 0x0000001e, 0xffffffe2, 0x000017ee, 0xffffe812, 0xffffee18,
-        0x000011e8, 0x0000301e, 0xffffcfe2, 0x00001e30, 0xffffe1d0, 0x000023fa, 0xffffdc06, 0xfffffa24,
-        0x000005dc, 0x0000300c, 0xffffcff4, 0x00000c30, 0xfffff3d0, 0x00003030, 0xffffcfd0, 0x00003600,
-        0xffffca00, 0x00000036, 0xffffffca, 0x000023dc, 0xffffdc24, 0x00002fe8, 0xffffd018, 0xffffe830,
-        0x000017d0, 0x00004e1e, 0xffffb1e2, 0x00001e4e, 0xffffe1b2, 0x00005436, 0xffffabca, 0x00003654,
-        0xffffc9ac, 0x000041ee, 0xffffbe12, 0xffffee42, 0x000011be, 0x0000540c, 0xffffabf4, 0x00000c54,
-        0xfffff3ac, 0x00005a5a, 0xffffa5a6, 0x00005ffa, 0xffffa006, 0xfffffa60, 0x000005a0, 0x000041ca,
-        0xffffbe36, 0xffffca42, 0x000035be, 0x000059d6, 0xffffa62a, 0xffffd65a, 0x000029a6, 0x00007de2,
-        0xffff821e, 0xffffe27e, 0x00001d82, 0x0000659a, 0xffff9a66, 0x00007dac, 0xffff8254, 0xffffac7e,
-        0x00005382, 0x00002424, 0xffffdbdc, 0x00004242, 0xffffbdbe, 0x00000000, 0x06060000, 0xf9fa0000,
-        0x06000000, 0xfa000000, 0x00060000, 0xfffa0000, 0x0c0c0000, 0xf3f40000, 0x0c060000, 0xf3fa0000,
-        0x060c0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x06000606, 0xfa000606, 0x00060606, 0xfffa0606,
-        0x0c0c0606, 0xf3f40606, 0x0c060606, 0xf3fa0606, 0x060c0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa,
-        0x05fff9fa, 0xf9fff9fa, 0x0005f9fa, 0xfff9f9fa, 0x0c0bf9fa, 0xf3f3f9fa, 0x0c05f9fa, 0xf3f9f9fa,
-        0x060bf9fa, 0x00000600, 0x06060600, 0xf9fa0600, 0x06000600, 0xfa000600, 0x00060600, 0xfffa0600,
-        0x0c0c0600, 0xf3f40600, 0x0c060600, 0xf3fa0600, 0x060c0600, 0xfffffa00, 0x0605fa00, 0xf9f9fa00,
-        0x05fffa00, 0xf9fffa00, 0x0005fa00, 0xfff9fa00, 0x0c0bfa00, 0xf3f3fa00, 0x0c05fa00, 0xf3f9fa00,
-        0x060bfa00, 0x00000006, 0x06060006, 0xf9fa0006, 0x06000006, 0xfa000006, 0x00060006, 0xfffa0006,
-        0x0c0c0006, 0xf3f40006, 0x0c060006, 0xf3fa0006, 0x060c0006, 0xfffffffa, 0x0605fffa, 0xf9f9fffa,
-        0x05fffffa, 0xf9fffffa, 0x0005fffa, 0xfff9fffa, 0x0c0bfffa, 0xf3f3fffa, 0x0c05fffa, 0xf3f9fffa,
-        0x060bfffa, 0x00000c0c, 0x06060c0c, 0xf9fa0c0c, 0x06000c0c, 0xfa000c0c, 0x00060c0c, 0xfffa0c0c,
-        0x0c0c0c0c, 0xf3f40c0c, 0x0c060c0c, 0xf3fa0c0c, 0x060c0c0c, 0xfffff3f4, 0x0605f3f4, 0xf9f9f3f4,
-        0x05fff3f4, 0xf9fff3f4, 0x0005f3f4, 0xfff9f3f4, 0x0c0bf3f4, 0xf3f3f3f4, 0x0c05f3f4, 0xf3f9f3f4,
-        0x060bf3f4, 0x00000c06, 0x06060c06, 0xf9fa0c06, 0x06000c06, 0xfa000c06, 0x00060c06, 0xfffa0c06,
-        0x0c0c0c06, 0xf3f40c06, 0x0c060c06, 0xf3fa0c06, 0x060c0c06, 0xfffff3fa, 0x0605f3fa, 0xf9f9f3fa,
-        0x05fff3fa, 0xf9fff3fa, 0x0005f3fa, 0xfff9f3fa, 0x0c0bf3fa, 0xf3f3f3fa, 0x0c05f3fa, 0xf3f9f3fa,
-        0x060bf3fa, 0x0000060c, 0x0606060c, 0xf9fa060c, 0x0600060c, 0xfa00060c, 0x0006060c, 0xfffa060c,
-        0x0c0c060c, 0xf3f4060c, 0x0c06060c, 0xf3fa060c, 0x060c060c, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000707, 0xfffff8f9, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x00000e0e,
-        0xfffff1f2, 0x00001507, 0xffffeaf9, 0x00000715, 0xfffff8eb, 0x00000df2, 0xfffff20e, 0x000014f9,
-        0xffffeb07, 0xfffff915, 0x000006eb, 0x00001c0e, 0xffffe3f2, 0x00000e1c, 0xfffff1e4, 0x00001c1c,
-        0xffffe3e4, 0x00002300, 0xffffdd00, 0x00000023, 0xffffffdd, 0x00001beb, 0xffffe415, 0xffffeb1c,
-        0x000014e4, 0x00003823, 0xffffc7dd, 0x00002338, 0xffffdcc8, 0x000029f2, 0xffffd60e, 0xfffff22a,
-        0x00000dd6, 0x0000380e, 0xffffc7f2, 0x00000e38, 0xfffff1c8, 0x00003838, 0xffffc7c8, 0x00003f00,
-        0xffffc100, 0x0000003f, 0xffffffc1, 0x000029d6, 0xffffd62a, 0x000037e4, 0xffffc81c, 0xffffe438,
-        0x00001bc8, 0x00005b23, 0xffffa4dd, 0x0000235b, 0xffffdca5, 0x0000623f, 0xffff9dc1, 0x00003f62,
-        0xffffc09e, 0x00004ceb, 0xffffb315, 0xffffeb4d, 0x000014b3, 0x0000620e, 0xffff9df2, 0x00000e62,
-        0xfffff19e, 0x00006969, 0xffff9697, 0x000076f9, 0xffff8907, 0xfffff977, 0x00000689, 0x00004cc1,
-        0xffffb33f, 0xffffc14d, 0x00003eb3, 0x000068cf, 0xffff9731, 0xffffcf69, 0x00003097, 0x00007689,
-        0xffff8977, 0x00002a2a, 0xffffd5d6, 0x00004d4d, 0xffffb2b3, 0x00000000, 0x07070000, 0xf8f90000,
-        0x07000000, 0xf9000000, 0x00070000, 0xfff90000, 0x0e0e0000, 0xf1f20000, 0x15070000, 0xeaf90000,
-        0x07150000, 0x00000707, 0x07070707, 0xf8f90707, 0x07000707, 0xf9000707, 0x00070707, 0xfff90707,
-        0x0e0e0707, 0xf1f20707, 0x15070707, 0xeaf90707, 0x07150707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9,
-        0x06fff8f9, 0xf8fff8f9, 0x0006f8f9, 0xfff8f8f9, 0x0e0df8f9, 0xf1f1f8f9, 0x1506f8f9, 0xeaf8f8f9,
-        0x0714f8f9, 0x00000700, 0x07070700, 0xf8f90700, 0x07000700, 0xf9000700, 0x00070700, 0xfff90700,
-        0x0e0e0700, 0xf1f20700, 0x15070700, 0xeaf90700, 0x07150700, 0xfffff900, 0x0706f900, 0xf8f8f900,
-        0x06fff900, 0xf8fff900, 0x0006f900, 0xfff8f900, 0x0e0df900, 0xf1f1f900, 0x1506f900, 0xeaf8f900,
-        0x0714f900, 0x00000007, 0x07070007, 0xf8f90007, 0x07000007, 0xf9000007, 0x00070007, 0xfff90007,
-        0x0e0e0007, 0xf1f20007, 0x15070007, 0xeaf90007, 0x07150007, 0xfffffff9, 0x0706fff9, 0xf8f8fff9,
-        0x06fffff9, 0xf8fffff9, 0x0006fff9, 0xfff8fff9, 0x0e0dfff9, 0xf1f1fff9, 0x1506fff9, 0xeaf8fff9,
-        0x0714fff9, 0x00000e0e, 0x07070e0e, 0xf8f90e0e, 0x07000e0e, 0xf9000e0e, 0x00070e0e, 0xfff90e0e,
-        0x0e0e0e0e, 0xf1f20e0e, 0x15070e0e, 0xeaf90e0e, 0x07150e0e, 0xfffff1f2, 0x0706f1f2, 0xf8f8f1f2,
-        0x06fff1f2, 0xf8fff1f2, 0x0006f1f2, 0xfff8f1f2, 0x0e0df1f2, 0xf1f1f1f2, 0x1506f1f2, 0xeaf8f1f2,
-        0x0714f1f2, 0x00001507, 0x07071507, 0xf8f91507, 0x07001507, 0xf9001507, 0x00071507, 0xfff91507,
-        0x0e0e1507, 0xf1f21507, 0x15071507, 0xeaf91507, 0x07151507, 0xffffeaf9, 0x0706eaf9, 0xf8f8eaf9,
-        0x06ffeaf9, 0xf8ffeaf9, 0x0006eaf9, 0xfff8eaf9, 0x0e0deaf9, 0xf1f1eaf9, 0x1506eaf9, 0xeaf8eaf9,
-        0x0714eaf9, 0x00000715, 0x07070715, 0xf8f90715, 0x07000715, 0xf9000715, 0x00070715, 0xfff90715,
-        0x0e0e0715, 0xf1f20715, 0x15070715, 0xeaf90715, 0x07150715, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000808, 0xfffff7f8, 0x00000800, 0xfffff800, 0x00000008, 0xfffffff8, 0x00001010,
-        0xffffeff0, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00000ff0, 0xfffff010, 0x000017f8,
-        0xffffe808, 0xfffff818, 0x000007e8, 0x00002010, 0xffffdff0, 0x00001020, 0xffffefe0, 0x00002020,
-        0xffffdfe0, 0x00002800, 0xffffd800, 0x00000028, 0xffffffd8, 0x00001fe8, 0xffffe018, 0xffffe820,
-        0x000017e0, 0x00004028, 0xffffbfd8, 0x00002840, 0xffffd7c0, 0x00002ff0, 0xffffd010, 0xfffff030,
-        0x00000fd0, 0x00004010, 0xffffbff0, 0x00001040, 0xffffefc0, 0x00004040, 0xffffbfc0, 0x00004800,
-        0xffffb800, 0x00000048, 0xffffffb8, 0x00002fd0, 0xffffd030, 0x00003fe0, 0xffffc020, 0xffffe040,
-        0x00001fc0, 0x00006828, 0xffff97d8, 0x00002868, 0xffffd798, 0x00007048, 0xffff8fb8, 0x00004870,
-        0xffffb790, 0x000057e8, 0xffffa818, 0xffffe858, 0x000017a8, 0x00007010, 0xffff8ff0, 0x00001070,
-        0xffffef90, 0x00007878, 0xffff8788, 0x000057b8, 0xffffa848, 0xffffb858, 0x000047a8, 0x000077c8,
-        0xffff8838, 0xffffc878, 0x00003788, 0x00003030, 0xffffcfd0, 0x00005858, 0xffffa7a8, 0x00000000,
-        0x08080000, 0xf7f80000, 0x08000000, 0xf8000000, 0x00080000, 0xfff80000, 0x10100000, 0xeff00000,
-        0x10080000, 0xeff80000, 0x08100000, 0x00000808, 0x08080808, 0xf7f80808, 0x08000808, 0xf8000808,
-        0x00080808, 0xfff80808, 0x10100808, 0xeff00808, 0x10080808, 0xeff80808, 0x08100808, 0xfffff7f8,
-        0x0807f7f8, 0xf7f7f7f8, 0x07fff7f8, 0xf7fff7f8, 0x0007f7f8, 0xfff7f7f8, 0x100ff7f8, 0xefeff7f8,
-        0x1007f7f8, 0xeff7f7f8, 0x080ff7f8, 0x00000800, 0x08080800, 0xf7f80800, 0x08000800, 0xf8000800,
-        0x00080800, 0xfff80800, 0x10100800, 0xeff00800, 0x10080800, 0xeff80800, 0x08100800, 0xfffff800,
-        0x0807f800, 0xf7f7f800, 0x07fff800, 0xf7fff800, 0x0007f800, 0xfff7f800, 0x100ff800, 0xefeff800,
-        0x1007f800, 0xeff7f800, 0x080ff800, 0x00000008, 0x08080008, 0xf7f80008, 0x08000008, 0xf8000008,
-        0x00080008, 0xfff80008, 0x10100008, 0xeff00008, 0x10080008, 0xeff80008, 0x08100008, 0xfffffff8,
-        0x0807fff8, 0xf7f7fff8, 0x07fffff8, 0xf7fffff8, 0x0007fff8, 0xfff7fff8, 0x100ffff8, 0xefeffff8,
-        0x1007fff8, 0xeff7fff8, 0x080ffff8, 0x00001010, 0x08081010, 0xf7f81010, 0x08001010, 0xf8001010,
-        0x00081010, 0xfff81010, 0x10101010, 0xeff01010, 0x10081010, 0xeff81010, 0x08101010, 0xffffeff0,
-        0x0807eff0, 0xf7f7eff0, 0x07ffeff0, 0xf7ffeff0, 0x0007eff0, 0xfff7eff0, 0x100feff0, 0xefefeff0,
-        0x1007eff0, 0xeff7eff0, 0x080feff0, 0x00001008, 0x08081008, 0xf7f81008, 0x08001008, 0xf8001008,
-        0x00081008, 0xfff81008, 0x10101008, 0xeff01008, 0x10081008, 0xeff81008, 0x08101008, 0xffffeff8,
-        0x0807eff8, 0xf7f7eff8, 0x07ffeff8, 0xf7ffeff8, 0x0007eff8, 0xfff7eff8, 0x100feff8, 0xefefeff8,
-        0x1007eff8, 0xeff7eff8, 0x080feff8, 0x00000810, 0x08080810, 0xf7f80810, 0x08000810, 0xf8000810,
-        0x00080810, 0xfff80810, 0x10100810, 0xeff00810, 0x10080810, 0xeff80810, 0x08100810, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000909, 0xfffff6f7, 0x00000900, 0xfffff700, 0x00000009, 0xfffffff7, 0x00001212,
-        0xffffedee, 0x00001b09, 0xffffe4f7, 0x0000091b, 0xfffff6e5, 0x000011ee, 0xffffee12, 0x00001af7,
-        0xffffe509, 0xfffff71b, 0x000008e5, 0x00002412, 0xffffdbee, 0x00001224, 0xffffeddc, 0x00002424,
-        0xffffdbdc, 0x00002d00, 0xffffd300, 0x0000002d, 0xffffffd3, 0x000023e5, 0xffffdc1b, 0xffffe524,
-        0x00001adc, 0x0000482d, 0xffffb7d3, 0x00002d48, 0xffffd2b8, 0x000035ee, 0xffffca12, 0xffffee36,
-        0x000011ca, 0x00004812, 0xffffb7ee, 0x00001248, 0xffffedb8, 0x00004848, 0xffffb7b8, 0x00005100,
-        0xffffaf00, 0x00000051, 0xffffffaf, 0x000035ca, 0xffffca36, 0x000047dc, 0xffffb824, 0xffffdc48,
-        0x000023b8, 0x0000752d, 0xffff8ad3, 0x00002d75, 0xffffd28b, 0x00007e51, 0xffff81af, 0x0000517e,
-        0xffffae82, 0x000062e5, 0xffff9d1b, 0xffffe563, 0x00001a9d, 0x000062af, 0xffff9d51, 0xffffaf63,
-        0x0000509d, 0x00003636, 0xffffc9ca, 0x00006c6c, 0xffff9394, 0x00000000, 0x09090000, 0xf6f70000,
-        0x09000000, 0xf7000000, 0x00090000, 0xfff70000, 0x12120000, 0xedee0000, 0x1b090000, 0xe4f70000,
-        0x091b0000, 0xf6e50000, 0x00000909, 0x09090909, 0xf6f70909, 0x09000909, 0xf7000909, 0x00090909,
-        0xfff70909, 0x12120909, 0xedee0909, 0x1b090909, 0xe4f70909, 0x091b0909, 0xf6e50909, 0xfffff6f7,
-        0x0908f6f7, 0xf6f6f6f7, 0x08fff6f7, 0xf6fff6f7, 0x0008f6f7, 0xfff6f6f7, 0x1211f6f7, 0xededf6f7,
-        0x1b08f6f7, 0xe4f6f6f7, 0x091af6f7, 0xf6e4f6f7, 0x00000900, 0x09090900, 0xf6f70900, 0x09000900,
-        0xf7000900, 0x00090900, 0xfff70900, 0x12120900, 0xedee0900, 0x1b090900, 0xe4f70900, 0x091b0900,
-        0xf6e50900, 0xfffff700, 0x0908f700, 0xf6f6f700, 0x08fff700, 0xf6fff700, 0x0008f700, 0xfff6f700,
-        0x1211f700, 0xededf700, 0x1b08f700, 0xe4f6f700, 0x091af700, 0xf6e4f700, 0x00000009, 0x09090009,
-        0xf6f70009, 0x09000009, 0xf7000009, 0x00090009, 0xfff70009, 0x12120009, 0xedee0009, 0x1b090009,
-        0xe4f70009, 0x091b0009, 0xf6e50009, 0xfffffff7, 0x0908fff7, 0xf6f6fff7, 0x08fffff7, 0xf6fffff7,
-        0x0008fff7, 0xfff6fff7, 0x1211fff7, 0xededfff7, 0x1b08fff7, 0xe4f6fff7, 0x091afff7, 0xf6e4fff7,
-        0x00001212, 0x09091212, 0xf6f71212, 0x09001212, 0xf7001212, 0x00091212, 0xfff71212, 0x12121212,
-        0xedee1212, 0x1b091212, 0xe4f71212, 0x091b1212, 0xf6e51212, 0xffffedee, 0x0908edee, 0xf6f6edee,
-        0x08ffedee, 0xf6ffedee, 0x0008edee, 0xfff6edee, 0x1211edee, 0xedededee, 0x1b08edee, 0xe4f6edee,
-        0x091aedee, 0xf6e4edee, 0x00001b09, 0x09091b09, 0xf6f71b09, 0x09001b09, 0xf7001b09, 0x00091b09,
-        0xfff71b09, 0x12121b09, 0xedee1b09, 0x1b091b09, 0xe4f71b09, 0x091b1b09, 0xf6e51b09, 0xffffe4f7,
-        0x0908e4f7, 0xf6f6e4f7, 0x08ffe4f7, 0xf6ffe4f7, 0x0008e4f7, 0xfff6e4f7, 0x1211e4f7, 0xedede4f7,
-        0x1b08e4f7, 0xe4f6e4f7, 0x091ae4f7, 0xf6e4e4f7, 0x0000091b, 0x0909091b, 0xf6f7091b, 0x0900091b,
-        0xf700091b, 0x0009091b, 0xfff7091b, 0x1212091b, 0xedee091b, 0x1b09091b, 0xe4f7091b, 0x091b091b,
-        0xf6e5091b, 0xfffff6e5, 0x0908f6e5, 0xf6f6f6e5, 0x08fff6e5, 0xf6fff6e5, 0x0008f6e5, 0xfff6f6e5,
-        0x1211f6e5, 0xededf6e5, 0x1b08f6e5, 0xe4f6f6e5, 0x091af6e5, 0xf6e4f6e5, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,
-        0xfffff9fa, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x000004fb, 0xfffffb05, 0xfffffb05,
-        0x000004fb, 0x00000b06, 0xfffff4fa, 0x0000060b, 0xfffff9f5, 0x00000800, 0xfffff800, 0x00000008,
-        0xfffffff8, 0x00000b0b, 0xfffff4f5, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x0000110c,
-        0xffffeef4, 0x00000c11, 0xfffff3ef, 0x00001111, 0xffffeeef, 0x00001206, 0xffffedfa, 0x00000612,
-        0xfffff9ee, 0x00000af8, 0xfffff508, 0xfffff80b, 0x000007f5, 0x00000f00, 0xfffff100, 0x0000000f,
-        0xfffffff1, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00001912, 0xffffe6ee, 0x00001219,
-        0xffffede7, 0x0000190b, 0xffffe6f5, 0x00000b19, 0xfffff4e7, 0x00001919, 0xffffe6e7, 0x00000df2,
-        0xfffff20e, 0xfffff20e, 0x00000df2, 0x00001a00, 0xffffe600, 0x0000001a, 0xffffffe6, 0x000011f5,
-        0xffffee0b, 0xfffff512, 0x00000aee, 0x000015f9, 0xffffea07, 0xfffff916, 0x000006ea, 0x0000221a,
-        0xffffdde6, 0x00001a22, 0xffffe5de, 0x00002212, 0xffffddee, 0x00001222, 0xffffedde, 0x00002222,
-        0xffffddde, 0x0000230b, 0xffffdcf5, 0x00000b23, 0xfffff4dd, 0x00001d00, 0xffffe300, 0x0000001d,
-        0xffffffe3, 0x000015ed, 0xffffea13, 0xffffed16, 0x000012ea, 0x000019f1, 0xffffe60f, 0xfffff11a,
-        0x00000ee6, 0x00002500, 0xffffdb00, 0x00000025, 0xffffffdb, 0x00002c1b, 0xffffd3e5, 0x00001b2c,
-        0xffffe4d4, 0x00002c24, 0xffffd3dc, 0x0000242c, 0xffffdbd4, 0x00002c12, 0xffffd3ee, 0x0000122c,
-        0xffffedd4, 0x000020f6, 0xffffdf0a, 0xfffff621, 0x000009df, 0x00002d2d, 0xffffd2d3, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,
-        0xfffff9fa, 0x00000700, 0xfffff900, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020300, 0x0201fd00,
-        0x02020003, 0x0201fffd, 0x02020606, 0x0201f9fa, 0x02020700, 0x0201f900, 0xfdfe0000, 0xfdfe0202,
-        0xfdfdfdfe, 0xfdfe0300, 0xfdfdfd00, 0xfdfe0003, 0xfdfdfffd, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0700,
-        0xfdfdf900, 0x03000000, 0x03000202, 0x02fffdfe, 0x03000300, 0x02fffd00, 0x03000003, 0x02fffffd,
-        0x03000606, 0x02fff9fa, 0x03000700, 0x02fff900, 0xfd000000, 0xfd000202, 0xfcfffdfe, 0xfd000300,
-        0xfcfffd00, 0xfd000003, 0xfcfffffd, 0xfd000606, 0xfcfff9fa, 0xfd000700, 0xfcfff900, 0x00030000,
-        0x00030202, 0x0002fdfe, 0x00030300, 0x0002fd00, 0x00030003, 0x0002fffd, 0x00030606, 0x0002f9fa,
-        0x00030700, 0x0002f900, 0xfffd0000, 0xfffd0202, 0xfffcfdfe, 0xfffd0300, 0xfffcfd00, 0xfffd0003,
-        0xfffcfffd, 0xfffd0606, 0xfffcf9fa, 0xfffd0700, 0xfffcf900, 0x06060000, 0x06060202, 0x0605fdfe,
-        0x06060300, 0x0605fd00, 0x06060003, 0x0605fffd, 0x06060606, 0x0605f9fa, 0x06060700, 0x0605f900,
-        0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0300, 0xf9f9fd00, 0xf9fa0003, 0xf9f9fffd, 0xf9fa0606,
-        0xf9f9f9fa, 0xf9fa0700, 0xf9f9f900, 0x07000000, 0x07000202, 0x06fffdfe, 0x07000300, 0x06fffd00,
-        0x07000003, 0x06fffffd, 0x07000606, 0x06fff9fa, 0x07000700, 0x06fff900, 0xf9000000, 0xf9000202,
-        0xf8fffdfe, 0xf9000300, 0xf8fffd00, 0xf9000003, 0xf8fffffd, 0xf9000606, 0xf8fff9fa, 0xf9000700,
-        0xf8fff900, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606,
-        0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x000003fc, 0xfffffc04, 0xfffffa0a,
-        0x000005f6, 0xfffff400, 0x00000c00, 0xfffff3fa, 0xfffff406, 0x00000bfa, 0x00000c06, 0xfffffff2,
-        0x0000000e, 0x00000c0c, 0xfffff3f4, 0xffffee00, 0x00001200, 0xfffff40e, 0x00000bf2, 0xfffff9ee,
-        0xfffffa12, 0x000005ee, 0x00000612, 0xffffedf6, 0xffffee0a, 0x000011f6, 0x0000120a, 0xffffffea,
-        0x00000016, 0xffffe800, 0x00001800, 0xfffff3ea, 0xfffff416, 0x00000bea, 0x00000c16, 0xffffe7f8,
-        0xffffe808, 0x000017f8, 0x00001808, 0xfffff9e6, 0xfffffa1a, 0x000005e6, 0x0000061a, 0xffffffe4,
-        0x0000001c, 0x00001414, 0xffffebec, 0xffffe5f2, 0x00001a0e, 0xfffff3e2, 0x00000c1e, 0xffffdff6,
-        0x0000200a, 0xffffdfee, 0x00002012, 0xffffe5e6, 0x00001a1a, 0xffffebde, 0x00001422, 0xfffff3da,
-        0x00000c26, 0xffffdfe0, 0x00002020, 0x00002020, 0xffffd7ea, 0xffffddde, 0x00002222, 0x00000000,
-        0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa,
-        0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002,
-        0x01fffffe, 0x02000202, 0x01fffdfe, 0x02000606, 0x01fff9fa, 0x02000600, 0x01fffa00, 0x02000006,
-        0x01fffffa, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000202, 0xfdfffdfe,
-        0xfe000606, 0xfdfff9fa, 0xfe000600, 0xfdfffa00, 0xfe000006, 0xfdfffffa, 0x00020000, 0x00020200,
-        0x0001fe00, 0x00020002, 0x0001fffe, 0x00020202, 0x0001fdfe, 0x00020606, 0x0001f9fa, 0x00020600,
-        0x0001fa00, 0x00020006, 0x0001fffa, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe,
-        0xfffe0202, 0xfffdfdfe, 0xfffe0606, 0xfffdf9fa, 0xfffe0600, 0xfffdfa00, 0xfffe0006, 0xfffdfffa,
-        0x02020000, 0x02020200, 0x0201fe00, 0x02020002, 0x0201fffe, 0x02020202, 0x0201fdfe, 0x02020606,
-        0x0201f9fa, 0x02020600, 0x0201fa00, 0x02020006, 0x0201fffa, 0xfdfe0000, 0xfdfe0200, 0xfdfdfe00,
-        0xfdfe0002, 0xfdfdfffe, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0600, 0xfdfdfa00,
-        0xfdfe0006, 0xfdfdfffa, 0x06060000, 0x06060200, 0x0605fe00, 0x06060002, 0x0605fffe, 0x06060202,
-        0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060600, 0x0605fa00, 0x06060006, 0x0605fffa, 0xf9fa0000,
-        0xf9fa0200, 0xf9f9fe00, 0xf9fa0002, 0xf9f9fffe, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,
-        0xf9fa0600, 0xf9f9fa00, 0xf9fa0006, 0xf9f9fffa, 0x06000000, 0x06000200, 0x05fffe00, 0x06000002,
-        0x05fffffe, 0x06000202, 0x05fffdfe, 0x06000606, 0x05fff9fa, 0x06000600, 0x05fffa00, 0x06000006,
-        0x05fffffa, 0xfa000000, 0xfa000200, 0xf9fffe00, 0xfa000002, 0xf9fffffe, 0xfa000202, 0xf9fffdfe,
-        0xfa000606, 0xf9fff9fa, 0xfa000600, 0xf9fffa00, 0xfa000006, 0xf9fffffa, 0x00060000, 0x00060200,
-        0x0005fe00, 0x00060002, 0x0005fffe, 0x00060202, 0x0005fdfe, 0x00060606, 0x0005f9fa, 0x00060600,
-        0x0005fa00, 0x00060006, 0x0005fffa, 0xfffa0000, 0xfffa0200, 0xfff9fe00, 0xfffa0002, 0xfff9fffe,
-        0xfffa0202, 0xfff9fdfe, 0xfffa0606, 0xfff9f9fa, 0xfffa0600, 0xfff9fa00, 0xfffa0006, 0xfff9fffa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a,
-        0xfffff5f6, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000005fa, 0xfffffa06, 0xfffff80e,
-        0x000007f2, 0xffffffee, 0x00000012, 0xfffff00a, 0x00000ff6, 0xffffe800, 0x00001800, 0xfffff7e8,
-        0xfffff818, 0x000007e8, 0x00000818, 0x00001212, 0xffffedee, 0xfffff014, 0x00000fec, 0xffffe5f2,
-        0xffffe60e, 0x000019f2, 0x00001a0e, 0xffffffe2, 0x0000001e, 0xffffde00, 0x00002200, 0xfffff7de,
-        0xfffff822, 0x000007de, 0x00000822, 0xffffede2, 0xffffee1e, 0x000011e2, 0x0000121e, 0xffffddf6,
-        0xffffde0a, 0x000021f6, 0x0000220a, 0xffffddec, 0x00002214, 0xffffffd8, 0x00000028, 0x00001e1e,
-        0xffffe1e2, 0xffffedd8, 0x00001228, 0xffffd400, 0x00002c00, 0xffffd3f0, 0x00002c10, 0xffffdbdc,
-        0xffffdbdc, 0x00002424, 0xffffd3e6, 0x00002c1a, 0xffffe5d2, 0x00001a2e, 0xffffedcc, 0x00001234,
-        0xffffc9ec, 0xffffd3d4, 0x00002c2c, 0xffffc9e0, 0xffffd1d2, 0xffffd1d2, 0x00002e2e, 0x00000000,
-        0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a, 0xfffff5f6,
-        0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002,
-        0x01fffffe, 0x02000404, 0x01fffbfc, 0x02000a0a, 0x01fff5f6, 0x02000a00, 0x01fff600, 0x0200000a,
-        0x01fffff6, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000404, 0xfdfffbfc,
-        0xfe000a0a, 0xfdfff5f6, 0xfe000a00, 0xfdfff600, 0xfe00000a, 0xfdfffff6, 0x00020000, 0x00020200,
-        0x0001fe00, 0x00020002, 0x0001fffe, 0x00020404, 0x0001fbfc, 0x00020a0a, 0x0001f5f6, 0x00020a00,
-        0x0001f600, 0x0002000a, 0x0001fff6, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe,
-        0xfffe0404, 0xfffdfbfc, 0xfffe0a0a, 0xfffdf5f6, 0xfffe0a00, 0xfffdf600, 0xfffe000a, 0xfffdfff6,
-        0x04040000, 0x04040200, 0x0403fe00, 0x04040002, 0x0403fffe, 0x04040404, 0x0403fbfc, 0x04040a0a,
-        0x0403f5f6, 0x04040a00, 0x0403f600, 0x0404000a, 0x0403fff6, 0xfbfc0000, 0xfbfc0200, 0xfbfbfe00,
-        0xfbfc0002, 0xfbfbfffe, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0a0a, 0xfbfbf5f6, 0xfbfc0a00, 0xfbfbf600,
-        0xfbfc000a, 0xfbfbfff6, 0x0a0a0000, 0x0a0a0200, 0x0a09fe00, 0x0a0a0002, 0x0a09fffe, 0x0a0a0404,
-        0x0a09fbfc, 0x0a0a0a0a, 0x0a09f5f6, 0x0a0a0a00, 0x0a09f600, 0x0a0a000a, 0x0a09fff6, 0xf5f60000,
-        0xf5f60200, 0xf5f5fe00, 0xf5f60002, 0xf5f5fffe, 0xf5f60404, 0xf5f5fbfc, 0xf5f60a0a, 0xf5f5f5f6,
-        0xf5f60a00, 0xf5f5f600, 0xf5f6000a, 0xf5f5fff6, 0x0a000000, 0x0a000200, 0x09fffe00, 0x0a000002,
-        0x09fffffe, 0x0a000404, 0x09fffbfc, 0x0a000a0a, 0x09fff5f6, 0x0a000a00, 0x09fff600, 0x0a00000a,
-        0x09fffff6, 0xf6000000, 0xf6000200, 0xf5fffe00, 0xf6000002, 0xf5fffffe, 0xf6000404, 0xf5fffbfc,
-        0xf6000a0a, 0xf5fff5f6, 0xf6000a00, 0xf5fff600, 0xf600000a, 0xf5fffff6, 0x000a0000, 0x000a0200,
-        0x0009fe00, 0x000a0002, 0x0009fffe, 0x000a0404, 0x0009fbfc, 0x000a0a0a, 0x0009f5f6, 0x000a0a00,
-        0x0009f600, 0x000a000a, 0x0009fff6, 0xfff60000, 0xfff60200, 0xfff5fe00, 0xfff60002, 0xfff5fffe,
-        0xfff60404, 0xfff5fbfc, 0xfff60a0a, 0xfff5f5f6, 0xfff60a00, 0xfff5f600, 0xfff6000a, 0xfff5fff6,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c,
-        0xfffff3f4, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x000007f8, 0xfffff808, 0xfffff008,
-        0x00000ff8, 0xffffe800, 0x00001800, 0xfffff7e8, 0xfffff818, 0x000007e8, 0x00000818, 0xfffff014,
-        0x00000fec, 0xffffffe4, 0x0000001c, 0xffffe7f0, 0xffffe810, 0x000017f0, 0x00001810, 0xffffe000,
-        0x00002000, 0xffffefe4, 0xfffff01c, 0x00000fe4, 0x0000101c, 0xffffdff8, 0xffffe008, 0xfffff7e0,
-        0xfffff820, 0x000007e0, 0x00000820, 0x00001ff8, 0x00002008, 0x00001818, 0xffffe7e8, 0xffffe818,
-        0x000017e8, 0xffffdfec, 0x00002014, 0xffffffd8, 0x00000028, 0xffffefd8, 0x00001028, 0xffffd400,
-        0xffffd400, 0xffffffd4, 0x0000002c, 0x00002c00, 0x00002c00, 0xffffdfe0, 0x00002020, 0xffffd3f0,
-        0x00002c10, 0xffffd3e8, 0xffffe7d4, 0x0000182c, 0x00002c18, 0xffffefd0, 0x00001030, 0xffffdbdc,
-        0xffffdbdc, 0x00002424, 0x00002424, 0xffffcbec, 0x00002828, 0xffffd7d8, 0xffffcbe0, 0x00000000,
-        0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c, 0xfffff3f4,
-        0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x04000000, 0x04000400, 0x03fffc00, 0x04000004,
-        0x03fffffc, 0x04000404, 0x03fffbfc, 0x04000c0c, 0x03fff3f4, 0x04000c00, 0x03fff400, 0x0400000c,
-        0x03fffff4, 0xfc000000, 0xfc000400, 0xfbfffc00, 0xfc000004, 0xfbfffffc, 0xfc000404, 0xfbfffbfc,
-        0xfc000c0c, 0xfbfff3f4, 0xfc000c00, 0xfbfff400, 0xfc00000c, 0xfbfffff4, 0x00040000, 0x00040400,
-        0x0003fc00, 0x00040004, 0x0003fffc, 0x00040404, 0x0003fbfc, 0x00040c0c, 0x0003f3f4, 0x00040c00,
-        0x0003f400, 0x0004000c, 0x0003fff4, 0xfffc0000, 0xfffc0400, 0xfffbfc00, 0xfffc0004, 0xfffbfffc,
-        0xfffc0404, 0xfffbfbfc, 0xfffc0c0c, 0xfffbf3f4, 0xfffc0c00, 0xfffbf400, 0xfffc000c, 0xfffbfff4,
-        0x04040000, 0x04040400, 0x0403fc00, 0x04040004, 0x0403fffc, 0x04040404, 0x0403fbfc, 0x04040c0c,
-        0x0403f3f4, 0x04040c00, 0x0403f400, 0x0404000c, 0x0403fff4, 0xfbfc0000, 0xfbfc0400, 0xfbfbfc00,
-        0xfbfc0004, 0xfbfbfffc, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0c0c, 0xfbfbf3f4, 0xfbfc0c00, 0xfbfbf400,
-        0xfbfc000c, 0xfbfbfff4, 0x0c0c0000, 0x0c0c0400, 0x0c0bfc00, 0x0c0c0004, 0x0c0bfffc, 0x0c0c0404,
-        0x0c0bfbfc, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c0c00, 0x0c0bf400, 0x0c0c000c, 0x0c0bfff4, 0xf3f40000,
-        0xf3f40400, 0xf3f3fc00, 0xf3f40004, 0xf3f3fffc, 0xf3f40404, 0xf3f3fbfc, 0xf3f40c0c, 0xf3f3f3f4,
-        0xf3f40c00, 0xf3f3f400, 0xf3f4000c, 0xf3f3fff4, 0x0c000000, 0x0c000400, 0x0bfffc00, 0x0c000004,
-        0x0bfffffc, 0x0c000404, 0x0bfffbfc, 0x0c000c0c, 0x0bfff3f4, 0x0c000c00, 0x0bfff400, 0x0c00000c,
-        0x0bfffff4, 0xf4000000, 0xf4000400, 0xf3fffc00, 0xf4000004, 0xf3fffffc, 0xf4000404, 0xf3fffbfc,
-        0xf4000c0c, 0xf3fff3f4, 0xf4000c00, 0xf3fff400, 0xf400000c, 0xf3fffff4, 0x000c0000, 0x000c0400,
-        0x000bfc00, 0x000c0004, 0x000bfffc, 0x000c0404, 0x000bfbfc, 0x000c0c0c, 0x000bf3f4, 0x000c0c00,
-        0x000bf400, 0x000c000c, 0x000bfff4, 0xfff40000, 0xfff40400, 0xfff3fc00, 0xfff40004, 0xfff3fffc,
-        0xfff40404, 0xfff3fbfc, 0xfff40c0c, 0xfff3f3f4, 0xfff40c00, 0xfff3f400, 0xfff4000c, 0xfff3fff4,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,
-        0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,
-        0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,
-        0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,
-        0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,
-        0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,
-        0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,
-        0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,
-        0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,
-        0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,
-        0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,
-        0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,
-        0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,
-        0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,
-        0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,
-        0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,
-        0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,
-        0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,
-        0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,
-        0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,
-        0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,
-        0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,
-        0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,
-        0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,
-        0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,
-        0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,
-        0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,
-        0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,
-        0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,
-        0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,
-        0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,
-        0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,
-        0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,
-        0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,
-        0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,
-        0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,
-        0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,
-        0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,
-        0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,
-        0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,
-        0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,
-        0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,
-        0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,
-        0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,
-        0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,
-        0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,
-        0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,
-        0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,
-        0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,
-        0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,
-        0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,
-        0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,
-        0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,
-        0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,
-        0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,
-        0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,
-        0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,
-        0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,
-        0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,
-        0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,
-        0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,
-        0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,
-        0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,
-        0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,
-        0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,
-        0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,
-        0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,
-        0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,
-        0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,
-        0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,
-        0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,
-        0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,
-        0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,
-        0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,
-        0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,
-        0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,
-        0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,
-        0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,
-        0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,
-        0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,
-        0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,
-        0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,
-        0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,
-        0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,
-        0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-};
-
-
-static const uint32_t correctionloworder[] = {
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x04040404,
-        0xfbfbfbfc, 0x05050101, 0xfafafeff, 0x01010505, 0xfefefafb, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe,
-        0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x09090404, 0xf6f6fbfc, 0x04040909, 0xfbfbf6f7, 0x09090909,
-        0xf6f6f6f7, 0x0a0a0101, 0xf5f5feff, 0x01010a0a, 0xfefef5f6, 0x0807fafb, 0xf7f80505, 0xfafb0808,
-        0x0504f7f8, 0x0f0f0909, 0xf0f0f6f7, 0x09090f0f, 0xf6f6f0f1, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,
-        0x0302f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000,
-        0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff6f7, 0xeff00909, 0xf6f71010,
-        0x0908eff0, 0x1b1b0b0b, 0xe4e4f4f5, 0x0b0b1b1b, 0xf4f4e4e5, 0x1c1c1313, 0xe3e3eced, 0x13131c1c,
-        0xecece3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1d1d0404, 0xe2e2fbfc, 0x04041d1d,
-        0xfbfbe2e3, 0x1e1e1e1e, 0xe1e1e1e2, 0x2120fdfe, 0xdedf0202, 0xfdfe2121, 0x0201dedf, 0x1716edee,
-        0xe8e91212, 0xedee1717, 0x1211e8e9, 0x1e1df0f1, 0xe1e20f0f, 0xf0f11e1e, 0x0f0ee1e2, 0x2e2e1616,
-        0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31312323,
-        0xcecedcdd, 0x23233131, 0xdcdccecf, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929, 0x0b0ad6d7, 0x33330404,
-        0xccccfbfc, 0x04043333, 0xfbfbcccd, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e2e3,
-        0xd5d61d1d, 0xe2e32a2a, 0x1d1cd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1b1b,
-        0xb3b3e4e5, 0x1b1b4c4c, 0xe4e4b3b4, 0x4d4d2b2b, 0xb2b2d4d5, 0x2b2b4d4d, 0xd4d4b2b3, 0x3736e7e8,
-        0xc8c91818, 0xe7e83737, 0x1817c8c9, 0x4f4f0e0e, 0xb0b0f1f2, 0x0e0e4f4f, 0xf1f1b0b1, 0x53533f3f,
-        0xacacc0c1, 0x3f3f5353, 0xc0c0acad, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202,
-        0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5d5d5d5d, 0xa2a2a2a3, 0x3d3ccbcc, 0xc2c33434, 0xcbcc3d3d,
-        0x3433c2c3, 0x78783434, 0x8787cbcc, 0x34347878, 0xcbcb8788, 0x4b4ad2d3, 0xb4b52d2d, 0xd2d34b4b,
-        0x2d2cb4b5, 0x7d7d4b4b, 0x8282b4b5, 0x4b4b7d7d, 0xb4b48283, 0x7a7a2121, 0x8585dedf, 0x21217a7a,
-        0xdede8586, 0x6766f2f3, 0x98990d0d, 0xf2f36767, 0x0d0c9899, 0x605fd7d8, 0x9fa02828, 0xd7d86060,
-        0x28279fa0, 0x7f7eddde, 0x80812222, 0xddde7f7f, 0x22218081, 0x5958a6a7, 0xa6a75959, 0x6968b1b2,
-        0x96974e4e, 0xb1b26969, 0x4e4d9697, 0x0c0c0c0c, 0xf3f3f3f4, 0x17171717, 0xe8e8e8e9, 0x2a2a2a2a,
-        0xd5d5d5d6, 0x49494949, 0xb6b6b6b7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0xfcfd0101,
-        0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfeff0303, 0xfeff0303,
-        0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd,
-        0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707,
-        0xf8f8f8f9, 0x08080202, 0xf7f7fdfe, 0x02020808, 0xfdfdf7f8, 0x0908fdfe, 0xf6f70202, 0xfdfe0909,
-        0x0201f6f7, 0x0605f9fa, 0xf9fa0606, 0x0d0d0606, 0xf2f2f9fa, 0x06060d0d, 0xf9f9f2f3, 0x0d0d0d0d,
-        0xf2f2f2f3, 0x0e0e0101, 0xf1f1feff, 0x01010e0e, 0xfefef1f2, 0x0c0bf7f8, 0xf3f40808, 0xf7f80c0c,
-        0x0807f3f4, 0x17170e0e, 0xe8e8f1f2, 0x0e0e1717, 0xf1f1e8e9, 0x1211fafb, 0xedee0505, 0xfafb1212,
-        0x0504edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1afeff,
-        0xe4e50101, 0xfeff1b1b, 0x0100e4e5, 0x1110eeef, 0xeeef1111, 0x1716f2f3, 0xe8e90d0d, 0xf2f31717,
-        0x0d0ce8e9, 0x28281010, 0xd7d7eff0, 0x10102828, 0xefefd7d8, 0x29291c1c, 0xd6d6e3e4, 0x1c1c2929,
-        0xe3e3d6d7, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2b2b0606, 0xd4d4f9fa, 0x06062b2b,
-        0xf9f9d4d5, 0x2e2e2e2e, 0xd1d1d1d2, 0x3231fbfc, 0xcdce0404, 0xfbfc3232, 0x0403cdce, 0x2221e4e5,
-        0xddde1b1b, 0xe4e52222, 0x1b1addde, 0x2d2ce9ea, 0xd2d31616, 0xe9ea2d2d, 0x1615d2d3, 0x45452222,
-        0xbabaddde, 0x22224545, 0xddddbabb, 0x46461313, 0xb9b9eced, 0x13134646, 0xececb9ba, 0x49493535,
-        0xb6b6cacb, 0x35354949, 0xcacab6b7, 0x3e3deeef, 0xc1c21111, 0xeeef3e3e, 0x1110c1c2, 0x4d4d0505,
-        0xb2b2fafb, 0x05054d4d, 0xfafab2b3, 0x52525252, 0xadadadae, 0x3332cccd, 0xcccd3333, 0x403fd4d5,
-        0xbfc02b2b, 0xd4d54040, 0x2b2abfc0, 0x5a59f5f6, 0xa5a60a0a, 0xf5f65a5a, 0x0a09a5a6, 0x72722929,
-        0x8d8dd6d7, 0x29297272, 0xd6d68d8e, 0x74744040, 0x8b8bbfc0, 0x40407474, 0xbfbf8b8c, 0x5251dadb,
-        0xadae2525, 0xdadb5252, 0x2524adae, 0x77771616, 0x8888e9ea, 0x16167777, 0xe9e98889, 0x7c7c5f5f,
-        0x8383a0a1, 0x5f5f7c7c, 0xa0a08384, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5c5bb1b2,
-        0xa3a44e4e, 0xb1b25c5c, 0x4e4da3a4, 0x7170bbbc, 0x8e8f4444, 0xbbbc7171, 0x44438e8f, 0x12121212,
-        0xedededee, 0x22222222, 0xddddddde, 0x3f3f3f3f, 0xc0c0c0c1, 0x6d6d6d6d, 0x92929293, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303,
-        0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd,
-        0xfcfcfcfd, 0xfcfcfcfd, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff,
-        0x0403feff, 0x0403feff, 0x0403feff, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101,
-        0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404,
-        0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc,
-        0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x07070707, 0x07070707,
-        0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9,
-        0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303,
-        0xf5f5fcfd, 0x03030a0a, 0xfcfcf5f6, 0x09090909, 0xf6f6f6f7, 0x0706f8f9, 0xf8f90707, 0x0c0bfcfd,
-        0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x11110808, 0xeeeef7f8, 0x08081111, 0xf7f7eeef, 0x11111111,
-        0xeeeeeeef, 0x13130101, 0xececfeff, 0x01011313, 0xfefeeced, 0x100ff4f5, 0xeff00b0b, 0xf4f51010,
-        0x0b0aeff0, 0x1716f9fa, 0xe8e90606, 0xf9fa1717, 0x0605e8e9, 0x1f1f1212, 0xe0e0edee, 0x12121f1f,
-        0xedede0e1, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x21212121, 0xdedededf, 0x2423feff,
-        0xdbdc0101, 0xfeff2424, 0x0100dbdc, 0x1716e8e9, 0xe8e91717, 0x1f1eeeef, 0xe0e11111, 0xeeef1f1f,
-        0x1110e0e1, 0x36361515, 0xc9c9eaeb, 0x15153636, 0xeaeac9ca, 0x37372525, 0xc8c8dadb, 0x25253737,
-        0xdadac8c9, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x39390808, 0xc6c6f7f8, 0x08083939,
-        0xf7f7c6c7, 0x3d3d3d3d, 0xc2c2c2c3, 0x4241fafb, 0xbdbe0505, 0xfafb4242, 0x0504bdbe, 0x2d2cdbdc,
-        0xd2d32424, 0xdbdc2d2d, 0x2423d2d3, 0x3c3be2e3, 0xc3c41d1d, 0xe2e33c3c, 0x1d1cc3c4, 0x5c5c2d2d,
-        0xa3a3d2d3, 0x2d2d5c5c, 0xd2d2a3a4, 0x5d5d1919, 0xa2a2e6e7, 0x19195d5d, 0xe6e6a2a3, 0x61614747,
-        0x9e9eb8b9, 0x47476161, 0xb8b89e9f, 0x5352e9ea, 0xacad1616, 0xe9ea5353, 0x1615acad, 0x66660707,
-        0x9999f8f9, 0x07076666, 0xf8f8999a, 0x6d6d6d6d, 0x92929293, 0x4443bbbc, 0xbbbc4444, 0x5554c6c7,
-        0xaaab3939, 0xc6c75555, 0x3938aaab, 0x7877f2f3, 0x87880d0d, 0xf2f37878, 0x0d0c8788, 0x6e6dcecf,
-        0x91923131, 0xcecf6e6e, 0x31309192, 0x7b7a9798, 0x84856868, 0x97987b7b, 0x68678485, 0x18181818,
-        0xe7e7e7e8, 0x2e2e2e2e, 0xd1d1d1d2, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,
-        0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff,
-        0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0xfafb0101, 0xfafb0101, 0xfafb0101,
-        0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfeff0505,
-        0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505,
-        0xfeff0505, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb,
-        0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303,
-        0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd,
-        0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0x03030a0a,
-        0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a,
-        0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b,
-        0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x03030d0d, 0xfcfcf2f3, 0x0908f6f7, 0xf6f70909, 0x0f0efbfc,
-        0xf0f10404, 0xfbfc0f0f, 0x0403f0f1, 0x16160b0b, 0xe9e9f4f5, 0x0b0b1616, 0xf4f4e9ea, 0x15151515,
-        0xeaeaeaeb, 0x18180202, 0xe7e7fdfe, 0x02021818, 0xfdfde7e8, 0x1413f1f2, 0xebec0e0e, 0xf1f21414,
-        0x0e0debec, 0x26261717, 0xd9d9e8e9, 0x17172626, 0xe8e8d9da, 0x1d1cf7f8, 0xe2e30808, 0xf7f81d1d,
-        0x0807e2e3, 0x27270b0b, 0xd8d8f4f5, 0x0b0b2727, 0xf4f4d8d9, 0x29292929, 0xd6d6d6d7, 0x2d2cfeff,
-        0xd2d30101, 0xfeff2d2d, 0x0100d2d3, 0x1d1ce2e3, 0xe2e31d1d, 0x2726e9ea, 0xd8d91616, 0xe9ea2727,
-        0x1615d8d9, 0x43431b1b, 0xbcbce4e5, 0x1b1b4343, 0xe4e4bcbd, 0x45452f2f, 0xbabad0d1, 0x2f2f4545,
-        0xd0d0babb, 0x3837f0f1, 0xc7c80f0f, 0xf0f13838, 0x0f0ec7c8, 0x47470b0b, 0xb8b8f4f5, 0x0b0b4747,
-        0xf4f4b8b9, 0x4c4c4c4c, 0xb3b3b3b4, 0x5352f9fa, 0xacad0606, 0xf9fa5353, 0x0605acad, 0x3938d2d3,
-        0xc6c72d2d, 0xd2d33939, 0x2d2cc6c7, 0x4b4adbdc, 0xb4b52424, 0xdbdc4b4b, 0x2423b4b5, 0x73733838,
-        0x8c8cc7c8, 0x38387373, 0xc7c78c8d, 0x75751f1f, 0x8a8ae0e1, 0x1f1f7575, 0xe0e08a8b, 0x7a7a5858,
-        0x8585a7a8, 0x58587a7a, 0xa7a78586, 0x6867e3e4, 0x97981c1c, 0xe3e46868, 0x1c1b9798, 0x5554aaab,
-        0xaaab5555, 0x6a69b7b8, 0x95964848, 0xb7b86a6a, 0x48479596, 0x1e1e1e1e, 0xe1e1e1e2, 0x3a3a3a3a,
-        0xc5c5c5c6, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505,
-        0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505,
-        0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb,
-        0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe,
-        0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0xf8f90202,
-        0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202,
-        0xf8f90202, 0xf8f90202, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707,
-        0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9,
-        0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9,
-        0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b,
-        0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5,
-        0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0x0d0d0303, 0x0d0d0303,
-        0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303,
-        0x0d0d0303, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd,
-        0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d,
-        0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0xfbfbf0f1, 0x0b0af4f5, 0xf4f50b0b, 0x1211fafb,
-        0xedee0505, 0xfafb1212, 0x0504edee, 0x1a1a0d0d, 0xe5e5f2f3, 0x0d0d1a1a, 0xf2f2e5e6, 0x1a1a1a1a,
-        0xe5e5e5e6, 0x1d1d0202, 0xe2e2fdfe, 0x02021d1d, 0xfdfde2e3, 0x1817eff0, 0xe7e81010, 0xeff01818,
-        0x100fe7e8, 0x2e2e1c1c, 0xd1d1e3e4, 0x1c1c2e2e, 0xe3e3d1d2, 0x2322f6f7, 0xdcdd0909, 0xf6f72323,
-        0x0908dcdd, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31313131, 0xcecececf, 0x3635feff,
-        0xc9ca0101, 0xfeff3636, 0x0100c9ca, 0x2322dcdd, 0xdcdd2323, 0x2f2ee5e6, 0xd0d11a1a, 0xe5e62f2f,
-        0x1a19d0d1, 0x51512020, 0xaeaedfe0, 0x20205151, 0xdfdfaeaf, 0x53533838, 0xacacc7c8, 0x38385353,
-        0xc7c7acad, 0x4342edee, 0xbcbd1212, 0xedee4343, 0x1211bcbd, 0x56560d0d, 0xa9a9f2f3, 0x0d0d5656,
-        0xf2f2a9aa, 0x5b5b5b5b, 0xa4a4a4a5, 0x6362f8f9, 0x9c9d0707, 0xf8f96363, 0x07069c9d, 0x4443c9ca,
-        0xbbbc3636, 0xc9ca4444, 0x3635bbbc, 0x5a59d3d4, 0xa5a62c2c, 0xd3d45a5a, 0x2c2ba5a6, 0x7c7bdedf,
-        0x83842121, 0xdedf7c7c, 0x21208384, 0x67669899, 0x98996767, 0x7f7ea9aa, 0x80815656, 0xa9aa7f7f,
-        0x56558081, 0x25252525, 0xdadadadb, 0x45454545, 0xbabababb, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe,
-        0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0xf7f80202, 0xf7f80202, 0xf7f80202,
-        0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202,
-        0xf7f80202, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808,
-        0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8,
-        0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8,
-        0x0201f7f8, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d,
-        0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3,
-        0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3,
-        0xf2f2f2f3, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404,
-        0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc,
-        0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc,
-        0xf0f0fbfc, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f,
-        0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010,
-        0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0xfafaedee, 0x0d0cf2f3, 0xf2f30d0d, 0x1514f9fa,
-        0xeaeb0606, 0xf9fa1515, 0x0605eaeb, 0x1e1e0f0f, 0xe1e1f0f1, 0x0f0f1e1e, 0xf0f0e1e2, 0x1e1e1e1e,
-        0xe1e1e1e2, 0x22220202, 0xddddfdfe, 0x02022222, 0xfdfdddde, 0x1c1beced, 0xe3e41313, 0xeced1c1c,
-        0x1312e3e4, 0x36362020, 0xc9c9dfe0, 0x20203636, 0xdfdfc9ca, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929,
-        0x0b0ad6d7, 0x37370f0f, 0xc8c8f0f1, 0x0f0f3737, 0xf0f0c8c9, 0x39393939, 0xc6c6c6c7, 0x3f3efeff,
-        0xc0c10101, 0xfeff3f3f, 0x0100c0c1, 0x2827d7d8, 0xd7d82828, 0x3736e1e2, 0xc8c91e1e, 0xe1e23737,
-        0x1e1dc8c9, 0x5e5e2525, 0xa1a1dadb, 0x25255e5e, 0xdadaa1a2, 0x60604141, 0x9f9fbebf, 0x41416060,
-        0xbebe9fa0, 0x4e4deaeb, 0xb1b21515, 0xeaeb4e4e, 0x1514b1b2, 0x64640f0f, 0x9b9bf0f1, 0x0f0f6464,
-        0xf0f09b9c, 0x6a6a6a6a, 0x95959596, 0x7473f7f8, 0x8b8c0808, 0xf7f87474, 0x08078b8c, 0x4f4ec0c1,
-        0xb0b13f3f, 0xc0c14f4f, 0x3f3eb0b1, 0x6968cccd, 0x96973333, 0xcccd6969, 0x33329697, 0x78778788,
-        0x87887878, 0x2b2b2b2b, 0xd4d4d4d5, 0x50505050, 0xafafafb0, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707,
-        0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,
-        0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,
-        0xf8f8f8f9, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd,
-        0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0xf5f60303, 0xf5f60303, 0xf5f60303,
-        0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303,
-        0xf5f60303, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a,
-        0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6,
-        0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6,
-        0x0302f5f6, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010,
-        0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0, 0xefefeff0, 0xefefeff0,
-        0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0,
-        0xefefeff0, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505,
-        0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0xededfafb, 0xededfafb, 0xededfafb,
-        0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb,
-        0xededfafb, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212,
-        0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212,
-        0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0xfafaebec, 0x0f0ef0f1, 0xf0f10f0f, 0x1817f8f9,
-        0xe7e80707, 0xf8f91818, 0x0706e7e8, 0x23231111, 0xdcdceeef, 0x11112323, 0xeeeedcdd, 0x22222222,
-        0xddddddde, 0x26260303, 0xd9d9fcfd, 0x03032626, 0xfcfcd9da, 0x201fe9ea, 0xdfe01616, 0xe9ea2020,
-        0x1615dfe0, 0x3d3d2525, 0xc2c2dadb, 0x25253d3d, 0xdadac2c3, 0x2f2ef2f3, 0xd0d10d0d, 0xf2f32f2f,
-        0x0d0cd0d1, 0x3f3f1111, 0xc0c0eeef, 0x11113f3f, 0xeeeec0c1, 0x41414141, 0xbebebebf, 0x4847feff,
-        0xb7b80101, 0xfeff4848, 0x0100b7b8, 0x2e2dd1d2, 0xd1d22e2e, 0x3f3edcdd, 0xc0c12323, 0xdcdd3f3f,
-        0x2322c0c1, 0x6b6b2b2b, 0x9494d4d5, 0x2b2b6b6b, 0xd4d49495, 0x6e6e4b4b, 0x9191b4b5, 0x4b4b6e6e,
-        0xb4b49192, 0x5958e7e8, 0xa6a71818, 0xe7e85959, 0x1817a6a7, 0x72721111, 0x8d8deeef, 0x11117272,
-        0xeeee8d8e, 0x79797979, 0x86868687, 0x5b5ab7b8, 0xa4a54848, 0xb7b85b5b, 0x4847a4a5, 0x7877c5c6,
-        0x87883a3a, 0xc5c67878, 0x3a398788, 0x31313131, 0xcecececf, 0x5c5c5c5c, 0xa3a3a3a4, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808,
-        0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8,
-        0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8,
-        0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd,
-        0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0xf4f50303,
-        0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303,
-        0xf4f50303, 0xf4f50303, 0xf4f50303, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b,
-        0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0x0302f4f5,
-        0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5,
-        0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212,
-        0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee,
-        0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee,
-        0xedededee, 0xedededee, 0xedededee, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505,
-        0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0xebebfafb,
-        0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb,
-        0xebebfafb, 0xebebfafb, 0xebebfafb, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414,
-        0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414,
-        0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x1110eeef, 0xeeef1111, 0x1b1af8f9,
-        0xe4e50707, 0xf8f91b1b, 0x0706e4e5, 0x27271313, 0xd8d8eced, 0x13132727, 0xececd8d9, 0x27272727,
-        0xd8d8d8d9, 0x2b2b0303, 0xd4d4fcfd, 0x03032b2b, 0xfcfcd4d5, 0x2423e7e8, 0xdbdc1818, 0xe7e82424,
-        0x1817dbdc, 0x45452a2a, 0xbabad5d6, 0x2a2a4545, 0xd5d5babb, 0x3534f1f2, 0xcacb0e0e, 0xf1f23535,
-        0x0e0dcacb, 0x47471313, 0xb8b8eced, 0x13134747, 0xececb8b9, 0x49494949, 0xb6b6b6b7, 0x504ffdfe,
-        0xafb00202, 0xfdfe5050, 0x0201afb0, 0x3433cbcc, 0xcbcc3434, 0x4645d8d9, 0xb9ba2727, 0xd8d94646,
-        0x2726b9ba, 0x79793030, 0x8686cfd0, 0x30307979, 0xcfcf8687, 0x7c7c5454, 0x8383abac, 0x54547c7c,
-        0xabab8384, 0x6463e4e5, 0x9b9c1b1b, 0xe4e56464, 0x1b1a9b9c, 0x6665aeaf, 0x999a5151, 0xaeaf6666,
-        0x5150999a, 0x37373737, 0xc8c8c8c9, 0x68686868, 0x97979798, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909,
-        0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7,
-        0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7,
-        0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd,
-        0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd,
-        0x0c0bfcfd, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303,
-        0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xfcfd0c0c, 0xfcfd0c0c,
-        0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c,
-        0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4,
-        0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606,
-        0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0xe8e8f9fa,
-        0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa,
-        0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0x06061717, 0x06061717, 0x06061717, 0x06061717,
-        0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717,
-        0x06061717, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9,
-        0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404,
-        0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe,
-        0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x08080404, 0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808,
-        0xf7f7f7f8, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0807fbfc, 0xf7f80404, 0xfbfc0808,
-        0x0403f7f8, 0x0e0e0808, 0xf1f1f7f8, 0x08080e0e, 0xf7f7f1f2, 0x0c0bfdfe, 0xf3f40202, 0xfdfe0c0c,
-        0x0201f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000,
-        0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff7f8, 0xeff00808, 0xf7f81010,
-        0x0807eff0, 0x1a1a0a0a, 0xe5e5f5f6, 0x0a0a1a1a, 0xf5f5e5e6, 0x1c1c1212, 0xe3e3edee, 0x12121c1c,
-        0xedede3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1c1c0404, 0xe3e3fbfc, 0x04041c1c,
-        0xfbfbe3e4, 0x1e1e1e1e, 0xe1e1e1e2, 0x201ffdfe, 0xdfe00202, 0xfdfe2020, 0x0201dfe0, 0x1615edee,
-        0xe9ea1212, 0xedee1616, 0x1211e9ea, 0x1e1df1f2, 0xe1e20e0e, 0xf1f21e1e, 0x0e0de1e2, 0x2e2e1616,
-        0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2e2e0c0c, 0xd1d1f3f4, 0x0c0c2e2e, 0xf3f3d1d2, 0x30302222,
-        0xcfcfddde, 0x22223030, 0xddddcfd0, 0x2827f5f6, 0xd7d80a0a, 0xf5f62828, 0x0a09d7d8, 0x32320404,
-        0xcdcdfbfc, 0x04043232, 0xfbfbcdce, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e3e4,
-        0xd5d61c1c, 0xe3e42a2a, 0x1c1bd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1a1a,
-        0xb3b3e5e6, 0x1a1a4c4c, 0xe5e5b3b4, 0x4c4c2a2a, 0xb3b3d5d6, 0x2a2a4c4c, 0xd5d5b3b4, 0x3635e7e8,
-        0xc9ca1818, 0xe7e83636, 0x1817c9ca, 0x4e4e0e0e, 0xb1b1f1f2, 0x0e0e4e4e, 0xf1f1b1b2, 0x52523e3e,
-        0xadadc1c2, 0x3e3e5252, 0xc1c1adae, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202,
-        0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5c5c5c5c, 0xa3a3a3a4, 0x3c3bcbcc, 0xc3c43434, 0xcbcc3c3c,
-        0x3433c3c4, 0x76763434, 0x8989cbcc, 0x34347676, 0xcbcb898a, 0x4a49d3d4, 0xb5b62c2c, 0xd3d44a4a,
-        0x2c2bb5b6, 0x76764a4a, 0x8989b5b6, 0x4a4a7676, 0xb5b5898a, 0x76762020, 0x8989dfe0, 0x20207676,
-        0xdfdf898a, 0x6665f3f4, 0x999a0c0c, 0xf3f46666, 0x0c0b999a, 0x605fd7d8, 0x9fa02828, 0xd7d86060,
-        0x28279fa0, 0x7675ddde, 0x898a2222, 0xddde7676, 0x2221898a, 0x5857a7a8, 0xa7a85858, 0x6867b1b2,
-        0x97984e4e, 0xb1b26868, 0x4e4d9798, 0x0c0c0c0c, 0xf3f3f3f4, 0x16161616, 0xe9e9e9ea, 0x2a2a2a2a,
-        0xd5d5d5d6, 0x48484848, 0xb7b7b7b8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0xfdfe0000,
-        0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,
-        0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,
-        0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,
-        0xf9f9f9fa, 0x09090303, 0xf6f6fcfd, 0x03030909, 0xfcfcf6f7, 0x0908fcfd, 0xf6f70303, 0xfcfd0909,
-        0x0302f6f7, 0x0605f9fa, 0xf9fa0606, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x0f0f0000, 0xf0f10000, 0x00000f0f, 0xfffff0f1, 0x0c0bf6f7, 0xf3f40909, 0xf6f70c0c,
-        0x0908f3f4, 0x18180f0f, 0xe7e7f0f1, 0x0f0f1818, 0xf0f0e7e8, 0x1211f9fa, 0xedee0606, 0xf9fa1212,
-        0x0605edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1b0000,
-        0xe4e50000, 0x00001b1b, 0xffffe4e5, 0x1211edee, 0xedee1212, 0x1817f3f4, 0xe7e80c0c, 0xf3f41818,
-        0x0c0be7e8, 0x27270f0f, 0xd8d8f0f1, 0x0f0f2727, 0xf0f0d8d9, 0x2a2a1b1b, 0xd5d5e4e5, 0x1b1b2a2a,
-        0xe4e4d5d6, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2a2a0606, 0xd5d5f9fa, 0x06062a2a,
-        0xf9f9d5d6, 0x2d2d2d2d, 0xd2d2d2d3, 0x3332fcfd, 0xcccd0303, 0xfcfd3333, 0x0302cccd, 0x2120e4e5,
-        0xdedf1b1b, 0xe4e52121, 0x1b1adedf, 0x2d2ceaeb, 0xd2d31515, 0xeaeb2d2d, 0x1514d2d3, 0x45452121,
-        0xbabadedf, 0x21214545, 0xdedebabb, 0x45451212, 0xbabaedee, 0x12124545, 0xededbabb, 0x48483636,
-        0xb7b7c9ca, 0x36364848, 0xc9c9b7b8, 0x3f3eedee, 0xc0c11212, 0xedee3f3f, 0x1211c0c1, 0x4e4e0606,
-        0xb1b1f9fa, 0x06064e4e, 0xf9f9b1b2, 0x51515151, 0xaeaeaeaf, 0x3332cccd, 0xcccd3333, 0x3f3ed5d6,
-        0xc0c12a2a, 0xd5d63f3f, 0x2a29c0c1, 0x5a59f6f7, 0xa5a60909, 0xf6f75a5a, 0x0908a5a6, 0x72722a2a,
-        0x8d8dd5d6, 0x2a2a7272, 0xd5d58d8e, 0x75753f3f, 0x8a8ac0c1, 0x3f3f7575, 0xc0c08a8b, 0x5150dbdc,
-        0xaeaf2424, 0xdbdc5151, 0x2423aeaf, 0x78781515, 0x8787eaeb, 0x15157878, 0xeaea8788, 0x7b7b6060,
-        0x84849fa0, 0x60607b7b, 0x9f9f8485, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5d5cb1b2,
-        0xa2a34e4e, 0xb1b25d5d, 0x4e4da2a3, 0x7271babb, 0x8d8e4545, 0xbabb7272, 0x45448d8e, 0x12121212,
-        0xedededee, 0x21212121, 0xdedededf, 0x3f3f3f3f, 0xc0c0c0c1, 0x6c6c6c6c, 0x93939394, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303,
-        0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd,
-        0xfcfcfcfd, 0xfcfcfcfd, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000,
-        0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000,
-        0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303, 0x00000303, 0x00000303, 0x00000303,
-        0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd,
-        0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404,
-        0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808, 0xf7f7f7f8, 0x0807f7f8, 0xf7f80808, 0x0c0bfbfc,
-        0xf3f40404, 0xfbfc0c0c, 0x0403f3f4, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x10101010,
-        0xefefeff0, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x100ff3f4, 0xeff00c0c, 0xf3f41010,
-        0x0c0beff0, 0x1817fbfc, 0xe7e80404, 0xfbfc1818, 0x0403e7e8, 0x20201010, 0xdfdfeff0, 0x10102020,
-        0xefefdfe0, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x20202020, 0xdfdfdfe0, 0x24240000,
-        0xdbdc0000, 0x00002424, 0xffffdbdc, 0x1817e7e8, 0xe7e81818, 0x201feff0, 0xdfe01010, 0xeff02020,
-        0x100fdfe0, 0x34341414, 0xcbcbebec, 0x14143434, 0xebebcbcc, 0x38382424, 0xc7c7dbdc, 0x24243838,
-        0xdbdbc7c8, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x38380808, 0xc7c7f7f8, 0x08083838,
-        0xf7f7c7c8, 0x3c3c3c3c, 0xc3c3c3c4, 0x403ffbfc, 0xbfc00404, 0xfbfc4040, 0x0403bfc0, 0x2c2bdbdc,
-        0xd3d42424, 0xdbdc2c2c, 0x2423d3d4, 0x3c3be3e4, 0xc3c41c1c, 0xe3e43c3c, 0x1c1bc3c4, 0x5c5c2c2c,
-        0xa3a3d3d4, 0x2c2c5c5c, 0xd3d3a3a4, 0x5c5c1818, 0xa3a3e7e8, 0x18185c5c, 0xe7e7a3a4, 0x60604848,
-        0x9f9fb7b8, 0x48486060, 0xb7b79fa0, 0x5453ebec, 0xabac1414, 0xebec5454, 0x1413abac, 0x64640808,
-        0x9b9bf7f8, 0x08086464, 0xf7f79b9c, 0x6c6c6c6c, 0x93939394, 0x4443bbbc, 0xbbbc4444, 0x5453c7c8,
-        0xabac3838, 0xc7c85454, 0x3837abac, 0x7877f3f4, 0x87880c0c, 0xf3f47878, 0x0c0b8788, 0x6c6bcfd0,
-        0x93943030, 0xcfd06c6c, 0x302f9394, 0x7c7b9798, 0x83846868, 0x97987c7c, 0x68678384, 0x18181818,
-        0xe7e7e7e8, 0x2c2c2c2c, 0xd3d3d3d4, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,
-        0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,
-        0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000,
-        0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404,
-        0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404,
-        0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,
-        0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404,
-        0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc,
-        0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0x04040808,
-        0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808,
-        0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a,
-        0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x05050f0f, 0xfafaf0f1, 0x0a09f5f6, 0xf5f60a0a, 0x0f0efafb,
-        0xf0f10505, 0xfafb0f0f, 0x0504f0f1, 0x14140a0a, 0xebebf5f6, 0x0a0a1414, 0xf5f5ebec, 0x14141414,
-        0xebebebec, 0x19190000, 0xe6e70000, 0x00001919, 0xffffe6e7, 0x1413f0f1, 0xebec0f0f, 0xf0f11414,
-        0x0f0eebec, 0x28281919, 0xd7d7e6e7, 0x19192828, 0xe6e6d7d8, 0x1e1df5f6, 0xe1e20a0a, 0xf5f61e1e,
-        0x0a09e1e2, 0x28280a0a, 0xd7d7f5f6, 0x0a0a2828, 0xf5f5d7d8, 0x28282828, 0xd7d7d7d8, 0x2d2d0000,
-        0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x1e1de1e2, 0xe1e21e1e, 0x2827ebec, 0xd7d81414, 0xebec2828,
-        0x1413d7d8, 0x41411919, 0xbebee6e7, 0x19194141, 0xe6e6bebf, 0x46462d2d, 0xb9b9d2d3, 0x2d2d4646,
-        0xd2d2b9ba, 0x3736f0f1, 0xc8c90f0f, 0xf0f13737, 0x0f0ec8c9, 0x46460a0a, 0xb9b9f5f6, 0x0a0a4646,
-        0xf5f5b9ba, 0x4b4b4b4b, 0xb4b4b4b5, 0x5554fafb, 0xaaab0505, 0xfafb5555, 0x0504aaab, 0x3736d2d3,
-        0xc8c92d2d, 0xd2d33737, 0x2d2cc8c9, 0x4b4adcdd, 0xb4b52323, 0xdcdd4b4b, 0x2322b4b5, 0x73733737,
-        0x8c8cc8c9, 0x37377373, 0xc8c88c8d, 0x73731e1e, 0x8c8ce1e2, 0x1e1e7373, 0xe1e18c8d, 0x78785a5a,
-        0x8787a5a6, 0x5a5a7878, 0xa5a58788, 0x6968e1e2, 0x96971e1e, 0xe1e26969, 0x1e1d9697, 0x5554aaab,
-        0xaaab5555, 0x6968b9ba, 0x96974646, 0xb9ba6969, 0x46459697, 0x1e1e1e1e, 0xe1e1e1e2, 0x3c3c3c3c,
-        0xc3c3c3c4, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505,
-        0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505,
-        0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb,
-        0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x05050000, 0x05050000, 0x05050000, 0x05050000,
-        0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0xfafb0000,
-        0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000,
-        0xfafb0000, 0xfafb0000, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505,
-        0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0xfffffafb, 0xfffffafb, 0xfffffafb,
-        0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb,
-        0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a,
-        0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6,
-        0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0f0f0505, 0x0f0f0505,
-        0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505,
-        0x0f0f0505, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb,
-        0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0bf3f4, 0xf3f40c0c, 0x1211f9fa,
-        0xedee0606, 0xf9fa1212, 0x0605edee, 0x18180c0c, 0xe7e7f3f4, 0x0c0c1818, 0xf3f3e7e8, 0x18181818,
-        0xe7e7e7e8, 0x1e1e0000, 0xe1e20000, 0x00001e1e, 0xffffe1e2, 0x1817edee, 0xe7e81212, 0xedee1818,
-        0x1211e7e8, 0x30301e1e, 0xcfcfe1e2, 0x1e1e3030, 0xe1e1cfd0, 0x2423f9fa, 0xdbdc0606, 0xf9fa2424,
-        0x0605dbdc, 0x30300c0c, 0xcfcff3f4, 0x0c0c3030, 0xf3f3cfd0, 0x30303030, 0xcfcfcfd0, 0x36360000,
-        0xc9ca0000, 0x00003636, 0xffffc9ca, 0x2423dbdc, 0xdbdc2424, 0x302fe7e8, 0xcfd01818, 0xe7e83030,
-        0x1817cfd0, 0x4e4e1e1e, 0xb1b1e1e2, 0x1e1e4e4e, 0xe1e1b1b2, 0x54543636, 0xababc9ca, 0x36365454,
-        0xc9c9abac, 0x4241edee, 0xbdbe1212, 0xedee4242, 0x1211bdbe, 0x54540c0c, 0xababf3f4, 0x0c0c5454,
-        0xf3f3abac, 0x5a5a5a5a, 0xa5a5a5a6, 0x605ff9fa, 0x9fa00606, 0xf9fa6060, 0x06059fa0, 0x4241c9ca,
-        0xbdbe3636, 0xc9ca4242, 0x3635bdbe, 0x5a59d5d6, 0xa5a62a2a, 0xd5d65a5a, 0x2a29a5a6, 0x7e7de1e2,
-        0x81821e1e, 0xe1e27e7e, 0x1e1d8182, 0x6665999a, 0x999a6666, 0x7e7dabac, 0x81825454, 0xabac7e7e,
-        0x54538182, 0x24242424, 0xdbdbdbdc, 0x42424242, 0xbdbdbdbe, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000,
-        0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,
-        0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,
-        0xf9fa0000, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606,
-        0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,
-        0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,
-        0xfffff9fa, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606,
-        0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa,
-        0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa,
-        0xf3f3f9fa, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c,
-        0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e,
-        0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0xf8f8eaeb, 0x0e0df1f2, 0xf1f20e0e, 0x1514f8f9,
-        0xeaeb0707, 0xf8f91515, 0x0706eaeb, 0x1c1c0e0e, 0xe3e3f1f2, 0x0e0e1c1c, 0xf1f1e3e4, 0x1c1c1c1c,
-        0xe3e3e3e4, 0x23230000, 0xdcdd0000, 0x00002323, 0xffffdcdd, 0x1c1beaeb, 0xe3e41515, 0xeaeb1c1c,
-        0x1514e3e4, 0x38382323, 0xc7c7dcdd, 0x23233838, 0xdcdcc7c8, 0x2a29f1f2, 0xd5d60e0e, 0xf1f22a2a,
-        0x0e0dd5d6, 0x38380e0e, 0xc7c7f1f2, 0x0e0e3838, 0xf1f1c7c8, 0x38383838, 0xc7c7c7c8, 0x3f3f0000,
-        0xc0c10000, 0x00003f3f, 0xffffc0c1, 0x2a29d5d6, 0xd5d62a2a, 0x3837e3e4, 0xc7c81c1c, 0xe3e43838,
-        0x1c1bc7c8, 0x5b5b2323, 0xa4a4dcdd, 0x23235b5b, 0xdcdca4a5, 0x62623f3f, 0x9d9dc0c1, 0x3f3f6262,
-        0xc0c09d9e, 0x4d4ceaeb, 0xb2b31515, 0xeaeb4d4d, 0x1514b2b3, 0x62620e0e, 0x9d9df1f2, 0x0e0e6262,
-        0xf1f19d9e, 0x69696969, 0x96969697, 0x7776f8f9, 0x88890707, 0xf8f97777, 0x07068889, 0x4d4cc0c1,
-        0xb2b33f3f, 0xc0c14d4d, 0x3f3eb2b3, 0x6968cecf, 0x96973131, 0xcecf6969, 0x31309697, 0x77768889,
-        0x88897777, 0x2a2a2a2a, 0xd5d5d5d6, 0x4d4d4d4d, 0xb2b2b2b3, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707,
-        0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,
-        0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,
-        0xf8f8f8f9, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000,
-        0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000, 0xf8f90000,
-        0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000,
-        0xf8f90000, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707,
-        0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9,
-        0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9,
-        0xfffff8f9, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e,
-        0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2,
-        0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2,
-        0xf1f1f1f2, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707,
-        0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9,
-        0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9,
-        0xeaeaf8f9, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515,
-        0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010,
-        0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x100feff0, 0xeff01010, 0x1817f7f8,
-        0xe7e80808, 0xf7f81818, 0x0807e7e8, 0x20201010, 0xdfdfeff0, 0x10102020, 0xefefdfe0, 0x20202020,
-        0xdfdfdfe0, 0x28280000, 0xd7d80000, 0x00002828, 0xffffd7d8, 0x201fe7e8, 0xdfe01818, 0xe7e82020,
-        0x1817dfe0, 0x40402828, 0xbfbfd7d8, 0x28284040, 0xd7d7bfc0, 0x302feff0, 0xcfd01010, 0xeff03030,
-        0x100fcfd0, 0x40401010, 0xbfbfeff0, 0x10104040, 0xefefbfc0, 0x40404040, 0xbfbfbfc0, 0x48480000,
-        0xb7b80000, 0x00004848, 0xffffb7b8, 0x302fcfd0, 0xcfd03030, 0x403fdfe0, 0xbfc02020, 0xdfe04040,
-        0x201fbfc0, 0x68682828, 0x9797d7d8, 0x28286868, 0xd7d79798, 0x70704848, 0x8f8fb7b8, 0x48487070,
-        0xb7b78f90, 0x5857e7e8, 0xa7a81818, 0xe7e85858, 0x1817a7a8, 0x70701010, 0x8f8feff0, 0x10107070,
-        0xefef8f90, 0x78787878, 0x87878788, 0x5857b7b8, 0xa7a84848, 0xb7b85858, 0x4847a7a8, 0x7877c7c8,
-        0x87883838, 0xc7c87878, 0x38378788, 0x30303030, 0xcfcfcfd0, 0x58585858, 0xa7a7a7a8, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808,
-        0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8,
-        0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8,
-        0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000,
-        0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0xf7f80000,
-        0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000,
-        0xf7f80000, 0xf7f80000, 0xf7f80000, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808,
-        0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0xfffff7f8,
-        0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8,
-        0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010,
-        0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0,
-        0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0,
-        0xefefeff0, 0xefefeff0, 0xefefeff0, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808,
-        0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0xefeff7f8,
-        0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8,
-        0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010,
-        0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212,
-        0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x1211edee, 0xedee1212, 0x1b1af6f7,
-        0xe4e50909, 0xf6f71b1b, 0x0908e4e5, 0x24241212, 0xdbdbedee, 0x12122424, 0xededdbdc, 0x24242424,
-        0xdbdbdbdc, 0x2d2d0000, 0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x2423e4e5, 0xdbdc1b1b, 0xe4e52424,
-        0x1b1adbdc, 0x48482d2d, 0xb7b7d2d3, 0x2d2d4848, 0xd2d2b7b8, 0x3635edee, 0xc9ca1212, 0xedee3636,
-        0x1211c9ca, 0x48481212, 0xb7b7edee, 0x12124848, 0xededb7b8, 0x48484848, 0xb7b7b7b8, 0x51510000,
-        0xaeaf0000, 0x00005151, 0xffffaeaf, 0x3635c9ca, 0xc9ca3636, 0x4847dbdc, 0xb7b82424, 0xdbdc4848,
-        0x2423b7b8, 0x75752d2d, 0x8a8ad2d3, 0x2d2d7575, 0xd2d28a8b, 0x7e7e5151, 0x8181aeaf, 0x51517e7e,
-        0xaeae8182, 0x6362e4e5, 0x9c9d1b1b, 0xe4e56363, 0x1b1a9c9d, 0x6362aeaf, 0x9c9d5151, 0xaeaf6363,
-        0x51509c9d, 0x36363636, 0xc9c9c9ca, 0x6c6c6c6c, 0x93939394, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909,
-        0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7,
-        0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7,
-        0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x09090000, 0x09090000, 0x09090000, 0x09090000,
-        0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000,
-        0x09090000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000,
-        0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0x00000909, 0x00000909,
-        0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909,
-        0x00000909, 0x00000909, 0x00000909, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7,
-        0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7,
-        0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212,
-        0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee, 0xedededee, 0xedededee,
-        0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee,
-        0xedededee, 0xedededee, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909,
-        0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0xe4e4f6f7,
-        0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7,
-        0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b,
-        0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b,
-        0x09091b1b, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5,
-        0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,
-        0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0504fafb, 0xfafb0505, 0xfafb0505,
-        0x0504fafb, 0x0b0b0606, 0xf4f4f9fa, 0x06060b0b, 0xf9f9f4f5, 0x08080000, 0xf7f80000, 0x00000808,
-        0xfffff7f8, 0x0b0b0b0b, 0xf4f4f4f5, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x11110c0c,
-        0xeeeef3f4, 0x0c0c1111, 0xf3f3eeef, 0x11111111, 0xeeeeeeef, 0x12120606, 0xededf9fa, 0x06061212,
-        0xf9f9edee, 0x0b0af7f8, 0xf4f50808, 0xf7f80b0b, 0x0807f4f5, 0x0f0f0000, 0xf0f10000, 0x00000f0f,
-        0xfffff0f1, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x19191212, 0xe6e6edee, 0x12121919,
-        0xedede6e7, 0x19190b0b, 0xe6e6f4f5, 0x0b0b1919, 0xf4f4e6e7, 0x19191919, 0xe6e6e6e7, 0x0e0df1f2,
-        0xf1f20e0e, 0xf1f20e0e, 0x0e0df1f2, 0x1a1a0000, 0xe5e60000, 0x00001a1a, 0xffffe5e6, 0x1211f4f5,
-        0xedee0b0b, 0xf4f51212, 0x0b0aedee, 0x1615f8f9, 0xe9ea0707, 0xf8f91616, 0x0706e9ea, 0x22221a1a,
-        0xdddde5e6, 0x1a1a2222, 0xe5e5ddde, 0x22221212, 0xddddedee, 0x12122222, 0xededddde, 0x22222222,
-        0xddddddde, 0x23230b0b, 0xdcdcf4f5, 0x0b0b2323, 0xf4f4dcdd, 0x1d1d0000, 0xe2e30000, 0x00001d1d,
-        0xffffe2e3, 0x1615eced, 0xe9ea1313, 0xeced1616, 0x1312e9ea, 0x1a19f0f1, 0xe5e60f0f, 0xf0f11a1a,
-        0x0f0ee5e6, 0x25250000, 0xdadb0000, 0x00002525, 0xffffdadb, 0x2c2c1b1b, 0xd3d3e4e5, 0x1b1b2c2c,
-        0xe4e4d3d4, 0x2c2c2424, 0xd3d3dbdc, 0x24242c2c, 0xdbdbd3d4, 0x2c2c1212, 0xd3d3edee, 0x12122c2c,
-        0xededd3d4, 0x2120f5f6, 0xdedf0a0a, 0xf5f62121, 0x0a09dedf, 0x2d2d2d2d, 0xd2d2d2d3, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,
-        0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000,
-        0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000,
-        0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd,
-        0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000,
-        0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,
-        0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303,
-        0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,
-        0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000,
-        0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000,
-        0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0403fbfc, 0xfbfc0404, 0xf9fa0a0a,
-        0x0605f5f6, 0xf3f40000, 0x0c0c0000, 0xf3f3f9fa, 0xf3f40606, 0x0c0bf9fa, 0x0c0c0606, 0xfffff1f2,
-        0x00000e0e, 0x0c0c0c0c, 0xf3f3f3f4, 0xedee0000, 0x12120000, 0xf3f40e0e, 0x0c0bf1f2, 0xf9f9edee,
-        0xf9fa1212, 0x0605edee, 0x06061212, 0xededf5f6, 0xedee0a0a, 0x1211f5f6, 0x12120a0a, 0xffffe9ea,
-        0x00001616, 0xe7e80000, 0x18180000, 0xf3f3e9ea, 0xf3f41616, 0x0c0be9ea, 0x0c0c1616, 0xe7e7f7f8,
-        0xe7e80808, 0x1817f7f8, 0x18180808, 0xf9f9e5e6, 0xf9fa1a1a, 0x0605e5e6, 0x06061a1a, 0xffffe3e4,
-        0x00001c1c, 0x14141414, 0xebebebec, 0xe5e5f1f2, 0x1a1a0e0e, 0xf3f3e1e2, 0x0c0c1e1e, 0xdfdff5f6,
-        0x20200a0a, 0xdfdfedee, 0x20201212, 0xe5e5e5e6, 0x1a1a1a1a, 0xebebddde, 0x14142222, 0xf3f3d9da,
-        0x0c0c2626, 0xdfdfdfe0, 0x20202020, 0x20202020, 0xd7d7e9ea, 0xddddddde, 0x22222222, 0x00000000,
-        0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,
-        0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606,
-        0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000,
-        0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000,
-        0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000,
-        0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000,
-        0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000,
-        0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,
-        0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606,
-        0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000,
-        0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000,
-        0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a,
-        0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0605f9fa, 0xf9fa0606, 0xf7f80e0e,
-        0x0807f1f2, 0xffffedee, 0x00001212, 0xeff00a0a, 0x100ff5f6, 0xe7e80000, 0x18180000, 0xf7f7e7e8,
-        0xf7f81818, 0x0807e7e8, 0x08081818, 0x12121212, 0xedededee, 0xeff01414, 0x100febec, 0xe5e5f1f2,
-        0xe5e60e0e, 0x1a19f1f2, 0x1a1a0e0e, 0xffffe1e2, 0x00001e1e, 0xddde0000, 0x22220000, 0xf7f7ddde,
-        0xf7f82222, 0x0807ddde, 0x08082222, 0xedede1e2, 0xedee1e1e, 0x1211e1e2, 0x12121e1e, 0xddddf5f6,
-        0xddde0a0a, 0x2221f5f6, 0x22220a0a, 0xddddebec, 0x22221414, 0xffffd7d8, 0x00002828, 0x1e1e1e1e,
-        0xe1e1e1e2, 0xededd7d8, 0x12122828, 0xd3d40000, 0x2c2c0000, 0xd3d3eff0, 0x2c2c1010, 0xdbdbdbdc,
-        0xdbdbdbdc, 0x24242424, 0xd3d3e5e6, 0x2c2c1a1a, 0xe5e5d1d2, 0x1a1a2e2e, 0xededcbcc, 0x12123434,
-        0xc9c9ebec, 0xd3d3d3d4, 0x2c2c2c2c, 0xc9c9dfe0, 0xd1d1d1d2, 0xd1d1d1d2, 0x2e2e2e2e, 0x00000000,
-        0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6,
-        0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,
-        0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a,
-        0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc,
-        0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000,
-        0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000,
-        0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,
-        0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6,
-        0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a,
-        0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000,
-        0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000,
-        0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404,
-        0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000,
-        0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6,
-        0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,
-        0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a,
-        0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc,
-        0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000,
-        0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000,
-        0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,
-        0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x0807f7f8, 0xf7f80808, 0xeff00808,
-        0x100ff7f8, 0xe7e80000, 0x18180000, 0xf7f7e7e8, 0xf7f81818, 0x0807e7e8, 0x08081818, 0xeff01414,
-        0x100febec, 0xffffe3e4, 0x00001c1c, 0xe7e7eff0, 0xe7e81010, 0x1817eff0, 0x18181010, 0xdfe00000,
-        0x20200000, 0xefefe3e4, 0xeff01c1c, 0x100fe3e4, 0x10101c1c, 0xdfdff7f8, 0xdfe00808, 0xf7f7dfe0,
-        0xf7f82020, 0x0807dfe0, 0x08082020, 0x201ff7f8, 0x20200808, 0x18181818, 0xe7e7e7e8, 0xe7e81818,
-        0x1817e7e8, 0xdfdfebec, 0x20201414, 0xffffd7d8, 0x00002828, 0xefefd7d8, 0x10102828, 0xd3d40000,
-        0xd3d40000, 0xffffd3d4, 0x00002c2c, 0x2c2c0000, 0x2c2c0000, 0xdfdfdfe0, 0x20202020, 0xd3d3eff0,
-        0x2c2c1010, 0xd3d3e7e8, 0xe7e7d3d4, 0x18182c2c, 0x2c2c1818, 0xefefcfd0, 0x10103030, 0xdbdbdbdc,
-        0xdbdbdbdc, 0x24242424, 0x24242424, 0xcbcbebec, 0x28282828, 0xd7d7d7d8, 0xcbcbdfe0, 0x00000000,
-        0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404,
-        0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c,
-        0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000,
-        0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000,
-        0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,
-        0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4,
-        0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000,
-        0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000,
-        0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404,
-        0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000,
-        0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404,
-        0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c,
-        0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000,
-        0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000,
-        0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,
-        0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,
-        0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,
-        0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,
-        0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,
-        0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,
-        0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,
-        0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,
-        0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,
-        0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,
-        0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,
-        0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,
-        0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-};
-
-
-static const uint32_t correctionhighorder[] = {
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101,
-        0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303,
-        0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9,
-        0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707,
-        0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc,
-        0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404,
-        0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101,
-        0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff,
-        0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd,
-        0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303,
-        0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000,
-        0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,
-        0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb,
-        0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101,
-        0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,
-        0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb,
-        0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101,
-        0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,
-        0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202,
-        0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505,
-        0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303,
-        0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9,
-        0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe,
-        0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000,
-        0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5,
-        0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707,
-        0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb,
-        0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd,
-        0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b,
-        0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202,
-        0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505,
-        0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303,
-        0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9,
-        0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,
-        0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,
-        0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,
-        0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,
-        0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,
-        0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,
-        0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7,
-        0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa,
-        0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,
-        0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000,
-        0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec,
-        0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd,
-        0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717,
-        0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4,
-        0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909,
-        0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606,
-        0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303,
-        0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9,
-        0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414,
-        0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7,
-        0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa,
-        0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,
-        0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000,
-        0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec,
-        0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd,
-        0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717,
-        0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4,
-        0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000,
-        0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202,
-        0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,
-        0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000,
-        0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202,
-        0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe,
-        0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,
-        0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,
-        0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd,
-        0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303,
-        0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000,
-        0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000,
-        0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd,
-        0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303,
-        0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000,
-        0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,
-        0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,
-        0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000,
-        0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,
-        0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,
-        0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000,
-        0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc,
-        0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,
-        0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,
-        0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000,
-        0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505,
-        0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505,
-        0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb,
-        0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000,
-        0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000,
-        0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6,
-        0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505,
-        0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb,
-        0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb,
-        0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a,
-        0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000,
-        0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505,
-        0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505,
-        0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb,
-        0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,
-        0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,
-        0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,
-        0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,
-        0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,
-        0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,
-        0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,
-        0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,
-        0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7,
-        0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7,
-        0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909,
-        0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000,
-        0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee,
-        0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000,
-        0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b,
-        0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7,
-        0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909,
-        0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909,
-        0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000,
-        0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5,
-        0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212,
-        0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7,
-        0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7,
-        0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909,
-        0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000,
-        0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee,
-        0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000,
-        0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b,
-        0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7,
-        0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000,
-        0x03030000, 0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000,
-        0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303,
-        0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303,
-        0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd,
-        0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000,
-        0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000,
-        0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000,
-        0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,
-        0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,
-        0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000,
-        0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,
-        0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202,
-        0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,
-        0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000,
-        0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000,
-        0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,
-        0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0x00000606, 0x00000606,
-        0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606,
-        0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,
-        0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,
-        0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,
-        0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000,
-        0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,
-        0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202,
-        0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,
-        0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a,
-        0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6,
-        0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6,
-        0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000,
-        0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000,
-        0x0a0a0000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000,
-        0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0x00000a0a, 0x00000a0a,
-        0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a,
-        0x00000a0a, 0x00000a0a, 0x00000a0a, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6,
-        0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,
-        0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,
-        0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000,
-        0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404, 0x00000404,
-        0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404,
-        0x00000404, 0x00000404, 0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,
-        0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,
-        0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,
-        0xfbfbfbfc, 0xfbfbfbfc, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000,
-        0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000,
-        0x0c0c0000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000,
-        0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0x00000c0c, 0x00000c0c,
-        0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c,
-        0x00000c0c, 0x00000c0c, 0x00000c0c, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4,
-        0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,
-        0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,
-        0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,
-        0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
-        0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,
-        0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,
-        0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,
-        0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,
-        0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,
-        0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,
-        0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,
-        0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,
-        0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,
-        0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,
-        0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,
-        0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-};
--- a/src/ffmpeg/libavcodec/interplayvideo.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,964 +0,0 @@
-/*
- * Interplay MVE Video Decoder
- * Copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file interplayvideo.c
- * Interplay MVE Video Decoder by Mike Melanson (melanson@pcisys.net)
- * For more information about the Interplay MVE format, visit:
- *   http://www.pcisys.net/~melanson/codecs/interplay-mve.txt
- * This code is written in such a way that the identifiers match up
- * with the encoding descriptions in the document.
- *
- * This decoder presently only supports a PAL8 output colorspace.
- *
- * An Interplay video frame consists of 2 parts: The decoding map and
- * the video data. A demuxer must load these 2 parts together in a single
- * buffer before sending it through the stream to this decoder.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-
-#define PALETTE_COUNT 256
-
-/* debugging support */
-#define DEBUG_INTERPLAY 0
-#if DEBUG_INTERPLAY
-#define debug_interplay(x,...) av_log(NULL, AV_LOG_DEBUG, x, __VA_ARGS__)
-#else
-static inline void debug_interplay(const char *format, ...) { }
-#endif
-
-typedef struct IpvideoContext {
-
-    AVCodecContext *avctx;
-    DSPContext dsp;
-    AVFrame second_last_frame;
-    AVFrame last_frame;
-    AVFrame current_frame;
-    unsigned char *decoding_map;
-    int decoding_map_size;
-
-    unsigned char *buf;
-    int size;
-
-    unsigned char *stream_ptr;
-    unsigned char *stream_end;
-    unsigned char *pixel_ptr;
-    int line_inc;
-    int stride;
-    int upper_motion_limit_offset;
-
-} IpvideoContext;
-
-#define CHECK_STREAM_PTR(n) \
-  if ((s->stream_ptr + n) > s->stream_end) { \
-    av_log(s->avctx, AV_LOG_ERROR, "Interplay video warning: stream_ptr out of bounds (%p >= %p)\n", \
-      s->stream_ptr + n, s->stream_end); \
-    return -1; \
-  }
-
-#define COPY_FROM_CURRENT() \
-    motion_offset = current_offset; \
-    motion_offset += y * s->stride; \
-    motion_offset += x; \
-    if (motion_offset < 0) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
-        return -1; \
-    } else if (motion_offset > s->upper_motion_limit_offset) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
-            motion_offset, s->upper_motion_limit_offset); \
-        return -1; \
-    } \
-    s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \
-        s->current_frame.data[0] + motion_offset, s->stride, 8);
-
-#define COPY_FROM_PREVIOUS() \
-    motion_offset = current_offset; \
-    motion_offset += y * s->stride; \
-    motion_offset += x; \
-    if (motion_offset < 0) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
-        return -1; \
-    } else if (motion_offset > s->upper_motion_limit_offset) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
-            motion_offset, s->upper_motion_limit_offset); \
-        return -1; \
-    } \
-    s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \
-        s->last_frame.data[0] + motion_offset, s->stride, 8);
-
-#define COPY_FROM_SECOND_LAST() \
-    motion_offset = current_offset; \
-    motion_offset += y * s->stride; \
-    motion_offset += x; \
-    if (motion_offset < 0) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
-        return -1; \
-    } else if (motion_offset > s->upper_motion_limit_offset) { \
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
-            motion_offset, s->upper_motion_limit_offset); \
-        return -1; \
-    } \
-    s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \
-        s->second_last_frame.data[0] + motion_offset, s->stride, 8);
-
-static int ipvideo_decode_block_opcode_0x0(IpvideoContext *s)
-{
-    int x, y;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy a block from the previous frame */
-    x = y = 0;
-    COPY_FROM_PREVIOUS();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x1(IpvideoContext *s)
-{
-    int x, y;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy block from 2 frames ago */
-    x = y = 0;
-    COPY_FROM_SECOND_LAST();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x2(IpvideoContext *s)
-{
-    unsigned char B;
-    int x, y;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy block from 2 frames ago using a motion vector; need 1 more byte */
-    CHECK_STREAM_PTR(1);
-    B = *s->stream_ptr++;
-
-    if (B < 56) {
-        x = 8 + (B % 7);
-        y = B / 7;
-    } else {
-        x = -14 + ((B - 56) % 29);
-        y =   8 + ((B - 56) / 29);
-    }
-
-    debug_interplay ("    motion byte = %d, (x, y) = (%d, %d)\n", B, x, y);
-    COPY_FROM_SECOND_LAST();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x3(IpvideoContext *s)
-{
-    unsigned char B;
-    int x, y;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy 8x8 block from current frame from an up/left block */
-
-    /* need 1 more byte for motion */
-    CHECK_STREAM_PTR(1);
-    B = *s->stream_ptr++;
-
-    if (B < 56) {
-        x = -(8 + (B % 7));
-        y = -(B / 7);
-    } else {
-        x = -(-14 + ((B - 56) % 29));
-        y = -(  8 + ((B - 56) / 29));
-    }
-
-    debug_interplay ("    motion byte = %d, (x, y) = (%d, %d)\n", B, x, y);
-    COPY_FROM_CURRENT();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x4(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char B, BL, BH;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy a block from the previous frame; need 1 more byte */
-    CHECK_STREAM_PTR(1);
-
-    B = *s->stream_ptr++;
-    BL = B & 0x0F;
-    BH = (B >> 4) & 0x0F;
-    x = -8 + BL;
-    y = -8 + BH;
-
-    debug_interplay ("    motion byte = %d, (x, y) = (%d, %d)\n", B, x, y);
-    COPY_FROM_PREVIOUS();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s)
-{
-    signed char x, y;
-    int motion_offset;
-    int current_offset = s->pixel_ptr - s->current_frame.data[0];
-
-    /* copy a block from the previous frame using an expanded range;
-     * need 2 more bytes */
-    CHECK_STREAM_PTR(2);
-
-    x = *s->stream_ptr++;
-    y = *s->stream_ptr++;
-
-    debug_interplay ("    motion bytes = %d, %d\n", x, y);
-    COPY_FROM_PREVIOUS();
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x6(IpvideoContext *s)
-{
-    /* mystery opcode? skip multiple blocks? */
-    av_log(s->avctx, AV_LOG_ERROR, "  Interplay video: Help! Mystery opcode 0x6 seen\n");
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x7(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char P0, P1;
-    unsigned char B[8];
-    unsigned int flags;
-    int bitmask;
-
-    /* 2-color encoding */
-    CHECK_STREAM_PTR(2);
-
-    P0 = *s->stream_ptr++;
-    P1 = *s->stream_ptr++;
-
-    if (P0 <= P1) {
-
-        /* need 8 more bytes from the stream */
-        CHECK_STREAM_PTR(8);
-        for (y = 0; y < 8; y++)
-            B[y] = *s->stream_ptr++;
-
-        for (y = 0; y < 8; y++) {
-            flags = B[y];
-            for (x = 0x01; x <= 0x80; x <<= 1) {
-                if (flags & x)
-                    *s->pixel_ptr++ = P1;
-                else
-                    *s->pixel_ptr++ = P0;
-            }
-            s->pixel_ptr += s->line_inc;
-        }
-
-    } else {
-
-        /* need 2 more bytes from the stream */
-        CHECK_STREAM_PTR(2);
-        B[0] = *s->stream_ptr++;
-        B[1] = *s->stream_ptr++;
-
-        flags = (B[1] << 8) | B[0];
-        bitmask = 0x0001;
-        for (y = 0; y < 8; y += 2) {
-            for (x = 0; x < 8; x += 2, bitmask <<= 1) {
-                if (flags & bitmask) {
-                    *(s->pixel_ptr + x) = P1;
-                    *(s->pixel_ptr + x + 1) = P1;
-                    *(s->pixel_ptr + s->stride + x) = P1;
-                    *(s->pixel_ptr + s->stride + x + 1) = P1;
-                } else {
-                    *(s->pixel_ptr + x) = P0;
-                    *(s->pixel_ptr + x + 1) = P0;
-                    *(s->pixel_ptr + s->stride + x) = P0;
-                    *(s->pixel_ptr + s->stride + x + 1) = P0;
-                }
-            }
-            s->pixel_ptr += s->stride * 2;
-        }
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char P[8];
-    unsigned char B[8];
-    unsigned int flags = 0;
-    unsigned int bitmask = 0;
-    unsigned char P0 = 0, P1 = 0;
-    int lower_half = 0;
-
-    /* 2-color encoding for each 4x4 quadrant, or 2-color encoding on
-     * either top and bottom or left and right halves */
-    CHECK_STREAM_PTR(2);
-
-    P[0] = *s->stream_ptr++;
-    P[1] = *s->stream_ptr++;
-
-    if (P[0] <= P[1]) {
-
-        /* need 12 more bytes */
-        CHECK_STREAM_PTR(12);
-        B[0] = *s->stream_ptr++;  B[1] = *s->stream_ptr++;
-        P[2] = *s->stream_ptr++;  P[3] = *s->stream_ptr++;
-        B[2] = *s->stream_ptr++;  B[3] = *s->stream_ptr++;
-        P[4] = *s->stream_ptr++;  P[5] = *s->stream_ptr++;
-        B[4] = *s->stream_ptr++;  B[5] = *s->stream_ptr++;
-        P[6] = *s->stream_ptr++;  P[7] = *s->stream_ptr++;
-        B[6] = *s->stream_ptr++;  B[7] = *s->stream_ptr++;
-
-        for (y = 0; y < 8; y++) {
-
-            /* time to reload flags? */
-            if (y == 0) {
-                flags =
-                    ((B[0] & 0xF0) <<  4) | ((B[4] & 0xF0) <<  8) |
-                    ((B[0] & 0x0F)      ) | ((B[4] & 0x0F) <<  4) |
-                    ((B[1] & 0xF0) << 20) | ((B[5] & 0xF0) << 24) |
-                    ((B[1] & 0x0F) << 16) | ((B[5] & 0x0F) << 20);
-                bitmask = 0x00000001;
-                lower_half = 0;  /* still on top half */
-            } else if (y == 4) {
-                flags =
-                    ((B[2] & 0xF0) <<  4) | ((B[6] & 0xF0) <<  8) |
-                    ((B[2] & 0x0F)      ) | ((B[6] & 0x0F) <<  4) |
-                    ((B[3] & 0xF0) << 20) | ((B[7] & 0xF0) << 24) |
-                    ((B[3] & 0x0F) << 16) | ((B[7] & 0x0F) << 20);
-                bitmask = 0x00000001;
-                lower_half = 2;
-            }
-
-            for (x = 0; x < 8; x++, bitmask <<= 1) {
-                /* get the pixel values ready for this quadrant */
-                if (x == 0) {
-                    P0 = P[lower_half + 0];
-                    P1 = P[lower_half + 1];
-                } else if (x == 4) {
-                    P0 = P[lower_half + 4];
-                    P1 = P[lower_half + 5];
-                }
-
-                if (flags & bitmask)
-                    *s->pixel_ptr++ = P1;
-                else
-                    *s->pixel_ptr++ = P0;
-            }
-            s->pixel_ptr += s->line_inc;
-        }
-
-    } else {
-
-        /* need 10 more bytes */
-        CHECK_STREAM_PTR(10);
-        B[0] = *s->stream_ptr++;  B[1] = *s->stream_ptr++;
-        B[2] = *s->stream_ptr++;  B[3] = *s->stream_ptr++;
-        P[2] = *s->stream_ptr++;  P[3] = *s->stream_ptr++;
-        B[4] = *s->stream_ptr++;  B[5] = *s->stream_ptr++;
-        B[6] = *s->stream_ptr++;  B[7] = *s->stream_ptr++;
-
-        if (P[2] <= P[3]) {
-
-            /* vertical split; left & right halves are 2-color encoded */
-
-            for (y = 0; y < 8; y++) {
-
-                /* time to reload flags? */
-                if (y == 0) {
-                    flags =
-                        ((B[0] & 0xF0) <<  4) | ((B[4] & 0xF0) <<  8) |
-                        ((B[0] & 0x0F)      ) | ((B[4] & 0x0F) <<  4) |
-                        ((B[1] & 0xF0) << 20) | ((B[5] & 0xF0) << 24) |
-                        ((B[1] & 0x0F) << 16) | ((B[5] & 0x0F) << 20);
-                    bitmask = 0x00000001;
-                } else if (y == 4) {
-                    flags =
-                        ((B[2] & 0xF0) <<  4) | ((B[6] & 0xF0) <<  8) |
-                        ((B[2] & 0x0F)      ) | ((B[6] & 0x0F) <<  4) |
-                        ((B[3] & 0xF0) << 20) | ((B[7] & 0xF0) << 24) |
-                        ((B[3] & 0x0F) << 16) | ((B[7] & 0x0F) << 20);
-                    bitmask = 0x00000001;
-                }
-
-                for (x = 0; x < 8; x++, bitmask <<= 1) {
-                    /* get the pixel values ready for this half */
-                    if (x == 0) {
-                        P0 = P[0];
-                        P1 = P[1];
-                    } else if (x == 4) {
-                        P0 = P[2];
-                        P1 = P[3];
-                    }
-
-                    if (flags & bitmask)
-                        *s->pixel_ptr++ = P1;
-                    else
-                        *s->pixel_ptr++ = P0;
-                }
-                s->pixel_ptr += s->line_inc;
-            }
-
-        } else {
-
-            /* horizontal split; top & bottom halves are 2-color encoded */
-
-            for (y = 0; y < 8; y++) {
-
-                flags = B[y];
-                if (y == 0) {
-                    P0 = P[0];
-                    P1 = P[1];
-                } else if (y == 4) {
-                    P0 = P[2];
-                    P1 = P[3];
-                }
-
-                for (bitmask = 0x01; bitmask <= 0x80; bitmask <<= 1) {
-
-                    if (flags & bitmask)
-                        *s->pixel_ptr++ = P1;
-                    else
-                        *s->pixel_ptr++ = P0;
-                }
-                s->pixel_ptr += s->line_inc;
-            }
-        }
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char P[4];
-    unsigned char B[4];
-    unsigned int flags = 0;
-    int shifter = 0;
-    unsigned char pix;
-
-    /* 4-color encoding */
-    CHECK_STREAM_PTR(4);
-
-    for (y = 0; y < 4; y++)
-        P[y] = *s->stream_ptr++;
-
-    if ((P[0] <= P[1]) && (P[2] <= P[3])) {
-
-        /* 1 of 4 colors for each pixel, need 16 more bytes */
-        CHECK_STREAM_PTR(16);
-
-        for (y = 0; y < 8; y++) {
-            /* get the next set of 8 2-bit flags */
-            flags = (s->stream_ptr[1] << 8) | s->stream_ptr[0];
-            s->stream_ptr += 2;
-            for (x = 0, shifter = 0; x < 8; x++, shifter += 2) {
-                *s->pixel_ptr++ = P[(flags >> shifter) & 0x03];
-            }
-            s->pixel_ptr += s->line_inc;
-        }
-
-    } else if ((P[0] <= P[1]) && (P[2] > P[3])) {
-
-        /* 1 of 4 colors for each 2x2 block, need 4 more bytes */
-        CHECK_STREAM_PTR(4);
-
-        B[0] = *s->stream_ptr++;
-        B[1] = *s->stream_ptr++;
-        B[2] = *s->stream_ptr++;
-        B[3] = *s->stream_ptr++;
-        flags = (B[3] << 24) | (B[2] << 16) | (B[1] << 8) | B[0];
-        shifter = 0;
-
-        for (y = 0; y < 8; y += 2) {
-            for (x = 0; x < 8; x += 2, shifter += 2) {
-                pix = P[(flags >> shifter) & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + x + 1) = pix;
-                *(s->pixel_ptr + s->stride + x) = pix;
-                *(s->pixel_ptr + s->stride + x + 1) = pix;
-            }
-            s->pixel_ptr += s->stride * 2;
-        }
-
-    } else if ((P[0] > P[1]) && (P[2] <= P[3])) {
-
-        /* 1 of 4 colors for each 2x1 block, need 8 more bytes */
-        CHECK_STREAM_PTR(8);
-
-        for (y = 0; y < 8; y++) {
-            /* time to reload flags? */
-            if ((y == 0) || (y == 4)) {
-                B[0] = *s->stream_ptr++;
-                B[1] = *s->stream_ptr++;
-                B[2] = *s->stream_ptr++;
-                B[3] = *s->stream_ptr++;
-                flags = (B[3] << 24) | (B[2] << 16) | (B[1] << 8) | B[0];
-                shifter = 0;
-            }
-            for (x = 0; x < 8; x += 2, shifter += 2) {
-                pix = P[(flags >> shifter) & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + x + 1) = pix;
-            }
-            s->pixel_ptr += s->stride;
-        }
-
-    } else {
-
-        /* 1 of 4 colors for each 1x2 block, need 8 more bytes */
-        CHECK_STREAM_PTR(8);
-
-        for (y = 0; y < 8; y += 2) {
-            /* time to reload flags? */
-            if ((y == 0) || (y == 4)) {
-                B[0] = *s->stream_ptr++;
-                B[1] = *s->stream_ptr++;
-                B[2] = *s->stream_ptr++;
-                B[3] = *s->stream_ptr++;
-                flags = (B[3] << 24) | (B[2] << 16) | (B[1] << 8) | B[0];
-                shifter = 0;
-            }
-            for (x = 0; x < 8; x++, shifter += 2) {
-                pix = P[(flags >> shifter) & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + s->stride + x) = pix;
-            }
-            s->pixel_ptr += s->stride * 2;
-        }
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char P[16];
-    unsigned char B[16];
-    int flags = 0;
-    int shifter = 0;
-    int index;
-    int split;
-    int lower_half;
-
-    /* 4-color encoding for each 4x4 quadrant, or 4-color encoding on
-     * either top and bottom or left and right halves */
-    CHECK_STREAM_PTR(4);
-
-    for (y = 0; y < 4; y++)
-        P[y] = *s->stream_ptr++;
-
-    if (P[0] <= P[1]) {
-
-        /* 4-color encoding for each quadrant; need 28 more bytes */
-        CHECK_STREAM_PTR(28);
-
-        for (y = 0; y < 4; y++)
-            B[y] = *s->stream_ptr++;
-        for (y = 4; y < 16; y += 4) {
-            for (x = y; x < y + 4; x++)
-                P[x] = *s->stream_ptr++;
-            for (x = y; x < y + 4; x++)
-                B[x] = *s->stream_ptr++;
-        }
-
-        for (y = 0; y < 8; y++) {
-
-            lower_half = (y >= 4) ? 4 : 0;
-            flags = (B[y + 8] << 8) | B[y];
-
-            for (x = 0, shifter = 0; x < 8; x++, shifter += 2) {
-                split = (x >= 4) ? 8 : 0;
-                index = split + lower_half + ((flags >> shifter) & 0x03);
-                *s->pixel_ptr++ = P[index];
-            }
-
-            s->pixel_ptr += s->line_inc;
-        }
-
-    } else {
-
-        /* 4-color encoding for either left and right or top and bottom
-         * halves; need 20 more bytes */
-        CHECK_STREAM_PTR(20);
-
-        for (y = 0; y < 8; y++)
-            B[y] = *s->stream_ptr++;
-        for (y = 4; y < 8; y++)
-            P[y] = *s->stream_ptr++;
-        for (y = 8; y < 16; y++)
-            B[y] = *s->stream_ptr++;
-
-        if (P[4] <= P[5]) {
-
-            /* block is divided into left and right halves */
-            for (y = 0; y < 8; y++) {
-
-                flags = (B[y + 8] << 8) | B[y];
-                split = 0;
-
-                for (x = 0, shifter = 0; x < 8; x++, shifter += 2) {
-                    if (x == 4)
-                        split = 4;
-                    *s->pixel_ptr++ = P[split + ((flags >> shifter) & 0x03)];
-                }
-
-                s->pixel_ptr += s->line_inc;
-            }
-
-        } else {
-
-            /* block is divided into top and bottom halves */
-            split = 0;
-            for (y = 0; y < 8; y++) {
-
-                flags = (B[y * 2 + 1] << 8) | B[y * 2];
-                if (y == 4)
-                    split = 4;
-
-                for (x = 0, shifter = 0; x < 8; x++, shifter += 2)
-                    *s->pixel_ptr++ = P[split + ((flags >> shifter) & 0x03)];
-
-                s->pixel_ptr += s->line_inc;
-            }
-        }
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xB(IpvideoContext *s)
-{
-    int x, y;
-
-    /* 64-color encoding (each pixel in block is a different color) */
-    CHECK_STREAM_PTR(64);
-
-    for (y = 0; y < 8; y++) {
-        for (x = 0; x < 8; x++) {
-            *s->pixel_ptr++ = *s->stream_ptr++;
-        }
-        s->pixel_ptr += s->line_inc;
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xC(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char pix;
-
-    /* 16-color block encoding: each 2x2 block is a different color */
-    CHECK_STREAM_PTR(16);
-
-    for (y = 0; y < 8; y += 2) {
-        for (x = 0; x < 8; x += 2) {
-            pix = *s->stream_ptr++;
-            *(s->pixel_ptr + x) = pix;
-            *(s->pixel_ptr + x + 1) = pix;
-            *(s->pixel_ptr + s->stride + x) = pix;
-            *(s->pixel_ptr + s->stride + x + 1) = pix;
-        }
-        s->pixel_ptr += s->stride * 2;
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char P[4];
-    unsigned char index = 0;
-
-    /* 4-color block encoding: each 4x4 block is a different color */
-    CHECK_STREAM_PTR(4);
-
-    for (y = 0; y < 4; y++)
-        P[y] = *s->stream_ptr++;
-
-    for (y = 0; y < 8; y++) {
-        if (y < 4)
-            index = 0;
-        else
-            index = 2;
-
-        for (x = 0; x < 8; x++) {
-            if (x == 4)
-                index++;
-            *s->pixel_ptr++ = P[index];
-        }
-        s->pixel_ptr += s->line_inc;
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xE(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char pix;
-
-    /* 1-color encoding: the whole block is 1 solid color */
-    CHECK_STREAM_PTR(1);
-    pix = *s->stream_ptr++;
-
-    for (y = 0; y < 8; y++) {
-        for (x = 0; x < 8; x++) {
-            *s->pixel_ptr++ = pix;
-        }
-        s->pixel_ptr += s->line_inc;
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int ipvideo_decode_block_opcode_0xF(IpvideoContext *s)
-{
-    int x, y;
-    unsigned char sample0, sample1;
-
-    /* dithered encoding */
-    CHECK_STREAM_PTR(2);
-    sample0 = *s->stream_ptr++;
-    sample1 = *s->stream_ptr++;
-
-    for (y = 0; y < 8; y++) {
-        for (x = 0; x < 8; x += 2) {
-            if (y & 1) {
-                *s->pixel_ptr++ = sample1;
-                *s->pixel_ptr++ = sample0;
-            } else {
-                *s->pixel_ptr++ = sample0;
-                *s->pixel_ptr++ = sample1;
-            }
-        }
-        s->pixel_ptr += s->line_inc;
-    }
-
-    /* report success */
-    return 0;
-}
-
-static int (*ipvideo_decode_block[16])(IpvideoContext *s);
-
-static void ipvideo_decode_opcodes(IpvideoContext *s)
-{
-    int x, y;
-    int index = 0;
-    unsigned char opcode;
-    int ret;
-    int code_counts[16];
-    static int frame = 0;
-
-    debug_interplay("------------------ frame %d\n", frame);
-    frame++;
-
-    for (x = 0; x < 16; x++)
-        code_counts[x] = 0;
-
-    /* this is PAL8, so make the palette available */
-    memcpy(s->current_frame.data[1], s->avctx->palctrl->palette, PALETTE_COUNT * 4);
-
-    s->stride = s->current_frame.linesize[0];
-    s->stream_ptr = s->buf + 14;  /* data starts 14 bytes in */
-    s->stream_end = s->buf + s->size;
-    s->line_inc = s->stride - 8;
-    s->upper_motion_limit_offset = (s->avctx->height - 8) * s->stride
-        + s->avctx->width - 8;
-    s->dsp = s->dsp;
-
-    for (y = 0; y < (s->stride * s->avctx->height); y += s->stride * 8) {
-        for (x = y; x < y + s->avctx->width; x += 8) {
-            /* bottom nibble first, then top nibble (which makes it
-             * hard to use a GetBitcontext) */
-            if (index & 1)
-                opcode = s->decoding_map[index >> 1] >> 4;
-            else
-                opcode = s->decoding_map[index >> 1] & 0xF;
-            index++;
-
-            debug_interplay("  block @ (%3d, %3d): encoding 0x%X, data ptr @ %p\n",
-                x - y, y / s->stride, opcode, s->stream_ptr);
-            code_counts[opcode]++;
-
-            s->pixel_ptr = s->current_frame.data[0] + x;
-            ret = ipvideo_decode_block[opcode](s);
-            if (ret != 0) {
-                av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode problem on frame %d, @ block (%d, %d)\n",
-                    frame, x - y, y / s->stride);
-                return;
-            }
-        }
-    }
-    if ((s->stream_ptr != s->stream_end) &&
-        (s->stream_ptr + 1 != s->stream_end)) {
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %td bytes left over\n",
-            s->stream_end - s->stream_ptr);
-    }
-}
-
-static int ipvideo_decode_init(AVCodecContext *avctx)
-{
-    IpvideoContext *s = avctx->priv_data;
-
-    s->avctx = avctx;
-
-    if (s->avctx->palctrl == NULL) {
-        av_log(avctx, AV_LOG_ERROR, " Interplay video: palette expected.\n");
-        return -1;
-    }
-
-    avctx->pix_fmt = PIX_FMT_PAL8;
-    avctx->has_b_frames = 0;
-    dsputil_init(&s->dsp, avctx);
-
-    /* decoding map contains 4 bits of information per 8x8 block */
-    s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
-
-    /* assign block decode functions */
-    ipvideo_decode_block[0x0] = ipvideo_decode_block_opcode_0x0;
-    ipvideo_decode_block[0x1] = ipvideo_decode_block_opcode_0x1;
-    ipvideo_decode_block[0x2] = ipvideo_decode_block_opcode_0x2;
-    ipvideo_decode_block[0x3] = ipvideo_decode_block_opcode_0x3;
-    ipvideo_decode_block[0x4] = ipvideo_decode_block_opcode_0x4;
-    ipvideo_decode_block[0x5] = ipvideo_decode_block_opcode_0x5;
-    ipvideo_decode_block[0x6] = ipvideo_decode_block_opcode_0x6;
-    ipvideo_decode_block[0x7] = ipvideo_decode_block_opcode_0x7;
-    ipvideo_decode_block[0x8] = ipvideo_decode_block_opcode_0x8;
-    ipvideo_decode_block[0x9] = ipvideo_decode_block_opcode_0x9;
-    ipvideo_decode_block[0xA] = ipvideo_decode_block_opcode_0xA;
-    ipvideo_decode_block[0xB] = ipvideo_decode_block_opcode_0xB;
-    ipvideo_decode_block[0xC] = ipvideo_decode_block_opcode_0xC;
-    ipvideo_decode_block[0xD] = ipvideo_decode_block_opcode_0xD;
-    ipvideo_decode_block[0xE] = ipvideo_decode_block_opcode_0xE;
-    ipvideo_decode_block[0xF] = ipvideo_decode_block_opcode_0xF;
-
-    s->current_frame.data[0] = s->last_frame.data[0] =
-    s->second_last_frame.data[0] = NULL;
-
-    return 0;
-}
-
-static int ipvideo_decode_frame(AVCodecContext *avctx,
-                                void *data, int *data_size,
-                                uint8_t *buf, int buf_size)
-{
-    IpvideoContext *s = avctx->priv_data;
-    AVPaletteControl *palette_control = avctx->palctrl;
-
-    /* compressed buffer needs to be large enough to at least hold an entire
-     * decoding map */
-    if (buf_size < s->decoding_map_size)
-        return buf_size;
-
-    s->decoding_map = buf;
-    s->buf = buf + s->decoding_map_size;
-    s->size = buf_size - s->decoding_map_size;
-
-    s->current_frame.reference = 3;
-    if (avctx->get_buffer(avctx, &s->current_frame)) {
-        av_log(avctx, AV_LOG_ERROR, "  Interplay Video: get_buffer() failed\n");
-        return -1;
-    }
-
-    ipvideo_decode_opcodes(s);
-
-    if (palette_control->palette_changed) {
-        palette_control->palette_changed = 0;
-        s->current_frame.palette_has_changed = 1;
-    }
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = s->current_frame;
-
-    /* shuffle frames */
-    if (s->second_last_frame.data[0])
-        avctx->release_buffer(avctx, &s->second_last_frame);
-    s->second_last_frame = s->last_frame;
-    s->last_frame = s->current_frame;
-    s->current_frame.data[0] = NULL;  /* catch any access attempts */
-
-    /* report that the buffer was completely consumed */
-    return buf_size;
-}
-
-static int ipvideo_decode_end(AVCodecContext *avctx)
-{
-    IpvideoContext *s = avctx->priv_data;
-
-    /* release the last frame */
-    if (s->last_frame.data[0])
-        avctx->release_buffer(avctx, &s->last_frame);
-    if (s->second_last_frame.data[0])
-        avctx->release_buffer(avctx, &s->second_last_frame);
-
-    return 0;
-}
-
-AVCodec interplay_video_decoder = {
-    "interplayvideo",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_INTERPLAY_VIDEO,
-    sizeof(IpvideoContext),
-    ipvideo_decode_init,
-    NULL,
-    ipvideo_decode_end,
-    ipvideo_decode_frame,
-    CODEC_CAP_DR1,
-};
--- a/src/ffmpeg/libavcodec/nuv.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
- * NuppelVideo decoder
- * Copyright (c) 2006 Reimar Doeffinger
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "common.h"
-#include "avcodec.h"
-
-#include "bswap.h"
-#include "dsputil.h"
-#include "lzo.h"
-#include "rtjpeg.h"
-
-typedef struct {
-    AVFrame pic;
-    int width, height;
-    unsigned int decomp_size;
-    unsigned char* decomp_buf;
-    uint32_t lq[64], cq[64];
-    RTJpegContext rtj;
-    DSPContext dsp;
-} NuvContext;
-
-/**
- * \brief copy frame data from buffer to AVFrame, handling stride.
- * \param f destination AVFrame
- * \param src source buffer, does not use any line-stride
- * \param width width of the video frame
- * \param height height of the video frame
- */
-static void copy_frame(AVFrame *f, uint8_t *src,
-                       int width, int height) {
-    AVPicture pic;
-    avpicture_fill(&pic, src, PIX_FMT_YUV420P, width, height);
-    img_copy((AVPicture *)f, &pic, PIX_FMT_YUV420P, width, height);
-}
-
-/**
- * \brief extract quantization tables from codec data into our context
- */
-static int get_quant(AVCodecContext *avctx, NuvContext *c,
-                     uint8_t *buf, int size) {
-    int i;
-    if (size < 2 * 64 * 4) {
-        av_log(avctx, AV_LOG_ERROR, "insufficient rtjpeg quant data\n");
-        return -1;
-    }
-    for (i = 0; i < 64; i++, buf += 4)
-        c->lq[i] = LE_32(buf);
-    for (i = 0; i < 64; i++, buf += 4)
-        c->cq[i] = LE_32(buf);
-    return 0;
-}
-
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                        uint8_t *buf, int buf_size) {
-    NuvContext *c = (NuvContext *)avctx->priv_data;
-    AVFrame *picture = data;
-    int orig_size = buf_size;
-    enum {NUV_UNCOMPRESSED = '0', NUV_RTJPEG = '1',
-          NUV_RTJPEG_IN_LZO = '2', NUV_LZO = '3',
-          NUV_BLACK = 'N', NUV_COPY_LAST = 'L'} comptype;
-
-    if (buf_size < 12) {
-        av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");
-        return -1;
-    }
-
-    if (c->pic.data[0])
-        avctx->release_buffer(avctx, &c->pic);
-    c->pic.reference = 1;
-    c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
-                          FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
-    if (avctx->get_buffer(avctx, &c->pic) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-        return -1;
-    }
-
-    // codec data (rtjpeg quant tables)
-    if (buf[0] == 'D' && buf[1] == 'R') {
-        int ret;
-        // skip rest of the frameheader.
-        buf = &buf[12];
-        buf_size -= 12;
-        ret = get_quant(avctx, c, buf, buf_size);
-        if (ret < 0)
-            return ret;
-        rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
-        return orig_size;
-    }
-
-    if (buf[0] != 'V' || buf_size < 12) {
-        av_log(avctx, AV_LOG_ERROR, "not a nuv video frame\n");
-        return -1;
-    }
-    comptype = buf[1];
-    // skip rest of the frameheader.
-    buf = &buf[12];
-    buf_size -= 12;
-
-    c->pic.pict_type = FF_I_TYPE;
-    c->pic.key_frame = 1;
-    // decompress/copy/whatever data
-    switch (comptype) {
-        case NUV_UNCOMPRESSED: {
-            int height = c->height;
-            if (buf_size < c->width * height * 3 / 2) {
-                av_log(avctx, AV_LOG_ERROR, "uncompressed frame too short\n");
-                height = buf_size / c->width / 3 * 2;
-            }
-            copy_frame(&c->pic, buf, c->width, height);
-            break;
-        }
-        case NUV_RTJPEG: {
-            rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size);
-            break;
-        }
-        case NUV_RTJPEG_IN_LZO: {
-            int outlen = c->decomp_size, inlen = buf_size;
-            if (lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen))
-                av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
-            rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, c->decomp_buf, c->decomp_size);
-            break;
-        }
-        case NUV_LZO: {
-            int outlen = c->decomp_size, inlen = buf_size;
-            if (lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen))
-                av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
-            copy_frame(&c->pic, c->decomp_buf, c->width, c->height);
-            break;
-        }
-        case NUV_BLACK: {
-            memset(c->pic.data[0], 0, c->width * c->height);
-            memset(c->pic.data[1], 128, c->width * c->height / 4);
-            memset(c->pic.data[2], 128, c->width * c->height / 4);
-            break;
-        }
-        case NUV_COPY_LAST: {
-            c->pic.pict_type = FF_P_TYPE;
-            c->pic.key_frame = 0;
-            /* nothing more to do here */
-            break;
-        }
-        default:
-            av_log(avctx, AV_LOG_ERROR, "unknown compression\n");
-            return -1;
-    }
-
-    *picture = c->pic;
-    *data_size = sizeof(AVFrame);
-    return orig_size;
-}
-
-static int decode_init(AVCodecContext *avctx) {
-    NuvContext *c = (NuvContext *)avctx->priv_data;
-    avctx->width = (avctx->width + 1) & ~1;
-    avctx->height = (avctx->height + 1) & ~1;
-    if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
-        return 1;
-    }
-    avctx->has_b_frames = 0;
-    avctx->pix_fmt = PIX_FMT_YUV420P;
-    c->pic.data[0] = NULL;
-    c->width = avctx->width;
-    c->height = avctx->height;
-    c->decomp_size = c->height * c->width * 3 / 2;
-    c->decomp_buf = av_malloc(c->decomp_size + LZO_OUTPUT_PADDING);
-    if (!c->decomp_buf) {
-        av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
-        return 1;
-    }
-    dsputil_init(&c->dsp, avctx);
-    if (avctx->extradata_size)
-        get_quant(avctx, c, avctx->extradata, avctx->extradata_size);
-    rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
-    return 0;
-}
-
-static int decode_end(AVCodecContext *avctx) {
-    NuvContext *c = (NuvContext *)avctx->priv_data;
-    av_freep(&c->decomp_buf);
-    if (c->pic.data[0])
-        avctx->release_buffer(avctx, &c->pic);
-    return 0;
-}
-
-AVCodec nuv_decoder = {
-    "nuv",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_NUV,
-    sizeof(NuvContext),
-    decode_init,
-    NULL,
-    decode_end,
-    decode_frame,
-    CODEC_CAP_DR1,
-};
-
--- a/src/ffmpeg/libavcodec/rv10.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,803 +0,0 @@
-/*
- * RV10 codec
- * Copyright (c) 2000,2001 Fabrice Bellard.
- * Copyright (c) 2002-2004 Michael Niedermayer
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file rv10.c
- * RV10 codec.
- */
-
-#include "avcodec.h"
-#include "dsputil.h"
-#include "mpegvideo.h"
-
-//#define DEBUG
-
-#define DC_VLC_BITS 14 //FIXME find a better solution
-
-static const uint16_t rv_lum_code[256] =
-{
- 0x3e7f, 0x0f00, 0x0f01, 0x0f02, 0x0f03, 0x0f04, 0x0f05, 0x0f06,
- 0x0f07, 0x0f08, 0x0f09, 0x0f0a, 0x0f0b, 0x0f0c, 0x0f0d, 0x0f0e,
- 0x0f0f, 0x0f10, 0x0f11, 0x0f12, 0x0f13, 0x0f14, 0x0f15, 0x0f16,
- 0x0f17, 0x0f18, 0x0f19, 0x0f1a, 0x0f1b, 0x0f1c, 0x0f1d, 0x0f1e,
- 0x0f1f, 0x0f20, 0x0f21, 0x0f22, 0x0f23, 0x0f24, 0x0f25, 0x0f26,
- 0x0f27, 0x0f28, 0x0f29, 0x0f2a, 0x0f2b, 0x0f2c, 0x0f2d, 0x0f2e,
- 0x0f2f, 0x0f30, 0x0f31, 0x0f32, 0x0f33, 0x0f34, 0x0f35, 0x0f36,
- 0x0f37, 0x0f38, 0x0f39, 0x0f3a, 0x0f3b, 0x0f3c, 0x0f3d, 0x0f3e,
- 0x0f3f, 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386,
- 0x0387, 0x0388, 0x0389, 0x038a, 0x038b, 0x038c, 0x038d, 0x038e,
- 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396,
- 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e,
- 0x039f, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6,
- 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce,
- 0x00cf, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056,
- 0x0057, 0x0020, 0x0021, 0x0022, 0x0023, 0x000c, 0x000d, 0x0004,
- 0x0000, 0x0005, 0x000e, 0x000f, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
- 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
- 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
- 0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
- 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
- 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
- 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
- 0x0f40, 0x0f41, 0x0f42, 0x0f43, 0x0f44, 0x0f45, 0x0f46, 0x0f47,
- 0x0f48, 0x0f49, 0x0f4a, 0x0f4b, 0x0f4c, 0x0f4d, 0x0f4e, 0x0f4f,
- 0x0f50, 0x0f51, 0x0f52, 0x0f53, 0x0f54, 0x0f55, 0x0f56, 0x0f57,
- 0x0f58, 0x0f59, 0x0f5a, 0x0f5b, 0x0f5c, 0x0f5d, 0x0f5e, 0x0f5f,
- 0x0f60, 0x0f61, 0x0f62, 0x0f63, 0x0f64, 0x0f65, 0x0f66, 0x0f67,
- 0x0f68, 0x0f69, 0x0f6a, 0x0f6b, 0x0f6c, 0x0f6d, 0x0f6e, 0x0f6f,
- 0x0f70, 0x0f71, 0x0f72, 0x0f73, 0x0f74, 0x0f75, 0x0f76, 0x0f77,
- 0x0f78, 0x0f79, 0x0f7a, 0x0f7b, 0x0f7c, 0x0f7d, 0x0f7e, 0x0f7f,
-};
-
-static const uint8_t rv_lum_bits[256] =
-{
- 14, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  7,  7,  7,  7,  7,  7,  7,
-  7,  6,  6,  6,  6,  5,  5,  4,
-  2,  4,  5,  5,  6,  6,  6,  6,
-  7,  7,  7,  7,  7,  7,  7,  7,
-  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
-};
-
-static const uint16_t rv_chrom_code[256] =
-{
- 0xfe7f, 0x3f00, 0x3f01, 0x3f02, 0x3f03, 0x3f04, 0x3f05, 0x3f06,
- 0x3f07, 0x3f08, 0x3f09, 0x3f0a, 0x3f0b, 0x3f0c, 0x3f0d, 0x3f0e,
- 0x3f0f, 0x3f10, 0x3f11, 0x3f12, 0x3f13, 0x3f14, 0x3f15, 0x3f16,
- 0x3f17, 0x3f18, 0x3f19, 0x3f1a, 0x3f1b, 0x3f1c, 0x3f1d, 0x3f1e,
- 0x3f1f, 0x3f20, 0x3f21, 0x3f22, 0x3f23, 0x3f24, 0x3f25, 0x3f26,
- 0x3f27, 0x3f28, 0x3f29, 0x3f2a, 0x3f2b, 0x3f2c, 0x3f2d, 0x3f2e,
- 0x3f2f, 0x3f30, 0x3f31, 0x3f32, 0x3f33, 0x3f34, 0x3f35, 0x3f36,
- 0x3f37, 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c, 0x3f3d, 0x3f3e,
- 0x3f3f, 0x0f80, 0x0f81, 0x0f82, 0x0f83, 0x0f84, 0x0f85, 0x0f86,
- 0x0f87, 0x0f88, 0x0f89, 0x0f8a, 0x0f8b, 0x0f8c, 0x0f8d, 0x0f8e,
- 0x0f8f, 0x0f90, 0x0f91, 0x0f92, 0x0f93, 0x0f94, 0x0f95, 0x0f96,
- 0x0f97, 0x0f98, 0x0f99, 0x0f9a, 0x0f9b, 0x0f9c, 0x0f9d, 0x0f9e,
- 0x0f9f, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6,
- 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce,
- 0x03cf, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6,
- 0x00e7, 0x0030, 0x0031, 0x0032, 0x0033, 0x0008, 0x0009, 0x0002,
- 0x0000, 0x0003, 0x000a, 0x000b, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
- 0x03d0, 0x03d1, 0x03d2, 0x03d3, 0x03d4, 0x03d5, 0x03d6, 0x03d7,
- 0x03d8, 0x03d9, 0x03da, 0x03db, 0x03dc, 0x03dd, 0x03de, 0x03df,
- 0x0fa0, 0x0fa1, 0x0fa2, 0x0fa3, 0x0fa4, 0x0fa5, 0x0fa6, 0x0fa7,
- 0x0fa8, 0x0fa9, 0x0faa, 0x0fab, 0x0fac, 0x0fad, 0x0fae, 0x0faf,
- 0x0fb0, 0x0fb1, 0x0fb2, 0x0fb3, 0x0fb4, 0x0fb5, 0x0fb6, 0x0fb7,
- 0x0fb8, 0x0fb9, 0x0fba, 0x0fbb, 0x0fbc, 0x0fbd, 0x0fbe, 0x0fbf,
- 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44, 0x3f45, 0x3f46, 0x3f47,
- 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c, 0x3f4d, 0x3f4e, 0x3f4f,
- 0x3f50, 0x3f51, 0x3f52, 0x3f53, 0x3f54, 0x3f55, 0x3f56, 0x3f57,
- 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, 0x3f5c, 0x3f5d, 0x3f5e, 0x3f5f,
- 0x3f60, 0x3f61, 0x3f62, 0x3f63, 0x3f64, 0x3f65, 0x3f66, 0x3f67,
- 0x3f68, 0x3f69, 0x3f6a, 0x3f6b, 0x3f6c, 0x3f6d, 0x3f6e, 0x3f6f,
- 0x3f70, 0x3f71, 0x3f72, 0x3f73, 0x3f74, 0x3f75, 0x3f76, 0x3f77,
- 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c, 0x3f7d, 0x3f7e, 0x3f7f,
-};
-
-static const uint8_t rv_chrom_bits[256] =
-{
- 16, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10,  8,  8,  8,  8,  8,  8,  8,
-  8,  6,  6,  6,  6,  4,  4,  3,
-  2,  3,  4,  4,  6,  6,  6,  6,
-  8,  8,  8,  8,  8,  8,  8,  8,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
-};
-
-static VLC rv_dc_lum, rv_dc_chrom;
-
-int rv_decode_dc(MpegEncContext *s, int n)
-{
-    int code;
-
-    if (n < 4) {
-        code = get_vlc2(&s->gb, rv_dc_lum.table, DC_VLC_BITS, 2);
-        if (code < 0) {
-            /* XXX: I don't understand why they use LONGER codes than
-               necessary. The following code would be completely useless
-               if they had thought about it !!! */
-            code = get_bits(&s->gb, 7);
-            if (code == 0x7c) {
-                code = (int8_t)(get_bits(&s->gb, 7) + 1);
-            } else if (code == 0x7d) {
-                code = -128 + get_bits(&s->gb, 7);
-            } else if (code == 0x7e) {
-                if (get_bits(&s->gb, 1) == 0)
-                    code = (int8_t)(get_bits(&s->gb, 8) + 1);
-                else
-                    code = (int8_t)(get_bits(&s->gb, 8));
-            } else if (code == 0x7f) {
-                get_bits(&s->gb, 11);
-                code = 1;
-            }
-        } else {
-            code -= 128;
-        }
-    } else {
-        code = get_vlc2(&s->gb, rv_dc_chrom.table, DC_VLC_BITS, 2);
-        /* same remark */
-        if (code < 0) {
-            code = get_bits(&s->gb, 9);
-            if (code == 0x1fc) {
-                code = (int8_t)(get_bits(&s->gb, 7) + 1);
-            } else if (code == 0x1fd) {
-                code = -128 + get_bits(&s->gb, 7);
-            } else if (code == 0x1fe) {
-                get_bits(&s->gb, 9);
-                code = 1;
-            } else {
-                av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n");
-                return 0xffff;
-            }
-        } else {
-            code -= 128;
-        }
-    }
-    return -code;
-}
-
-#ifdef CONFIG_ENCODERS
-
-/* write RV 1.0 compatible frame header */
-void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
-{
-    int full_frame= 0;
-
-    align_put_bits(&s->pb);
-
-    put_bits(&s->pb, 1, 1);     /* marker */
-
-    put_bits(&s->pb, 1, (s->pict_type == P_TYPE));
-
-    put_bits(&s->pb, 1, 0);     /* not PB frame */
-
-    put_bits(&s->pb, 5, s->qscale);
-
-    if (s->pict_type == I_TYPE) {
-        /* specific MPEG like DC coding not used */
-    }
-    /* if multiple packets per frame are sent, the position at which
-       to display the macro blocks is coded here */
-    if(!full_frame){
-        put_bits(&s->pb, 6, 0); /* mb_x */
-        put_bits(&s->pb, 6, 0); /* mb_y */
-        put_bits(&s->pb, 12, s->mb_width * s->mb_height);
-    }
-
-    put_bits(&s->pb, 3, 0);     /* ignored */
-}
-
-void rv20_encode_picture_header(MpegEncContext *s, int picture_number){
-    put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ?
-    put_bits(&s->pb, 1, 0);     /* unknown bit */
-    put_bits(&s->pb, 5, s->qscale);
-
-    put_bits(&s->pb, 8, picture_number&0xFF); //FIXME wrong, but correct is not known
-    s->mb_x= s->mb_y= 0;
-    ff_h263_encode_mba(s);
-
-    put_bits(&s->pb, 1, s->no_rounding);
-
-    assert(s->f_code == 1);
-    assert(s->unrestricted_mv == 1);
-//    assert(s->h263_aic== (s->pict_type == I_TYPE));
-    assert(s->alt_inter_vlc == 0);
-    assert(s->umvplus == 0);
-    assert(s->modified_quant==1);
-    assert(s->loop_filter==1);
-
-    s->h263_aic= s->pict_type == I_TYPE;
-    if(s->h263_aic){
-        s->y_dc_scale_table=
-        s->c_dc_scale_table= ff_aic_dc_scale_table;
-    }else{
-        s->y_dc_scale_table=
-        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
-    }
-}
-
-#if 0 /* unused, remove? */
-static int get_num(GetBitContext *gb)
-{
-    int n, n1;
-
-    n = get_bits(gb, 16);
-    if (n >= 0x4000) {
-        return n - 0x4000;
-    } else {
-        n1 = get_bits(gb, 16);
-        return (n << 16) | n1;
-    }
-}
-#endif
-
-#endif //CONFIG_ENCODERS
-
-/* read RV 1.0 compatible frame header */
-static int rv10_decode_picture_header(MpegEncContext *s)
-{
-    int mb_count, pb_frame, marker, unk, mb_xy;
-
-//printf("ff:%d\n", full_frame);
-    marker = get_bits(&s->gb, 1);
-
-    if (get_bits(&s->gb, 1))
-        s->pict_type = P_TYPE;
-    else
-        s->pict_type = I_TYPE;
-//printf("h:%X ver:%d\n",h,s->rv10_version);
-    if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
-    pb_frame = get_bits(&s->gb, 1);
-
-#ifdef DEBUG
-    av_log(s->avctx, AV_LOG_DEBUG, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
-#endif
-
-    if (pb_frame){
-        av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n");
-        return -1;
-    }
-
-    s->qscale = get_bits(&s->gb, 5);
-    if(s->qscale==0){
-        av_log(s->avctx, AV_LOG_ERROR, "error, qscale:0\n");
-        return -1;
-    }
-
-    if (s->pict_type == I_TYPE) {
-        if (s->rv10_version == 3) {
-            /* specific MPEG like DC coding not used */
-            s->last_dc[0] = get_bits(&s->gb, 8);
-            s->last_dc[1] = get_bits(&s->gb, 8);
-            s->last_dc[2] = get_bits(&s->gb, 8);
-#ifdef DEBUG
-            av_log(s->avctx, AV_LOG_DEBUG, "DC:%d %d %d\n",
-                   s->last_dc[0],
-                   s->last_dc[1],
-                   s->last_dc[2]);
-#endif
-        }
-    }
-    /* if multiple packets per frame are sent, the position at which
-       to display the macro blocks is coded here */
-
-    mb_xy= s->mb_x + s->mb_y*s->mb_width;
-    if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){
-        s->mb_x = get_bits(&s->gb, 6); /* mb_x */
-        s->mb_y = get_bits(&s->gb, 6); /* mb_y */
-        mb_count = get_bits(&s->gb, 12);
-    } else {
-        s->mb_x = 0;
-        s->mb_y = 0;
-        mb_count = s->mb_width * s->mb_height;
-    }
-    unk= get_bits(&s->gb, 3);   /* ignored */
-//printf("%d\n", unk);
-    s->f_code = 1;
-    s->unrestricted_mv = 1;
-
-    return mb_count;
-}
-
-static int rv20_decode_picture_header(MpegEncContext *s)
-{
-    int seq, mb_pos, i;
-
-#if 0
-    GetBitContext gb= s->gb;
-    for(i=0; i<64; i++){
-        av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
-        if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
-    }
-    av_log(s->avctx, AV_LOG_DEBUG, "\n");
-#endif
-#if 0
-    av_log(s->avctx, AV_LOG_DEBUG, "%3dx%03d/%02Xx%02X ", s->width, s->height, s->width/4, s->height/4);
-    for(i=0; i<s->avctx->extradata_size; i++){
-        av_log(s->avctx, AV_LOG_DEBUG, "%02X ", ((uint8_t*)s->avctx->extradata)[i]);
-        if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
-    }
-    av_log(s->avctx, AV_LOG_DEBUG, "\n");
-#endif
-
-    if(s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){
-        if (get_bits(&s->gb, 3)){
-            av_log(s->avctx, AV_LOG_ERROR, "unknown triplet set\n");
-            return -1;
-        }
-    }
-
-    i= get_bits(&s->gb, 2);
-    switch(i){
-    case 0: s->pict_type= I_TYPE; break;
-    case 1: s->pict_type= I_TYPE; break; //hmm ...
-    case 2: s->pict_type= P_TYPE; break;
-    case 3: s->pict_type= B_TYPE; break;
-    default:
-        av_log(s->avctx, AV_LOG_ERROR, "unknown frame type\n");
-        return -1;
-    }
-
-    if(s->last_picture_ptr==NULL && s->pict_type==B_TYPE){
-        av_log(s->avctx, AV_LOG_ERROR, "early B pix\n");
-        return -1;
-    }
-
-    if (get_bits(&s->gb, 1)){
-        av_log(s->avctx, AV_LOG_ERROR, "unknown bit set\n");
-        return -1;
-    }
-
-    s->qscale = get_bits(&s->gb, 5);
-    if(s->qscale==0){
-        av_log(s->avctx, AV_LOG_ERROR, "error, qscale:0\n");
-        return -1;
-    }
-    if(s->avctx->sub_id == 0x30203002){
-        if (get_bits(&s->gb, 1)){
-            av_log(s->avctx, AV_LOG_ERROR, "unknown bit2 set\n");
-            return -1;
-        }
-    }
-
-    if(s->avctx->has_b_frames){
-        int f, new_w, new_h;
-        int v= s->avctx->extradata_size >= 4 ? 7&((uint8_t*)s->avctx->extradata)[1] : 0;
-
-        if (get_bits(&s->gb, 1)){
-            av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n");
-//            return -1;
-        }
-        seq= get_bits(&s->gb, 13)<<2;
-
-        f= get_bits(&s->gb, av_log2(v)+1);
-
-        if(f){
-            new_w= 4*((uint8_t*)s->avctx->extradata)[6+2*f];
-            new_h= 4*((uint8_t*)s->avctx->extradata)[7+2*f];
-        }else{
-            new_w= s->width; //FIXME wrong we of course must save the original in the context
-            new_h= s->height;
-        }
-        if(new_w != s->width || new_h != s->height){
-            av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h);
-            MPV_common_end(s);
-            s->width  = s->avctx->width = new_w;
-            s->height = s->avctx->height= new_h;
-            if (MPV_common_init(s) < 0)
-                return -1;
-        }
-
-        if(s->avctx->debug & FF_DEBUG_PICT_INFO){
-            av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, v);
-        }
-    }else{
-        seq= get_bits(&s->gb, 8)*128;
-    }
-
-//     if(s->avctx->sub_id <= 0x20201002){ //0x20201002 definitely needs this
-    mb_pos= ff_h263_decode_mba(s);
-/*    }else{
-        mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1);
-        s->mb_x= mb_pos % s->mb_width;
-        s->mb_y= mb_pos / s->mb_width;
-    }*/
-//av_log(s->avctx, AV_LOG_DEBUG, "%d\n", seq);
-    seq |= s->time &~0x7FFF;
-    if(seq - s->time >  0x4000) seq -= 0x8000;
-    if(seq - s->time < -0x4000) seq += 0x8000;
-    if(seq != s->time){
-        if(s->pict_type!=B_TYPE){
-            s->time= seq;
-            s->pp_time= s->time - s->last_non_b_time;
-            s->last_non_b_time= s->time;
-        }else{
-            s->time= seq;
-            s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
-            if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
-                av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible from seeking? skipping current b frame\n");
-                return FRAME_SKIPPED;
-            }
-            ff_mpeg4_init_direct_mv(s);
-        }
-    }
-//    printf("%d %d %d %d %d\n", seq, (int)s->time, (int)s->last_non_b_time, s->pp_time, s->pb_time);
-/*for(i=0; i<32; i++){
-    av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
-}
-av_log(s->avctx, AV_LOG_DEBUG, "\n");*/
-    s->no_rounding= get_bits1(&s->gb);
-
-    s->f_code = 1;
-    s->unrestricted_mv = 1;
-    s->h263_aic= s->pict_type == I_TYPE;
-//    s->alt_inter_vlc=1;
-//    s->obmc=1;
-//    s->umvplus=1;
-    s->modified_quant=1;
-    s->loop_filter=1;
-
-    if(s->avctx->debug & FF_DEBUG_PICT_INFO){
-            av_log(s->avctx, AV_LOG_INFO, "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n",
-                   seq, s->mb_x, s->mb_y, s->pict_type, s->qscale, s->no_rounding);
-    }
-
-    assert(s->pict_type != B_TYPE || !s->low_delay);
-
-    return s->mb_width*s->mb_height - mb_pos;
-}
-
-static int rv10_decode_init(AVCodecContext *avctx)
-{
-    MpegEncContext *s = avctx->priv_data;
-    static int done=0;
-
-    MPV_decode_defaults(s);
-
-    s->avctx= avctx;
-    s->out_format = FMT_H263;
-    s->codec_id= avctx->codec_id;
-
-    s->width = avctx->width;
-    s->height = avctx->height;
-
-    s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1;
-    avctx->sub_id= BE_32((uint8_t*)avctx->extradata + 4);
-
-    switch(avctx->sub_id){
-    case 0x10000000:
-        s->rv10_version= 0;
-        s->low_delay=1;
-        break;
-    case 0x10002000:
-        s->rv10_version= 3;
-        s->low_delay=1;
-        s->obmc=1;
-        break;
-    case 0x10003000:
-        s->rv10_version= 3;
-        s->low_delay=1;
-        break;
-    case 0x10003001:
-        s->rv10_version= 3;
-        s->low_delay=1;
-        break;
-    case 0x20001000: /* real rv20 decoder fail on this id */
-    /*case 0x20100001:
-    case 0x20101001:
-    case 0x20103001:*/
-    case 0x20100000 ... 0x2019ffff:
-        s->low_delay=1;
-        break;
-    /*case 0x20200002:
-    case 0x20201002:
-    case 0x20203002:*/
-    case 0x20200002 ... 0x202fffff:
-    case 0x30202002:
-    case 0x30203002:
-        s->low_delay=0;
-        s->avctx->has_b_frames=1;
-        break;
-    default:
-        av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id);
-    }
-
-    if(avctx->debug & FF_DEBUG_PICT_INFO){
-        av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", avctx->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1);
-    }
-
-    avctx->pix_fmt = PIX_FMT_YUV420P;
-
-    if (MPV_common_init(s) < 0)
-        return -1;
-
-    h263_decode_init_vlc(s);
-
-    /* init rv vlc */
-    if (!done) {
-        init_vlc(&rv_dc_lum, DC_VLC_BITS, 256,
-                 rv_lum_bits, 1, 1,
-                 rv_lum_code, 2, 2, 1);
-        init_vlc(&rv_dc_chrom, DC_VLC_BITS, 256,
-                 rv_chrom_bits, 1, 1,
-                 rv_chrom_code, 2, 2, 1);
-        done = 1;
-    }
-
-    return 0;
-}
-
-static int rv10_decode_end(AVCodecContext *avctx)
-{
-    MpegEncContext *s = avctx->priv_data;
-
-    MPV_common_end(s);
-    return 0;
-}
-
-static int rv10_decode_packet(AVCodecContext *avctx,
-                             uint8_t *buf, int buf_size)
-{
-    MpegEncContext *s = avctx->priv_data;
-    int mb_count, mb_pos, left, start_mb_x;
-
-    init_get_bits(&s->gb, buf, buf_size*8);
-    if(s->codec_id ==CODEC_ID_RV10)
-        mb_count = rv10_decode_picture_header(s);
-    else
-        mb_count = rv20_decode_picture_header(s);
-    if (mb_count < 0) {
-        av_log(s->avctx, AV_LOG_ERROR, "HEADER ERROR\n");
-        return -1;
-    }
-
-    if (s->mb_x >= s->mb_width ||
-        s->mb_y >= s->mb_height) {
-        av_log(s->avctx, AV_LOG_ERROR, "POS ERROR %d %d\n", s->mb_x, s->mb_y);
-        return -1;
-    }
-    mb_pos = s->mb_y * s->mb_width + s->mb_x;
-    left = s->mb_width * s->mb_height - mb_pos;
-    if (mb_count > left) {
-        av_log(s->avctx, AV_LOG_ERROR, "COUNT ERROR\n");
-        return -1;
-    }
-//if(s->pict_type == P_TYPE) return 0;
-
-    if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) {
-        if(s->current_picture_ptr){ //FIXME write parser so we always have complete frames?
-            ff_er_frame_end(s);
-            MPV_frame_end(s);
-            s->mb_x= s->mb_y = s->resync_mb_x = s->resync_mb_y= 0;
-        }
-        if(MPV_frame_start(s, avctx) < 0)
-            return -1;
-        ff_er_frame_start(s);
-    }
-
-#ifdef DEBUG
-    av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
-#endif
-
-    /* default quantization values */
-    if(s->codec_id== CODEC_ID_RV10){
-        if(s->mb_y==0) s->first_slice_line=1;
-    }else{
-        s->first_slice_line=1;
-        s->resync_mb_x= s->mb_x;
-    }
-    start_mb_x= s->mb_x;
-    s->resync_mb_y= s->mb_y;
-    if(s->h263_aic){
-        s->y_dc_scale_table=
-        s->c_dc_scale_table= ff_aic_dc_scale_table;
-    }else{
-        s->y_dc_scale_table=
-        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
-    }
-
-    if(s->modified_quant)
-        s->chroma_qscale_table= ff_h263_chroma_qscale_table;
-
-    ff_set_qscale(s, s->qscale);
-
-    s->rv10_first_dc_coded[0] = 0;
-    s->rv10_first_dc_coded[1] = 0;
-    s->rv10_first_dc_coded[2] = 0;
-//printf("%d %X %X\n", s->pict_type, s->current_picture.motion_val[0], s->current_picture.motion_val[1]);
-    s->block_wrap[0]=
-    s->block_wrap[1]=
-    s->block_wrap[2]=
-    s->block_wrap[3]= s->b8_stride;
-    s->block_wrap[4]=
-    s->block_wrap[5]= s->mb_stride;
-    ff_init_block_index(s);
-    /* decode each macroblock */
-
-    for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) {
-        int ret;
-        ff_update_block_index(s);
-#ifdef DEBUG
-        av_log(avctx, AV_LOG_DEBUG, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
-#endif
-
-        s->mv_dir = MV_DIR_FORWARD;
-        s->mv_type = MV_TYPE_16X16;
-        ret=ff_h263_decode_mb(s, s->block);
-
-        if (ret == SLICE_ERROR || s->gb.size_in_bits < get_bits_count(&s->gb)) {
-            av_log(s->avctx, AV_LOG_ERROR, "ERROR at MB %d %d\n", s->mb_x, s->mb_y);
-            return -1;
-        }
-        if(s->pict_type != B_TYPE)
-            ff_h263_update_motion_val(s);
-        MPV_decode_mb(s, s->block);
-        if(s->loop_filter)
-            ff_h263_loop_filter(s);
-
-        if (++s->mb_x == s->mb_width) {
-            s->mb_x = 0;
-            s->mb_y++;
-            ff_init_block_index(s);
-        }
-        if(s->mb_x == s->resync_mb_x)
-            s->first_slice_line=0;
-        if(ret == SLICE_END) break;
-    }
-
-    ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END);
-
-    return buf_size;
-}
-
-static int rv10_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
-                             uint8_t *buf, int buf_size)
-{
-    MpegEncContext *s = avctx->priv_data;
-    int i;
-    AVFrame *pict = data;
-
-#ifdef DEBUG
-    av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
-#endif
-
-    /* no supplementary picture */
-    if (buf_size == 0) {
-        return 0;
-    }
-
-    if(avctx->slice_count){
-        for(i=0; i<avctx->slice_count; i++){
-            int offset= avctx->slice_offset[i];
-            int size;
-
-            if(i+1 == avctx->slice_count)
-                size= buf_size - offset;
-            else
-                size= avctx->slice_offset[i+1] - offset;
-
-            rv10_decode_packet(avctx, buf+offset, size);
-        }
-    }else{
-        rv10_decode_packet(avctx, buf, buf_size);
-    }
-
-    if(s->current_picture_ptr != NULL && s->mb_y>=s->mb_height){
-        ff_er_frame_end(s);
-        MPV_frame_end(s);
-
-        if (s->pict_type == B_TYPE || s->low_delay) {
-            *pict= *(AVFrame*)s->current_picture_ptr;
-        } else if (s->last_picture_ptr != NULL) {
-            *pict= *(AVFrame*)s->last_picture_ptr;
-        }
-
-        if(s->last_picture_ptr || s->low_delay){
-            *data_size = sizeof(AVFrame);
-            ff_print_debug_info(s, pict);
-        }
-        s->current_picture_ptr= NULL; //so we can detect if frame_end wasnt called (find some nicer solution...)
-    }
-
-    return buf_size;
-}
-
-AVCodec rv10_decoder = {
-    "rv10",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_RV10,
-    sizeof(MpegEncContext),
-    rv10_decode_init,
-    NULL,
-    rv10_decode_end,
-    rv10_decode_frame,
-    CODEC_CAP_DR1
-};
-
-AVCodec rv20_decoder = {
-    "rv20",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_RV20,
-    sizeof(MpegEncContext),
-    rv10_decode_init,
-    NULL,
-    rv10_decode_end,
-    rv10_decode_frame,
-    CODEC_CAP_DR1 | CODEC_CAP_DELAY,
-    .flush= ff_mpeg_flush,
-};
-
--- a/src/ffmpeg/libavcodec/snow.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4682 +0,0 @@
-/*
- * Copyright (C) 2004 Michael Niedermayer <michaelni@gmx.at>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "avcodec.h"
-#include "common.h"
-#include "dsputil.h"
-#include "snow.h"
-
-#include "rangecoder.h"
-
-#include "mpegvideo.h"
-
-#undef NDEBUG
-#include <assert.h>
-
-static const int8_t quant3[256]={
- 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0,
-};
-static const int8_t quant3b[256]={
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-};
-static const int8_t quant3bA[256]={
- 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
- 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
-};
-static const int8_t quant5[256]={
- 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,
-};
-static const int8_t quant7[256]={
- 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
--2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,
-};
-static const int8_t quant9[256]={
- 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,
--3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-1,-1,
-};
-static const int8_t quant11[256]={
- 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-4,-4,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,
--4,-4,-4,-4,-4,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-1,
-};
-static const int8_t quant13[256]={
- 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
--6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
--6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
--6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
--6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,
--6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,
--4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-1,
-};
-
-#if 0 //64*cubic
-static const uint8_t obmc32[1024]={
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 8, 8, 7, 7, 6, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0, 0,
- 0, 0, 1, 2, 2, 3, 4, 6, 7, 8, 9,10,11,12,12,12,12,12,12,11,10, 9, 8, 7, 6, 4, 3, 2, 2, 1, 0, 0,
- 0, 1, 1, 2, 3, 5, 6, 8,10,11,13,14,15,16,17,18,18,17,16,15,14,13,11,10, 8, 6, 5, 3, 2, 1, 1, 0,
- 0, 1, 1, 3, 4, 6, 8,10,13,15,17,19,20,22,22,23,23,22,22,20,19,17,15,13,10, 8, 6, 4, 3, 1, 1, 0,
- 0, 1, 2, 4, 6, 8,10,13,16,19,21,23,25,27,28,29,29,28,27,25,23,21,19,16,13,10, 8, 6, 4, 2, 1, 0,
- 0, 1, 2, 4, 7,10,13,16,19,22,25,28,31,33,34,35,35,34,33,31,28,25,22,19,16,13,10, 7, 4, 2, 1, 0,
- 0, 1, 3, 5, 8,11,15,19,22,26,30,33,36,38,40,41,41,40,38,36,33,30,26,22,19,15,11, 8, 5, 3, 1, 0,
- 0, 1, 3, 6, 9,12,17,21,25,30,34,38,41,44,45,46,46,45,44,41,38,34,30,25,21,17,12, 9, 6, 3, 1, 0,
- 0, 1, 3, 6,10,14,19,23,28,33,38,42,45,48,51,52,52,51,48,45,42,38,33,28,23,19,14,10, 6, 3, 1, 0,
- 0, 1, 4, 7,11,15,20,25,31,36,41,45,49,52,55,56,56,55,52,49,45,41,36,31,25,20,15,11, 7, 4, 1, 0,
- 0, 2, 4, 7,12,16,22,27,33,38,44,48,52,56,58,60,60,58,56,52,48,44,38,33,27,22,16,12, 7, 4, 2, 0,
- 0, 1, 4, 8,12,17,22,28,34,40,45,51,55,58,61,62,62,61,58,55,51,45,40,34,28,22,17,12, 8, 4, 1, 0,
- 0, 2, 4, 8,12,18,23,29,35,41,46,52,56,60,62,64,64,62,60,56,52,46,41,35,29,23,18,12, 8, 4, 2, 0,
- 0, 2, 4, 8,12,18,23,29,35,41,46,52,56,60,62,64,64,62,60,56,52,46,41,35,29,23,18,12, 8, 4, 2, 0,
- 0, 1, 4, 8,12,17,22,28,34,40,45,51,55,58,61,62,62,61,58,55,51,45,40,34,28,22,17,12, 8, 4, 1, 0,
- 0, 2, 4, 7,12,16,22,27,33,38,44,48,52,56,58,60,60,58,56,52,48,44,38,33,27,22,16,12, 7, 4, 2, 0,
- 0, 1, 4, 7,11,15,20,25,31,36,41,45,49,52,55,56,56,55,52,49,45,41,36,31,25,20,15,11, 7, 4, 1, 0,
- 0, 1, 3, 6,10,14,19,23,28,33,38,42,45,48,51,52,52,51,48,45,42,38,33,28,23,19,14,10, 6, 3, 1, 0,
- 0, 1, 3, 6, 9,12,17,21,25,30,34,38,41,44,45,46,46,45,44,41,38,34,30,25,21,17,12, 9, 6, 3, 1, 0,
- 0, 1, 3, 5, 8,11,15,19,22,26,30,33,36,38,40,41,41,40,38,36,33,30,26,22,19,15,11, 8, 5, 3, 1, 0,
- 0, 1, 2, 4, 7,10,13,16,19,22,25,28,31,33,34,35,35,34,33,31,28,25,22,19,16,13,10, 7, 4, 2, 1, 0,
- 0, 1, 2, 4, 6, 8,10,13,16,19,21,23,25,27,28,29,29,28,27,25,23,21,19,16,13,10, 8, 6, 4, 2, 1, 0,
- 0, 1, 1, 3, 4, 6, 8,10,13,15,17,19,20,22,22,23,23,22,22,20,19,17,15,13,10, 8, 6, 4, 3, 1, 1, 0,
- 0, 1, 1, 2, 3, 5, 6, 8,10,11,13,14,15,16,17,18,18,17,16,15,14,13,11,10, 8, 6, 5, 3, 2, 1, 1, 0,
- 0, 0, 1, 2, 2, 3, 4, 6, 7, 8, 9,10,11,12,12,12,12,12,12,11,10, 9, 8, 7, 6, 4, 3, 2, 2, 1, 0, 0,
- 0, 0, 1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 8, 8, 7, 7, 6, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-//error:0.000022
-};
-static const uint8_t obmc16[256]={
- 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 2, 4, 5, 5, 6, 6, 5, 5, 4, 2, 1, 1, 0,
- 0, 1, 4, 6, 9,11,13,15,15,13,11, 9, 6, 4, 1, 0,
- 0, 2, 6,11,15,20,24,26,26,24,20,15,11, 6, 2, 0,
- 0, 4, 9,15,23,29,34,38,38,34,29,23,15, 9, 4, 0,
- 0, 5,11,20,29,38,45,49,49,45,38,29,20,11, 5, 0,
- 1, 5,13,24,34,45,53,57,57,53,45,34,24,13, 5, 1,
- 1, 6,15,26,38,49,57,62,62,57,49,38,26,15, 6, 1,
- 1, 6,15,26,38,49,57,62,62,57,49,38,26,15, 6, 1,
- 1, 5,13,24,34,45,53,57,57,53,45,34,24,13, 5, 1,
- 0, 5,11,20,29,38,45,49,49,45,38,29,20,11, 5, 0,
- 0, 4, 9,15,23,29,34,38,38,34,29,23,15, 9, 4, 0,
- 0, 2, 6,11,15,20,24,26,26,24,20,15,11, 6, 2, 0,
- 0, 1, 4, 6, 9,11,13,15,15,13,11, 9, 6, 4, 1, 0,
- 0, 1, 1, 2, 4, 5, 5, 6, 6, 5, 5, 4, 2, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
-//error:0.000033
-};
-#elif 1 // 64*linear
-static const uint8_t obmc32[1024]={
-  0,  0,  0,  0,  4,  4,  4,  4,  4,  4,  4,  4,  8,  8,  8,  8,  8,  8,  8,  8,  4,  4,  4,  4,  4,  4,  4,  4,  0,  0,  0,  0,
-  0,  4,  4,  4,  8,  8,  8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12,  8,  8,  8,  4,  4,  4,  0,
-  0,  4,  8,  8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12,  8,  8,  4,  0,
-  0,  4,  8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12,  8,  4,  0,
-  4,  8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12,  8,  4,
-  4,  8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12,  8,  4,
-  4,  8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16,  8,  4,
-  4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12,  4,
-  4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12,  4,
-  4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16,  4,
-  4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16,  4,
-  4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16,  4,
-  8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20,  8,
-  8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20,  8,
-  8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20,  8,
-  8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24,  8,
-  8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24,  8,
-  8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20,  8,
-  8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20,  8,
-  8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20,  8,
-  4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16,  4,
-  4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16,  4,
-  4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16,  4,
-  4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12,  4,
-  4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12,  4,
-  4,  8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16,  8,  4,
-  4,  8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12,  8,  4,
-  4,  8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12,  8,  4,
-  0,  4,  8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12,  8,  4,  0,
-  0,  4,  8,  8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12,  8,  8,  4,  0,
-  0,  4,  4,  4,  8,  8,  8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12,  8,  8,  8,  4,  4,  4,  0,
-  0,  0,  0,  0,  4,  4,  4,  4,  4,  4,  4,  4,  8,  8,  8,  8,  8,  8,  8,  8,  4,  4,  4,  4,  4,  4,  4,  4,  0,  0,  0,  0,
- //error:0.000020
-};
-static const uint8_t obmc16[256]={
-  0,  4,  4,  8,  8, 12, 12, 16, 16, 12, 12,  8,  8,  4,  4,  0,
-  4,  8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16,  8,  4,
-  4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16,  4,
-  8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20,  8,
-  8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28,  8,
- 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12,
- 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12,
- 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16,
- 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16,
- 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12,
- 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12,
-  8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28,  8,
-  8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20,  8,
-  4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16,  4,
-  4,  8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16,  8,  4,
-  0,  4,  4,  8,  8, 12, 12, 16, 16, 12, 12,  8,  8,  4,  4,  0,
-//error:0.000015
-};
-#else //64*cos
-static const uint8_t obmc32[1024]={
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0,
- 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 9,10,11,11,12,12,12,12,11,11,10, 9, 7, 6, 5, 4, 3, 2, 1, 1, 0, 0,
- 0, 0, 1, 2, 3, 5, 6, 8, 9,11,12,14,15,16,17,17,17,17,16,15,14,12,11, 9, 8, 6, 5, 3, 2, 1, 0, 0,
- 0, 1, 1, 2, 4, 6, 8,10,12,15,17,19,20,21,22,23,23,22,21,20,19,17,15,12,10, 8, 6, 4, 2, 1, 1, 0,
- 0, 1, 2, 3, 5, 8,10,13,16,19,21,24,26,27,28,29,29,28,27,26,24,21,19,16,13,10, 8, 5, 3, 2, 1, 0,
- 0, 1, 2, 4, 6, 9,12,16,19,23,26,29,31,33,34,35,35,34,33,31,29,26,23,19,16,12, 9, 6, 4, 2, 1, 0,
- 0, 1, 3, 5, 7,11,15,19,23,26,30,34,37,39,40,41,41,40,39,37,34,30,26,23,19,15,11, 7, 5, 3, 1, 0,
- 0, 1, 3, 5, 9,12,17,21,26,30,35,38,42,44,46,47,47,46,44,42,38,35,30,26,21,17,12, 9, 5, 3, 1, 0,
- 0, 1, 3, 6, 9,14,19,24,29,34,38,43,46,49,51,52,52,51,49,46,43,38,34,29,24,19,14, 9, 6, 3, 1, 0,
- 0, 1, 3, 6,11,15,20,26,31,37,42,46,50,53,56,57,57,56,53,50,46,42,37,31,26,20,15,11, 6, 3, 1, 0,
- 0, 1, 3, 7,11,16,21,27,33,39,44,49,53,57,59,60,60,59,57,53,49,44,39,33,27,21,16,11, 7, 3, 1, 0,
- 0, 1, 4, 7,12,17,22,28,34,40,46,51,56,59,61,63,63,61,59,56,51,46,40,34,28,22,17,12, 7, 4, 1, 0,
- 0, 1, 4, 7,12,17,23,29,35,41,47,52,57,60,63,64,64,63,60,57,52,47,41,35,29,23,17,12, 7, 4, 1, 0,
- 0, 1, 4, 7,12,17,23,29,35,41,47,52,57,60,63,64,64,63,60,57,52,47,41,35,29,23,17,12, 7, 4, 1, 0,
- 0, 1, 4, 7,12,17,22,28,34,40,46,51,56,59,61,63,63,61,59,56,51,46,40,34,28,22,17,12, 7, 4, 1, 0,
- 0, 1, 3, 7,11,16,21,27,33,39,44,49,53,57,59,60,60,59,57,53,49,44,39,33,27,21,16,11, 7, 3, 1, 0,
- 0, 1, 3, 6,11,15,20,26,31,37,42,46,50,53,56,57,57,56,53,50,46,42,37,31,26,20,15,11, 6, 3, 1, 0,
- 0, 1, 3, 6, 9,14,19,24,29,34,38,43,46,49,51,52,52,51,49,46,43,38,34,29,24,19,14, 9, 6, 3, 1, 0,
- 0, 1, 3, 5, 9,12,17,21,26,30,35,38,42,44,46,47,47,46,44,42,38,35,30,26,21,17,12, 9, 5, 3, 1, 0,
- 0, 1, 3, 5, 7,11,15,19,23,26,30,34,37,39,40,41,41,40,39,37,34,30,26,23,19,15,11, 7, 5, 3, 1, 0,
- 0, 1, 2, 4, 6, 9,12,16,19,23,26,29,31,33,34,35,35,34,33,31,29,26,23,19,16,12, 9, 6, 4, 2, 1, 0,
- 0, 1, 2, 3, 5, 8,10,13,16,19,21,24,26,27,28,29,29,28,27,26,24,21,19,16,13,10, 8, 5, 3, 2, 1, 0,
- 0, 1, 1, 2, 4, 6, 8,10,12,15,17,19,20,21,22,23,23,22,21,20,19,17,15,12,10, 8, 6, 4, 2, 1, 1, 0,
- 0, 0, 1, 2, 3, 5, 6, 8, 9,11,12,14,15,16,17,17,17,17,16,15,14,12,11, 9, 8, 6, 5, 3, 2, 1, 0, 0,
- 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 9,10,11,11,12,12,12,12,11,11,10, 9, 7, 6, 5, 4, 3, 2, 1, 1, 0, 0,
- 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-//error:0.000022
-};
-static const uint8_t obmc16[256]={
- 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 1, 2, 3, 4, 5, 5, 5, 5, 4, 3, 2, 1, 0, 0,
- 0, 1, 3, 6, 8,11,13,14,14,13,11, 8, 6, 3, 1, 0,
- 0, 2, 6,10,15,20,24,26,26,24,20,15,10, 6, 2, 0,
- 0, 3, 8,16,23,30,35,38,38,35,30,23,16, 8, 3, 0,
- 1, 4,11,20,30,39,46,49,49,46,39,30,20,11, 4, 1,
- 1, 5,13,24,35,46,54,58,58,54,46,35,24,13, 5, 1,
- 0, 5,14,26,38,49,58,63,63,58,49,38,26,14, 5, 0,
- 0, 5,14,26,38,49,58,63,63,58,49,38,26,14, 5, 0,
- 1, 5,13,24,35,46,54,58,58,54,46,35,24,13, 5, 1,
- 1, 4,11,20,30,39,46,49,49,46,39,30,20,11, 4, 1,
- 0, 3, 8,16,23,30,35,38,38,35,30,23,16, 8, 3, 0,
- 0, 2, 6,10,15,20,24,26,26,24,20,15,10, 6, 2, 0,
- 0, 1, 3, 6, 8,11,13,14,14,13,11, 8, 6, 3, 1, 0,
- 0, 0, 1, 2, 3, 4, 5, 5, 5, 5, 4, 3, 2, 1, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-//error:0.000022
-};
-#endif
-
-//linear *64
-static const uint8_t obmc8[64]={
-  4, 12, 20, 28, 28, 20, 12,  4,
- 12, 36, 60, 84, 84, 60, 36, 12,
- 20, 60,100,140,140,100, 60, 20,
- 28, 84,140,196,196,140, 84, 28,
- 28, 84,140,196,196,140, 84, 28,
- 20, 60,100,140,140,100, 60, 20,
- 12, 36, 60, 84, 84, 60, 36, 12,
-  4, 12, 20, 28, 28, 20, 12,  4,
-//error:0.000000
-};
-
-//linear *64
-static const uint8_t obmc4[16]={
- 16, 48, 48, 16,
- 48,144,144, 48,
- 48,144,144, 48,
- 16, 48, 48, 16,
-//error:0.000000
-};
-
-static const uint8_t *obmc_tab[4]={
-    obmc32, obmc16, obmc8, obmc4
-};
-
-static int scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES];
-
-typedef struct BlockNode{
-    int16_t mx;
-    int16_t my;
-    uint8_t ref;
-    uint8_t color[3];
-    uint8_t type;
-//#define TYPE_SPLIT    1
-#define BLOCK_INTRA   1
-#define BLOCK_OPT     2
-//#define TYPE_NOCOLOR  4
-    uint8_t level; //FIXME merge into type?
-}BlockNode;
-
-static const BlockNode null_block= { //FIXME add border maybe
-    .color= {128,128,128},
-    .mx= 0,
-    .my= 0,
-    .ref= 0,
-    .type= 0,
-    .level= 0,
-};
-
-#define LOG2_MB_SIZE 4
-#define MB_SIZE (1<<LOG2_MB_SIZE)
-
-typedef struct x_and_coeff{
-    int16_t x;
-    uint16_t coeff;
-} x_and_coeff;
-
-typedef struct SubBand{
-    int level;
-    int stride;
-    int width;
-    int height;
-    int qlog;                                   ///< log(qscale)/log[2^(1/6)]
-    DWTELEM *buf;
-    int buf_x_offset;
-    int buf_y_offset;
-    int stride_line; ///< Stride measured in lines, not pixels.
-    x_and_coeff * x_coeff;
-    struct SubBand *parent;
-    uint8_t state[/*7*2*/ 7 + 512][32];
-}SubBand;
-
-typedef struct Plane{
-    int width;
-    int height;
-    SubBand band[MAX_DECOMPOSITIONS][4];
-}Plane;
-
-typedef struct SnowContext{
-//    MpegEncContext m; // needed for motion estimation, should not be used for anything else, the idea is to make the motion estimation eventually independant of MpegEncContext, so this will be removed then (FIXME/XXX)
-
-    AVCodecContext *avctx;
-    RangeCoder c;
-    DSPContext dsp;
-    AVFrame new_picture;
-    AVFrame input_picture;              ///< new_picture with the internal linesizes
-    AVFrame current_picture;
-    AVFrame last_picture[MAX_REF_FRAMES];
-    AVFrame mconly_picture;
-//     uint8_t q_context[16];
-    uint8_t header_state[32];
-    uint8_t block_state[128 + 32*128];
-    int keyframe;
-    int always_reset;
-    int version;
-    int spatial_decomposition_type;
-    int temporal_decomposition_type;
-    int spatial_decomposition_count;
-    int temporal_decomposition_count;
-    int max_ref_frames;
-    int ref_frames;
-    int16_t (*ref_mvs[MAX_REF_FRAMES])[2];
-    uint32_t *ref_scores[MAX_REF_FRAMES];
-    DWTELEM *spatial_dwt_buffer;
-    int colorspace_type;
-    int chroma_h_shift;
-    int chroma_v_shift;
-    int spatial_scalability;
-    int qlog;
-    int lambda;
-    int lambda2;
-    int pass1_rc;
-    int mv_scale;
-    int qbias;
-#define QBIAS_SHIFT 3
-    int b_width;
-    int b_height;
-    int block_max_depth;
-    Plane plane[MAX_PLANES];
-    BlockNode *block;
-#define ME_CACHE_SIZE 1024
-    int me_cache[ME_CACHE_SIZE];
-    int me_cache_generation;
-    slice_buffer sb;
-
-    MpegEncContext m; // needed for motion estimation, should not be used for anything else, the idea is to make the motion estimation eventually independant of MpegEncContext, so this will be removed then (FIXME/XXX)
-}SnowContext;
-
-typedef struct {
-    DWTELEM *b0;
-    DWTELEM *b1;
-    DWTELEM *b2;
-    DWTELEM *b3;
-    int y;
-} dwt_compose_t;
-
-#define slice_buffer_get_line(slice_buf, line_num) ((slice_buf)->line[line_num] ? (slice_buf)->line[line_num] : slice_buffer_load_line((slice_buf), (line_num)))
-//#define slice_buffer_get_line(slice_buf, line_num) (slice_buffer_load_line((slice_buf), (line_num)))
-
-static void iterative_me(SnowContext *s);
-
-static void slice_buffer_init(slice_buffer * buf, int line_count, int max_allocated_lines, int line_width, DWTELEM * base_buffer)
-{
-    int i;
-
-    buf->base_buffer = base_buffer;
-    buf->line_count = line_count;
-    buf->line_width = line_width;
-    buf->data_count = max_allocated_lines;
-    buf->line = (DWTELEM * *) av_mallocz (sizeof(DWTELEM *) * line_count);
-    buf->data_stack = (DWTELEM * *) av_malloc (sizeof(DWTELEM *) * max_allocated_lines);
-
-    for (i = 0; i < max_allocated_lines; i++)
-    {
-      buf->data_stack[i] = (DWTELEM *) av_malloc (sizeof(DWTELEM) * line_width);
-    }
-
-    buf->data_stack_top = max_allocated_lines - 1;
-}
-
-static DWTELEM * slice_buffer_load_line(slice_buffer * buf, int line)
-{
-    int offset;
-    DWTELEM * buffer;
-
-//  av_log(NULL, AV_LOG_DEBUG, "Cache hit: %d\n", line);
-
-    assert(buf->data_stack_top >= 0);
-//  assert(!buf->line[line]);
-    if (buf->line[line])
-        return buf->line[line];
-
-    offset = buf->line_width * line;
-    buffer = buf->data_stack[buf->data_stack_top];
-    buf->data_stack_top--;
-    buf->line[line] = buffer;
-
-//  av_log(NULL, AV_LOG_DEBUG, "slice_buffer_load_line: line: %d remaining: %d\n", line, buf->data_stack_top + 1);
-
-    return buffer;
-}
-
-static void slice_buffer_release(slice_buffer * buf, int line)
-{
-    int offset;
-    DWTELEM * buffer;
-
-    assert(line >= 0 && line < buf->line_count);
-    assert(buf->line[line]);
-
-    offset = buf->line_width * line;
-    buffer = buf->line[line];
-    buf->data_stack_top++;
-    buf->data_stack[buf->data_stack_top] = buffer;
-    buf->line[line] = NULL;
-
-//  av_log(NULL, AV_LOG_DEBUG, "slice_buffer_release: line: %d remaining: %d\n", line, buf->data_stack_top + 1);
-}
-
-static void slice_buffer_flush(slice_buffer * buf)
-{
-    int i;
-    for (i = 0; i < buf->line_count; i++)
-    {
-        if (buf->line[i])
-        {
-//      av_log(NULL, AV_LOG_DEBUG, "slice_buffer_flush: line: %d \n", i);
-            slice_buffer_release(buf, i);
-        }
-    }
-}
-
-static void slice_buffer_destroy(slice_buffer * buf)
-{
-    int i;
-    slice_buffer_flush(buf);
-
-    for (i = buf->data_count - 1; i >= 0; i--)
-    {
-        assert(buf->data_stack[i]);
-        av_freep(&buf->data_stack[i]);
-    }
-    assert(buf->data_stack);
-    av_freep(&buf->data_stack);
-    assert(buf->line);
-    av_freep(&buf->line);
-}
-
-#ifdef __sgi
-// Avoid a name clash on SGI IRIX
-#undef qexp
-#endif
-#define QEXPSHIFT (7-FRAC_BITS+8) //FIXME try to change this to 0
-static uint8_t qexp[QROOT];
-
-static inline int mirror(int v, int m){
-    while((unsigned)v > (unsigned)m){
-        v=-v;
-        if(v<0) v+= 2*m;
-    }
-    return v;
-}
-
-static inline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){
-    int i;
-
-    if(v){
-        const int a= FFABS(v);
-        const int e= av_log2(a);
-#if 1
-        const int el= FFMIN(e, 10);
-        put_rac(c, state+0, 0);
-
-        for(i=0; i<el; i++){
-            put_rac(c, state+1+i, 1);  //1..10
-        }
-        for(; i<e; i++){
-            put_rac(c, state+1+9, 1);  //1..10
-        }
-        put_rac(c, state+1+FFMIN(i,9), 0);
-
-        for(i=e-1; i>=el; i--){
-            put_rac(c, state+22+9, (a>>i)&1); //22..31
-        }
-        for(; i>=0; i--){
-            put_rac(c, state+22+i, (a>>i)&1); //22..31
-        }
-
-        if(is_signed)
-            put_rac(c, state+11 + el, v < 0); //11..21
-#else
-
-        put_rac(c, state+0, 0);
-        if(e<=9){
-            for(i=0; i<e; i++){
-                put_rac(c, state+1+i, 1);  //1..10
-            }
-            put_rac(c, state+1+i, 0);
-
-            for(i=e-1; i>=0; i--){
-                put_rac(c, state+22+i, (a>>i)&1); //22..31
-            }
-
-            if(is_signed)
-                put_rac(c, state+11 + e, v < 0); //11..21
-        }else{
-            for(i=0; i<e; i++){
-                put_rac(c, state+1+FFMIN(i,9), 1);  //1..10
-            }
-            put_rac(c, state+1+FFMIN(i,9), 0);
-
-            for(i=e-1; i>=0; i--){
-                put_rac(c, state+22+FFMIN(i,9), (a>>i)&1); //22..31
-            }
-
-            if(is_signed)
-                put_rac(c, state+11 + FFMIN(e,10), v < 0); //11..21
-        }
-#endif
-    }else{
-        put_rac(c, state+0, 1);
-    }
-}
-
-static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
-    if(get_rac(c, state+0))
-        return 0;
-    else{
-        int i, e, a;
-        e= 0;
-        while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10
-            e++;
-        }
-
-        a= 1;
-        for(i=e-1; i>=0; i--){
-            a += a + get_rac(c, state+22 + FFMIN(i,9)); //22..31
-        }
-
-        if(is_signed && get_rac(c, state+11 + FFMIN(e,10))) //11..21
-            return -a;
-        else
-            return a;
-    }
-}
-
-static inline void put_symbol2(RangeCoder *c, uint8_t *state, int v, int log2){
-    int i;
-    int r= log2>=0 ? 1<<log2 : 1;
-
-    assert(v>=0);
-    assert(log2>=-4);
-
-    while(v >= r){
-        put_rac(c, state+4+log2, 1);
-        v -= r;
-        log2++;
-        if(log2>0) r+=r;
-    }
-    put_rac(c, state+4+log2, 0);
-
-    for(i=log2-1; i>=0; i--){
-        put_rac(c, state+31-i, (v>>i)&1);
-    }
-}
-
-static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){
-    int i;
-    int r= log2>=0 ? 1<<log2 : 1;
-    int v=0;
-
-    assert(log2>=-4);
-
-    while(get_rac(c, state+4+log2)){
-        v+= r;
-        log2++;
-        if(log2>0) r+=r;
-    }
-
-    for(i=log2-1; i>=0; i--){
-        v+= get_rac(c, state+31-i)<<i;
-    }
-
-    return v;
-}
-
-static always_inline void lift(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
-    const int mirror_left= !highpass;
-    const int mirror_right= (width&1) ^ highpass;
-    const int w= (width>>1) - 1 + (highpass & width);
-    int i;
-
-#define LIFT(src, ref, inv) ((src) + ((inv) ? - (ref) : + (ref)))
-    if(mirror_left){
-        dst[0] = LIFT(src[0], ((mul*2*ref[0]+add)>>shift), inverse);
-        dst += dst_step;
-        src += src_step;
-    }
-
-    for(i=0; i<w; i++){
-        dst[i*dst_step] = LIFT(src[i*src_step], ((mul*(ref[i*ref_step] + ref[(i+1)*ref_step])+add)>>shift), inverse);
-    }
-
-    if(mirror_right){
-        dst[w*dst_step] = LIFT(src[w*src_step], ((mul*2*ref[w*ref_step]+add)>>shift), inverse);
-    }
-}
-
-#ifndef lift5
-static always_inline void lift5(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
-    const int mirror_left= !highpass;
-    const int mirror_right= (width&1) ^ highpass;
-    const int w= (width>>1) - 1 + (highpass & width);
-    int i;
-
-    if(mirror_left){
-        int r= 3*2*ref[0];
-        r += r>>4;
-        r += r>>8;
-        dst[0] = LIFT(src[0], ((r+add)>>shift), inverse);
-        dst += dst_step;
-        src += src_step;
-    }
-
-    for(i=0; i<w; i++){
-        int r= 3*(ref[i*ref_step] + ref[(i+1)*ref_step]);
-        r += r>>4;
-        r += r>>8;
-        dst[i*dst_step] = LIFT(src[i*src_step], ((r+add)>>shift), inverse);
-    }
-
-    if(mirror_right){
-        int r= 3*2*ref[w*ref_step];
-        r += r>>4;
-        r += r>>8;
-        dst[w*dst_step] = LIFT(src[w*src_step], ((r+add)>>shift), inverse);
-    }
-}
-#endif
-
-#ifndef liftS
-static always_inline void liftS(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
-    const int mirror_left= !highpass;
-    const int mirror_right= (width&1) ^ highpass;
-    const int w= (width>>1) - 1 + (highpass & width);
-    int i;
-
-    assert(shift == 4);
-#define LIFTS(src, ref, inv) ((inv) ? (src) - (((ref) - 4*(src))>>shift): (16*4*(src) + 4*(ref) + 8 + (5<<27))/(5*16) - (1<<23))
-    if(mirror_left){
-        dst[0] = LIFTS(src[0], mul*2*ref[0]+add, inverse);
-        dst += dst_step;
-        src += src_step;
-    }
-
-    for(i=0; i<w; i++){
-        dst[i*dst_step] = LIFTS(src[i*src_step], mul*(ref[i*ref_step] + ref[(i+1)*ref_step])+add, inverse);
-    }
-
-    if(mirror_right){
-        dst[w*dst_step] = LIFTS(src[w*src_step], mul*2*ref[w*ref_step]+add, inverse);
-    }
-}
-#endif
-
-
-static void inplace_lift(DWTELEM *dst, int width, int *coeffs, int n, int shift, int start, int inverse){
-    int x, i;
-
-    for(x=start; x<width; x+=2){
-        int64_t sum=0;
-
-        for(i=0; i<n; i++){
-            int x2= x + 2*i - n + 1;
-            if     (x2<     0) x2= -x2;
-            else if(x2>=width) x2= 2*width-x2-2;
-            sum += coeffs[i]*(int64_t)dst[x2];
-        }
-        if(inverse) dst[x] -= (sum + (1<<shift)/2)>>shift;
-        else        dst[x] += (sum + (1<<shift)/2)>>shift;
-    }
-}
-
-static void inplace_liftV(DWTELEM *dst, int width, int height, int stride, int *coeffs, int n, int shift, int start, int inverse){
-    int x, y, i;
-    for(y=start; y<height; y+=2){
-        for(x=0; x<width; x++){
-            int64_t sum=0;
-
-            for(i=0; i<n; i++){
-                int y2= y + 2*i - n + 1;
-                if     (y2<      0) y2= -y2;
-                else if(y2>=height) y2= 2*height-y2-2;
-                sum += coeffs[i]*(int64_t)dst[x + y2*stride];
-            }
-            if(inverse) dst[x + y*stride] -= (sum + (1<<shift)/2)>>shift;
-            else        dst[x + y*stride] += (sum + (1<<shift)/2)>>shift;
-        }
-    }
-}
-
-#define SCALEX 1
-#define LX0 0
-#define LX1 1
-
-#if 0 // more accurate 9/7
-#define N1 2
-#define SHIFT1 14
-#define COEFFS1 (int[]){-25987,-25987}
-#define N2 2
-#define SHIFT2 19
-#define COEFFS2 (int[]){-27777,-27777}
-#define N3 2
-#define SHIFT3 15
-#define COEFFS3 (int[]){28931,28931}
-#define N4 2
-#define SHIFT4 15
-#define COEFFS4 (int[]){14533,14533}
-#elif 1 // 13/7 CRF
-#define N1 4
-#define SHIFT1 4
-#define COEFFS1 (int[]){1,-9,-9,1}
-#define N2 4
-#define SHIFT2 4
-#define COEFFS2 (int[]){-1,5,5,-1}
-#define N3 0
-#define SHIFT3 1
-#define COEFFS3 NULL
-#define N4 0
-#define SHIFT4 1
-#define COEFFS4 NULL
-#elif 1 // 3/5
-#define LX0 1
-#define LX1 0
-#define SCALEX 0.5
-#define N1 2
-#define SHIFT1 1
-#define COEFFS1 (int[]){1,1}
-#define N2 2
-#define SHIFT2 2
-#define COEFFS2 (int[]){-1,-1}
-#define N3 0
-#define SHIFT3 0
-#define COEFFS3 NULL
-#define N4 0
-#define SHIFT4 0
-#define COEFFS4 NULL
-#elif 1 // 11/5
-#define N1 0
-#define SHIFT1 1
-#define COEFFS1 NULL
-#define N2 2
-#define SHIFT2 2
-#define COEFFS2 (int[]){-1,-1}
-#define N3 2
-#define SHIFT3 0
-#define COEFFS3 (int[]){-1,-1}
-#define N4 4
-#define SHIFT4 7
-#define COEFFS4 (int[]){-5,29,29,-5}
-#define SCALEX 4
-#elif 1 // 9/7 CDF
-#define N1 2
-#define SHIFT1 7
-#define COEFFS1 (int[]){-203,-203}
-#define N2 2
-#define SHIFT2 12
-#define COEFFS2 (int[]){-217,-217}
-#define N3 2
-#define SHIFT3 7
-#define COEFFS3 (int[]){113,113}
-#define N4 2
-#define SHIFT4 9
-#define COEFFS4 (int[]){227,227}
-#define SCALEX 1
-#elif 1 // 7/5 CDF
-#define N1 0
-#define SHIFT1 1
-#define COEFFS1 NULL
-#define N2 2
-#define SHIFT2 2
-#define COEFFS2 (int[]){-1,-1}
-#define N3 2
-#define SHIFT3 0
-#define COEFFS3 (int[]){-1,-1}
-#define N4 2
-#define SHIFT4 4
-#define COEFFS4 (int[]){3,3}
-#elif 1 // 9/7 MN
-#define N1 4
-#define SHIFT1 4
-#define COEFFS1 (int[]){1,-9,-9,1}
-#define N2 2
-#define SHIFT2 2
-#define COEFFS2 (int[]){1,1}
-#define N3 0
-#define SHIFT3 1
-#define COEFFS3 NULL
-#define N4 0
-#define SHIFT4 1
-#define COEFFS4 NULL
-#else // 13/7 CRF
-#define N1 4
-#define SHIFT1 4
-#define COEFFS1 (int[]){1,-9,-9,1}
-#define N2 4
-#define SHIFT2 4
-#define COEFFS2 (int[]){-1,5,5,-1}
-#define N3 0
-#define SHIFT3 1
-#define COEFFS3 NULL
-#define N4 0
-#define SHIFT4 1
-#define COEFFS4 NULL
-#endif
-static void horizontal_decomposeX(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int width2= width>>1;
-    const int w2= (width+1)>>1;
-    int x;
-
-    inplace_lift(b, width, COEFFS1, N1, SHIFT1, LX1, 0);
-    inplace_lift(b, width, COEFFS2, N2, SHIFT2, LX0, 0);
-    inplace_lift(b, width, COEFFS3, N3, SHIFT3, LX1, 0);
-    inplace_lift(b, width, COEFFS4, N4, SHIFT4, LX0, 0);
-
-    for(x=0; x<width2; x++){
-        temp[x   ]= b[2*x    ];
-        temp[x+w2]= b[2*x + 1];
-    }
-    if(width&1)
-        temp[x   ]= b[2*x    ];
-    memcpy(b, temp, width*sizeof(int));
-}
-
-static void horizontal_composeX(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int width2= width>>1;
-    int x;
-    const int w2= (width+1)>>1;
-
-    memcpy(temp, b, width*sizeof(int));
-    for(x=0; x<width2; x++){
-        b[2*x    ]= temp[x   ];
-        b[2*x + 1]= temp[x+w2];
-    }
-    if(width&1)
-        b[2*x    ]= temp[x   ];
-
-    inplace_lift(b, width, COEFFS4, N4, SHIFT4, LX0, 1);
-    inplace_lift(b, width, COEFFS3, N3, SHIFT3, LX1, 1);
-    inplace_lift(b, width, COEFFS2, N2, SHIFT2, LX0, 1);
-    inplace_lift(b, width, COEFFS1, N1, SHIFT1, LX1, 1);
-}
-
-static void spatial_decomposeX(DWTELEM *buffer, int width, int height, int stride){
-    int x, y;
-
-    for(y=0; y<height; y++){
-        for(x=0; x<width; x++){
-            buffer[y*stride + x] *= SCALEX;
-        }
-    }
-
-    for(y=0; y<height; y++){
-        horizontal_decomposeX(buffer + y*stride, width);
-    }
-
-    inplace_liftV(buffer, width, height, stride, COEFFS1, N1, SHIFT1, LX1, 0);
-    inplace_liftV(buffer, width, height, stride, COEFFS2, N2, SHIFT2, LX0, 0);
-    inplace_liftV(buffer, width, height, stride, COEFFS3, N3, SHIFT3, LX1, 0);
-    inplace_liftV(buffer, width, height, stride, COEFFS4, N4, SHIFT4, LX0, 0);
-}
-
-static void spatial_composeX(DWTELEM *buffer, int width, int height, int stride){
-    int x, y;
-
-    inplace_liftV(buffer, width, height, stride, COEFFS4, N4, SHIFT4, LX0, 1);
-    inplace_liftV(buffer, width, height, stride, COEFFS3, N3, SHIFT3, LX1, 1);
-    inplace_liftV(buffer, width, height, stride, COEFFS2, N2, SHIFT2, LX0, 1);
-    inplace_liftV(buffer, width, height, stride, COEFFS1, N1, SHIFT1, LX1, 1);
-
-    for(y=0; y<height; y++){
-        horizontal_composeX(buffer + y*stride, width);
-    }
-
-    for(y=0; y<height; y++){
-        for(x=0; x<width; x++){
-            buffer[y*stride + x] /= SCALEX;
-        }
-    }
-}
-
-static void horizontal_decompose53i(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int width2= width>>1;
-    int x;
-    const int w2= (width+1)>>1;
-
-    for(x=0; x<width2; x++){
-        temp[x   ]= b[2*x    ];
-        temp[x+w2]= b[2*x + 1];
-    }
-    if(width&1)
-        temp[x   ]= b[2*x    ];
-#if 0
-    {
-    int A1,A2,A3,A4;
-    A2= temp[1       ];
-    A4= temp[0       ];
-    A1= temp[0+width2];
-    A1 -= (A2 + A4)>>1;
-    A4 += (A1 + 1)>>1;
-    b[0+width2] = A1;
-    b[0       ] = A4;
-    for(x=1; x+1<width2; x+=2){
-        A3= temp[x+width2];
-        A4= temp[x+1     ];
-        A3 -= (A2 + A4)>>1;
-        A2 += (A1 + A3 + 2)>>2;
-        b[x+width2] = A3;
-        b[x       ] = A2;
-
-        A1= temp[x+1+width2];
-        A2= temp[x+2       ];
-        A1 -= (A2 + A4)>>1;
-        A4 += (A1 + A3 + 2)>>2;
-        b[x+1+width2] = A1;
-        b[x+1       ] = A4;
-    }
-    A3= temp[width-1];
-    A3 -= A2;
-    A2 += (A1 + A3 + 2)>>2;
-    b[width -1] = A3;
-    b[width2-1] = A2;
-    }
-#else
-    lift(b+w2, temp+w2, temp, 1, 1, 1, width, -1, 0, 1, 1, 0);
-    lift(b   , temp   , b+w2, 1, 1, 1, width,  1, 2, 2, 0, 0);
-#endif
-}
-
-static void vertical_decompose53iH0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] -= (b0[i] + b2[i])>>1;
-    }
-}
-
-static void vertical_decompose53iL0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] += (b0[i] + b2[i] + 2)>>2;
-    }
-}
-
-static void spatial_decompose53i(DWTELEM *buffer, int width, int height, int stride){
-    int y;
-    DWTELEM *b0= buffer + mirror(-2-1, height-1)*stride;
-    DWTELEM *b1= buffer + mirror(-2  , height-1)*stride;
-
-    for(y=-2; y<height; y+=2){
-        DWTELEM *b2= buffer + mirror(y+1, height-1)*stride;
-        DWTELEM *b3= buffer + mirror(y+2, height-1)*stride;
-
-{START_TIMER
-        if(y+1<(unsigned)height) horizontal_decompose53i(b2, width);
-        if(y+2<(unsigned)height) horizontal_decompose53i(b3, width);
-STOP_TIMER("horizontal_decompose53i")}
-
-{START_TIMER
-        if(y+1<(unsigned)height) vertical_decompose53iH0(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_decompose53iL0(b0, b1, b2, width);
-STOP_TIMER("vertical_decompose53i*")}
-
-        b0=b2;
-        b1=b3;
-    }
-}
-
-static void horizontal_decompose97i(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int w2= (width+1)>>1;
-
-    lift (temp+w2, b    +1, b      , 1, 2, 2, width, -W_AM, W_AO, W_AS, 1, 0);
-    liftS(temp   , b      , temp+w2, 1, 2, 1, width, -W_BM, W_BO, W_BS, 0, 0);
-    lift5(b   +w2, temp+w2, temp   , 1, 1, 1, width,  W_CM, W_CO, W_CS, 1, 0);
-    lift (b      , temp   , b   +w2, 1, 1, 1, width,  W_DM, W_DO, W_DS, 0, 0);
-}
-
-
-static void vertical_decompose97iH0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] -= (W_AM*(b0[i] + b2[i])+W_AO)>>W_AS;
-    }
-}
-
-static void vertical_decompose97iH1(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-#ifdef lift5
-        b1[i] += (W_CM*(b0[i] + b2[i])+W_CO)>>W_CS;
-#else
-        int r= 3*(b0[i] + b2[i]);
-        r+= r>>4;
-        r+= r>>8;
-        b1[i] += (r+W_CO)>>W_CS;
-#endif
-    }
-}
-
-static void vertical_decompose97iL0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-#ifdef liftS
-        b1[i] -= (W_BM*(b0[i] + b2[i])+W_BO)>>W_BS;
-#else
-        b1[i] = (16*4*b1[i] - 4*(b0[i] + b2[i]) + 8*5 + (5<<27)) / (5*16) - (1<<23);
-#endif
-    }
-}
-
-static void vertical_decompose97iL1(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] += (W_DM*(b0[i] + b2[i])+W_DO)>>W_DS;
-    }
-}
-
-static void spatial_decompose97i(DWTELEM *buffer, int width, int height, int stride){
-    int y;
-    DWTELEM *b0= buffer + mirror(-4-1, height-1)*stride;
-    DWTELEM *b1= buffer + mirror(-4  , height-1)*stride;
-    DWTELEM *b2= buffer + mirror(-4+1, height-1)*stride;
-    DWTELEM *b3= buffer + mirror(-4+2, height-1)*stride;
-
-    for(y=-4; y<height; y+=2){
-        DWTELEM *b4= buffer + mirror(y+3, height-1)*stride;
-        DWTELEM *b5= buffer + mirror(y+4, height-1)*stride;
-
-{START_TIMER
-        if(y+3<(unsigned)height) horizontal_decompose97i(b4, width);
-        if(y+4<(unsigned)height) horizontal_decompose97i(b5, width);
-if(width>400){
-STOP_TIMER("horizontal_decompose97i")
-}}
-
-{START_TIMER
-        if(y+3<(unsigned)height) vertical_decompose97iH0(b3, b4, b5, width);
-        if(y+2<(unsigned)height) vertical_decompose97iL0(b2, b3, b4, width);
-        if(y+1<(unsigned)height) vertical_decompose97iH1(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_decompose97iL1(b0, b1, b2, width);
-
-if(width>400){
-STOP_TIMER("vertical_decompose97i")
-}}
-
-        b0=b2;
-        b1=b3;
-        b2=b4;
-        b3=b5;
-    }
-}
-
-void ff_spatial_dwt(DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
-    int level;
-
-    for(level=0; level<decomposition_count; level++){
-        switch(type){
-        case DWT_97: spatial_decompose97i(buffer, width>>level, height>>level, stride<<level); break;
-        case DWT_53: spatial_decompose53i(buffer, width>>level, height>>level, stride<<level); break;
-        case DWT_X: spatial_decomposeX  (buffer, width>>level, height>>level, stride<<level); break;
-        }
-    }
-}
-
-static void horizontal_compose53i(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int width2= width>>1;
-    const int w2= (width+1)>>1;
-    int x;
-
-#if 0
-    int A1,A2,A3,A4;
-    A2= temp[1       ];
-    A4= temp[0       ];
-    A1= temp[0+width2];
-    A1 -= (A2 + A4)>>1;
-    A4 += (A1 + 1)>>1;
-    b[0+width2] = A1;
-    b[0       ] = A4;
-    for(x=1; x+1<width2; x+=2){
-        A3= temp[x+width2];
-        A4= temp[x+1     ];
-        A3 -= (A2 + A4)>>1;
-        A2 += (A1 + A3 + 2)>>2;
-        b[x+width2] = A3;
-        b[x       ] = A2;
-
-        A1= temp[x+1+width2];
-        A2= temp[x+2       ];
-        A1 -= (A2 + A4)>>1;
-        A4 += (A1 + A3 + 2)>>2;
-        b[x+1+width2] = A1;
-        b[x+1       ] = A4;
-    }
-    A3= temp[width-1];
-    A3 -= A2;
-    A2 += (A1 + A3 + 2)>>2;
-    b[width -1] = A3;
-    b[width2-1] = A2;
-#else
-    lift(temp   , b   , b+w2, 1, 1, 1, width,  1, 2, 2, 0, 1);
-    lift(temp+w2, b+w2, temp, 1, 1, 1, width, -1, 0, 1, 1, 1);
-#endif
-    for(x=0; x<width2; x++){
-        b[2*x    ]= temp[x   ];
-        b[2*x + 1]= temp[x+w2];
-    }
-    if(width&1)
-        b[2*x    ]= temp[x   ];
-}
-
-static void vertical_compose53iH0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] += (b0[i] + b2[i])>>1;
-    }
-}
-
-static void vertical_compose53iL0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] -= (b0[i] + b2[i] + 2)>>2;
-    }
-}
-
-static void spatial_compose53i_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int height, int stride_line){
-    cs->b0 = slice_buffer_get_line(sb, mirror(-1-1, height-1) * stride_line);
-    cs->b1 = slice_buffer_get_line(sb, mirror(-1  , height-1) * stride_line);
-    cs->y = -1;
-}
-
-static void spatial_compose53i_init(dwt_compose_t *cs, DWTELEM *buffer, int height, int stride){
-    cs->b0 = buffer + mirror(-1-1, height-1)*stride;
-    cs->b1 = buffer + mirror(-1  , height-1)*stride;
-    cs->y = -1;
-}
-
-static void spatial_compose53i_dy_buffered(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){
-    int y= cs->y;
-
-    DWTELEM *b0= cs->b0;
-    DWTELEM *b1= cs->b1;
-    DWTELEM *b2= slice_buffer_get_line(sb, mirror(y+1, height-1) * stride_line);
-    DWTELEM *b3= slice_buffer_get_line(sb, mirror(y+2, height-1) * stride_line);
-
-{START_TIMER
-        if(y+1<(unsigned)height) vertical_compose53iL0(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_compose53iH0(b0, b1, b2, width);
-STOP_TIMER("vertical_compose53i*")}
-
-{START_TIMER
-        if(y-1<(unsigned)height) horizontal_compose53i(b0, width);
-        if(y+0<(unsigned)height) horizontal_compose53i(b1, width);
-STOP_TIMER("horizontal_compose53i")}
-
-    cs->b0 = b2;
-    cs->b1 = b3;
-    cs->y += 2;
-}
-
-static void spatial_compose53i_dy(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride){
-    int y= cs->y;
-    DWTELEM *b0= cs->b0;
-    DWTELEM *b1= cs->b1;
-    DWTELEM *b2= buffer + mirror(y+1, height-1)*stride;
-    DWTELEM *b3= buffer + mirror(y+2, height-1)*stride;
-
-{START_TIMER
-        if(y+1<(unsigned)height) vertical_compose53iL0(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_compose53iH0(b0, b1, b2, width);
-STOP_TIMER("vertical_compose53i*")}
-
-{START_TIMER
-        if(y-1<(unsigned)height) horizontal_compose53i(b0, width);
-        if(y+0<(unsigned)height) horizontal_compose53i(b1, width);
-STOP_TIMER("horizontal_compose53i")}
-
-    cs->b0 = b2;
-    cs->b1 = b3;
-    cs->y += 2;
-}
-
-static void spatial_compose53i(DWTELEM *buffer, int width, int height, int stride){
-    dwt_compose_t cs;
-    spatial_compose53i_init(&cs, buffer, height, stride);
-    while(cs.y <= height)
-        spatial_compose53i_dy(&cs, buffer, width, height, stride);
-}
-
-
-void ff_snow_horizontal_compose97i(DWTELEM *b, int width){
-    DWTELEM temp[width];
-    const int w2= (width+1)>>1;
-
-    lift (temp   , b      , b   +w2, 1, 1, 1, width,  W_DM, W_DO, W_DS, 0, 1);
-    lift5(temp+w2, b   +w2, temp   , 1, 1, 1, width,  W_CM, W_CO, W_CS, 1, 1);
-    liftS(b      , temp   , temp+w2, 2, 1, 1, width, -W_BM, W_BO, W_BS, 0, 1);
-    lift (b+1    , temp+w2, b      , 2, 1, 2, width, -W_AM, W_AO, W_AS, 1, 1);
-}
-
-static void vertical_compose97iH0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] += (W_AM*(b0[i] + b2[i])+W_AO)>>W_AS;
-    }
-}
-
-static void vertical_compose97iH1(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-#ifdef lift5
-        b1[i] -= (W_CM*(b0[i] + b2[i])+W_CO)>>W_CS;
-#else
-        int r= 3*(b0[i] + b2[i]);
-        r+= r>>4;
-        r+= r>>8;
-        b1[i] -= (r+W_CO)>>W_CS;
-#endif
-    }
-}
-
-static void vertical_compose97iL0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-#ifdef liftS
-        b1[i] += (W_BM*(b0[i] + b2[i])+W_BO)>>W_BS;
-#else
-        b1[i] += (W_BM*(b0[i] + b2[i])+4*b1[i]+W_BO)>>W_BS;
-#endif
-    }
-}
-
-static void vertical_compose97iL1(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-        b1[i] -= (W_DM*(b0[i] + b2[i])+W_DO)>>W_DS;
-    }
-}
-
-void ff_snow_vertical_compose97i(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, DWTELEM *b3, DWTELEM *b4, DWTELEM *b5, int width){
-    int i;
-
-    for(i=0; i<width; i++){
-#ifndef lift5
-        int r;
-#endif
-        b4[i] -= (W_DM*(b3[i] + b5[i])+W_DO)>>W_DS;
-#ifdef lift5
-        b3[i] -= (W_CM*(b2[i] + b4[i])+W_CO)>>W_CS;
-#else
-        r= 3*(b2[i] + b4[i]);
-        r+= r>>4;
-        r+= r>>8;
-        b3[i] -= (r+W_CO)>>W_CS;
-#endif
-#ifdef liftS
-        b2[i] += (W_BM*(b1[i] + b3[i])+W_BO)>>W_BS;
-#else
-        b2[i] += (W_BM*(b1[i] + b3[i])+4*b2[i]+W_BO)>>W_BS;
-#endif
-        b1[i] += (W_AM*(b0[i] + b2[i])+W_AO)>>W_AS;
-    }
-}
-
-static void spatial_compose97i_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int height, int stride_line){
-    cs->b0 = slice_buffer_get_line(sb, mirror(-3-1, height-1) * stride_line);
-    cs->b1 = slice_buffer_get_line(sb, mirror(-3  , height-1) * stride_line);
-    cs->b2 = slice_buffer_get_line(sb, mirror(-3+1, height-1) * stride_line);
-    cs->b3 = slice_buffer_get_line(sb, mirror(-3+2, height-1) * stride_line);
-    cs->y = -3;
-}
-
-static void spatial_compose97i_init(dwt_compose_t *cs, DWTELEM *buffer, int height, int stride){
-    cs->b0 = buffer + mirror(-3-1, height-1)*stride;
-    cs->b1 = buffer + mirror(-3  , height-1)*stride;
-    cs->b2 = buffer + mirror(-3+1, height-1)*stride;
-    cs->b3 = buffer + mirror(-3+2, height-1)*stride;
-    cs->y = -3;
-}
-
-static void spatial_compose97i_dy_buffered(DSPContext *dsp, dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){
-    int y = cs->y;
-
-    DWTELEM *b0= cs->b0;
-    DWTELEM *b1= cs->b1;
-    DWTELEM *b2= cs->b2;
-    DWTELEM *b3= cs->b3;
-    DWTELEM *b4= slice_buffer_get_line(sb, mirror(y + 3, height - 1) * stride_line);
-    DWTELEM *b5= slice_buffer_get_line(sb, mirror(y + 4, height - 1) * stride_line);
-
-{START_TIMER
-    if(y>0 && y+4<height){
-        dsp->vertical_compose97i(b0, b1, b2, b3, b4, b5, width);
-    }else{
-        if(y+3<(unsigned)height) vertical_compose97iL1(b3, b4, b5, width);
-        if(y+2<(unsigned)height) vertical_compose97iH1(b2, b3, b4, width);
-        if(y+1<(unsigned)height) vertical_compose97iL0(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_compose97iH0(b0, b1, b2, width);
-    }
-if(width>400){
-STOP_TIMER("vertical_compose97i")}}
-
-{START_TIMER
-        if(y-1<(unsigned)height) dsp->horizontal_compose97i(b0, width);
-        if(y+0<(unsigned)height) dsp->horizontal_compose97i(b1, width);
-if(width>400 && y+0<(unsigned)height){
-STOP_TIMER("horizontal_compose97i")}}
-
-    cs->b0=b2;
-    cs->b1=b3;
-    cs->b2=b4;
-    cs->b3=b5;
-    cs->y += 2;
-}
-
-static void spatial_compose97i_dy(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride){
-    int y = cs->y;
-    DWTELEM *b0= cs->b0;
-    DWTELEM *b1= cs->b1;
-    DWTELEM *b2= cs->b2;
-    DWTELEM *b3= cs->b3;
-    DWTELEM *b4= buffer + mirror(y+3, height-1)*stride;
-    DWTELEM *b5= buffer + mirror(y+4, height-1)*stride;
-
-{START_TIMER
-        if(y+3<(unsigned)height) vertical_compose97iL1(b3, b4, b5, width);
-        if(y+2<(unsigned)height) vertical_compose97iH1(b2, b3, b4, width);
-        if(y+1<(unsigned)height) vertical_compose97iL0(b1, b2, b3, width);
-        if(y+0<(unsigned)height) vertical_compose97iH0(b0, b1, b2, width);
-if(width>400){
-STOP_TIMER("vertical_compose97i")}}
-
-{START_TIMER
-        if(y-1<(unsigned)height) ff_snow_horizontal_compose97i(b0, width);
-        if(y+0<(unsigned)height) ff_snow_horizontal_compose97i(b1, width);
-if(width>400 && b0 <= b2){
-STOP_TIMER("horizontal_compose97i")}}
-
-    cs->b0=b2;
-    cs->b1=b3;
-    cs->b2=b4;
-    cs->b3=b5;
-    cs->y += 2;
-}
-
-static void spatial_compose97i(DWTELEM *buffer, int width, int height, int stride){
-    dwt_compose_t cs;
-    spatial_compose97i_init(&cs, buffer, height, stride);
-    while(cs.y <= height)
-        spatial_compose97i_dy(&cs, buffer, width, height, stride);
-}
-
-static void ff_spatial_idwt_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line, int type, int decomposition_count){
-    int level;
-    for(level=decomposition_count-1; level>=0; level--){
-        switch(type){
-        case DWT_97: spatial_compose97i_buffered_init(cs+level, sb, height>>level, stride_line<<level); break;
-        case DWT_53: spatial_compose53i_buffered_init(cs+level, sb, height>>level, stride_line<<level); break;
-        /* not slicified yet */
-        case DWT_X: /*spatial_composeX(buffer, width>>level, height>>level, stride<<level); break;*/
-          av_log(NULL, AV_LOG_ERROR, "spatial_composeX neither buffered nor slicified yet.\n"); break;
-        }
-    }
-}
-
-static void ff_spatial_idwt_init(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
-    int level;
-    for(level=decomposition_count-1; level>=0; level--){
-        switch(type){
-        case DWT_97: spatial_compose97i_init(cs+level, buffer, height>>level, stride<<level); break;
-        case DWT_53: spatial_compose53i_init(cs+level, buffer, height>>level, stride<<level); break;
-        /* not slicified yet */
-        case DWT_X: spatial_composeX(buffer, width>>level, height>>level, stride<<level); break;
-        }
-    }
-}
-
-static void ff_spatial_idwt_slice(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count, int y){
-    const int support = type==1 ? 3 : 5;
-    int level;
-    if(type==2) return;
-
-    for(level=decomposition_count-1; level>=0; level--){
-        while(cs[level].y <= FFMIN((y>>level)+support, height>>level)){
-            switch(type){
-            case DWT_97: spatial_compose97i_dy(cs+level, buffer, width>>level, height>>level, stride<<level);
-                    break;
-            case DWT_53: spatial_compose53i_dy(cs+level, buffer, width>>level, height>>level, stride<<level);
-                    break;
-            case DWT_X: break;
-            }
-        }
-    }
-}
-
-static void ff_spatial_idwt_buffered_slice(DSPContext *dsp, dwt_compose_t *cs, slice_buffer * slice_buf, int width, int height, int stride_line, int type, int decomposition_count, int y){
-    const int support = type==1 ? 3 : 5;
-    int level;
-    if(type==2) return;
-
-    for(level=decomposition_count-1; level>=0; level--){
-        while(cs[level].y <= FFMIN((y>>level)+support, height>>level)){
-            switch(type){
-            case DWT_97: spatial_compose97i_dy_buffered(dsp, cs+level, slice_buf, width>>level, height>>level, stride_line<<level);
-                    break;
-            case DWT_53: spatial_compose53i_dy_buffered(cs+level, slice_buf, width>>level, height>>level, stride_line<<level);
-                    break;
-            case DWT_X: break;
-            }
-        }
-    }
-}
-
-static void ff_spatial_idwt(DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
-    if(type==2){
-        int level;
-        for(level=decomposition_count-1; level>=0; level--)
-            spatial_composeX  (buffer, width>>level, height>>level, stride<<level);
-    }else{
-        dwt_compose_t cs[MAX_DECOMPOSITIONS];
-        int y;
-        ff_spatial_idwt_init(cs, buffer, width, height, stride, type, decomposition_count);
-        for(y=0; y<height; y+=4)
-            ff_spatial_idwt_slice(cs, buffer, width, height, stride, type, decomposition_count, y);
-    }
-}
-
-static int encode_subband_c0run(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
-    const int w= b->width;
-    const int h= b->height;
-    int x, y;
-
-    if(1){
-        int run=0;
-        int runs[w*h];
-        int run_index=0;
-        int max_index;
-
-        for(y=0; y<h; y++){
-            for(x=0; x<w; x++){
-                int v, p=0;
-                int /*ll=0, */l=0, lt=0, t=0, rt=0;
-                v= src[x + y*stride];
-
-                if(y){
-                    t= src[x + (y-1)*stride];
-                    if(x){
-                        lt= src[x - 1 + (y-1)*stride];
-                    }
-                    if(x + 1 < w){
-                        rt= src[x + 1 + (y-1)*stride];
-                    }
-                }
-                if(x){
-                    l= src[x - 1 + y*stride];
-                    /*if(x > 1){
-                        if(orientation==1) ll= src[y + (x-2)*stride];
-                        else               ll= src[x - 2 + y*stride];
-                    }*/
-                }
-                if(parent){
-                    int px= x>>1;
-                    int py= y>>1;
-                    if(px<b->parent->width && py<b->parent->height)
-                        p= parent[px + py*2*stride];
-                }
-                if(!(/*ll|*/l|lt|t|rt|p)){
-                    if(v){
-                        runs[run_index++]= run;
-                        run=0;
-                    }else{
-                        run++;
-                    }
-                }
-            }
-        }
-        max_index= run_index;
-        runs[run_index++]= run;
-        run_index=0;
-        run= runs[run_index++];
-
-        put_symbol2(&s->c, b->state[30], max_index, 0);
-        if(run_index <= max_index)
-            put_symbol2(&s->c, b->state[1], run, 3);
-
-        for(y=0; y<h; y++){
-            if(s->c.bytestream_end - s->c.bytestream < w*40){
-                av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
-                return -1;
-            }
-            for(x=0; x<w; x++){
-                int v, p=0;
-                int /*ll=0, */l=0, lt=0, t=0, rt=0;
-                v= src[x + y*stride];
-
-                if(y){
-                    t= src[x + (y-1)*stride];
-                    if(x){
-                        lt= src[x - 1 + (y-1)*stride];
-                    }
-                    if(x + 1 < w){
-                        rt= src[x + 1 + (y-1)*stride];
-                    }
-                }
-                if(x){
-                    l= src[x - 1 + y*stride];
-                    /*if(x > 1){
-                        if(orientation==1) ll= src[y + (x-2)*stride];
-                        else               ll= src[x - 2 + y*stride];
-                    }*/
-                }
-                if(parent){
-                    int px= x>>1;
-                    int py= y>>1;
-                    if(px<b->parent->width && py<b->parent->height)
-                        p= parent[px + py*2*stride];
-                }
-                if(/*ll|*/l|lt|t|rt|p){
-                    int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p));
-
-                    put_rac(&s->c, &b->state[0][context], !!v);
-                }else{
-                    if(!run){
-                        run= runs[run_index++];
-
-                        if(run_index <= max_index)
-                            put_symbol2(&s->c, b->state[1], run, 3);
-                        assert(v);
-                    }else{
-                        run--;
-                        assert(!v);
-                    }
-                }
-                if(v){
-                    int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p));
-                    int l2= 2*FFABS(l) + (l<0);
-                    int t2= 2*FFABS(t) + (t<0);
-
-                    put_symbol2(&s->c, b->state[context + 2], FFABS(v)-1, context-4);
-                    put_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l2&0xFF] + 3*quant3bA[t2&0xFF]], v<0);
-                }
-            }
-        }
-    }
-    return 0;
-}
-
-static int encode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
-//    encode_subband_qtree(s, b, src, parent, stride, orientation);
-//    encode_subband_z0run(s, b, src, parent, stride, orientation);
-    return encode_subband_c0run(s, b, src, parent, stride, orientation);
-//    encode_subband_dzr(s, b, src, parent, stride, orientation);
-}
-
-static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, int orientation){
-    const int w= b->width;
-    const int h= b->height;
-    int x,y;
-
-    if(1){
-        int run, runs;
-        x_and_coeff *xc= b->x_coeff;
-        x_and_coeff *prev_xc= NULL;
-        x_and_coeff *prev2_xc= xc;
-        x_and_coeff *parent_xc= parent ? parent->x_coeff : NULL;
-        x_and_coeff *prev_parent_xc= parent_xc;
-
-        runs= get_symbol2(&s->c, b->state[30], 0);
-        if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3);
-        else           run= INT_MAX;
-
-        for(y=0; y<h; y++){
-            int v=0;
-            int lt=0, t=0, rt=0;
-
-            if(y && prev_xc->x == 0){
-                rt= prev_xc->coeff;
-            }
-            for(x=0; x<w; x++){
-                int p=0;
-                const int l= v;
-
-                lt= t; t= rt;
-
-                if(y){
-                    if(prev_xc->x <= x)
-                        prev_xc++;
-                    if(prev_xc->x == x + 1)
-                        rt= prev_xc->coeff;
-                    else
-                        rt=0;
-                }
-                if(parent_xc){
-                    if(x>>1 > parent_xc->x){
-                        parent_xc++;
-                    }
-                    if(x>>1 == parent_xc->x){
-                        p= parent_xc->coeff;
-                    }
-                }
-                if(/*ll|*/l|lt|t|rt|p){
-                    int context= av_log2(/*FFABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1));
-
-                    v=get_rac(&s->c, &b->state[0][context]);
-                    if(v){
-                        v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1);
-                        v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]);
-
-                        xc->x=x;
-                        (xc++)->coeff= v;
-                    }
-                }else{
-                    if(!run){
-                        if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3);
-                        else           run= INT_MAX;
-                        v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1);
-                        v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]);
-
-                        xc->x=x;
-                        (xc++)->coeff= v;
-                    }else{
-                        int max_run;
-                        run--;
-                        v=0;
-
-                        if(y) max_run= FFMIN(run, prev_xc->x - x - 2);
-                        else  max_run= FFMIN(run, w-x-1);
-                        if(parent_xc)
-                            max_run= FFMIN(max_run, 2*parent_xc->x - x - 1);
-                        x+= max_run;
-                        run-= max_run;
-                    }
-                }
-            }
-            (xc++)->x= w+1; //end marker
-            prev_xc= prev2_xc;
-            prev2_xc= xc;
-
-            if(parent_xc){
-                if(y&1){
-                    while(parent_xc->x != parent->width+1)
-                        parent_xc++;
-                    parent_xc++;
-                    prev_parent_xc= parent_xc;
-                }else{
-                    parent_xc= prev_parent_xc;
-                }
-            }
-        }
-
-        (xc++)->x= w+1; //end marker
-    }
-}
-
-static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, slice_buffer * sb, int start_y, int h, int save_state[1]){
-    const int w= b->width;
-    int y;
-    const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
-    int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
-    int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
-    int new_index = 0;
-
-    START_TIMER
-
-    if(b->buf == s->spatial_dwt_buffer || s->qlog == LOSSLESS_QLOG){
-        qadd= 0;
-        qmul= 1<<QEXPSHIFT;
-    }
-
-    /* If we are on the second or later slice, restore our index. */
-    if (start_y != 0)
-        new_index = save_state[0];
-
-
-    for(y=start_y; y<h; y++){
-        int x = 0;
-        int v;
-        DWTELEM * line = slice_buffer_get_line(sb, y * b->stride_line + b->buf_y_offset) + b->buf_x_offset;
-        memset(line, 0, b->width*sizeof(DWTELEM));
-        v = b->x_coeff[new_index].coeff;
-        x = b->x_coeff[new_index++].x;
-        while(x < w)
-        {
-            register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT;
-            register int u= -(v&1);
-            line[x] = (t^u) - u;
-
-            v = b->x_coeff[new_index].coeff;
-            x = b->x_coeff[new_index++].x;
-        }
-    }
-    if(w > 200 && start_y != 0/*level+1 == s->spatial_decomposition_count*/){
-        STOP_TIMER("decode_subband")
-    }
-
-    /* Save our variables for the next slice. */
-    save_state[0] = new_index;
-
-    return;
-}
-
-static void reset_contexts(SnowContext *s){
-    int plane_index, level, orientation;
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        for(level=0; level<s->spatial_decomposition_count; level++){
-            for(orientation=level ? 1:0; orientation<4; orientation++){
-                memset(s->plane[plane_index].band[level][orientation].state, MID_STATE, sizeof(s->plane[plane_index].band[level][orientation].state));
-            }
-        }
-    }
-    memset(s->header_state, MID_STATE, sizeof(s->header_state));
-    memset(s->block_state, MID_STATE, sizeof(s->block_state));
-}
-
-static int alloc_blocks(SnowContext *s){
-    int w= -((-s->avctx->width )>>LOG2_MB_SIZE);
-    int h= -((-s->avctx->height)>>LOG2_MB_SIZE);
-
-    s->b_width = w;
-    s->b_height= h;
-
-    s->block= av_mallocz(w * h * sizeof(BlockNode) << (s->block_max_depth*2));
-    return 0;
-}
-
-static inline void copy_rac_state(RangeCoder *d, RangeCoder *s){
-    uint8_t *bytestream= d->bytestream;
-    uint8_t *bytestream_start= d->bytestream_start;
-    *d= *s;
-    d->bytestream= bytestream;
-    d->bytestream_start= bytestream_start;
-}
-
-//near copy & paste from dsputil, FIXME
-static int pix_sum(uint8_t * pix, int line_size, int w)
-{
-    int s, i, j;
-
-    s = 0;
-    for (i = 0; i < w; i++) {
-        for (j = 0; j < w; j++) {
-            s += pix[0];
-            pix ++;
-        }
-        pix += line_size - w;
-    }
-    return s;
-}
-
-//near copy & paste from dsputil, FIXME
-static int pix_norm1(uint8_t * pix, int line_size, int w)
-{
-    int s, i, j;
-    uint32_t *sq = squareTbl + 256;
-
-    s = 0;
-    for (i = 0; i < w; i++) {
-        for (j = 0; j < w; j ++) {
-            s += sq[pix[0]];
-            pix ++;
-        }
-        pix += line_size - w;
-    }
-    return s;
-}
-
-static inline void set_blocks(SnowContext *s, int level, int x, int y, int l, int cb, int cr, int mx, int my, int ref, int type){
-    const int w= s->b_width << s->block_max_depth;
-    const int rem_depth= s->block_max_depth - level;
-    const int index= (x + y*w) << rem_depth;
-    const int block_w= 1<<rem_depth;
-    BlockNode block;
-    int i,j;
-
-    block.color[0]= l;
-    block.color[1]= cb;
-    block.color[2]= cr;
-    block.mx= mx;
-    block.my= my;
-    block.ref= ref;
-    block.type= type;
-    block.level= level;
-
-    for(j=0; j<block_w; j++){
-        for(i=0; i<block_w; i++){
-            s->block[index + i + j*w]= block;
-        }
-    }
-}
-
-static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index){
-    const int offset[3]= {
-          y*c->  stride + x,
-        ((y*c->uvstride + x)>>1),
-        ((y*c->uvstride + x)>>1),
-    };
-    int i;
-    for(i=0; i<3; i++){
-        c->src[0][i]= src [i];
-        c->ref[0][i]= ref [i] + offset[i];
-    }
-    assert(!ref_index);
-}
-
-static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref,
-                           BlockNode *left, BlockNode *top, BlockNode *tr){
-    if(s->ref_frames == 1){
-        *mx = mid_pred(left->mx, top->mx, tr->mx);
-        *my = mid_pred(left->my, top->my, tr->my);
-    }else{
-        const int *scale = scale_mv_ref[ref];
-        *mx = mid_pred(left->mx * scale[left->ref] + 128 >>8,
-                       top ->mx * scale[top ->ref] + 128 >>8,
-                       tr  ->mx * scale[tr  ->ref] + 128 >>8);
-        *my = mid_pred(left->my * scale[left->ref] + 128 >>8,
-                       top ->my * scale[top ->ref] + 128 >>8,
-                       tr  ->my * scale[tr  ->ref] + 128 >>8);
-    }
-}
-
-//FIXME copy&paste
-#define P_LEFT P[1]
-#define P_TOP P[2]
-#define P_TOPRIGHT P[3]
-#define P_MEDIAN P[4]
-#define P_MV1 P[9]
-#define FLAG_QPEL   1 //must be 1
-
-static int encode_q_branch(SnowContext *s, int level, int x, int y){
-    uint8_t p_buffer[1024];
-    uint8_t i_buffer[1024];
-    uint8_t p_state[sizeof(s->block_state)];
-    uint8_t i_state[sizeof(s->block_state)];
-    RangeCoder pc, ic;
-    uint8_t *pbbak= s->c.bytestream;
-    uint8_t *pbbak_start= s->c.bytestream_start;
-    int score, score2, iscore, i_len, p_len, block_s, sum;
-    const int w= s->b_width  << s->block_max_depth;
-    const int h= s->b_height << s->block_max_depth;
-    const int rem_depth= s->block_max_depth - level;
-    const int index= (x + y*w) << rem_depth;
-    const int block_w= 1<<(LOG2_MB_SIZE - level);
-    int trx= (x+1)<<rem_depth;
-    int try= (y+1)<<rem_depth;
-    BlockNode *left  = x ? &s->block[index-1] : &null_block;
-    BlockNode *top   = y ? &s->block[index-w] : &null_block;
-    BlockNode *right = trx<w ? &s->block[index+1] : &null_block;
-    BlockNode *bottom= try<h ? &s->block[index+w] : &null_block;
-    BlockNode *tl    = y && x ? &s->block[index-w-1] : left;
-    BlockNode *tr    = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt
-    int pl = left->color[0];
-    int pcb= left->color[1];
-    int pcr= left->color[2];
-    int pmx, pmy;
-    int mx=0, my=0;
-    int l,cr,cb;
-    const int stride= s->current_picture.linesize[0];
-    const int uvstride= s->current_picture.linesize[1];
-    uint8_t *current_data[3]= { s->input_picture.data[0] + (x + y*  stride)*block_w,
-                                s->input_picture.data[1] + (x + y*uvstride)*block_w/2,
-                                s->input_picture.data[2] + (x + y*uvstride)*block_w/2};
-    int P[10][2];
-    int16_t last_mv[3][2];
-    int qpel= !!(s->avctx->flags & CODEC_FLAG_QPEL); //unused
-    const int shift= 1+qpel;
-    MotionEstContext *c= &s->m.me;
-    int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref);
-    int mx_context= av_log2(2*FFABS(left->mx - top->mx));
-    int my_context= av_log2(2*FFABS(left->my - top->my));
-    int s_context= 2*left->level + 2*top->level + tl->level + tr->level;
-    int ref, best_ref, ref_score, ref_mx, ref_my;
-
-    assert(sizeof(s->block_state) >= 256);
-    if(s->keyframe){
-        set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA);
-        return 0;
-    }
-
-//    clip predictors / edge ?
-
-    P_LEFT[0]= left->mx;
-    P_LEFT[1]= left->my;
-    P_TOP [0]= top->mx;
-    P_TOP [1]= top->my;
-    P_TOPRIGHT[0]= tr->mx;
-    P_TOPRIGHT[1]= tr->my;
-
-    last_mv[0][0]= s->block[index].mx;
-    last_mv[0][1]= s->block[index].my;
-    last_mv[1][0]= right->mx;
-    last_mv[1][1]= right->my;
-    last_mv[2][0]= bottom->mx;
-    last_mv[2][1]= bottom->my;
-
-    s->m.mb_stride=2;
-    s->m.mb_x=
-    s->m.mb_y= 0;
-    s->m.me.skip= 0;
-
-    assert(s->m.me.  stride ==   stride);
-    assert(s->m.me.uvstride == uvstride);
-
-    c->penalty_factor    = get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_cmp);
-    c->sub_penalty_factor= get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_sub_cmp);
-    c->mb_penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->mb_cmp);
-    c->current_mv_penalty= c->mv_penalty[s->m.f_code=1] + MAX_MV;
-
-    c->xmin = - x*block_w - 16+2;
-    c->ymin = - y*block_w - 16+2;
-    c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-2;
-    c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-2;
-
-    if(P_LEFT[0]     > (c->xmax<<shift)) P_LEFT[0]    = (c->xmax<<shift);
-    if(P_LEFT[1]     > (c->ymax<<shift)) P_LEFT[1]    = (c->ymax<<shift);
-    if(P_TOP[0]      > (c->xmax<<shift)) P_TOP[0]     = (c->xmax<<shift);
-    if(P_TOP[1]      > (c->ymax<<shift)) P_TOP[1]     = (c->ymax<<shift);
-    if(P_TOPRIGHT[0] < (c->xmin<<shift)) P_TOPRIGHT[0]= (c->xmin<<shift);
-    if(P_TOPRIGHT[0] > (c->xmax<<shift)) P_TOPRIGHT[0]= (c->xmax<<shift); //due to pmx no clip
-    if(P_TOPRIGHT[1] > (c->ymax<<shift)) P_TOPRIGHT[1]= (c->ymax<<shift);
-
-    P_MEDIAN[0]= mid_pred(P_LEFT[0], P_TOP[0], P_TOPRIGHT[0]);
-    P_MEDIAN[1]= mid_pred(P_LEFT[1], P_TOP[1], P_TOPRIGHT[1]);
-
-    if (!y) {
-        c->pred_x= P_LEFT[0];
-        c->pred_y= P_LEFT[1];
-    } else {
-        c->pred_x = P_MEDIAN[0];
-        c->pred_y = P_MEDIAN[1];
-    }
-
-    score= INT_MAX;
-    best_ref= 0;
-    for(ref=0; ref<s->ref_frames; ref++){
-        init_ref(c, current_data, s->last_picture[ref].data, NULL, block_w*x, block_w*y, 0);
-
-        ref_score= ff_epzs_motion_search(&s->m, &ref_mx, &ref_my, P, 0, /*ref_index*/ 0, last_mv,
-                                         (1<<16)>>shift, level-LOG2_MB_SIZE+4, block_w);
-
-        assert(ref_mx >= c->xmin);
-        assert(ref_mx <= c->xmax);
-        assert(ref_my >= c->ymin);
-        assert(ref_my <= c->ymax);
-
-        ref_score= s->m.me.sub_motion_search(&s->m, &ref_mx, &ref_my, ref_score, 0, 0, level-LOG2_MB_SIZE+4, block_w);
-        ref_score= ff_get_mb_score(&s->m, ref_mx, ref_my, 0, 0, level-LOG2_MB_SIZE+4, block_w, 0);
-        ref_score+= 2*av_log2(2*ref)*c->penalty_factor;
-        if(s->ref_mvs[ref]){
-            s->ref_mvs[ref][index][0]= ref_mx;
-            s->ref_mvs[ref][index][1]= ref_my;
-            s->ref_scores[ref][index]= ref_score;
-        }
-        if(score > ref_score){
-            score= ref_score;
-            best_ref= ref;
-            mx= ref_mx;
-            my= ref_my;
-        }
-    }
-    //FIXME if mb_cmp != SSE then intra cant be compared currently and mb_penalty vs. lambda2
-
-  //  subpel search
-    pc= s->c;
-    pc.bytestream_start=
-    pc.bytestream= p_buffer; //FIXME end/start? and at the other stoo
-    memcpy(p_state, s->block_state, sizeof(s->block_state));
-
-    if(level!=s->block_max_depth)
-        put_rac(&pc, &p_state[4 + s_context], 1);
-    put_rac(&pc, &p_state[1 + left->type + top->type], 0);
-    if(s->ref_frames > 1)
-        put_symbol(&pc, &p_state[128 + 1024 + 32*ref_context], best_ref, 0);
-    pred_mv(s, &pmx, &pmy, best_ref, left, top, tr);
-    put_symbol(&pc, &p_state[128 + 32*(mx_context + 16*!!best_ref)], mx - pmx, 1);
-    put_symbol(&pc, &p_state[128 + 32*(my_context + 16*!!best_ref)], my - pmy, 1);
-    p_len= pc.bytestream - pc.bytestream_start;
-    score += (s->lambda2*(p_len*8
-              + (pc.outstanding_count - s->c.outstanding_count)*8
-              + (-av_log2(pc.range)    + av_log2(s->c.range))
-             ))>>FF_LAMBDA_SHIFT;
-
-    block_s= block_w*block_w;
-    sum = pix_sum(current_data[0], stride, block_w);
-    l= (sum + block_s/2)/block_s;
-    iscore = pix_norm1(current_data[0], stride, block_w) - 2*l*sum + l*l*block_s;
-
-    block_s= block_w*block_w>>2;
-    sum = pix_sum(current_data[1], uvstride, block_w>>1);
-    cb= (sum + block_s/2)/block_s;
-//    iscore += pix_norm1(&current_mb[1][0], uvstride, block_w>>1) - 2*cb*sum + cb*cb*block_s;
-    sum = pix_sum(current_data[2], uvstride, block_w>>1);
-    cr= (sum + block_s/2)/block_s;
-//    iscore += pix_norm1(&current_mb[2][0], uvstride, block_w>>1) - 2*cr*sum + cr*cr*block_s;
-
-    ic= s->c;
-    ic.bytestream_start=
-    ic.bytestream= i_buffer; //FIXME end/start? and at the other stoo
-    memcpy(i_state, s->block_state, sizeof(s->block_state));
-    if(level!=s->block_max_depth)
-        put_rac(&ic, &i_state[4 + s_context], 1);
-    put_rac(&ic, &i_state[1 + left->type + top->type], 1);
-    put_symbol(&ic, &i_state[32],  l-pl , 1);
-    put_symbol(&ic, &i_state[64], cb-pcb, 1);
-    put_symbol(&ic, &i_state[96], cr-pcr, 1);
-    i_len= ic.bytestream - ic.bytestream_start;
-    iscore += (s->lambda2*(i_len*8
-              + (ic.outstanding_count - s->c.outstanding_count)*8
-              + (-av_log2(ic.range)    + av_log2(s->c.range))
-             ))>>FF_LAMBDA_SHIFT;
-
-//    assert(score==256*256*256*64-1);
-    assert(iscore < 255*255*256 + s->lambda2*10);
-    assert(iscore >= 0);
-    assert(l>=0 && l<=255);
-    assert(pl>=0 && pl<=255);
-
-    if(level==0){
-        int varc= iscore >> 8;
-        int vard= score >> 8;
-        if (vard <= 64 || vard < varc)
-            c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
-        else
-            c->scene_change_score+= s->m.qscale;
-    }
-
-    if(level!=s->block_max_depth){
-        put_rac(&s->c, &s->block_state[4 + s_context], 0);
-        score2 = encode_q_branch(s, level+1, 2*x+0, 2*y+0);
-        score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+0);
-        score2+= encode_q_branch(s, level+1, 2*x+0, 2*y+1);
-        score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+1);
-        score2+= s->lambda2>>FF_LAMBDA_SHIFT; //FIXME exact split overhead
-
-        if(score2 < score && score2 < iscore)
-            return score2;
-    }
-
-    if(iscore < score){
-        pred_mv(s, &pmx, &pmy, 0, left, top, tr);
-        memcpy(pbbak, i_buffer, i_len);
-        s->c= ic;
-        s->c.bytestream_start= pbbak_start;
-        s->c.bytestream= pbbak + i_len;
-        set_blocks(s, level, x, y, l, cb, cr, pmx, pmy, 0, BLOCK_INTRA);
-        memcpy(s->block_state, i_state, sizeof(s->block_state));
-        return iscore;
-    }else{
-        memcpy(pbbak, p_buffer, p_len);
-        s->c= pc;
-        s->c.bytestream_start= pbbak_start;
-        s->c.bytestream= pbbak + p_len;
-        set_blocks(s, level, x, y, pl, pcb, pcr, mx, my, best_ref, 0);
-        memcpy(s->block_state, p_state, sizeof(s->block_state));
-        return score;
-    }
-}
-
-static always_inline int same_block(BlockNode *a, BlockNode *b){
-    if((a->type&BLOCK_INTRA) && (b->type&BLOCK_INTRA)){
-        return !((a->color[0] - b->color[0]) | (a->color[1] - b->color[1]) | (a->color[2] - b->color[2]));
-    }else{
-        return !((a->mx - b->mx) | (a->my - b->my) | (a->ref - b->ref) | ((a->type ^ b->type)&BLOCK_INTRA));
-    }
-}
-
-static void encode_q_branch2(SnowContext *s, int level, int x, int y){
-    const int w= s->b_width  << s->block_max_depth;
-    const int rem_depth= s->block_max_depth - level;
-    const int index= (x + y*w) << rem_depth;
-    int trx= (x+1)<<rem_depth;
-    BlockNode *b= &s->block[index];
-    BlockNode *left  = x ? &s->block[index-1] : &null_block;
-    BlockNode *top   = y ? &s->block[index-w] : &null_block;
-    BlockNode *tl    = y && x ? &s->block[index-w-1] : left;
-    BlockNode *tr    = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt
-    int pl = left->color[0];
-    int pcb= left->color[1];
-    int pcr= left->color[2];
-    int pmx, pmy;
-    int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref);
-    int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 16*!!b->ref;
-    int my_context= av_log2(2*FFABS(left->my - top->my)) + 16*!!b->ref;
-    int s_context= 2*left->level + 2*top->level + tl->level + tr->level;
-
-    if(s->keyframe){
-        set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA);
-        return;
-    }
-
-    if(level!=s->block_max_depth){
-        if(same_block(b,b+1) && same_block(b,b+w) && same_block(b,b+w+1)){
-            put_rac(&s->c, &s->block_state[4 + s_context], 1);
-        }else{
-            put_rac(&s->c, &s->block_state[4 + s_context], 0);
-            encode_q_branch2(s, level+1, 2*x+0, 2*y+0);
-            encode_q_branch2(s, level+1, 2*x+1, 2*y+0);
-            encode_q_branch2(s, level+1, 2*x+0, 2*y+1);
-            encode_q_branch2(s, level+1, 2*x+1, 2*y+1);
-            return;
-        }
-    }
-    if(b->type & BLOCK_INTRA){
-        pred_mv(s, &pmx, &pmy, 0, left, top, tr);
-        put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 1);
-        put_symbol(&s->c, &s->block_state[32], b->color[0]-pl , 1);
-        put_symbol(&s->c, &s->block_state[64], b->color[1]-pcb, 1);
-        put_symbol(&s->c, &s->block_state[96], b->color[2]-pcr, 1);
-        set_blocks(s, level, x, y, b->color[0], b->color[1], b->color[2], pmx, pmy, 0, BLOCK_INTRA);
-    }else{
-        pred_mv(s, &pmx, &pmy, b->ref, left, top, tr);
-        put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 0);
-        if(s->ref_frames > 1)
-            put_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], b->ref, 0);
-        put_symbol(&s->c, &s->block_state[128 + 32*mx_context], b->mx - pmx, 1);
-        put_symbol(&s->c, &s->block_state[128 + 32*my_context], b->my - pmy, 1);
-        set_blocks(s, level, x, y, pl, pcb, pcr, b->mx, b->my, b->ref, 0);
-    }
-}
-
-static void decode_q_branch(SnowContext *s, int level, int x, int y){
-    const int w= s->b_width << s->block_max_depth;
-    const int rem_depth= s->block_max_depth - level;
-    const int index= (x + y*w) << rem_depth;
-    int trx= (x+1)<<rem_depth;
-    BlockNode *left  = x ? &s->block[index-1] : &null_block;
-    BlockNode *top   = y ? &s->block[index-w] : &null_block;
-    BlockNode *tl    = y && x ? &s->block[index-w-1] : left;
-    BlockNode *tr    = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt
-    int s_context= 2*left->level + 2*top->level + tl->level + tr->level;
-
-    if(s->keyframe){
-        set_blocks(s, level, x, y, null_block.color[0], null_block.color[1], null_block.color[2], null_block.mx, null_block.my, null_block.ref, BLOCK_INTRA);
-        return;
-    }
-
-    if(level==s->block_max_depth || get_rac(&s->c, &s->block_state[4 + s_context])){
-        int type;
-        int l = left->color[0];
-        int cb= left->color[1];
-        int cr= left->color[2];
-        int mx= mid_pred(left->mx, top->mx, tr->mx);
-        int my= mid_pred(left->my, top->my, tr->my);
-        int ref = 0;
-        int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref);
-        int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx));
-        int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my));
-
-        type= get_rac(&s->c, &s->block_state[1 + left->type + top->type]) ? BLOCK_INTRA : 0;
-
-        if(type){
-            pred_mv(s, &mx, &my, 0, left, top, tr);
-            l += get_symbol(&s->c, &s->block_state[32], 1);
-            cb+= get_symbol(&s->c, &s->block_state[64], 1);
-            cr+= get_symbol(&s->c, &s->block_state[96], 1);
-        }else{
-            if(s->ref_frames > 1)
-                ref= get_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], 0);
-            pred_mv(s, &mx, &my, ref, left, top, tr);
-            mx+= get_symbol(&s->c, &s->block_state[128 + 32*(mx_context + 16*!!ref)], 1);
-            my+= get_symbol(&s->c, &s->block_state[128 + 32*(my_context + 16*!!ref)], 1);
-        }
-        set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type);
-    }else{
-        decode_q_branch(s, level+1, 2*x+0, 2*y+0);
-        decode_q_branch(s, level+1, 2*x+1, 2*y+0);
-        decode_q_branch(s, level+1, 2*x+0, 2*y+1);
-        decode_q_branch(s, level+1, 2*x+1, 2*y+1);
-    }
-}
-
-static void encode_blocks(SnowContext *s, int search){
-    int x, y;
-    int w= s->b_width;
-    int h= s->b_height;
-
-    if(s->avctx->me_method == ME_ITER && !s->keyframe && search)
-        iterative_me(s);
-
-    for(y=0; y<h; y++){
-        if(s->c.bytestream_end - s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit
-            av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
-            return;
-        }
-        for(x=0; x<w; x++){
-            if(s->avctx->me_method == ME_ITER || !search)
-                encode_q_branch2(s, 0, x, y);
-            else
-                encode_q_branch (s, 0, x, y);
-        }
-    }
-}
-
-static void decode_blocks(SnowContext *s){
-    int x, y;
-    int w= s->b_width;
-    int h= s->b_height;
-
-    for(y=0; y<h; y++){
-        for(x=0; x<w; x++){
-            decode_q_branch(s, 0, x, y);
-        }
-    }
-}
-
-static void mc_block(uint8_t *dst, uint8_t *src, uint8_t *tmp, int stride, int b_w, int b_h, int dx, int dy){
-    int x, y;
-START_TIMER
-    for(y=0; y < b_h+5; y++){
-        for(x=0; x < b_w; x++){
-            int a0= src[x    ];
-            int a1= src[x + 1];
-            int a2= src[x + 2];
-            int a3= src[x + 3];
-            int a4= src[x + 4];
-            int a5= src[x + 5];
-//            int am= 9*(a1+a2) - (a0+a3);
-            int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5);
-//            int am= 18*(a2+a3) - 2*(a1+a4);
-//             int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3;
-//             int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3;
-
-//            if(b_w==16) am= 8*(a1+a2);
-
-            if(dx<8) am = (32*a2*( 8-dx) +    am* dx    + 128)>>8;
-            else     am = (   am*(16-dx) + 32*a3*(dx-8) + 128)>>8;
-
-            /* FIXME Try increasing tmp buffer to 16 bits and not clipping here. Should give marginally better results. - Robert*/
-            if(am&(~255)) am= ~(am>>31);
-
-            tmp[x] = am;
-
-/*            if     (dx< 4) tmp[x + y*stride]= (16*a1*( 4-dx) +    aL* dx     + 32)>>6;
-            else if(dx< 8) tmp[x + y*stride]= (   aL*( 8-dx) +    am*(dx- 4) + 32)>>6;
-            else if(dx<12) tmp[x + y*stride]= (   am*(12-dx) +    aR*(dx- 8) + 32)>>6;
-            else           tmp[x + y*stride]= (   aR*(16-dx) + 16*a2*(dx-12) + 32)>>6;*/
-        }
-        tmp += stride;
-        src += stride;
-    }
-    tmp -= (b_h+5)*stride;
-
-    for(y=0; y < b_h; y++){
-        for(x=0; x < b_w; x++){
-            int a0= tmp[x + 0*stride];
-            int a1= tmp[x + 1*stride];
-            int a2= tmp[x + 2*stride];
-            int a3= tmp[x + 3*stride];
-            int a4= tmp[x + 4*stride];
-            int a5= tmp[x + 5*stride];
-            int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5);
-//            int am= 18*(a2+a3) - 2*(a1+a4);
-/*            int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3;
-            int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3;*/
-
-//            if(b_w==16) am= 8*(a1+a2);
-
-            if(dy<8) am =  (32*a2*( 8-dy) +    am* dy    + 128)>>8;
-            else     am = (   am*(16-dy) + 32*a3*(dy-8) + 128)>>8;
-
-            if(am&(~255)) am= ~(am>>31);
-
-            dst[x] = am;
-/*            if     (dy< 4) tmp[x + y*stride]= (16*a1*( 4-dy) +    aL* dy     + 32)>>6;
-            else if(dy< 8) tmp[x + y*stride]= (   aL*( 8-dy) +    am*(dy- 4) + 32)>>6;
-            else if(dy<12) tmp[x + y*stride]= (   am*(12-dy) +    aR*(dy- 8) + 32)>>6;
-            else           tmp[x + y*stride]= (   aR*(16-dy) + 16*a2*(dy-12) + 32)>>6;*/
-        }
-        dst += stride;
-        tmp += stride;
-    }
-STOP_TIMER("mc_block")
-}
-
-#define mca(dx,dy,b_w)\
-static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, uint8_t *src, int stride, int h){\
-    uint8_t tmp[stride*(b_w+5)];\
-    assert(h==b_w);\
-    mc_block(dst, src-2-2*stride, tmp, stride, b_w, b_w, dx, dy);\
-}
-
-mca( 0, 0,16)
-mca( 8, 0,16)
-mca( 0, 8,16)
-mca( 8, 8,16)
-mca( 0, 0,8)
-mca( 8, 0,8)
-mca( 0, 8,8)
-mca( 8, 8,8)
-
-static void pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){
-    if(block->type & BLOCK_INTRA){
-        int x, y;
-        const int color = block->color[plane_index];
-        const int color4= color*0x01010101;
-        if(b_w==32){
-            for(y=0; y < b_h; y++){
-                *(uint32_t*)&dst[0 + y*stride]= color4;
-                *(uint32_t*)&dst[4 + y*stride]= color4;
-                *(uint32_t*)&dst[8 + y*stride]= color4;
-                *(uint32_t*)&dst[12+ y*stride]= color4;
-                *(uint32_t*)&dst[16+ y*stride]= color4;
-                *(uint32_t*)&dst[20+ y*stride]= color4;
-                *(uint32_t*)&dst[24+ y*stride]= color4;
-                *(uint32_t*)&dst[28+ y*stride]= color4;
-            }
-        }else if(b_w==16){
-            for(y=0; y < b_h; y++){
-                *(uint32_t*)&dst[0 + y*stride]= color4;
-                *(uint32_t*)&dst[4 + y*stride]= color4;
-                *(uint32_t*)&dst[8 + y*stride]= color4;
-                *(uint32_t*)&dst[12+ y*stride]= color4;
-            }
-        }else if(b_w==8){
-            for(y=0; y < b_h; y++){
-                *(uint32_t*)&dst[0 + y*stride]= color4;
-                *(uint32_t*)&dst[4 + y*stride]= color4;
-            }
-        }else if(b_w==4){
-            for(y=0; y < b_h; y++){
-                *(uint32_t*)&dst[0 + y*stride]= color4;
-            }
-        }else{
-            for(y=0; y < b_h; y++){
-                for(x=0; x < b_w; x++){
-                    dst[x + y*stride]= color;
-                }
-            }
-        }
-    }else{
-        uint8_t *src= s->last_picture[block->ref].data[plane_index];
-        const int scale= plane_index ?  s->mv_scale : 2*s->mv_scale;
-        int mx= block->mx*scale;
-        int my= block->my*scale;
-        const int dx= mx&15;
-        const int dy= my&15;
-        const int tab_index= 3 - (b_w>>2) + (b_w>>4);
-        sx += (mx>>4) - 2;
-        sy += (my>>4) - 2;
-        src += sx + sy*stride;
-        if(   (unsigned)sx >= w - b_w - 4
-           || (unsigned)sy >= h - b_h - 4){
-            ff_emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+5, b_h+5, sx, sy, w, h);
-            src= tmp + MB_SIZE;
-        }
-//        assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h);
-//        assert(!(b_w&(b_w-1)));
-        assert(b_w>1 && b_h>1);
-        assert(tab_index>=0 && tab_index<4 || b_w==32);
-        if((dx&3) || (dy&3) || !(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h) || (b_w&(b_w-1)))
-            mc_block(dst, src, tmp, stride, b_w, b_h, dx, dy);
-        else if(b_w==32){
-            int y;
-            for(y=0; y<b_h; y+=16){
-                s->dsp.put_h264_qpel_pixels_tab[0][dy+(dx>>2)](dst + y*stride, src + 2 + (y+2)*stride,stride);
-                s->dsp.put_h264_qpel_pixels_tab[0][dy+(dx>>2)](dst + 16 + y*stride, src + 18 + (y+2)*stride,stride);
-            }
-        }else if(b_w==b_h)
-            s->dsp.put_h264_qpel_pixels_tab[tab_index  ][dy+(dx>>2)](dst,src + 2 + 2*stride,stride);
-        else if(b_w==2*b_h){
-            s->dsp.put_h264_qpel_pixels_tab[tab_index+1][dy+(dx>>2)](dst    ,src + 2       + 2*stride,stride);
-            s->dsp.put_h264_qpel_pixels_tab[tab_index+1][dy+(dx>>2)](dst+b_h,src + 2 + b_h + 2*stride,stride);
-        }else{
-            assert(2*b_w==b_h);
-            s->dsp.put_h264_qpel_pixels_tab[tab_index  ][dy+(dx>>2)](dst           ,src + 2 + 2*stride           ,stride);
-            s->dsp.put_h264_qpel_pixels_tab[tab_index  ][dy+(dx>>2)](dst+b_w*stride,src + 2 + 2*stride+b_w*stride,stride);
-        }
-    }
-}
-
-void ff_snow_inner_add_yblock(uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
-                              int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8){
-    int y, x;
-    DWTELEM * dst;
-    for(y=0; y<b_h; y++){
-        //FIXME ugly missue of obmc_stride
-        uint8_t *obmc1= obmc + y*obmc_stride;
-        uint8_t *obmc2= obmc1+ (obmc_stride>>1);
-        uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1);
-        uint8_t *obmc4= obmc3+ (obmc_stride>>1);
-        dst = slice_buffer_get_line(sb, src_y + y);
-        for(x=0; x<b_w; x++){
-            int v=   obmc1[x] * block[3][x + y*src_stride]
-                    +obmc2[x] * block[2][x + y*src_stride]
-                    +obmc3[x] * block[1][x + y*src_stride]
-                    +obmc4[x] * block[0][x + y*src_stride];
-
-            v <<= 8 - LOG2_OBMC_MAX;
-            if(FRAC_BITS != 8){
-                v += 1<<(7 - FRAC_BITS);
-                v >>= 8 - FRAC_BITS;
-            }
-            if(add){
-                v += dst[x + src_x];
-                v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS;
-                if(v&(~255)) v= ~(v>>31);
-                dst8[x + y*src_stride] = v;
-            }else{
-                dst[x + src_x] -= v;
-            }
-        }
-    }
-}
-
-//FIXME name clenup (b_w, block_w, b_width stuff)
-static always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, DWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){
-    const int b_width = s->b_width  << s->block_max_depth;
-    const int b_height= s->b_height << s->block_max_depth;
-    const int b_stride= b_width;
-    BlockNode *lt= &s->block[b_x + b_y*b_stride];
-    BlockNode *rt= lt+1;
-    BlockNode *lb= lt+b_stride;
-    BlockNode *rb= lb+1;
-    uint8_t *block[4];
-    int tmp_step= src_stride >= 7*MB_SIZE ? MB_SIZE : MB_SIZE*src_stride;
-    uint8_t tmp[src_stride*7*MB_SIZE]; //FIXME align
-    uint8_t *ptmp;
-    int x,y;
-
-    if(b_x<0){
-        lt= rt;
-        lb= rb;
-    }else if(b_x + 1 >= b_width){
-        rt= lt;
-        rb= lb;
-    }
-    if(b_y<0){
-        lt= lb;
-        rt= rb;
-    }else if(b_y + 1 >= b_height){
-        lb= lt;
-        rb= rt;
-    }
-
-    if(src_x<0){ //FIXME merge with prev & always round internal width upto *16
-        obmc -= src_x;
-        b_w += src_x;
-        if(!sliced && !offset_dst)
-            dst -= src_x;
-        src_x=0;
-    }else if(src_x + b_w > w){
-        b_w = w - src_x;
-    }
-    if(src_y<0){
-        obmc -= src_y*obmc_stride;
-        b_h += src_y;
-        if(!sliced && !offset_dst)
-            dst -= src_y*dst_stride;
-        src_y=0;
-    }else if(src_y + b_h> h){
-        b_h = h - src_y;
-    }
-
-    if(b_w<=0 || b_h<=0) return;
-
-assert(src_stride > 2*MB_SIZE + 5);
-    if(!sliced && offset_dst)
-        dst += src_x + src_y*dst_stride;
-    dst8+= src_x + src_y*src_stride;
-//    src += src_x + src_y*src_stride;
-
-    ptmp= tmp + 3*tmp_step;
-    block[0]= ptmp;
-    ptmp+=tmp_step;
-    pred_block(s, block[0], tmp, src_stride, src_x, src_y, b_w, b_h, lt, plane_index, w, h);
-
-    if(same_block(lt, rt)){
-        block[1]= block[0];
-    }else{
-        block[1]= ptmp;
-        ptmp+=tmp_step;
-        pred_block(s, block[1], tmp, src_stride, src_x, src_y, b_w, b_h, rt, plane_index, w, h);
-    }
-
-    if(same_block(lt, lb)){
-        block[2]= block[0];
-    }else if(same_block(rt, lb)){
-        block[2]= block[1];
-    }else{
-        block[2]= ptmp;
-        ptmp+=tmp_step;
-        pred_block(s, block[2], tmp, src_stride, src_x, src_y, b_w, b_h, lb, plane_index, w, h);
-    }
-
-    if(same_block(lt, rb) ){
-        block[3]= block[0];
-    }else if(same_block(rt, rb)){
-        block[3]= block[1];
-    }else if(same_block(lb, rb)){
-        block[3]= block[2];
-    }else{
-        block[3]= ptmp;
-        pred_block(s, block[3], tmp, src_stride, src_x, src_y, b_w, b_h, rb, plane_index, w, h);
-    }
-#if 0
-    for(y=0; y<b_h; y++){
-        for(x=0; x<b_w; x++){
-            int v=   obmc [x + y*obmc_stride] * block[3][x + y*src_stride] * (256/OBMC_MAX);
-            if(add) dst[x + y*dst_stride] += v;
-            else    dst[x + y*dst_stride] -= v;
-        }
-    }
-    for(y=0; y<b_h; y++){
-        uint8_t *obmc2= obmc + (obmc_stride>>1);
-        for(x=0; x<b_w; x++){
-            int v=   obmc2[x + y*obmc_stride] * block[2][x + y*src_stride] * (256/OBMC_MAX);
-            if(add) dst[x + y*dst_stride] += v;
-            else    dst[x + y*dst_stride] -= v;
-        }
-    }
-    for(y=0; y<b_h; y++){
-        uint8_t *obmc3= obmc + obmc_stride*(obmc_stride>>1);
-        for(x=0; x<b_w; x++){
-            int v=   obmc3[x + y*obmc_stride] * block[1][x + y*src_stride] * (256/OBMC_MAX);
-            if(add) dst[x + y*dst_stride] += v;
-            else    dst[x + y*dst_stride] -= v;
-        }
-    }
-    for(y=0; y<b_h; y++){
-        uint8_t *obmc3= obmc + obmc_stride*(obmc_stride>>1);
-        uint8_t *obmc4= obmc3+ (obmc_stride>>1);
-        for(x=0; x<b_w; x++){
-            int v=   obmc4[x + y*obmc_stride] * block[0][x + y*src_stride] * (256/OBMC_MAX);
-            if(add) dst[x + y*dst_stride] += v;
-            else    dst[x + y*dst_stride] -= v;
-        }
-    }
-#else
-    if(sliced){
-        START_TIMER
-
-        s->dsp.inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
-        STOP_TIMER("inner_add_yblock")
-    }else
-    for(y=0; y<b_h; y++){
-        //FIXME ugly missue of obmc_stride
-        uint8_t *obmc1= obmc + y*obmc_stride;
-        uint8_t *obmc2= obmc1+ (obmc_stride>>1);
-        uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1);
-        uint8_t *obmc4= obmc3+ (obmc_stride>>1);
-        for(x=0; x<b_w; x++){
-            int v=   obmc1[x] * block[3][x + y*src_stride]
-                    +obmc2[x] * block[2][x + y*src_stride]
-                    +obmc3[x] * block[1][x + y*src_stride]
-                    +obmc4[x] * block[0][x + y*src_stride];
-
-            v <<= 8 - LOG2_OBMC_MAX;
-            if(FRAC_BITS != 8){
-                v += 1<<(7 - FRAC_BITS);
-                v >>= 8 - FRAC_BITS;
-            }
-            if(add){
-                v += dst[x + y*dst_stride];
-                v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS;
-                if(v&(~255)) v= ~(v>>31);
-                dst8[x + y*src_stride] = v;
-            }else{
-                dst[x + y*dst_stride] -= v;
-            }
-        }
-    }
-#endif
-}
-
-static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, DWTELEM * old_buffer, int plane_index, int add, int mb_y){
-    Plane *p= &s->plane[plane_index];
-    const int mb_w= s->b_width  << s->block_max_depth;
-    const int mb_h= s->b_height << s->block_max_depth;
-    int x, y, mb_x;
-    int block_size = MB_SIZE >> s->block_max_depth;
-    int block_w    = plane_index ? block_size/2 : block_size;
-    const uint8_t *obmc  = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth];
-    int obmc_stride= plane_index ? block_size : 2*block_size;
-    int ref_stride= s->current_picture.linesize[plane_index];
-    uint8_t *dst8= s->current_picture.data[plane_index];
-    int w= p->width;
-    int h= p->height;
-    START_TIMER
-
-    if(s->keyframe || (s->avctx->debug&512)){
-        if(mb_y==mb_h)
-            return;
-
-        if(add){
-            for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++)
-            {
-//                DWTELEM * line = slice_buffer_get_line(sb, y);
-                DWTELEM * line = sb->line[y];
-                for(x=0; x<w; x++)
-                {
-//                    int v= buf[x + y*w] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1));
-                    int v= line[x] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1));
-                    v >>= FRAC_BITS;
-                    if(v&(~255)) v= ~(v>>31);
-                    dst8[x + y*ref_stride]= v;
-                }
-            }
-        }else{
-            for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++)
-            {
-//                DWTELEM * line = slice_buffer_get_line(sb, y);
-                DWTELEM * line = sb->line[y];
-                for(x=0; x<w; x++)
-                {
-                    line[x] -= 128 << FRAC_BITS;
-//                    buf[x + y*w]-= 128<<FRAC_BITS;
-                }
-            }
-        }
-
-        return;
-    }
-
-        for(mb_x=0; mb_x<=mb_w; mb_x++){
-            START_TIMER
-
-            add_yblock(s, 1, sb, old_buffer, dst8, obmc,
-                       block_w*mb_x - block_w/2,
-                       block_w*mb_y - block_w/2,
-                       block_w, block_w,
-                       w, h,
-                       w, ref_stride, obmc_stride,
-                       mb_x - 1, mb_y - 1,
-                       add, 0, plane_index);
-
-            STOP_TIMER("add_yblock")
-        }
-
-    STOP_TIMER("predict_slice")
-}
-
-static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_index, int add, int mb_y){
-    Plane *p= &s->plane[plane_index];
-    const int mb_w= s->b_width  << s->block_max_depth;
-    const int mb_h= s->b_height << s->block_max_depth;
-    int x, y, mb_x;
-    int block_size = MB_SIZE >> s->block_max_depth;
-    int block_w    = plane_index ? block_size/2 : block_size;
-    const uint8_t *obmc  = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth];
-    const int obmc_stride= plane_index ? block_size : 2*block_size;
-    int ref_stride= s->current_picture.linesize[plane_index];
-    uint8_t *dst8= s->current_picture.data[plane_index];
-    int w= p->width;
-    int h= p->height;
-    START_TIMER
-
-    if(s->keyframe || (s->avctx->debug&512)){
-        if(mb_y==mb_h)
-            return;
-
-        if(add){
-            for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++){
-                for(x=0; x<w; x++){
-                    int v= buf[x + y*w] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1));
-                    v >>= FRAC_BITS;
-                    if(v&(~255)) v= ~(v>>31);
-                    dst8[x + y*ref_stride]= v;
-                }
-            }
-        }else{
-            for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++){
-                for(x=0; x<w; x++){
-                    buf[x + y*w]-= 128<<FRAC_BITS;
-                }
-            }
-        }
-
-        return;
-    }
-
-        for(mb_x=0; mb_x<=mb_w; mb_x++){
-            START_TIMER
-
-            add_yblock(s, 0, NULL, buf, dst8, obmc,
-                       block_w*mb_x - block_w/2,
-                       block_w*mb_y - block_w/2,
-                       block_w, block_w,
-                       w, h,
-                       w, ref_stride, obmc_stride,
-                       mb_x - 1, mb_y - 1,
-                       add, 1, plane_index);
-
-            STOP_TIMER("add_yblock")
-        }
-
-    STOP_TIMER("predict_slice")
-}
-
-static always_inline void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){
-    const int mb_h= s->b_height << s->block_max_depth;
-    int mb_y;
-    for(mb_y=0; mb_y<=mb_h; mb_y++)
-        predict_slice(s, buf, plane_index, add, mb_y);
-}
-
-static int get_dc(SnowContext *s, int mb_x, int mb_y, int plane_index){
-    int i, x2, y2;
-    Plane *p= &s->plane[plane_index];
-    const int block_size = MB_SIZE >> s->block_max_depth;
-    const int block_w    = plane_index ? block_size/2 : block_size;
-    const uint8_t *obmc  = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth];
-    const int obmc_stride= plane_index ? block_size : 2*block_size;
-    const int ref_stride= s->current_picture.linesize[plane_index];
-    uint8_t *src= s-> input_picture.data[plane_index];
-    DWTELEM *dst= (DWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4;
-    const int b_stride = s->b_width << s->block_max_depth;
-    const int w= p->width;
-    const int h= p->height;
-    int index= mb_x + mb_y*b_stride;
-    BlockNode *b= &s->block[index];
-    BlockNode backup= *b;
-    int ab=0;
-    int aa=0;
-
-    b->type|= BLOCK_INTRA;
-    b->color[plane_index]= 0;
-    memset(dst, 0, obmc_stride*obmc_stride*sizeof(DWTELEM));
-
-    for(i=0; i<4; i++){
-        int mb_x2= mb_x + (i &1) - 1;
-        int mb_y2= mb_y + (i>>1) - 1;
-        int x= block_w*mb_x2 + block_w/2;
-        int y= block_w*mb_y2 + block_w/2;
-
-        add_yblock(s, 0, NULL, dst + ((i&1)+(i>>1)*obmc_stride)*block_w, NULL, obmc,
-                    x, y, block_w, block_w, w, h, obmc_stride, ref_stride, obmc_stride, mb_x2, mb_y2, 0, 0, plane_index);
-
-        for(y2= FFMAX(y, 0); y2<FFMIN(h, y+block_w); y2++){
-            for(x2= FFMAX(x, 0); x2<FFMIN(w, x+block_w); x2++){
-                int index= x2-(block_w*mb_x - block_w/2) + (y2-(block_w*mb_y - block_w/2))*obmc_stride;
-                int obmc_v= obmc[index];
-                int d;
-                if(y<0) obmc_v += obmc[index + block_w*obmc_stride];
-                if(x<0) obmc_v += obmc[index + block_w];
-                if(y+block_w>h) obmc_v += obmc[index - block_w*obmc_stride];
-                if(x+block_w>w) obmc_v += obmc[index - block_w];
-                //FIXME precalc this or simplify it somehow else
-
-                d = -dst[index] + (1<<(FRAC_BITS-1));
-                dst[index] = d;
-                ab += (src[x2 + y2*ref_stride] - (d>>FRAC_BITS)) * obmc_v;
-                aa += obmc_v * obmc_v; //FIXME precalclate this
-            }
-        }
-    }
-    *b= backup;
-
-    return clip(((ab<<LOG2_OBMC_MAX) + aa/2)/aa, 0, 255); //FIXME we shouldnt need cliping
-}
-
-static inline int get_block_bits(SnowContext *s, int x, int y, int w){
-    const int b_stride = s->b_width << s->block_max_depth;
-    const int b_height = s->b_height<< s->block_max_depth;
-    int index= x + y*b_stride;
-    BlockNode *b     = &s->block[index];
-    BlockNode *left  = x ? &s->block[index-1] : &null_block;
-    BlockNode *top   = y ? &s->block[index-b_stride] : &null_block;
-    BlockNode *tl    = y && x ? &s->block[index-b_stride-1] : left;
-    BlockNode *tr    = y && x+w<b_stride ? &s->block[index-b_stride+w] : tl;
-    int dmx, dmy;
-//  int mx_context= av_log2(2*FFABS(left->mx - top->mx));
-//  int my_context= av_log2(2*FFABS(left->my - top->my));
-
-    if(x<0 || x>=b_stride || y>=b_height)
-        return 0;
-/*
-1            0      0
-01X          1-2    1
-001XX        3-6    2-3
-0001XXX      7-14   4-7
-00001XXXX   15-30   8-15
-*/
-//FIXME try accurate rate
-//FIXME intra and inter predictors if surrounding blocks arent the same type
-    if(b->type & BLOCK_INTRA){
-        return 3+2*( av_log2(2*FFABS(left->color[0] - b->color[0]))
-                   + av_log2(2*FFABS(left->color[1] - b->color[1]))
-                   + av_log2(2*FFABS(left->color[2] - b->color[2])));
-    }else{
-        pred_mv(s, &dmx, &dmy, b->ref, left, top, tr);
-        dmx-= b->mx;
-        dmy-= b->my;
-        return 2*(1 + av_log2(2*FFABS(dmx)) //FIXME kill the 2* can be merged in lambda
-                    + av_log2(2*FFABS(dmy))
-                    + av_log2(2*b->ref));
-    }
-}
-
-static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, const uint8_t *obmc_edged){
-    Plane *p= &s->plane[plane_index];
-    const int block_size = MB_SIZE >> s->block_max_depth;
-    const int block_w    = plane_index ? block_size/2 : block_size;
-    const int obmc_stride= plane_index ? block_size : 2*block_size;
-    const int ref_stride= s->current_picture.linesize[plane_index];
-    uint8_t *dst= s->current_picture.data[plane_index];
-    uint8_t *src= s->  input_picture.data[plane_index];
-    DWTELEM *pred= (DWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4;
-    uint8_t cur[ref_stride*2*MB_SIZE]; //FIXME alignment
-    uint8_t tmp[ref_stride*(2*MB_SIZE+5)];
-    const int b_stride = s->b_width << s->block_max_depth;
-    const int b_height = s->b_height<< s->block_max_depth;
-    const int w= p->width;
-    const int h= p->height;
-    int distortion;
-    int rate= 0;
-    const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp);
-    int sx= block_w*mb_x - block_w/2;
-    int sy= block_w*mb_y - block_w/2;
-    int x0= FFMAX(0,-sx);
-    int y0= FFMAX(0,-sy);
-    int x1= FFMIN(block_w*2, w-sx);
-    int y1= FFMIN(block_w*2, h-sy);
-    int i,x,y;
-
-    pred_block(s, cur, tmp, ref_stride, sx, sy, block_w*2, block_w*2, &s->block[mb_x + mb_y*b_stride], plane_index, w, h);
-
-    for(y=y0; y<y1; y++){
-        const uint8_t *obmc1= obmc_edged + y*obmc_stride;
-        const DWTELEM *pred1 = pred + y*obmc_stride;
-        uint8_t *cur1 = cur + y*ref_stride;
-        uint8_t *dst1 = dst + sx + (sy+y)*ref_stride;
-        for(x=x0; x<x1; x++){
-            int v = (cur1[x] * obmc1[x]) << (FRAC_BITS - LOG2_OBMC_MAX);
-            v = (v + pred1[x]) >> FRAC_BITS;
-            if(v&(~255)) v= ~(v>>31);
-            dst1[x] = v;
-        }
-    }
-
-    /* copy the regions where obmc[] = (uint8_t)256 */
-    if(LOG2_OBMC_MAX == 8
-        && (mb_x == 0 || mb_x == b_stride-1)
-        && (mb_y == 0 || mb_y == b_height-1)){
-        if(mb_x == 0)
-            x1 = block_w;
-        else
-            x0 = block_w;
-        if(mb_y == 0)
-            y1 = block_w;
-        else
-            y0 = block_w;
-        for(y=y0; y<y1; y++)
-            memcpy(dst + sx+x0 + (sy+y)*ref_stride, cur + x0 + y*ref_stride, x1-x0);
-    }
-
-    if(block_w==16){
-        /* FIXME rearrange dsputil to fit 32x32 cmp functions */
-        /* FIXME check alignment of the cmp wavelet vs the encoding wavelet */
-        /* FIXME cmps overlap but don't cover the wavelet's whole support,
-         * so improving the score of one block is not strictly guaranteed to
-         * improve the score of the whole frame, so iterative motion est
-         * doesn't always converge. */
-        if(s->avctx->me_cmp == FF_CMP_W97)
-            distortion = w97_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
-        else if(s->avctx->me_cmp == FF_CMP_W53)
-            distortion = w53_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
-        else{
-            distortion = 0;
-            for(i=0; i<4; i++){
-                int off = sx+16*(i&1) + (sy+16*(i>>1))*ref_stride;
-                distortion += s->dsp.me_cmp[0](&s->m, src + off, dst + off, ref_stride, 16);
-            }
-        }
-    }else{
-        assert(block_w==8);
-        distortion = s->dsp.me_cmp[0](&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, block_w*2);
-    }
-
-    if(plane_index==0){
-        for(i=0; i<4; i++){
-/* ..RRr
- * .RXx.
- * rxx..
- */
-            rate += get_block_bits(s, mb_x + (i&1) - (i>>1), mb_y + (i>>1), 1);
-        }
-        if(mb_x == b_stride-2)
-            rate += get_block_bits(s, mb_x + 1, mb_y + 1, 1);
-    }
-    return distortion + rate*penalty_factor;
-}
-
-static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){
-    int i, y2;
-    Plane *p= &s->plane[plane_index];
-    const int block_size = MB_SIZE >> s->block_max_depth;
-    const int block_w    = plane_index ? block_size/2 : block_size;
-    const uint8_t *obmc  = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth];
-    const int obmc_stride= plane_index ? block_size : 2*block_size;
-    const int ref_stride= s->current_picture.linesize[plane_index];
-    uint8_t *dst= s->current_picture.data[plane_index];
-    uint8_t *src= s-> input_picture.data[plane_index];
-    static const DWTELEM zero_dst[4096]; //FIXME
-    const int b_stride = s->b_width << s->block_max_depth;
-    const int w= p->width;
-    const int h= p->height;
-    int distortion= 0;
-    int rate= 0;
-    const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp);
-
-    for(i=0; i<9; i++){
-        int mb_x2= mb_x + (i%3) - 1;
-        int mb_y2= mb_y + (i/3) - 1;
-        int x= block_w*mb_x2 + block_w/2;
-        int y= block_w*mb_y2 + block_w/2;
-
-        add_yblock(s, 0, NULL, zero_dst, dst, obmc,
-                   x, y, block_w, block_w, w, h, /*dst_stride*/0, ref_stride, obmc_stride, mb_x2, mb_y2, 1, 1, plane_index);
-
-        //FIXME find a cleaner/simpler way to skip the outside stuff
-        for(y2= y; y2<0; y2++)
-            memcpy(dst + x + y2*ref_stride, src + x + y2*ref_stride, block_w);
-        for(y2= h; y2<y+block_w; y2++)
-            memcpy(dst + x + y2*ref_stride, src + x + y2*ref_stride, block_w);
-        if(x<0){
-            for(y2= y; y2<y+block_w; y2++)
-                memcpy(dst + x + y2*ref_stride, src + x + y2*ref_stride, -x);
-        }
-        if(x+block_w > w){
-            for(y2= y; y2<y+block_w; y2++)
-                memcpy(dst + w + y2*ref_stride, src + w + y2*ref_stride, x+block_w - w);
-        }
-
-        assert(block_w== 8 || block_w==16);
-        distortion += s->dsp.me_cmp[block_w==8](&s->m, src + x + y*ref_stride, dst + x + y*ref_stride, ref_stride, block_w);
-    }
-
-    if(plane_index==0){
-        BlockNode *b= &s->block[mb_x+mb_y*b_stride];
-        int merged= same_block(b,b+1) && same_block(b,b+b_stride) && same_block(b,b+b_stride+1);
-
-/* ..RRRr
- * .RXXx.
- * .RXXx.
- * rxxx.
- */
-        if(merged)
-            rate = get_block_bits(s, mb_x, mb_y, 2);
-        for(i=merged?4:0; i<9; i++){
-            static const int dxy[9][2] = {{0,0},{1,0},{0,1},{1,1},{2,0},{2,1},{-1,2},{0,2},{1,2}};
-            rate += get_block_bits(s, mb_x + dxy[i][0], mb_y + dxy[i][1], 1);
-        }
-    }
-    return distortion + rate*penalty_factor;
-}
-
-static always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){
-    const int b_stride= s->b_width << s->block_max_depth;
-    BlockNode *block= &s->block[mb_x + mb_y * b_stride];
-    BlockNode backup= *block;
-    int rd, index, value;
-
-    assert(mb_x>=0 && mb_y>=0);
-    assert(mb_x<b_stride);
-
-    if(intra){
-        block->color[0] = p[0];
-        block->color[1] = p[1];
-        block->color[2] = p[2];
-        block->type |= BLOCK_INTRA;
-    }else{
-        index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1);
-        value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12);
-        if(s->me_cache[index] == value)
-            return 0;
-        s->me_cache[index]= value;
-
-        block->mx= p[0];
-        block->my= p[1];
-        block->type &= ~BLOCK_INTRA;
-    }
-
-    rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);
-
-//FIXME chroma
-    if(rd < *best_rd){
-        *best_rd= rd;
-        return 1;
-    }else{
-        *block= backup;
-        return 0;
-    }
-}
-
-/* special case for int[2] args we discard afterward, fixes compilation prob with gcc 2.95 */
-static always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){
-    int p[2] = {p0, p1};
-    return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);
-}
-
-static always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){
-    const int b_stride= s->b_width << s->block_max_depth;
-    BlockNode *block= &s->block[mb_x + mb_y * b_stride];
-    BlockNode backup[4]= {block[0], block[1], block[b_stride], block[b_stride+1]};
-    int rd, index, value;
-
-    assert(mb_x>=0 && mb_y>=0);
-    assert(mb_x<b_stride);
-    assert(((mb_x|mb_y)&1) == 0);
-
-    index= (p0 + 31*p1) & (ME_CACHE_SIZE-1);
-    value= s->me_cache_generation + (p0>>10) + (p1<<6) + (block->ref<<12);
-    if(s->me_cache[index] == value)
-        return 0;
-    s->me_cache[index]= value;
-
-    block->mx= p0;
-    block->my= p1;
-    block->ref= ref;
-    block->type &= ~BLOCK_INTRA;
-    block[1]= block[b_stride]= block[b_stride+1]= *block;
-
-    rd= get_4block_rd(s, mb_x, mb_y, 0);
-
-//FIXME chroma
-    if(rd < *best_rd){
-        *best_rd= rd;
-        return 1;
-    }else{
-        block[0]= backup[0];
-        block[1]= backup[1];
-        block[b_stride]= backup[2];
-        block[b_stride+1]= backup[3];
-        return 0;
-    }
-}
-
-static void iterative_me(SnowContext *s){
-    int pass, mb_x, mb_y;
-    const int b_width = s->b_width  << s->block_max_depth;
-    const int b_height= s->b_height << s->block_max_depth;
-    const int b_stride= b_width;
-    int color[3];
-
-    {
-        RangeCoder r = s->c;
-        uint8_t state[sizeof(s->block_state)];
-        memcpy(state, s->block_state, sizeof(s->block_state));
-        for(mb_y= 0; mb_y<s->b_height; mb_y++)
-            for(mb_x= 0; mb_x<s->b_width; mb_x++)
-                encode_q_branch(s, 0, mb_x, mb_y);
-        s->c = r;
-        memcpy(s->block_state, state, sizeof(s->block_state));
-    }
-
-    for(pass=0; pass<25; pass++){
-        int change= 0;
-
-        for(mb_y= 0; mb_y<b_height; mb_y++){
-            for(mb_x= 0; mb_x<b_width; mb_x++){
-                int dia_change, i, j, ref;
-                int best_rd= INT_MAX, ref_rd;
-                BlockNode backup, ref_b;
-                const int index= mb_x + mb_y * b_stride;
-                BlockNode *block= &s->block[index];
-                BlockNode *tb =                   mb_y            ? &s->block[index-b_stride  ] : NULL;
-                BlockNode *lb = mb_x                              ? &s->block[index         -1] : NULL;
-                BlockNode *rb = mb_x+1<b_width                    ? &s->block[index         +1] : NULL;
-                BlockNode *bb =                   mb_y+1<b_height ? &s->block[index+b_stride  ] : NULL;
-                BlockNode *tlb= mb_x           && mb_y            ? &s->block[index-b_stride-1] : NULL;
-                BlockNode *trb= mb_x+1<b_width && mb_y            ? &s->block[index-b_stride+1] : NULL;
-                BlockNode *blb= mb_x           && mb_y+1<b_height ? &s->block[index+b_stride-1] : NULL;
-                BlockNode *brb= mb_x+1<b_width && mb_y+1<b_height ? &s->block[index+b_stride+1] : NULL;
-                const int b_w= (MB_SIZE >> s->block_max_depth);
-                uint8_t obmc_edged[b_w*2][b_w*2];
-
-                if(pass && (block->type & BLOCK_OPT))
-                    continue;
-                block->type |= BLOCK_OPT;
-
-                backup= *block;
-
-                if(!s->me_cache_generation)
-                    memset(s->me_cache, 0, sizeof(s->me_cache));
-                s->me_cache_generation += 1<<22;
-
-                //FIXME precalc
-                {
-                    int x, y;
-                    memcpy(obmc_edged, obmc_tab[s->block_max_depth], b_w*b_w*4);
-                    if(mb_x==0)
-                        for(y=0; y<b_w*2; y++)
-                            memset(obmc_edged[y], obmc_edged[y][0] + obmc_edged[y][b_w-1], b_w);
-                    if(mb_x==b_stride-1)
-                        for(y=0; y<b_w*2; y++)
-                            memset(obmc_edged[y]+b_w, obmc_edged[y][b_w] + obmc_edged[y][b_w*2-1], b_w);
-                    if(mb_y==0){
-                        for(x=0; x<b_w*2; x++)
-                            obmc_edged[0][x] += obmc_edged[b_w-1][x];
-                        for(y=1; y<b_w; y++)
-                            memcpy(obmc_edged[y], obmc_edged[0], b_w*2);
-                    }
-                    if(mb_y==b_height-1){
-                        for(x=0; x<b_w*2; x++)
-                            obmc_edged[b_w*2-1][x] += obmc_edged[b_w][x];
-                        for(y=b_w; y<b_w*2-1; y++)
-                            memcpy(obmc_edged[y], obmc_edged[b_w*2-1], b_w*2);
-                    }
-                }
-
-                //skip stuff outside the picture
-                if(mb_x==0 || mb_y==0 || mb_x==b_width-1 || mb_y==b_height-1)
-                {
-                    uint8_t *src= s->  input_picture.data[0];
-                    uint8_t *dst= s->current_picture.data[0];
-                    const int stride= s->current_picture.linesize[0];
-                    const int block_w= MB_SIZE >> s->block_max_depth;
-                    const int sx= block_w*mb_x - block_w/2;
-                    const int sy= block_w*mb_y - block_w/2;
-                    const int w= s->plane[0].width;
-                    const int h= s->plane[0].height;
-                    int y;
-
-                    for(y=sy; y<0; y++)
-                        memcpy(dst + sx + y*stride, src + sx + y*stride, block_w*2);
-                    for(y=h; y<sy+block_w*2; y++)
-                        memcpy(dst + sx + y*stride, src + sx + y*stride, block_w*2);
-                    if(sx<0){
-                        for(y=sy; y<sy+block_w*2; y++)
-                            memcpy(dst + sx + y*stride, src + sx + y*stride, -sx);
-                    }
-                    if(sx+block_w*2 > w){
-                        for(y=sy; y<sy+block_w*2; y++)
-                            memcpy(dst + w + y*stride, src + w + y*stride, sx+block_w*2 - w);
-                    }
-                }
-
-                // intra(black) = neighbors' contribution to the current block
-                for(i=0; i<3; i++)
-                    color[i]= get_dc(s, mb_x, mb_y, i);
-
-                // get previous score (cant be cached due to OBMC)
-                if(pass > 0 && (block->type&BLOCK_INTRA)){
-                    int color0[3]= {block->color[0], block->color[1], block->color[2]};
-                    check_block(s, mb_x, mb_y, color0, 1, *obmc_edged, &best_rd);
-                }else
-                    check_block_inter(s, mb_x, mb_y, block->mx, block->my, *obmc_edged, &best_rd);
-
-                ref_b= *block;
-                ref_rd= best_rd;
-                for(ref=0; ref < s->ref_frames; ref++){
-                    int16_t (*mvr)[2]= &s->ref_mvs[ref][index];
-                    if(s->ref_scores[ref][index] > s->ref_scores[ref_b.ref][index]*3/2) //FIXME tune threshold
-                        continue;
-                    block->ref= ref;
-                    best_rd= INT_MAX;
-
-                    check_block_inter(s, mb_x, mb_y, mvr[0][0], mvr[0][1], *obmc_edged, &best_rd);
-                    check_block_inter(s, mb_x, mb_y, 0, 0, *obmc_edged, &best_rd);
-                    if(tb)
-                        check_block_inter(s, mb_x, mb_y, mvr[-b_stride][0], mvr[-b_stride][1], *obmc_edged, &best_rd);
-                    if(lb)
-                        check_block_inter(s, mb_x, mb_y, mvr[-1][0], mvr[-1][1], *obmc_edged, &best_rd);
-                    if(rb)
-                        check_block_inter(s, mb_x, mb_y, mvr[1][0], mvr[1][1], *obmc_edged, &best_rd);
-                    if(bb)
-                        check_block_inter(s, mb_x, mb_y, mvr[b_stride][0], mvr[b_stride][1], *obmc_edged, &best_rd);
-
-                    /* fullpel ME */
-                    //FIXME avoid subpel interpol / round to nearest integer
-                    do{
-                        dia_change=0;
-                        for(i=0; i<FFMAX(s->avctx->dia_size, 1); i++){
-                            for(j=0; j<i; j++){
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my+(4*j), *obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), *obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), *obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), *obmc_edged, &best_rd);
-                            }
-                        }
-                    }while(dia_change);
-                    /* subpel ME */
-                    do{
-                        static const int square[8][2]= {{+1, 0},{-1, 0},{ 0,+1},{ 0,-1},{+1,+1},{-1,-1},{+1,-1},{-1,+1},};
-                        dia_change=0;
-                        for(i=0; i<8; i++)
-                            dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+square[i][0], block->my+square[i][1], *obmc_edged, &best_rd);
-                    }while(dia_change);
-                    //FIXME or try the standard 2 pass qpel or similar
-
-                    mvr[0][0]= block->mx;
-                    mvr[0][1]= block->my;
-                    if(ref_rd > best_rd){
-                        ref_rd= best_rd;
-                        ref_b= *block;
-                    }
-                }
-                best_rd= ref_rd;
-                *block= ref_b;
-#if 1
-                check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd);
-                //FIXME RD style color selection
-#endif
-                if(!same_block(block, &backup)){
-                    if(tb ) tb ->type &= ~BLOCK_OPT;
-                    if(lb ) lb ->type &= ~BLOCK_OPT;
-                    if(rb ) rb ->type &= ~BLOCK_OPT;
-                    if(bb ) bb ->type &= ~BLOCK_OPT;
-                    if(tlb) tlb->type &= ~BLOCK_OPT;
-                    if(trb) trb->type &= ~BLOCK_OPT;
-                    if(blb) blb->type &= ~BLOCK_OPT;
-                    if(brb) brb->type &= ~BLOCK_OPT;
-                    change ++;
-                }
-            }
-        }
-        av_log(NULL, AV_LOG_ERROR, "pass:%d changed:%d\n", pass, change);
-        if(!change)
-            break;
-    }
-
-    if(s->block_max_depth == 1){
-        int change= 0;
-        for(mb_y= 0; mb_y<b_height; mb_y+=2){
-            for(mb_x= 0; mb_x<b_width; mb_x+=2){
-                int i;
-                int best_rd, init_rd;
-                const int index= mb_x + mb_y * b_stride;
-                BlockNode *b[4];
-
-                b[0]= &s->block[index];
-                b[1]= b[0]+1;
-                b[2]= b[0]+b_stride;
-                b[3]= b[2]+1;
-                if(same_block(b[0], b[1]) &&
-                   same_block(b[0], b[2]) &&
-                   same_block(b[0], b[3]))
-                    continue;
-
-                if(!s->me_cache_generation)
-                    memset(s->me_cache, 0, sizeof(s->me_cache));
-                s->me_cache_generation += 1<<22;
-
-                init_rd= best_rd= get_4block_rd(s, mb_x, mb_y, 0);
-
-                //FIXME more multiref search?
-                check_4block_inter(s, mb_x, mb_y,
-                                   (b[0]->mx + b[1]->mx + b[2]->mx + b[3]->mx + 2) >> 2,
-                                   (b[0]->my + b[1]->my + b[2]->my + b[3]->my + 2) >> 2, 0, &best_rd);
-
-                for(i=0; i<4; i++)
-                    if(!(b[i]->type&BLOCK_INTRA))
-                        check_4block_inter(s, mb_x, mb_y, b[i]->mx, b[i]->my, b[i]->ref, &best_rd);
-
-                if(init_rd != best_rd)
-                    change++;
-            }
-        }
-        av_log(NULL, AV_LOG_ERROR, "pass:4mv changed:%d\n", change*4);
-    }
-}
-
-static void quantize(SnowContext *s, SubBand *b, DWTELEM *src, int stride, int bias){
-    const int level= b->level;
-    const int w= b->width;
-    const int h= b->height;
-    const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
-    const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
-    int x,y, thres1, thres2;
-//    START_TIMER
-
-    if(s->qlog == LOSSLESS_QLOG) return;
-
-    bias= bias ? 0 : (3*qmul)>>3;
-    thres1= ((qmul - bias)>>QEXPSHIFT) - 1;
-    thres2= 2*thres1;
-
-    if(!bias){
-        for(y=0; y<h; y++){
-            for(x=0; x<w; x++){
-                int i= src[x + y*stride];
-
-                if((unsigned)(i+thres1) > thres2){
-                    if(i>=0){
-                        i<<= QEXPSHIFT;
-                        i/= qmul; //FIXME optimize
-                        src[x + y*stride]=  i;
-                    }else{
-                        i= -i;
-                        i<<= QEXPSHIFT;
-                        i/= qmul; //FIXME optimize
-                        src[x + y*stride]= -i;
-                    }
-                }else
-                    src[x + y*stride]= 0;
-            }
-        }
-    }else{
-        for(y=0; y<h; y++){
-            for(x=0; x<w; x++){
-                int i= src[x + y*stride];
-
-                if((unsigned)(i+thres1) > thres2){
-                    if(i>=0){
-                        i<<= QEXPSHIFT;
-                        i= (i + bias) / qmul; //FIXME optimize
-                        src[x + y*stride]=  i;
-                    }else{
-                        i= -i;
-                        i<<= QEXPSHIFT;
-                        i= (i + bias) / qmul; //FIXME optimize
-                        src[x + y*stride]= -i;
-                    }
-                }else
-                    src[x + y*stride]= 0;
-            }
-        }
-    }
-    if(level+1 == s->spatial_decomposition_count){
-//        STOP_TIMER("quantize")
-    }
-}
-
-static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int start_y, int end_y){
-    const int w= b->width;
-    const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
-    const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
-    const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
-    int x,y;
-    START_TIMER
-
-    if(s->qlog == LOSSLESS_QLOG) return;
-
-    for(y=start_y; y<end_y; y++){
-//        DWTELEM * line = slice_buffer_get_line_from_address(sb, src + (y * stride));
-        DWTELEM * line = slice_buffer_get_line(sb, (y * b->stride_line) + b->buf_y_offset) + b->buf_x_offset;
-        for(x=0; x<w; x++){
-            int i= line[x];
-            if(i<0){
-                line[x]= -((-i*qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
-            }else if(i>0){
-                line[x]=  (( i*qmul + qadd)>>(QEXPSHIFT));
-            }
-        }
-    }
-    if(w > 200 /*level+1 == s->spatial_decomposition_count*/){
-        STOP_TIMER("dquant")
-    }
-}
-
-static void dequantize(SnowContext *s, SubBand *b, DWTELEM *src, int stride){
-    const int w= b->width;
-    const int h= b->height;
-    const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
-    const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
-    const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
-    int x,y;
-    START_TIMER
-
-    if(s->qlog == LOSSLESS_QLOG) return;
-
-    for(y=0; y<h; y++){
-        for(x=0; x<w; x++){
-            int i= src[x + y*stride];
-            if(i<0){
-                src[x + y*stride]= -((-i*qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
-            }else if(i>0){
-                src[x + y*stride]=  (( i*qmul + qadd)>>(QEXPSHIFT));
-            }
-        }
-    }
-    if(w > 200 /*level+1 == s->spatial_decomposition_count*/){
-        STOP_TIMER("dquant")
-    }
-}
-
-static void decorrelate(SnowContext *s, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median){
-    const int w= b->width;
-    const int h= b->height;
-    int x,y;
-
-    for(y=h-1; y>=0; y--){
-        for(x=w-1; x>=0; x--){
-            int i= x + y*stride;
-
-            if(x){
-                if(use_median){
-                    if(y && x+1<w) src[i] -= mid_pred(src[i - 1], src[i - stride], src[i - stride + 1]);
-                    else  src[i] -= src[i - 1];
-                }else{
-                    if(y) src[i] -= mid_pred(src[i - 1], src[i - stride], src[i - 1] + src[i - stride] - src[i - 1 - stride]);
-                    else  src[i] -= src[i - 1];
-                }
-            }else{
-                if(y) src[i] -= src[i - stride];
-            }
-        }
-    }
-}
-
-static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){
-    const int w= b->width;
-    int x,y;
-
-//    START_TIMER
-
-    DWTELEM * line;
-    DWTELEM * prev;
-
-    if (start_y != 0)
-        line = slice_buffer_get_line(sb, ((start_y - 1) * b->stride_line) + b->buf_y_offset) + b->buf_x_offset;
-
-    for(y=start_y; y<end_y; y++){
-        prev = line;
-//        line = slice_buffer_get_line_from_address(sb, src + (y * stride));
-        line = slice_buffer_get_line(sb, (y * b->stride_line) + b->buf_y_offset) + b->buf_x_offset;
-        for(x=0; x<w; x++){
-            if(x){
-                if(use_median){
-                    if(y && x+1<w) line[x] += mid_pred(line[x - 1], prev[x], prev[x + 1]);
-                    else  line[x] += line[x - 1];
-                }else{
-                    if(y) line[x] += mid_pred(line[x - 1], prev[x], line[x - 1] + prev[x] - prev[x - 1]);
-                    else  line[x] += line[x - 1];
-                }
-            }else{
-                if(y) line[x] += prev[x];
-            }
-        }
-    }
-
-//    STOP_TIMER("correlate")
-}
-
-static void correlate(SnowContext *s, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median){
-    const int w= b->width;
-    const int h= b->height;
-    int x,y;
-
-    for(y=0; y<h; y++){
-        for(x=0; x<w; x++){
-            int i= x + y*stride;
-
-            if(x){
-                if(use_median){
-                    if(y && x+1<w) src[i] += mid_pred(src[i - 1], src[i - stride], src[i - stride + 1]);
-                    else  src[i] += src[i - 1];
-                }else{
-                    if(y) src[i] += mid_pred(src[i - 1], src[i - stride], src[i - 1] + src[i - stride] - src[i - 1 - stride]);
-                    else  src[i] += src[i - 1];
-                }
-            }else{
-                if(y) src[i] += src[i - stride];
-            }
-        }
-    }
-}
-
-static void encode_header(SnowContext *s){
-    int plane_index, level, orientation;
-    uint8_t kstate[32];
-
-    memset(kstate, MID_STATE, sizeof(kstate));
-
-    put_rac(&s->c, kstate, s->keyframe);
-    if(s->keyframe || s->always_reset)
-        reset_contexts(s);
-    if(s->keyframe){
-        put_symbol(&s->c, s->header_state, s->version, 0);
-        put_rac(&s->c, s->header_state, s->always_reset);
-        put_symbol(&s->c, s->header_state, s->temporal_decomposition_type, 0);
-        put_symbol(&s->c, s->header_state, s->temporal_decomposition_count, 0);
-        put_symbol(&s->c, s->header_state, s->spatial_decomposition_count, 0);
-        put_symbol(&s->c, s->header_state, s->colorspace_type, 0);
-        put_symbol(&s->c, s->header_state, s->chroma_h_shift, 0);
-        put_symbol(&s->c, s->header_state, s->chroma_v_shift, 0);
-        put_rac(&s->c, s->header_state, s->spatial_scalability);
-//        put_rac(&s->c, s->header_state, s->rate_scalability);
-        put_symbol(&s->c, s->header_state, s->max_ref_frames-1, 0);
-
-        for(plane_index=0; plane_index<2; plane_index++){
-            for(level=0; level<s->spatial_decomposition_count; level++){
-                for(orientation=level ? 1:0; orientation<4; orientation++){
-                    if(orientation==2) continue;
-                    put_symbol(&s->c, s->header_state, s->plane[plane_index].band[level][orientation].qlog, 1);
-                }
-            }
-        }
-    }
-    put_symbol(&s->c, s->header_state, s->spatial_decomposition_type, 0);
-    put_symbol(&s->c, s->header_state, s->qlog, 1);
-    put_symbol(&s->c, s->header_state, s->mv_scale, 0);
-    put_symbol(&s->c, s->header_state, s->qbias, 1);
-    put_symbol(&s->c, s->header_state, s->block_max_depth, 0);
-}
-
-static int decode_header(SnowContext *s){
-    int plane_index, level, orientation;
-    uint8_t kstate[32];
-
-    memset(kstate, MID_STATE, sizeof(kstate));
-
-    s->keyframe= get_rac(&s->c, kstate);
-    if(s->keyframe || s->always_reset)
-        reset_contexts(s);
-    if(s->keyframe){
-        s->version= get_symbol(&s->c, s->header_state, 0);
-        if(s->version>0){
-            av_log(s->avctx, AV_LOG_ERROR, "version %d not supported", s->version);
-            return -1;
-        }
-        s->always_reset= get_rac(&s->c, s->header_state);
-        s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0);
-        s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0);
-        s->spatial_decomposition_count= get_symbol(&s->c, s->header_state, 0);
-        s->colorspace_type= get_symbol(&s->c, s->header_state, 0);
-        s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0);
-        s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0);
-        s->spatial_scalability= get_rac(&s->c, s->header_state);
-//        s->rate_scalability= get_rac(&s->c, s->header_state);
-        s->max_ref_frames= get_symbol(&s->c, s->header_state, 0)+1;
-
-        for(plane_index=0; plane_index<3; plane_index++){
-            for(level=0; level<s->spatial_decomposition_count; level++){
-                for(orientation=level ? 1:0; orientation<4; orientation++){
-                    int q;
-                    if     (plane_index==2) q= s->plane[1].band[level][orientation].qlog;
-                    else if(orientation==2) q= s->plane[plane_index].band[level][1].qlog;
-                    else                    q= get_symbol(&s->c, s->header_state, 1);
-                    s->plane[plane_index].band[level][orientation].qlog= q;
-                }
-            }
-        }
-    }
-
-    s->spatial_decomposition_type= get_symbol(&s->c, s->header_state, 0);
-    if(s->spatial_decomposition_type > 2){
-        av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported", s->spatial_decomposition_type);
-        return -1;
-    }
-
-    s->qlog= get_symbol(&s->c, s->header_state, 1);
-    s->mv_scale= get_symbol(&s->c, s->header_state, 0);
-    s->qbias= get_symbol(&s->c, s->header_state, 1);
-    s->block_max_depth= get_symbol(&s->c, s->header_state, 0);
-    if(s->block_max_depth > 1 || s->block_max_depth < 0){
-        av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large", s->block_max_depth);
-        s->block_max_depth= 0;
-        return -1;
-    }
-
-    return 0;
-}
-
-static void init_qexp(void){
-    int i;
-    double v=128;
-
-    for(i=0; i<QROOT; i++){
-        qexp[i]= lrintf(v);
-        v *= pow(2, 1.0 / QROOT);
-    }
-}
-
-static int common_init(AVCodecContext *avctx){
-    SnowContext *s = avctx->priv_data;
-    int width, height;
-    int level, orientation, plane_index, dec;
-    int i, j;
-
-    s->avctx= avctx;
-
-    dsputil_init(&s->dsp, avctx);
-
-#define mcf(dx,dy)\
-    s->dsp.put_qpel_pixels_tab       [0][dy+dx/4]=\
-    s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\
-        s->dsp.put_h264_qpel_pixels_tab[0][dy+dx/4];\
-    s->dsp.put_qpel_pixels_tab       [1][dy+dx/4]=\
-    s->dsp.put_no_rnd_qpel_pixels_tab[1][dy+dx/4]=\
-        s->dsp.put_h264_qpel_pixels_tab[1][dy+dx/4];
-
-    mcf( 0, 0)
-    mcf( 4, 0)
-    mcf( 8, 0)
-    mcf(12, 0)
-    mcf( 0, 4)
-    mcf( 4, 4)
-    mcf( 8, 4)
-    mcf(12, 4)
-    mcf( 0, 8)
-    mcf( 4, 8)
-    mcf( 8, 8)
-    mcf(12, 8)
-    mcf( 0,12)
-    mcf( 4,12)
-    mcf( 8,12)
-    mcf(12,12)
-
-#define mcfh(dx,dy)\
-    s->dsp.put_pixels_tab       [0][dy/4+dx/8]=\
-    s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\
-        mc_block_hpel ## dx ## dy ## 16;\
-    s->dsp.put_pixels_tab       [1][dy/4+dx/8]=\
-    s->dsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\
-        mc_block_hpel ## dx ## dy ## 8;
-
-    mcfh(0, 0)
-    mcfh(8, 0)
-    mcfh(0, 8)
-    mcfh(8, 8)
-
-    if(!qexp[0])
-        init_qexp();
-
-    dec= s->spatial_decomposition_count= 5;
-    s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type
-
-    s->chroma_h_shift= 1; //FIXME XXX
-    s->chroma_v_shift= 1;
-
-//    dec += FFMAX(s->chroma_h_shift, s->chroma_v_shift);
-
-    width= s->avctx->width;
-    height= s->avctx->height;
-
-    s->spatial_dwt_buffer= av_mallocz(width*height*sizeof(DWTELEM));
-
-    s->mv_scale= (s->avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4;
-    s->block_max_depth= (s->avctx->flags & CODEC_FLAG_4MV) ? 1 : 0;
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        int w= s->avctx->width;
-        int h= s->avctx->height;
-
-        if(plane_index){
-            w>>= s->chroma_h_shift;
-            h>>= s->chroma_v_shift;
-        }
-        s->plane[plane_index].width = w;
-        s->plane[plane_index].height= h;
-//av_log(NULL, AV_LOG_DEBUG, "%d %d\n", w, h);
-        for(level=s->spatial_decomposition_count-1; level>=0; level--){
-            for(orientation=level ? 1 : 0; orientation<4; orientation++){
-                SubBand *b= &s->plane[plane_index].band[level][orientation];
-
-                b->buf= s->spatial_dwt_buffer;
-                b->level= level;
-                b->stride= s->plane[plane_index].width << (s->spatial_decomposition_count - level);
-                b->width = (w + !(orientation&1))>>1;
-                b->height= (h + !(orientation>1))>>1;
-
-                b->stride_line = 1 << (s->spatial_decomposition_count - level);
-                b->buf_x_offset = 0;
-                b->buf_y_offset = 0;
-
-                if(orientation&1){
-                    b->buf += (w+1)>>1;
-                    b->buf_x_offset = (w+1)>>1;
-                }
-                if(orientation>1){
-                    b->buf += b->stride>>1;
-                    b->buf_y_offset = b->stride_line >> 1;
-                }
-
-                if(level)
-                    b->parent= &s->plane[plane_index].band[level-1][orientation];
-                b->x_coeff=av_mallocz(((b->width+1) * b->height+1)*sizeof(x_and_coeff));
-            }
-            w= (w+1)>>1;
-            h= (h+1)>>1;
-        }
-    }
-
-    for(i=0; i<MAX_REF_FRAMES; i++)
-        for(j=0; j<MAX_REF_FRAMES; j++)
-            scale_mv_ref[i][j] = 256*(i+1)/(j+1);
-
-    reset_contexts(s);
-/*
-    width= s->width= avctx->width;
-    height= s->height= avctx->height;
-
-    assert(width && height);
-*/
-    s->avctx->get_buffer(s->avctx, &s->mconly_picture);
-
-    return 0;
-}
-
-static int qscale2qlog(int qscale){
-    return rint(QROOT*log(qscale / (float)FF_QP2LAMBDA)/log(2))
-           + 61*QROOT/8; //<64 >60
-}
-
-static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
-{
-    /* estimate the frame's complexity as a sum of weighted dwt coefs.
-     * FIXME we know exact mv bits at this point,
-     * but ratecontrol isn't set up to include them. */
-    uint32_t coef_sum= 0;
-    int level, orientation, delta_qlog;
-
-    for(level=0; level<s->spatial_decomposition_count; level++){
-        for(orientation=level ? 1 : 0; orientation<4; orientation++){
-            SubBand *b= &s->plane[0].band[level][orientation];
-            DWTELEM *buf= b->buf;
-            const int w= b->width;
-            const int h= b->height;
-            const int stride= b->stride;
-            const int qlog= clip(2*QROOT + b->qlog, 0, QROOT*16);
-            const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
-            const int qdiv= (1<<16)/qmul;
-            int x, y;
-            if(orientation==0)
-                decorrelate(s, b, buf, stride, 1, 0);
-            for(y=0; y<h; y++)
-                for(x=0; x<w; x++)
-                    coef_sum+= abs(buf[x+y*stride]) * qdiv >> 16;
-            if(orientation==0)
-                correlate(s, b, buf, stride, 1, 0);
-        }
-    }
-
-    /* ugly, ratecontrol just takes a sqrt again */
-    coef_sum = (uint64_t)coef_sum * coef_sum >> 16;
-    assert(coef_sum < INT_MAX);
-
-    if(pict->pict_type == I_TYPE){
-        s->m.current_picture.mb_var_sum= coef_sum;
-        s->m.current_picture.mc_mb_var_sum= 0;
-    }else{
-        s->m.current_picture.mc_mb_var_sum= coef_sum;
-        s->m.current_picture.mb_var_sum= 0;
-    }
-
-    pict->quality= ff_rate_estimate_qscale(&s->m, 1);
-    if (pict->quality < 0)
-        return INT_MIN;
-    s->lambda= pict->quality * 3/2;
-    delta_qlog= qscale2qlog(pict->quality) - s->qlog;
-    s->qlog+= delta_qlog;
-    return delta_qlog;
-}
-
-static void calculate_vissual_weight(SnowContext *s, Plane *p){
-    int width = p->width;
-    int height= p->height;
-    int level, orientation, x, y;
-
-    for(level=0; level<s->spatial_decomposition_count; level++){
-        for(orientation=level ? 1 : 0; orientation<4; orientation++){
-            SubBand *b= &p->band[level][orientation];
-            DWTELEM *buf= b->buf;
-            int64_t error=0;
-
-            memset(s->spatial_dwt_buffer, 0, sizeof(int)*width*height);
-            buf[b->width/2 + b->height/2*b->stride]= 256*256;
-            ff_spatial_idwt(s->spatial_dwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
-            for(y=0; y<height; y++){
-                for(x=0; x<width; x++){
-                    int64_t d= s->spatial_dwt_buffer[x + y*width];
-                    error += d*d;
-                }
-            }
-
-            b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5);
-//            av_log(NULL, AV_LOG_DEBUG, "%d %d %d\n", level, orientation, b->qlog/*, sqrt(error)*/);
-        }
-    }
-}
-
-static int encode_init(AVCodecContext *avctx)
-{
-    SnowContext *s = avctx->priv_data;
-    int plane_index;
-
-    if(avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){
-        av_log(avctx, AV_LOG_ERROR, "this codec is under development, files encoded with it may not be decodable with future versions!!!\n"
-               "use vstrict=-2 / -strict -2 to use it anyway\n");
-        return -1;
-    }
-
-    if(avctx->prediction_method == DWT_97
-       && (avctx->flags & CODEC_FLAG_QSCALE)
-       && avctx->global_quality == 0){
-        av_log(avctx, AV_LOG_ERROR, "the 9/7 wavelet is incompatible with lossless mode\n");
-        return -1;
-    }
-
-    common_init(avctx);
-    alloc_blocks(s);
-
-    s->version=0;
-
-    s->m.avctx   = avctx;
-    s->m.flags   = avctx->flags;
-    s->m.bit_rate= avctx->bit_rate;
-
-    s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t));
-    s->m.me.map       = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t));
-    s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t));
-    s->m.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t));
-    h263_encode_init(&s->m); //mv_penalty
-
-    s->max_ref_frames = FFMAX(FFMIN(avctx->refs, MAX_REF_FRAMES), 1);
-
-    if(avctx->flags&CODEC_FLAG_PASS1){
-        if(!avctx->stats_out)
-            avctx->stats_out = av_mallocz(256);
-    }
-    if((avctx->flags&CODEC_FLAG_PASS2) || !(avctx->flags&CODEC_FLAG_QSCALE)){
-        if(ff_rate_control_init(&s->m) < 0)
-            return -1;
-    }
-    s->pass1_rc= !(avctx->flags & (CODEC_FLAG_QSCALE|CODEC_FLAG_PASS2));
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        calculate_vissual_weight(s, &s->plane[plane_index]);
-    }
-
-
-    avctx->coded_frame= &s->current_picture;
-    switch(avctx->pix_fmt){
-//    case PIX_FMT_YUV444P:
-//    case PIX_FMT_YUV422P:
-    case PIX_FMT_YUV420P:
-    case PIX_FMT_GRAY8:
-//    case PIX_FMT_YUV411P:
-//    case PIX_FMT_YUV410P:
-        s->colorspace_type= 0;
-        break;
-/*    case PIX_FMT_RGBA32:
-        s->colorspace= 1;
-        break;*/
-    default:
-        av_log(avctx, AV_LOG_ERROR, "format not supported\n");
-        return -1;
-    }
-//    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
-    s->chroma_h_shift= 1;
-    s->chroma_v_shift= 1;
-
-    ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp);
-    ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp);
-
-    s->avctx->get_buffer(s->avctx, &s->input_picture);
-
-    if(s->avctx->me_method == ME_ITER){
-        int i;
-        int size= s->b_width * s->b_height << 2*s->block_max_depth;
-        for(i=0; i<s->max_ref_frames; i++){
-            s->ref_mvs[i]= av_mallocz(size*sizeof(int16_t[2]));
-            s->ref_scores[i]= av_mallocz(size*sizeof(uint32_t));
-        }
-    }
-
-    return 0;
-}
-
-static int frame_start(SnowContext *s){
-   AVFrame tmp;
-   int w= s->avctx->width; //FIXME round up to x16 ?
-   int h= s->avctx->height;
-
-    if(s->current_picture.data[0]){
-        draw_edges(s->current_picture.data[0], s->current_picture.linesize[0], w   , h   , EDGE_WIDTH  );
-        draw_edges(s->current_picture.data[1], s->current_picture.linesize[1], w>>1, h>>1, EDGE_WIDTH/2);
-        draw_edges(s->current_picture.data[2], s->current_picture.linesize[2], w>>1, h>>1, EDGE_WIDTH/2);
-    }
-
-    tmp= s->last_picture[s->max_ref_frames-1];
-    memmove(s->last_picture+1, s->last_picture, (s->max_ref_frames-1)*sizeof(AVFrame));
-    s->last_picture[0]= s->current_picture;
-    s->current_picture= tmp;
-
-    if(s->keyframe){
-        s->ref_frames= 0;
-    }else{
-        int i;
-        for(i=0; i<s->max_ref_frames && s->last_picture[i].data[0]; i++)
-            if(i && s->last_picture[i-1].key_frame)
-                break;
-        s->ref_frames= i;
-    }
-
-    s->current_picture.reference= 1;
-    if(s->avctx->get_buffer(s->avctx, &s->current_picture) < 0){
-        av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-        return -1;
-    }
-
-    s->current_picture.key_frame= s->keyframe;
-
-    return 0;
-}
-
-static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
-    SnowContext *s = avctx->priv_data;
-    RangeCoder * const c= &s->c;
-    AVFrame *pict = data;
-    const int width= s->avctx->width;
-    const int height= s->avctx->height;
-    int level, orientation, plane_index, i, y;
-    uint8_t rc_header_bak[sizeof(s->header_state)];
-    uint8_t rc_block_bak[sizeof(s->block_state)];
-
-    ff_init_range_encoder(c, buf, buf_size);
-    ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
-
-    for(i=0; i<3; i++){
-        int shift= !!i;
-        for(y=0; y<(height>>shift); y++)
-            memcpy(&s->input_picture.data[i][y * s->input_picture.linesize[i]],
-                   &pict->data[i][y * pict->linesize[i]],
-                   width>>shift);
-    }
-    s->new_picture = *pict;
-
-    s->m.picture_number= avctx->frame_number;
-    if(avctx->flags&CODEC_FLAG_PASS2){
-        s->m.pict_type =
-        pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type;
-        s->keyframe= pict->pict_type==FF_I_TYPE;
-        if(!(avctx->flags&CODEC_FLAG_QSCALE)) {
-            pict->quality= ff_rate_estimate_qscale(&s->m, 0);
-            if (pict->quality < 0)
-                return -1;
-        }
-    }else{
-        s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0;
-        s->m.pict_type=
-        pict->pict_type= s->keyframe ? FF_I_TYPE : FF_P_TYPE;
-    }
-
-    if(s->pass1_rc && avctx->frame_number == 0)
-        pict->quality= 2*FF_QP2LAMBDA;
-    if(pict->quality){
-        s->qlog= qscale2qlog(pict->quality);
-        s->lambda = pict->quality * 3/2;
-    }
-    if(s->qlog < 0 || (!pict->quality && (avctx->flags & CODEC_FLAG_QSCALE))){
-        s->qlog= LOSSLESS_QLOG;
-        s->lambda = 0;
-    }//else keep previous frame's qlog until after motion est
-
-    frame_start(s);
-
-    s->m.current_picture_ptr= &s->m.current_picture;
-    if(pict->pict_type == P_TYPE){
-        int block_width = (width +15)>>4;
-        int block_height= (height+15)>>4;
-        int stride= s->current_picture.linesize[0];
-
-        assert(s->current_picture.data[0]);
-        assert(s->last_picture[0].data[0]);
-
-        s->m.avctx= s->avctx;
-        s->m.current_picture.data[0]= s->current_picture.data[0];
-        s->m.   last_picture.data[0]= s->last_picture[0].data[0];
-        s->m.    new_picture.data[0]= s->  input_picture.data[0];
-        s->m.   last_picture_ptr= &s->m.   last_picture;
-        s->m.linesize=
-        s->m.   last_picture.linesize[0]=
-        s->m.    new_picture.linesize[0]=
-        s->m.current_picture.linesize[0]= stride;
-        s->m.uvlinesize= s->current_picture.linesize[1];
-        s->m.width = width;
-        s->m.height= height;
-        s->m.mb_width = block_width;
-        s->m.mb_height= block_height;
-        s->m.mb_stride=   s->m.mb_width+1;
-        s->m.b8_stride= 2*s->m.mb_width+1;
-        s->m.f_code=1;
-        s->m.pict_type= pict->pict_type;
-        s->m.me_method= s->avctx->me_method;
-        s->m.me.scene_change_score=0;
-        s->m.flags= s->avctx->flags;
-        s->m.quarter_sample= (s->avctx->flags & CODEC_FLAG_QPEL)!=0;
-        s->m.out_format= FMT_H263;
-        s->m.unrestricted_mv= 1;
-
-        s->m.lambda = s->lambda;
-        s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7);
-        s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT;
-
-        s->m.dsp= s->dsp; //move
-        ff_init_me(&s->m);
-        s->dsp= s->m.dsp;
-    }
-
-    if(s->pass1_rc){
-        memcpy(rc_header_bak, s->header_state, sizeof(s->header_state));
-        memcpy(rc_block_bak, s->block_state, sizeof(s->block_state));
-    }
-
-redo_frame:
-
-    s->m.pict_type = pict->pict_type;
-    s->qbias= pict->pict_type == P_TYPE ? 2 : 0;
-
-    encode_header(s);
-    s->m.misc_bits = 8*(s->c.bytestream - s->c.bytestream_start);
-    encode_blocks(s, 1);
-    s->m.mv_bits = 8*(s->c.bytestream - s->c.bytestream_start) - s->m.misc_bits;
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        Plane *p= &s->plane[plane_index];
-        int w= p->width;
-        int h= p->height;
-        int x, y;
-//        int bits= put_bits_count(&s->c.pb);
-
-    if(!(avctx->flags2 & CODEC_FLAG2_MEMC_ONLY)){
-        //FIXME optimize
-     if(pict->data[plane_index]) //FIXME gray hack
-        for(y=0; y<h; y++){
-            for(x=0; x<w; x++){
-                s->spatial_dwt_buffer[y*w + x]= pict->data[plane_index][y*pict->linesize[plane_index] + x]<<FRAC_BITS;
-            }
-        }
-        predict_plane(s, s->spatial_dwt_buffer, plane_index, 0);
-
-        if(   plane_index==0
-           && pict->pict_type == P_TYPE
-           && !(avctx->flags&CODEC_FLAG_PASS2)
-           && s->m.me.scene_change_score > s->avctx->scenechange_threshold){
-            ff_init_range_encoder(c, buf, buf_size);
-            ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
-            pict->pict_type= FF_I_TYPE;
-            s->keyframe=1;
-            s->current_picture.key_frame=1;
-            reset_contexts(s);
-            goto redo_frame;
-        }
-
-        if(s->qlog == LOSSLESS_QLOG){
-            for(y=0; y<h; y++){
-                for(x=0; x<w; x++){
-                    s->spatial_dwt_buffer[y*w + x]= (s->spatial_dwt_buffer[y*w + x] + (1<<(FRAC_BITS-1))-1)>>FRAC_BITS;
-                }
-            }
-        }
-
-        ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count);
-
-        if(s->pass1_rc && plane_index==0){
-            int delta_qlog = ratecontrol_1pass(s, pict);
-            if (delta_qlog <= INT_MIN)
-                return -1;
-            if(delta_qlog){
-                //reordering qlog in the bitstream would eliminate this reset
-                ff_init_range_encoder(c, buf, buf_size);
-                memcpy(s->header_state, rc_header_bak, sizeof(s->header_state));
-                memcpy(s->block_state, rc_block_bak, sizeof(s->block_state));
-                encode_header(s);
-                encode_blocks(s, 0);
-            }
-        }
-
-        for(level=0; level<s->spatial_decomposition_count; level++){
-            for(orientation=level ? 1 : 0; orientation<4; orientation++){
-                SubBand *b= &p->band[level][orientation];
-
-                quantize(s, b, b->buf, b->stride, s->qbias);
-                if(orientation==0)
-                    decorrelate(s, b, b->buf, b->stride, pict->pict_type == P_TYPE, 0);
-                encode_subband(s, b, b->buf, b->parent ? b->parent->buf : NULL, b->stride, orientation);
-                assert(b->parent==NULL || b->parent->stride == b->stride*2);
-                if(orientation==0)
-                    correlate(s, b, b->buf, b->stride, 1, 0);
-            }
-        }
-//        av_log(NULL, AV_LOG_DEBUG, "plane:%d bits:%d\n", plane_index, put_bits_count(&s->c.pb) - bits);
-
-        for(level=0; level<s->spatial_decomposition_count; level++){
-            for(orientation=level ? 1 : 0; orientation<4; orientation++){
-                SubBand *b= &p->band[level][orientation];
-
-                dequantize(s, b, b->buf, b->stride);
-            }
-        }
-
-        ff_spatial_idwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count);
-        if(s->qlog == LOSSLESS_QLOG){
-            for(y=0; y<h; y++){
-                for(x=0; x<w; x++){
-                    s->spatial_dwt_buffer[y*w + x]<<=FRAC_BITS;
-                }
-            }
-        }
-{START_TIMER
-        predict_plane(s, s->spatial_dwt_buffer, plane_index, 1);
-STOP_TIMER("pred-conv")}
-      }else{
-            //ME/MC only
-            if(pict->pict_type == I_TYPE){
-                for(y=0; y<h; y++){
-                    for(x=0; x<w; x++){
-                        s->current_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]=
-                            pict->data[plane_index][y*pict->linesize[plane_index] + x];
-                    }
-                }
-            }else{
-                memset(s->spatial_dwt_buffer, 0, sizeof(DWTELEM)*w*h);
-                predict_plane(s, s->spatial_dwt_buffer, plane_index, 1);
-            }
-      }
-        if(s->avctx->flags&CODEC_FLAG_PSNR){
-            int64_t error= 0;
-
-    if(pict->data[plane_index]) //FIXME gray hack
-            for(y=0; y<h; y++){
-                for(x=0; x<w; x++){
-                    int d= s->current_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x] - pict->data[plane_index][y*pict->linesize[plane_index] + x];
-                    error += d*d;
-                }
-            }
-            s->avctx->error[plane_index] += error;
-            s->current_picture.error[plane_index] = error;
-        }
-    }
-
-    if(s->last_picture[s->max_ref_frames-1].data[0])
-        avctx->release_buffer(avctx, &s->last_picture[s->max_ref_frames-1]);
-
-    s->current_picture.coded_picture_number = avctx->frame_number;
-    s->current_picture.pict_type = pict->pict_type;
-    s->current_picture.quality = pict->quality;
-    s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start);
-    s->m.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits;
-    s->m.current_picture.display_picture_number =
-    s->m.current_picture.coded_picture_number = avctx->frame_number;
-    s->m.current_picture.quality = pict->quality;
-    s->m.total_bits += 8*(s->c.bytestream - s->c.bytestream_start);
-    if(s->pass1_rc)
-        if (ff_rate_estimate_qscale(&s->m, 0) < 0)
-            return -1;
-    if(avctx->flags&CODEC_FLAG_PASS1)
-        ff_write_pass1_stats(&s->m);
-    s->m.last_pict_type = s->m.pict_type;
-
-    emms_c();
-
-    return ff_rac_terminate(c);
-}
-
-static void common_end(SnowContext *s){
-    int plane_index, level, orientation, i;
-
-    av_freep(&s->spatial_dwt_buffer);
-
-    av_freep(&s->m.me.scratchpad);
-    av_freep(&s->m.me.map);
-    av_freep(&s->m.me.score_map);
-    av_freep(&s->m.obmc_scratchpad);
-
-    av_freep(&s->block);
-
-    for(i=0; i<MAX_REF_FRAMES; i++){
-        av_freep(&s->ref_mvs[i]);
-        av_freep(&s->ref_scores[i]);
-        if(s->last_picture[i].data[0])
-            s->avctx->release_buffer(s->avctx, &s->last_picture[i]);
-    }
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        for(level=s->spatial_decomposition_count-1; level>=0; level--){
-            for(orientation=level ? 1 : 0; orientation<4; orientation++){
-                SubBand *b= &s->plane[plane_index].band[level][orientation];
-
-                av_freep(&b->x_coeff);
-            }
-        }
-    }
-}
-
-static int encode_end(AVCodecContext *avctx)
-{
-    SnowContext *s = avctx->priv_data;
-
-    common_end(s);
-    av_free(avctx->stats_out);
-
-    return 0;
-}
-
-static int decode_init(AVCodecContext *avctx)
-{
-    SnowContext *s = avctx->priv_data;
-    int block_size;
-
-    avctx->pix_fmt= PIX_FMT_YUV420P;
-
-    common_init(avctx);
-
-    block_size = MB_SIZE >> s->block_max_depth;
-    slice_buffer_init(&s->sb, s->plane[0].height, (block_size) + (s->spatial_decomposition_count * (s->spatial_decomposition_count + 3)) + 1, s->plane[0].width, s->spatial_dwt_buffer);
-
-    return 0;
-}
-
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){
-    SnowContext *s = avctx->priv_data;
-    RangeCoder * const c= &s->c;
-    int bytes_read;
-    AVFrame *picture = data;
-    int level, orientation, plane_index;
-
-    ff_init_range_decoder(c, buf, buf_size);
-    ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
-
-    s->current_picture.pict_type= FF_I_TYPE; //FIXME I vs. P
-    decode_header(s);
-    if(!s->block) alloc_blocks(s);
-
-    frame_start(s);
-    //keyframe flag dupliaction mess FIXME
-    if(avctx->debug&FF_DEBUG_PICT_INFO)
-        av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog);
-
-    decode_blocks(s);
-
-    for(plane_index=0; plane_index<3; plane_index++){
-        Plane *p= &s->plane[plane_index];
-        int w= p->width;
-        int h= p->height;
-        int x, y;
-        int decode_state[MAX_DECOMPOSITIONS][4][1]; /* Stored state info for unpack_coeffs. 1 variable per instance. */
-
-if(s->avctx->debug&2048){
-        memset(s->spatial_dwt_buffer, 0, sizeof(DWTELEM)*w*h);
-        predict_plane(s, s->spatial_dwt_buffer, plane_index, 1);
-
-        for(y=0; y<h; y++){
-            for(x=0; x<w; x++){
-                int v= s->current_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x];
-                s->mconly_picture.data[plane_index][y*s->mconly_picture.linesize[plane_index] + x]= v;
-            }
-        }
-}
-
-{   START_TIMER
-    for(level=0; level<s->spatial_decomposition_count; level++){
-        for(orientation=level ? 1 : 0; orientation<4; orientation++){
-            SubBand *b= &p->band[level][orientation];
-            unpack_coeffs(s, b, b->parent, orientation);
-        }
-    }
-    STOP_TIMER("unpack coeffs");
-}
-
-{START_TIMER
-    const int mb_h= s->b_height << s->block_max_depth;
-    const int block_size = MB_SIZE >> s->block_max_depth;
-    const int block_w    = plane_index ? block_size/2 : block_size;
-    int mb_y;
-    dwt_compose_t cs[MAX_DECOMPOSITIONS];
-    int yd=0, yq=0;
-    int y;
-    int end_y;
-
-    ff_spatial_idwt_buffered_init(cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count);
-    for(mb_y=0; mb_y<=mb_h; mb_y++){
-
-        int slice_starty = block_w*mb_y;
-        int slice_h = block_w*(mb_y+1);
-        if (!(s->keyframe || s->avctx->debug&512)){
-            slice_starty = FFMAX(0, slice_starty - (block_w >> 1));
-            slice_h -= (block_w >> 1);
-        }
-
-        {
-        START_TIMER
-        for(level=0; level<s->spatial_decomposition_count; level++){
-            for(orientation=level ? 1 : 0; orientation<4; orientation++){
-                SubBand *b= &p->band[level][orientation];
-                int start_y;
-                int end_y;
-                int our_mb_start = mb_y;
-                int our_mb_end = (mb_y + 1);
-                const int extra= 3;
-                start_y = (mb_y ? ((block_w * our_mb_start) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra: 0);
-                end_y = (((block_w * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra);
-                if (!(s->keyframe || s->avctx->debug&512)){
-                    start_y = FFMAX(0, start_y - (block_w >> (1+s->spatial_decomposition_count - level)));
-                    end_y = FFMAX(0, end_y - (block_w >> (1+s->spatial_decomposition_count - level)));
-                }
-                start_y = FFMIN(b->height, start_y);
-                end_y = FFMIN(b->height, end_y);
-
-                if (start_y != end_y){
-                    if (orientation == 0){
-                        SubBand * correlate_band = &p->band[0][0];
-                        int correlate_end_y = FFMIN(b->height, end_y + 1);
-                        int correlate_start_y = FFMIN(b->height, (start_y ? start_y + 1 : 0));
-                        decode_subband_slice_buffered(s, correlate_band, &s->sb, correlate_start_y, correlate_end_y, decode_state[0][0]);
-                        correlate_slice_buffered(s, &s->sb, correlate_band, correlate_band->buf, correlate_band->stride, 1, 0, correlate_start_y, correlate_end_y);
-                        dequantize_slice_buffered(s, &s->sb, correlate_band, correlate_band->buf, correlate_band->stride, start_y, end_y);
-                    }
-                    else
-                        decode_subband_slice_buffered(s, b, &s->sb, start_y, end_y, decode_state[level][orientation]);
-                }
-            }
-        }
-        STOP_TIMER("decode_subband_slice");
-        }
-
-{   START_TIMER
-        for(; yd<slice_h; yd+=4){
-            ff_spatial_idwt_buffered_slice(&s->dsp, cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count, yd);
-        }
-    STOP_TIMER("idwt slice");}
-
-
-        if(s->qlog == LOSSLESS_QLOG){
-            for(; yq<slice_h && yq<h; yq++){
-                DWTELEM * line = slice_buffer_get_line(&s->sb, yq);
-                for(x=0; x<w; x++){
-                    line[x] <<= FRAC_BITS;
-                }
-            }
-        }
-
-        predict_slice_buffered(s, &s->sb, s->spatial_dwt_buffer, plane_index, 1, mb_y);
-
-        y = FFMIN(p->height, slice_starty);
-        end_y = FFMIN(p->height, slice_h);
-        while(y < end_y)
-            slice_buffer_release(&s->sb, y++);
-    }
-
-    slice_buffer_flush(&s->sb);
-
-STOP_TIMER("idwt + predict_slices")}
-    }
-
-    emms_c();
-
-    if(s->last_picture[s->max_ref_frames-1].data[0])
-        avctx->release_buffer(avctx, &s->last_picture[s->max_ref_frames-1]);
-
-if(!(s->avctx->debug&2048))
-    *picture= s->current_picture;
-else
-    *picture= s->mconly_picture;
-
-    *data_size = sizeof(AVFrame);
-
-    bytes_read= c->bytestream - c->bytestream_start;
-    if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME
-
-    return bytes_read;
-}
-
-static int decode_end(AVCodecContext *avctx)
-{
-    SnowContext *s = avctx->priv_data;
-
-    slice_buffer_destroy(&s->sb);
-
-    common_end(s);
-
-    return 0;
-}
-
-AVCodec snow_decoder = {
-    "snow",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_SNOW,
-    sizeof(SnowContext),
-    decode_init,
-    NULL,
-    decode_end,
-    decode_frame,
-    0 /*CODEC_CAP_DR1*/ /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
-    NULL
-};
-
-#ifdef CONFIG_ENCODERS
-AVCodec snow_encoder = {
-    "snow",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_SNOW,
-    sizeof(SnowContext),
-    encode_init,
-    encode_frame,
-    encode_end,
-};
-#endif
-
-
-#if 0
-#undef malloc
-#undef free
-#undef printf
-
-int main(){
-    int width=256;
-    int height=256;
-    int buffer[2][width*height];
-    SnowContext s;
-    int i;
-    s.spatial_decomposition_count=6;
-    s.spatial_decomposition_type=1;
-
-    printf("testing 5/3 DWT\n");
-    for(i=0; i<width*height; i++)
-        buffer[0][i]= buffer[1][i]= random()%54321 - 12345;
-
-    ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-    ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-
-    for(i=0; i<width*height; i++)
-        if(buffer[0][i]!= buffer[1][i]) printf("fsck: %d %d %d\n",i, buffer[0][i], buffer[1][i]);
-
-    printf("testing 9/7 DWT\n");
-    s.spatial_decomposition_type=0;
-    for(i=0; i<width*height; i++)
-        buffer[0][i]= buffer[1][i]= random()%54321 - 12345;
-
-    ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-    ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-
-    for(i=0; i<width*height; i++)
-        if(FFABS(buffer[0][i] - buffer[1][i])>20) printf("fsck: %d %d %d\n",i, buffer[0][i], buffer[1][i]);
-
-#if 0
-    printf("testing AC coder\n");
-    memset(s.header_state, 0, sizeof(s.header_state));
-    ff_init_range_encoder(&s.c, buffer[0], 256*256);
-    ff_init_cabac_states(&s.c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64);
-
-    for(i=-256; i<256; i++){
-START_TIMER
-        put_symbol(&s.c, s.header_state, i*i*i/3*FFABS(i), 1);
-STOP_TIMER("put_symbol")
-    }
-    ff_rac_terminate(&s.c);
-
-    memset(s.header_state, 0, sizeof(s.header_state));
-    ff_init_range_decoder(&s.c, buffer[0], 256*256);
-    ff_init_cabac_states(&s.c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64);
-
-    for(i=-256; i<256; i++){
-        int j;
-START_TIMER
-        j= get_symbol(&s.c, s.header_state, 1);
-STOP_TIMER("get_symbol")
-        if(j!=i*i*i/3*FFABS(i)) printf("fsck: %d != %d\n", i, j);
-    }
-#endif
-{
-int level, orientation, x, y;
-int64_t errors[8][4];
-int64_t g=0;
-
-    memset(errors, 0, sizeof(errors));
-    s.spatial_decomposition_count=3;
-    s.spatial_decomposition_type=0;
-    for(level=0; level<s.spatial_decomposition_count; level++){
-        for(orientation=level ? 1 : 0; orientation<4; orientation++){
-            int w= width  >> (s.spatial_decomposition_count-level);
-            int h= height >> (s.spatial_decomposition_count-level);
-            int stride= width  << (s.spatial_decomposition_count-level);
-            DWTELEM *buf= buffer[0];
-            int64_t error=0;
-
-            if(orientation&1) buf+=w;
-            if(orientation>1) buf+=stride>>1;
-
-            memset(buffer[0], 0, sizeof(int)*width*height);
-            buf[w/2 + h/2*stride]= 256*256;
-            ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-            for(y=0; y<height; y++){
-                for(x=0; x<width; x++){
-                    int64_t d= buffer[0][x + y*width];
-                    error += d*d;
-                    if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9 && level==2) printf("%8lld ", d);
-                }
-                if(FFABS(height/2-y)<9 && level==2) printf("\n");
-            }
-            error= (int)(sqrt(error)+0.5);
-            errors[level][orientation]= error;
-            if(g) g=ff_gcd(g, error);
-            else g= error;
-        }
-    }
-    printf("static int const visual_weight[][4]={\n");
-    for(level=0; level<s.spatial_decomposition_count; level++){
-        printf("  {");
-        for(orientation=0; orientation<4; orientation++){
-            printf("%8lld,", errors[level][orientation]/g);
-        }
-        printf("},\n");
-    }
-    printf("};\n");
-    {
-            int level=2;
-            int orientation=3;
-            int w= width  >> (s.spatial_decomposition_count-level);
-            int h= height >> (s.spatial_decomposition_count-level);
-            int stride= width  << (s.spatial_decomposition_count-level);
-            DWTELEM *buf= buffer[0];
-            int64_t error=0;
-
-            buf+=w;
-            buf+=stride>>1;
-
-            memset(buffer[0], 0, sizeof(int)*width*height);
-#if 1
-            for(y=0; y<height; y++){
-                for(x=0; x<width; x++){
-                    int tab[4]={0,2,3,1};
-                    buffer[0][x+width*y]= 256*256*tab[(x&1) + 2*(y&1)];
-                }
-            }
-            ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-#else
-            for(y=0; y<h; y++){
-                for(x=0; x<w; x++){
-                    buf[x + y*stride  ]=169;
-                    buf[x + y*stride-w]=64;
-                }
-            }
-            ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
-#endif
-            for(y=0; y<height; y++){
-                for(x=0; x<width; x++){
-                    int64_t d= buffer[0][x + y*width];
-                    error += d*d;
-                    if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9) printf("%8lld ", d);
-                }
-                if(FFABS(height/2-y)<9) printf("\n");
-            }
-    }
-
-}
-    return 0;
-}
-#endif
-
--- a/src/ffmpeg/libavcodec/vp3.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2659 +0,0 @@
-/*
- * Copyright (C) 2003-2004 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file vp3.c
- * On2 VP3 Video Decoder
- *
- * VP3 Video Decoder by Mike Melanson (mike at multimedia.cx)
- * For more information about the VP3 coding process, visit:
- *   http://multimedia.cx/
- *
- * Theora decoder by Alex Beregszaszi
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-#include "mpegvideo.h"
-
-#include "vp3data.h"
-
-#define FRAGMENT_PIXELS 8
-
-/*
- * Debugging Variables
- *
- * Define one or more of the following compile-time variables to 1 to obtain
- * elaborate information about certain aspects of the decoding process.
- *
- * KEYFRAMES_ONLY: set this to 1 to only see keyframes (VP3 slideshow mode)
- * DEBUG_VP3: high-level decoding flow
- * DEBUG_INIT: initialization parameters
- * DEBUG_DEQUANTIZERS: display how the dequanization tables are built
- * DEBUG_BLOCK_CODING: unpacking the superblock/macroblock/fragment coding
- * DEBUG_MODES: unpacking the coding modes for individual fragments
- * DEBUG_VECTORS: display the motion vectors
- * DEBUG_TOKEN: display exhaustive information about each DCT token
- * DEBUG_VLC: display the VLCs as they are extracted from the stream
- * DEBUG_DC_PRED: display the process of reversing DC prediction
- * DEBUG_IDCT: show every detail of the IDCT process
- */
-
-#define KEYFRAMES_ONLY 0
-
-#define DEBUG_VP3 0
-#define DEBUG_INIT 0
-#define DEBUG_DEQUANTIZERS 0
-#define DEBUG_BLOCK_CODING 0
-#define DEBUG_MODES 0
-#define DEBUG_VECTORS 0
-#define DEBUG_TOKEN 0
-#define DEBUG_VLC 0
-#define DEBUG_DC_PRED 0
-#define DEBUG_IDCT 0
-
-#if DEBUG_VP3
-#define debug_vp3(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_vp3(const char *format, ...) { }
-#endif
-
-#if DEBUG_INIT
-#define debug_init(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_init(const char *format, ...) { }
-#endif
-
-#if DEBUG_DEQUANTIZERS
-#define debug_dequantizers(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_dequantizers(const char *format, ...) { }
-#endif
-
-#if DEBUG_BLOCK_CODING
-#define debug_block_coding(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_block_coding(const char *format, ...) { }
-#endif
-
-#if DEBUG_MODES
-#define debug_modes(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_modes(const char *format, ...) { }
-#endif
-
-#if DEBUG_VECTORS
-#define debug_vectors(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_vectors(const char *format, ...) { }
-#endif
-
-#if DEBUG_TOKEN
-#define debug_token(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_token(const char *format, ...) { }
-#endif
-
-#if DEBUG_VLC
-#define debug_vlc(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_vlc(const char *format, ...) { }
-#endif
-
-#if DEBUG_DC_PRED
-#define debug_dc_pred(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_dc_pred(const char *format, ...) { }
-#endif
-
-#if DEBUG_IDCT
-#define debug_idct(args...) av_log(NULL, AV_LOG_DEBUG, ## args)
-#else
-static inline void debug_idct(const char *format, ...) { }
-#endif
-
-typedef struct Coeff {
-    struct Coeff *next;
-    DCTELEM coeff;
-    uint8_t index;
-} Coeff;
-
-//FIXME split things out into their own arrays
-typedef struct Vp3Fragment {
-    Coeff *next_coeff;
-    /* address of first pixel taking into account which plane the fragment
-     * lives on as well as the plane stride */
-    int first_pixel;
-    /* this is the macroblock that the fragment belongs to */
-    uint16_t macroblock;
-    uint8_t coding_method;
-    uint8_t coeff_count;
-    int8_t motion_x;
-    int8_t motion_y;
-} Vp3Fragment;
-
-#define SB_NOT_CODED        0
-#define SB_PARTIALLY_CODED  1
-#define SB_FULLY_CODED      2
-
-#define MODE_INTER_NO_MV      0
-#define MODE_INTRA            1
-#define MODE_INTER_PLUS_MV    2
-#define MODE_INTER_LAST_MV    3
-#define MODE_INTER_PRIOR_LAST 4
-#define MODE_USING_GOLDEN     5
-#define MODE_GOLDEN_MV        6
-#define MODE_INTER_FOURMV     7
-#define CODING_MODE_COUNT     8
-
-/* special internal mode */
-#define MODE_COPY             8
-
-/* There are 6 preset schemes, plus a free-form scheme */
-static int ModeAlphabet[7][CODING_MODE_COUNT] =
-{
-    /* this is the custom scheme */
-    { 0, 0, 0, 0, 0, 0, 0, 0 },
-
-    /* scheme 1: Last motion vector dominates */
-    {    MODE_INTER_LAST_MV,    MODE_INTER_PRIOR_LAST,
-         MODE_INTER_PLUS_MV,    MODE_INTER_NO_MV,
-         MODE_INTRA,            MODE_USING_GOLDEN,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-    /* scheme 2 */
-    {    MODE_INTER_LAST_MV,    MODE_INTER_PRIOR_LAST,
-         MODE_INTER_NO_MV,      MODE_INTER_PLUS_MV,
-         MODE_INTRA,            MODE_USING_GOLDEN,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-    /* scheme 3 */
-    {    MODE_INTER_LAST_MV,    MODE_INTER_PLUS_MV,
-         MODE_INTER_PRIOR_LAST, MODE_INTER_NO_MV,
-         MODE_INTRA,            MODE_USING_GOLDEN,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-    /* scheme 4 */
-    {    MODE_INTER_LAST_MV,    MODE_INTER_PLUS_MV,
-         MODE_INTER_NO_MV,      MODE_INTER_PRIOR_LAST,
-         MODE_INTRA,            MODE_USING_GOLDEN,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-    /* scheme 5: No motion vector dominates */
-    {    MODE_INTER_NO_MV,      MODE_INTER_LAST_MV,
-         MODE_INTER_PRIOR_LAST, MODE_INTER_PLUS_MV,
-         MODE_INTRA,            MODE_USING_GOLDEN,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-    /* scheme 6 */
-    {    MODE_INTER_NO_MV,      MODE_USING_GOLDEN,
-         MODE_INTER_LAST_MV,    MODE_INTER_PRIOR_LAST,
-         MODE_INTER_PLUS_MV,    MODE_INTRA,
-         MODE_GOLDEN_MV,        MODE_INTER_FOURMV },
-
-};
-
-#define MIN_DEQUANT_VAL 2
-
-typedef struct Vp3DecodeContext {
-    AVCodecContext *avctx;
-    int theora, theora_tables;
-    int version;
-    int width, height;
-    AVFrame golden_frame;
-    AVFrame last_frame;
-    AVFrame current_frame;
-    int keyframe;
-    DSPContext dsp;
-    int flipped_image;
-
-    int qis[3];
-    int nqis;
-    int quality_index;
-    int last_quality_index;
-
-    int superblock_count;
-    int superblock_width;
-    int superblock_height;
-    int y_superblock_width;
-    int y_superblock_height;
-    int c_superblock_width;
-    int c_superblock_height;
-    int u_superblock_start;
-    int v_superblock_start;
-    unsigned char *superblock_coding;
-
-    int macroblock_count;
-    int macroblock_width;
-    int macroblock_height;
-
-    int fragment_count;
-    int fragment_width;
-    int fragment_height;
-
-    Vp3Fragment *all_fragments;
-    Coeff *coeffs;
-    Coeff *next_coeff;
-    int fragment_start[3];
-
-    ScanTable scantable;
-
-    /* tables */
-    uint16_t coded_dc_scale_factor[64];
-    uint32_t coded_ac_scale_factor[64];
-    uint8_t base_matrix[384][64];
-    uint8_t qr_count[2][3];
-    uint8_t qr_size [2][3][64];
-    uint16_t qr_base[2][3][64];
-
-    /* this is a list of indices into the all_fragments array indicating
-     * which of the fragments are coded */
-    int *coded_fragment_list;
-    int coded_fragment_list_index;
-    int pixel_addresses_inited;
-
-    VLC dc_vlc[16];
-    VLC ac_vlc_1[16];
-    VLC ac_vlc_2[16];
-    VLC ac_vlc_3[16];
-    VLC ac_vlc_4[16];
-
-    VLC superblock_run_length_vlc;
-    VLC fragment_run_length_vlc;
-    VLC mode_code_vlc;
-    VLC motion_vector_vlc;
-
-    /* these arrays need to be on 16-byte boundaries since SSE2 operations
-     * index into them */
-    DECLARE_ALIGNED_16(int16_t, qmat[2][4][64]);        //<qmat[is_inter][plane]
-
-    /* This table contains superblock_count * 16 entries. Each set of 16
-     * numbers corresponds to the fragment indices 0..15 of the superblock.
-     * An entry will be -1 to indicate that no entry corresponds to that
-     * index. */
-    int *superblock_fragments;
-
-    /* This table contains superblock_count * 4 entries. Each set of 4
-     * numbers corresponds to the macroblock indices 0..3 of the superblock.
-     * An entry will be -1 to indicate that no entry corresponds to that
-     * index. */
-    int *superblock_macroblocks;
-
-    /* This table contains macroblock_count * 6 entries. Each set of 6
-     * numbers corresponds to the fragment indices 0..5 which comprise
-     * the macroblock (4 Y fragments and 2 C fragments). */
-    int *macroblock_fragments;
-    /* This is an array that indicates how a particular macroblock
-     * is coded. */
-    unsigned char *macroblock_coding;
-
-    int first_coded_y_fragment;
-    int first_coded_c_fragment;
-    int last_coded_y_fragment;
-    int last_coded_c_fragment;
-
-    uint8_t edge_emu_buffer[9*2048]; //FIXME dynamic alloc
-    int8_t qscale_table[2048]; //FIXME dynamic alloc (width+15)/16
-
-    /* Huffman decode */
-    int hti;
-    unsigned int hbits;
-    int entries;
-    int huff_code_size;
-    uint16_t huffman_table[80][32][2];
-
-    uint32_t filter_limit_values[64];
-    int bounding_values_array[256];
-} Vp3DecodeContext;
-
-static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb);
-
-/************************************************************************
- * VP3 specific functions
- ************************************************************************/
-
-/*
- * This function sets up all of the various blocks mappings:
- * superblocks <-> fragments, macroblocks <-> fragments,
- * superblocks <-> macroblocks
- *
- * Returns 0 is successful; returns 1 if *anything* went wrong.
- */
-static int init_block_mapping(Vp3DecodeContext *s)
-{
-    int i, j;
-    signed int hilbert_walk_mb[4];
-
-    int current_fragment = 0;
-    int current_width = 0;
-    int current_height = 0;
-    int right_edge = 0;
-    int bottom_edge = 0;
-    int superblock_row_inc = 0;
-    int *hilbert = NULL;
-    int mapping_index = 0;
-
-    int current_macroblock;
-    int c_fragment;
-
-    signed char travel_width[16] = {
-         1,  1,  0, -1,
-         0,  0,  1,  0,
-         1,  0,  1,  0,
-         0, -1,  0,  1
-    };
-
-    signed char travel_height[16] = {
-         0,  0,  1,  0,
-         1,  1,  0, -1,
-         0,  1,  0, -1,
-        -1,  0, -1,  0
-    };
-
-    signed char travel_width_mb[4] = {
-         1,  0,  1,  0
-    };
-
-    signed char travel_height_mb[4] = {
-         0,  1,  0, -1
-    };
-
-    debug_vp3("  vp3: initialize block mapping tables\n");
-
-    hilbert_walk_mb[0] = 1;
-    hilbert_walk_mb[1] = s->macroblock_width;
-    hilbert_walk_mb[2] = 1;
-    hilbert_walk_mb[3] = -s->macroblock_width;
-
-    /* iterate through each superblock (all planes) and map the fragments */
-    for (i = 0; i < s->superblock_count; i++) {
-        debug_init("    superblock %d (u starts @ %d, v starts @ %d)\n",
-            i, s->u_superblock_start, s->v_superblock_start);
-
-        /* time to re-assign the limits? */
-        if (i == 0) {
-
-            /* start of Y superblocks */
-            right_edge = s->fragment_width;
-            bottom_edge = s->fragment_height;
-            current_width = -1;
-            current_height = 0;
-            superblock_row_inc = 3 * s->fragment_width -
-                (s->y_superblock_width * 4 - s->fragment_width);
-
-            /* the first operation for this variable is to advance by 1 */
-            current_fragment = -1;
-
-        } else if (i == s->u_superblock_start) {
-
-            /* start of U superblocks */
-            right_edge = s->fragment_width / 2;
-            bottom_edge = s->fragment_height / 2;
-            current_width = -1;
-            current_height = 0;
-            superblock_row_inc = 3 * (s->fragment_width / 2) -
-                (s->c_superblock_width * 4 - s->fragment_width / 2);
-
-            /* the first operation for this variable is to advance by 1 */
-            current_fragment = s->fragment_start[1] - 1;
-
-        } else if (i == s->v_superblock_start) {
-
-            /* start of V superblocks */
-            right_edge = s->fragment_width / 2;
-            bottom_edge = s->fragment_height / 2;
-            current_width = -1;
-            current_height = 0;
-            superblock_row_inc = 3 * (s->fragment_width / 2) -
-                (s->c_superblock_width * 4 - s->fragment_width / 2);
-
-            /* the first operation for this variable is to advance by 1 */
-            current_fragment = s->fragment_start[2] - 1;
-
-        }
-
-        if (current_width >= right_edge - 1) {
-            /* reset width and move to next superblock row */
-            current_width = -1;
-            current_height += 4;
-
-            /* fragment is now at the start of a new superblock row */
-            current_fragment += superblock_row_inc;
-        }
-
-        /* iterate through all 16 fragments in a superblock */
-        for (j = 0; j < 16; j++) {
-            current_fragment += travel_width[j] + right_edge * travel_height[j];
-            current_width += travel_width[j];
-            current_height += travel_height[j];
-
-            /* check if the fragment is in bounds */
-            if ((current_width < right_edge) &&
-                (current_height < bottom_edge)) {
-                s->superblock_fragments[mapping_index] = current_fragment;
-                debug_init("    mapping fragment %d to superblock %d, position %d (%d/%d x %d/%d)\n",
-                    s->superblock_fragments[mapping_index], i, j,
-                    current_width, right_edge, current_height, bottom_edge);
-            } else {
-                s->superblock_fragments[mapping_index] = -1;
-                debug_init("    superblock %d, position %d has no fragment (%d/%d x %d/%d)\n",
-                    i, j,
-                    current_width, right_edge, current_height, bottom_edge);
-            }
-
-            mapping_index++;
-        }
-    }
-
-    /* initialize the superblock <-> macroblock mapping; iterate through
-     * all of the Y plane superblocks to build this mapping */
-    right_edge = s->macroblock_width;
-    bottom_edge = s->macroblock_height;
-    current_width = -1;
-    current_height = 0;
-    superblock_row_inc = s->macroblock_width -
-        (s->y_superblock_width * 2 - s->macroblock_width);;
-    hilbert = hilbert_walk_mb;
-    mapping_index = 0;
-    current_macroblock = -1;
-    for (i = 0; i < s->u_superblock_start; i++) {
-
-        if (current_width >= right_edge - 1) {
-            /* reset width and move to next superblock row */
-            current_width = -1;
-            current_height += 2;
-
-            /* macroblock is now at the start of a new superblock row */
-            current_macroblock += superblock_row_inc;
-        }
-
-        /* iterate through each potential macroblock in the superblock */
-        for (j = 0; j < 4; j++) {
-            current_macroblock += hilbert_walk_mb[j];
-            current_width += travel_width_mb[j];
-            current_height += travel_height_mb[j];
-
-            /* check if the macroblock is in bounds */
-            if ((current_width < right_edge) &&
-                (current_height < bottom_edge)) {
-                s->superblock_macroblocks[mapping_index] = current_macroblock;
-                debug_init("    mapping macroblock %d to superblock %d, position %d (%d/%d x %d/%d)\n",
-                    s->superblock_macroblocks[mapping_index], i, j,
-                    current_width, right_edge, current_height, bottom_edge);
-            } else {
-                s->superblock_macroblocks[mapping_index] = -1;
-                debug_init("    superblock %d, position %d has no macroblock (%d/%d x %d/%d)\n",
-                    i, j,
-                    current_width, right_edge, current_height, bottom_edge);
-            }
-
-            mapping_index++;
-        }
-    }
-
-    /* initialize the macroblock <-> fragment mapping */
-    current_fragment = 0;
-    current_macroblock = 0;
-    mapping_index = 0;
-    for (i = 0; i < s->fragment_height; i += 2) {
-
-        for (j = 0; j < s->fragment_width; j += 2) {
-
-            debug_init("    macroblock %d contains fragments: ", current_macroblock);
-            s->all_fragments[current_fragment].macroblock = current_macroblock;
-            s->macroblock_fragments[mapping_index++] = current_fragment;
-            debug_init("%d ", current_fragment);
-
-            if (j + 1 < s->fragment_width) {
-                s->all_fragments[current_fragment + 1].macroblock = current_macroblock;
-                s->macroblock_fragments[mapping_index++] = current_fragment + 1;
-                debug_init("%d ", current_fragment + 1);
-            } else
-                s->macroblock_fragments[mapping_index++] = -1;
-
-            if (i + 1 < s->fragment_height) {
-                s->all_fragments[current_fragment + s->fragment_width].macroblock =
-                    current_macroblock;
-                s->macroblock_fragments[mapping_index++] =
-                    current_fragment + s->fragment_width;
-                debug_init("%d ", current_fragment + s->fragment_width);
-            } else
-                s->macroblock_fragments[mapping_index++] = -1;
-
-            if ((j + 1 < s->fragment_width) && (i + 1 < s->fragment_height)) {
-                s->all_fragments[current_fragment + s->fragment_width + 1].macroblock =
-                    current_macroblock;
-                s->macroblock_fragments[mapping_index++] =
-                    current_fragment + s->fragment_width + 1;
-                debug_init("%d ", current_fragment + s->fragment_width + 1);
-            } else
-                s->macroblock_fragments[mapping_index++] = -1;
-
-            /* C planes */
-            c_fragment = s->fragment_start[1] +
-                (i * s->fragment_width / 4) + (j / 2);
-            s->all_fragments[c_fragment].macroblock = s->macroblock_count;
-            s->macroblock_fragments[mapping_index++] = c_fragment;
-            debug_init("%d ", c_fragment);
-
-            c_fragment = s->fragment_start[2] +
-                (i * s->fragment_width / 4) + (j / 2);
-            s->all_fragments[c_fragment].macroblock = s->macroblock_count;
-            s->macroblock_fragments[mapping_index++] = c_fragment;
-            debug_init("%d ", c_fragment);
-
-            debug_init("\n");
-
-            if (j + 2 <= s->fragment_width)
-                current_fragment += 2;
-            else
-                current_fragment++;
-            current_macroblock++;
-        }
-
-        current_fragment += s->fragment_width;
-    }
-
-    return 0;  /* successful path out */
-}
-
-/*
- * This function wipes out all of the fragment data.
- */
-static void init_frame(Vp3DecodeContext *s, GetBitContext *gb)
-{
-    int i;
-
-    /* zero out all of the fragment information */
-    s->coded_fragment_list_index = 0;
-    for (i = 0; i < s->fragment_count; i++) {
-        s->all_fragments[i].coeff_count = 0;
-        s->all_fragments[i].motion_x = 127;
-        s->all_fragments[i].motion_y = 127;
-        s->all_fragments[i].next_coeff= NULL;
-        s->coeffs[i].index=
-        s->coeffs[i].coeff=0;
-        s->coeffs[i].next= NULL;
-    }
-}
-
-/*
- * This function sets up the dequantization tables used for a particular
- * frame.
- */
-static void init_dequantizer(Vp3DecodeContext *s)
-{
-    int ac_scale_factor = s->coded_ac_scale_factor[s->quality_index];
-    int dc_scale_factor = s->coded_dc_scale_factor[s->quality_index];
-    int i, plane, inter, qri, bmi, bmj, qistart;
-
-    debug_vp3("  vp3: initializing dequantization tables\n");
-
-    for(inter=0; inter<2; inter++){
-        for(plane=0; plane<3; plane++){
-            int sum=0;
-            for(qri=0; qri<s->qr_count[inter][plane]; qri++){
-                sum+= s->qr_size[inter][plane][qri];
-                if(s->quality_index <= sum)
-                    break;
-            }
-            qistart= sum - s->qr_size[inter][plane][qri];
-            bmi= s->qr_base[inter][plane][qri  ];
-            bmj= s->qr_base[inter][plane][qri+1];
-            for(i=0; i<64; i++){
-                int coeff= (  2*(sum    -s->quality_index)*s->base_matrix[bmi][i]
-                            - 2*(qistart-s->quality_index)*s->base_matrix[bmj][i]
-                            + s->qr_size[inter][plane][qri])
-                           / (2*s->qr_size[inter][plane][qri]);
-
-                int qmin= 8<<(inter + !i);
-                int qscale= i ? ac_scale_factor : dc_scale_factor;
-
-                s->qmat[inter][plane][i]= clip((qscale * coeff)/100 * 4, qmin, 4096);
-            }
-        }
-    }
-
-    memset(s->qscale_table, (FFMAX(s->qmat[0][0][1], s->qmat[0][1][1])+8)/16, 512); //FIXME finetune
-}
-
-/*
- * This function initializes the loop filter boundary limits if the frame's
- * quality index is different from the previous frame's.
- */
-static void init_loop_filter(Vp3DecodeContext *s)
-{
-    int *bounding_values= s->bounding_values_array+127;
-    int filter_limit;
-    int x;
-
-    filter_limit = s->filter_limit_values[s->quality_index];
-
-    /* set up the bounding values */
-    memset(s->bounding_values_array, 0, 256 * sizeof(int));
-    for (x = 0; x < filter_limit; x++) {
-        bounding_values[-x - filter_limit] = -filter_limit + x;
-        bounding_values[-x] = -x;
-        bounding_values[x] = x;
-        bounding_values[x + filter_limit] = filter_limit - x;
-    }
-}
-
-/*
- * This function unpacks all of the superblock/macroblock/fragment coding
- * information from the bitstream.
- */
-static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb)
-{
-    int bit = 0;
-    int current_superblock = 0;
-    int current_run = 0;
-    int decode_fully_flags = 0;
-    int decode_partial_blocks = 0;
-    int first_c_fragment_seen;
-
-    int i, j;
-    int current_fragment;
-
-    debug_vp3("  vp3: unpacking superblock coding\n");
-
-    if (s->keyframe) {
-
-        debug_vp3("    keyframe-- all superblocks are fully coded\n");
-        memset(s->superblock_coding, SB_FULLY_CODED, s->superblock_count);
-
-    } else {
-
-        /* unpack the list of partially-coded superblocks */
-        bit = get_bits(gb, 1);
-        /* toggle the bit because as soon as the first run length is
-         * fetched the bit will be toggled again */
-        bit ^= 1;
-        while (current_superblock < s->superblock_count) {
-            if (current_run-- == 0) {
-                bit ^= 1;
-                current_run = get_vlc2(gb,
-                    s->superblock_run_length_vlc.table, 6, 2);
-                if (current_run == 33)
-                    current_run += get_bits(gb, 12);
-                debug_block_coding("      setting superblocks %d..%d to %s\n",
-                    current_superblock,
-                    current_superblock + current_run - 1,
-                    (bit) ? "partially coded" : "not coded");
-
-                /* if any of the superblocks are not partially coded, flag
-                 * a boolean to decode the list of fully-coded superblocks */
-                if (bit == 0) {
-                    decode_fully_flags = 1;
-                } else {
-
-                    /* make a note of the fact that there are partially coded
-                     * superblocks */
-                    decode_partial_blocks = 1;
-                }
-            }
-            s->superblock_coding[current_superblock++] = bit;
-        }
-
-        /* unpack the list of fully coded superblocks if any of the blocks were
-         * not marked as partially coded in the previous step */
-        if (decode_fully_flags) {
-
-            current_superblock = 0;
-            current_run = 0;
-            bit = get_bits(gb, 1);
-            /* toggle the bit because as soon as the first run length is
-             * fetched the bit will be toggled again */
-            bit ^= 1;
-            while (current_superblock < s->superblock_count) {
-
-                /* skip any superblocks already marked as partially coded */
-                if (s->superblock_coding[current_superblock] == SB_NOT_CODED) {
-
-                    if (current_run-- == 0) {
-                        bit ^= 1;
-                        current_run = get_vlc2(gb,
-                            s->superblock_run_length_vlc.table, 6, 2);
-                        if (current_run == 33)
-                            current_run += get_bits(gb, 12);
-                    }
-
-                    debug_block_coding("      setting superblock %d to %s\n",
-                        current_superblock,
-                        (bit) ? "fully coded" : "not coded");
-                    s->superblock_coding[current_superblock] = 2*bit;
-                }
-                current_superblock++;
-            }
-        }
-
-        /* if there were partial blocks, initialize bitstream for
-         * unpacking fragment codings */
-        if (decode_partial_blocks) {
-
-            current_run = 0;
-            bit = get_bits(gb, 1);
-            /* toggle the bit because as soon as the first run length is
-             * fetched the bit will be toggled again */
-            bit ^= 1;
-        }
-    }
-
-    /* figure out which fragments are coded; iterate through each
-     * superblock (all planes) */
-    s->coded_fragment_list_index = 0;
-    s->next_coeff= s->coeffs + s->fragment_count;
-    s->first_coded_y_fragment = s->first_coded_c_fragment = 0;
-    s->last_coded_y_fragment = s->last_coded_c_fragment = -1;
-    first_c_fragment_seen = 0;
-    memset(s->macroblock_coding, MODE_COPY, s->macroblock_count);
-    for (i = 0; i < s->superblock_count; i++) {
-
-        /* iterate through all 16 fragments in a superblock */
-        for (j = 0; j < 16; j++) {
-
-            /* if the fragment is in bounds, check its coding status */
-            current_fragment = s->superblock_fragments[i * 16 + j];
-            if (current_fragment >= s->fragment_count) {
-                av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_superblocks(): bad fragment number (%d >= %d)\n",
-                    current_fragment, s->fragment_count);
-                return 1;
-            }
-            if (current_fragment != -1) {
-                if (s->superblock_coding[i] == SB_NOT_CODED) {
-
-                    /* copy all the fragments from the prior frame */
-                    s->all_fragments[current_fragment].coding_method =
-                        MODE_COPY;
-
-                } else if (s->superblock_coding[i] == SB_PARTIALLY_CODED) {
-
-                    /* fragment may or may not be coded; this is the case
-                     * that cares about the fragment coding runs */
-                    if (current_run-- == 0) {
-                        bit ^= 1;
-                        current_run = get_vlc2(gb,
-                            s->fragment_run_length_vlc.table, 5, 2);
-                    }
-
-                    if (bit) {
-                        /* default mode; actual mode will be decoded in
-                         * the next phase */
-                        s->all_fragments[current_fragment].coding_method =
-                            MODE_INTER_NO_MV;
-                        s->all_fragments[current_fragment].next_coeff= s->coeffs + current_fragment;
-                        s->coded_fragment_list[s->coded_fragment_list_index] =
-                            current_fragment;
-                        if ((current_fragment >= s->fragment_start[1]) &&
-                            (s->last_coded_y_fragment == -1) &&
-                            (!first_c_fragment_seen)) {
-                            s->first_coded_c_fragment = s->coded_fragment_list_index;
-                            s->last_coded_y_fragment = s->first_coded_c_fragment - 1;
-                            first_c_fragment_seen = 1;
-                        }
-                        s->coded_fragment_list_index++;
-                        s->macroblock_coding[s->all_fragments[current_fragment].macroblock] = MODE_INTER_NO_MV;
-                        debug_block_coding("      superblock %d is partially coded, fragment %d is coded\n",
-                            i, current_fragment);
-                    } else {
-                        /* not coded; copy this fragment from the prior frame */
-                        s->all_fragments[current_fragment].coding_method =
-                            MODE_COPY;
-                        debug_block_coding("      superblock %d is partially coded, fragment %d is not coded\n",
-                            i, current_fragment);
-                    }
-
-                } else {
-
-                    /* fragments are fully coded in this superblock; actual
-                     * coding will be determined in next step */
-                    s->all_fragments[current_fragment].coding_method =
-                        MODE_INTER_NO_MV;
-                    s->all_fragments[current_fragment].next_coeff= s->coeffs + current_fragment;
-                    s->coded_fragment_list[s->coded_fragment_list_index] =
-                        current_fragment;
-                    if ((current_fragment >= s->fragment_start[1]) &&
-                        (s->last_coded_y_fragment == -1) &&
-                        (!first_c_fragment_seen)) {
-                        s->first_coded_c_fragment = s->coded_fragment_list_index;
-                        s->last_coded_y_fragment = s->first_coded_c_fragment - 1;
-                        first_c_fragment_seen = 1;
-                    }
-                    s->coded_fragment_list_index++;
-                    s->macroblock_coding[s->all_fragments[current_fragment].macroblock] = MODE_INTER_NO_MV;
-                    debug_block_coding("      superblock %d is fully coded, fragment %d is coded\n",
-                        i, current_fragment);
-                }
-            }
-        }
-    }
-
-    if (!first_c_fragment_seen)
-        /* only Y fragments coded in this frame */
-        s->last_coded_y_fragment = s->coded_fragment_list_index - 1;
-    else
-        /* end the list of coded C fragments */
-        s->last_coded_c_fragment = s->coded_fragment_list_index - 1;
-
-    debug_block_coding("    %d total coded fragments, y: %d -> %d, c: %d -> %d\n",
-        s->coded_fragment_list_index,
-        s->first_coded_y_fragment,
-        s->last_coded_y_fragment,
-        s->first_coded_c_fragment,
-        s->last_coded_c_fragment);
-
-    return 0;
-}
-
-/*
- * This function unpacks all the coding mode data for individual macroblocks
- * from the bitstream.
- */
-static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb)
-{
-    int i, j, k;
-    int scheme;
-    int current_macroblock;
-    int current_fragment;
-    int coding_mode;
-
-    debug_vp3("  vp3: unpacking encoding modes\n");
-
-    if (s->keyframe) {
-        debug_vp3("    keyframe-- all blocks are coded as INTRA\n");
-
-        for (i = 0; i < s->fragment_count; i++)
-            s->all_fragments[i].coding_method = MODE_INTRA;
-
-    } else {
-
-        /* fetch the mode coding scheme for this frame */
-        scheme = get_bits(gb, 3);
-        debug_modes("    using mode alphabet %d\n", scheme);
-
-        /* is it a custom coding scheme? */
-        if (scheme == 0) {
-            debug_modes("    custom mode alphabet ahead:\n");
-            for (i = 0; i < 8; i++)
-                ModeAlphabet[scheme][get_bits(gb, 3)] = i;
-        }
-
-        for (i = 0; i < 8; i++)
-            debug_modes("      mode[%d][%d] = %d\n", scheme, i,
-                ModeAlphabet[scheme][i]);
-
-        /* iterate through all of the macroblocks that contain 1 or more
-         * coded fragments */
-        for (i = 0; i < s->u_superblock_start; i++) {
-
-            for (j = 0; j < 4; j++) {
-                current_macroblock = s->superblock_macroblocks[i * 4 + j];
-                if ((current_macroblock == -1) ||
-                    (s->macroblock_coding[current_macroblock] == MODE_COPY))
-                    continue;
-                if (current_macroblock >= s->macroblock_count) {
-                    av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_modes(): bad macroblock number (%d >= %d)\n",
-                        current_macroblock, s->macroblock_count);
-                    return 1;
-                }
-
-                /* mode 7 means get 3 bits for each coding mode */
-                if (scheme == 7)
-                    coding_mode = get_bits(gb, 3);
-                else
-                    coding_mode = ModeAlphabet[scheme]
-                        [get_vlc2(gb, s->mode_code_vlc.table, 3, 3)];
-
-                s->macroblock_coding[current_macroblock] = coding_mode;
-                for (k = 0; k < 6; k++) {
-                    current_fragment =
-                        s->macroblock_fragments[current_macroblock * 6 + k];
-                    if (current_fragment == -1)
-                        continue;
-                    if (current_fragment >= s->fragment_count) {
-                        av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_modes(): bad fragment number (%d >= %d)\n",
-                            current_fragment, s->fragment_count);
-                        return 1;
-                    }
-                    if (s->all_fragments[current_fragment].coding_method !=
-                        MODE_COPY)
-                        s->all_fragments[current_fragment].coding_method =
-                            coding_mode;
-                }
-
-                debug_modes("    coding method for macroblock starting @ fragment %d = %d\n",
-                    s->macroblock_fragments[current_macroblock * 6], coding_mode);
-            }
-        }
-    }
-
-    return 0;
-}
-
-/*
- * This function unpacks all the motion vectors for the individual
- * macroblocks from the bitstream.
- */
-static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
-{
-    int i, j, k;
-    int coding_mode;
-    int motion_x[6];
-    int motion_y[6];
-    int last_motion_x = 0;
-    int last_motion_y = 0;
-    int prior_last_motion_x = 0;
-    int prior_last_motion_y = 0;
-    int current_macroblock;
-    int current_fragment;
-
-    debug_vp3("  vp3: unpacking motion vectors\n");
-    if (s->keyframe) {
-
-        debug_vp3("    keyframe-- there are no motion vectors\n");
-
-    } else {
-
-        memset(motion_x, 0, 6 * sizeof(int));
-        memset(motion_y, 0, 6 * sizeof(int));
-
-        /* coding mode 0 is the VLC scheme; 1 is the fixed code scheme */
-        coding_mode = get_bits(gb, 1);
-        debug_vectors("    using %s scheme for unpacking motion vectors\n",
-            (coding_mode == 0) ? "VLC" : "fixed-length");
-
-        /* iterate through all of the macroblocks that contain 1 or more
-         * coded fragments */
-        for (i = 0; i < s->u_superblock_start; i++) {
-
-            for (j = 0; j < 4; j++) {
-                current_macroblock = s->superblock_macroblocks[i * 4 + j];
-                if ((current_macroblock == -1) ||
-                    (s->macroblock_coding[current_macroblock] == MODE_COPY))
-                    continue;
-                if (current_macroblock >= s->macroblock_count) {
-                    av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_vectors(): bad macroblock number (%d >= %d)\n",
-                        current_macroblock, s->macroblock_count);
-                    return 1;
-                }
-
-                current_fragment = s->macroblock_fragments[current_macroblock * 6];
-                if (current_fragment >= s->fragment_count) {
-                    av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_vectors(): bad fragment number (%d >= %d\n",
-                        current_fragment, s->fragment_count);
-                    return 1;
-                }
-                switch (s->macroblock_coding[current_macroblock]) {
-
-                case MODE_INTER_PLUS_MV:
-                case MODE_GOLDEN_MV:
-                    /* all 6 fragments use the same motion vector */
-                    if (coding_mode == 0) {
-                        motion_x[0] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
-                        motion_y[0] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
-                    } else {
-                        motion_x[0] = fixed_motion_vector_table[get_bits(gb, 6)];
-                        motion_y[0] = fixed_motion_vector_table[get_bits(gb, 6)];
-                    }
-
-                    for (k = 1; k < 6; k++) {
-                        motion_x[k] = motion_x[0];
-                        motion_y[k] = motion_y[0];
-                    }
-
-                    /* vector maintenance, only on MODE_INTER_PLUS_MV */
-                    if (s->macroblock_coding[current_macroblock] ==
-                        MODE_INTER_PLUS_MV) {
-                        prior_last_motion_x = last_motion_x;
-                        prior_last_motion_y = last_motion_y;
-                        last_motion_x = motion_x[0];
-                        last_motion_y = motion_y[0];
-                    }
-                    break;
-
-                case MODE_INTER_FOURMV:
-                    /* fetch 4 vectors from the bitstream, one for each
-                     * Y fragment, then average for the C fragment vectors */
-                    motion_x[4] = motion_y[4] = 0;
-                    for (k = 0; k < 4; k++) {
-                        if (coding_mode == 0) {
-                            motion_x[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
-                            motion_y[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
-                        } else {
-                            motion_x[k] = fixed_motion_vector_table[get_bits(gb, 6)];
-                            motion_y[k] = fixed_motion_vector_table[get_bits(gb, 6)];
-                        }
-                        motion_x[4] += motion_x[k];
-                        motion_y[4] += motion_y[k];
-                    }
-
-                    motion_x[5]=
-                    motion_x[4]= RSHIFT(motion_x[4], 2);
-                    motion_y[5]=
-                    motion_y[4]= RSHIFT(motion_y[4], 2);
-
-                    /* vector maintenance; vector[3] is treated as the
-                     * last vector in this case */
-                    prior_last_motion_x = last_motion_x;
-                    prior_last_motion_y = last_motion_y;
-                    last_motion_x = motion_x[3];
-                    last_motion_y = motion_y[3];
-                    break;
-
-                case MODE_INTER_LAST_MV:
-                    /* all 6 fragments use the last motion vector */
-                    motion_x[0] = last_motion_x;
-                    motion_y[0] = last_motion_y;
-                    for (k = 1; k < 6; k++) {
-                        motion_x[k] = motion_x[0];
-                        motion_y[k] = motion_y[0];
-                    }
-
-                    /* no vector maintenance (last vector remains the
-                     * last vector) */
-                    break;
-
-                case MODE_INTER_PRIOR_LAST:
-                    /* all 6 fragments use the motion vector prior to the
-                     * last motion vector */
-                    motion_x[0] = prior_last_motion_x;
-                    motion_y[0] = prior_last_motion_y;
-                    for (k = 1; k < 6; k++) {
-                        motion_x[k] = motion_x[0];
-                        motion_y[k] = motion_y[0];
-                    }
-
-                    /* vector maintenance */
-                    prior_last_motion_x = last_motion_x;
-                    prior_last_motion_y = last_motion_y;
-                    last_motion_x = motion_x[0];
-                    last_motion_y = motion_y[0];
-                    break;
-
-                default:
-                    /* covers intra, inter without MV, golden without MV */
-                    memset(motion_x, 0, 6 * sizeof(int));
-                    memset(motion_y, 0, 6 * sizeof(int));
-
-                    /* no vector maintenance */
-                    break;
-                }
-
-                /* assign the motion vectors to the correct fragments */
-                debug_vectors("    vectors for macroblock starting @ fragment %d (coding method %d):\n",
-                    current_fragment,
-                    s->macroblock_coding[current_macroblock]);
-                for (k = 0; k < 6; k++) {
-                    current_fragment =
-                        s->macroblock_fragments[current_macroblock * 6 + k];
-                    if (current_fragment == -1)
-                        continue;
-                    if (current_fragment >= s->fragment_count) {
-                        av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_vectors(): bad fragment number (%d >= %d)\n",
-                            current_fragment, s->fragment_count);
-                        return 1;
-                    }
-                    s->all_fragments[current_fragment].motion_x = motion_x[k];
-                    s->all_fragments[current_fragment].motion_y = motion_y[k];
-                    debug_vectors("    vector %d: fragment %d = (%d, %d)\n",
-                        k, current_fragment, motion_x[k], motion_y[k]);
-                }
-            }
-        }
-    }
-
-    return 0;
-}
-
-/*
- * This function is called by unpack_dct_coeffs() to extract the VLCs from
- * the bitstream. The VLCs encode tokens which are used to unpack DCT
- * data. This function unpacks all the VLCs for either the Y plane or both
- * C planes, and is called for DC coefficients or different AC coefficient
- * levels (since different coefficient types require different VLC tables.
- *
- * This function returns a residual eob run. E.g, if a particular token gave
- * instructions to EOB the next 5 fragments and there were only 2 fragments
- * left in the current fragment range, 3 would be returned so that it could
- * be passed into the next call to this same function.
- */
-static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
-                        VLC *table, int coeff_index,
-                        int first_fragment, int last_fragment,
-                        int eob_run)
-{
-    int i;
-    int token;
-    int zero_run = 0;
-    DCTELEM coeff = 0;
-    Vp3Fragment *fragment;
-    uint8_t *perm= s->scantable.permutated;
-    int bits_to_get;
-
-    if ((first_fragment >= s->fragment_count) ||
-        (last_fragment >= s->fragment_count)) {
-
-        av_log(s->avctx, AV_LOG_ERROR, "  vp3:unpack_vlcs(): bad fragment number (%d -> %d ?)\n",
-            first_fragment, last_fragment);
-        return 0;
-    }
-
-    for (i = first_fragment; i <= last_fragment; i++) {
-
-        fragment = &s->all_fragments[s->coded_fragment_list[i]];
-        if (fragment->coeff_count > coeff_index)
-            continue;
-
-        if (!eob_run) {
-            /* decode a VLC into a token */
-            token = get_vlc2(gb, table->table, 5, 3);
-            debug_vlc(" token = %2d, ", token);
-            /* use the token to get a zero run, a coefficient, and an eob run */
-            if (token <= 6) {
-                eob_run = eob_run_base[token];
-                if (eob_run_get_bits[token])
-                    eob_run += get_bits(gb, eob_run_get_bits[token]);
-                coeff = zero_run = 0;
-            } else {
-                bits_to_get = coeff_get_bits[token];
-                if (!bits_to_get)
-                    coeff = coeff_tables[token][0];
-                else
-                    coeff = coeff_tables[token][get_bits(gb, bits_to_get)];
-
-                zero_run = zero_run_base[token];
-                if (zero_run_get_bits[token])
-                    zero_run += get_bits(gb, zero_run_get_bits[token]);
-            }
-        }
-
-        if (!eob_run) {
-            fragment->coeff_count += zero_run;
-            if (fragment->coeff_count < 64){
-                fragment->next_coeff->coeff= coeff;
-                fragment->next_coeff->index= perm[fragment->coeff_count++]; //FIXME perm here already?
-                fragment->next_coeff->next= s->next_coeff;
-                s->next_coeff->next=NULL;
-                fragment->next_coeff= s->next_coeff++;
-            }
-            debug_vlc(" fragment %d coeff = %d\n",
-                s->coded_fragment_list[i], fragment->next_coeff[coeff_index]);
-        } else {
-            fragment->coeff_count |= 128;
-            debug_vlc(" fragment %d eob with %d coefficients\n",
-                s->coded_fragment_list[i], fragment->coeff_count&127);
-            eob_run--;
-        }
-    }
-
-    return eob_run;
-}
-
-/*
- * This function unpacks all of the DCT coefficient data from the
- * bitstream.
- */
-static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
-{
-    int i;
-    int dc_y_table;
-    int dc_c_table;
-    int ac_y_table;
-    int ac_c_table;
-    int residual_eob_run = 0;
-
-    /* fetch the DC table indices */
-    dc_y_table = get_bits(gb, 4);
-    dc_c_table = get_bits(gb, 4);
-
-    /* unpack the Y plane DC coefficients */
-    debug_vp3("  vp3: unpacking Y plane DC coefficients using table %d\n",
-        dc_y_table);
-    residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
-        s->first_coded_y_fragment, s->last_coded_y_fragment, residual_eob_run);
-
-    /* unpack the C plane DC coefficients */
-    debug_vp3("  vp3: unpacking C plane DC coefficients using table %d\n",
-        dc_c_table);
-    residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
-        s->first_coded_c_fragment, s->last_coded_c_fragment, residual_eob_run);
-
-    /* fetch the AC table indices */
-    ac_y_table = get_bits(gb, 4);
-    ac_c_table = get_bits(gb, 4);
-
-    /* unpack the group 1 AC coefficients (coeffs 1-5) */
-    for (i = 1; i <= 5; i++) {
-
-        debug_vp3("  vp3: unpacking level %d Y plane AC coefficients using table %d\n",
-            i, ac_y_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_1[ac_y_table], i,
-            s->first_coded_y_fragment, s->last_coded_y_fragment, residual_eob_run);
-
-        debug_vp3("  vp3: unpacking level %d C plane AC coefficients using table %d\n",
-            i, ac_c_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_1[ac_c_table], i,
-            s->first_coded_c_fragment, s->last_coded_c_fragment, residual_eob_run);
-    }
-
-    /* unpack the group 2 AC coefficients (coeffs 6-14) */
-    for (i = 6; i <= 14; i++) {
-
-        debug_vp3("  vp3: unpacking level %d Y plane AC coefficients using table %d\n",
-            i, ac_y_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_2[ac_y_table], i,
-            s->first_coded_y_fragment, s->last_coded_y_fragment, residual_eob_run);
-
-        debug_vp3("  vp3: unpacking level %d C plane AC coefficients using table %d\n",
-            i, ac_c_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_2[ac_c_table], i,
-            s->first_coded_c_fragment, s->last_coded_c_fragment, residual_eob_run);
-    }
-
-    /* unpack the group 3 AC coefficients (coeffs 15-27) */
-    for (i = 15; i <= 27; i++) {
-
-        debug_vp3("  vp3: unpacking level %d Y plane AC coefficients using table %d\n",
-            i, ac_y_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_3[ac_y_table], i,
-            s->first_coded_y_fragment, s->last_coded_y_fragment, residual_eob_run);
-
-        debug_vp3("  vp3: unpacking level %d C plane AC coefficients using table %d\n",
-            i, ac_c_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_3[ac_c_table], i,
-            s->first_coded_c_fragment, s->last_coded_c_fragment, residual_eob_run);
-    }
-
-    /* unpack the group 4 AC coefficients (coeffs 28-63) */
-    for (i = 28; i <= 63; i++) {
-
-        debug_vp3("  vp3: unpacking level %d Y plane AC coefficients using table %d\n",
-            i, ac_y_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_4[ac_y_table], i,
-            s->first_coded_y_fragment, s->last_coded_y_fragment, residual_eob_run);
-
-        debug_vp3("  vp3: unpacking level %d C plane AC coefficients using table %d\n",
-            i, ac_c_table);
-        residual_eob_run = unpack_vlcs(s, gb, &s->ac_vlc_4[ac_c_table], i,
-            s->first_coded_c_fragment, s->last_coded_c_fragment, residual_eob_run);
-    }
-
-    return 0;
-}
-
-/*
- * This function reverses the DC prediction for each coded fragment in
- * the frame. Much of this function is adapted directly from the original
- * VP3 source code.
- */
-#define COMPATIBLE_FRAME(x) \
-  (compatible_frame[s->all_fragments[x].coding_method] == current_frame_type)
-#define FRAME_CODED(x) (s->all_fragments[x].coding_method != MODE_COPY)
-#define DC_COEFF(u) (s->coeffs[u].index ? 0 : s->coeffs[u].coeff) //FIXME do somethin to simplify this
-
-static void reverse_dc_prediction(Vp3DecodeContext *s,
-                                  int first_fragment,
-                                  int fragment_width,
-                                  int fragment_height)
-{
-
-#define PUL 8
-#define PU 4
-#define PUR 2
-#define PL 1
-
-    int x, y;
-    int i = first_fragment;
-
-    int predicted_dc;
-
-    /* DC values for the left, up-left, up, and up-right fragments */
-    int vl, vul, vu, vur;
-
-    /* indices for the left, up-left, up, and up-right fragments */
-    int l, ul, u, ur;
-
-    /*
-     * The 6 fields mean:
-     *   0: up-left multiplier
-     *   1: up multiplier
-     *   2: up-right multiplier
-     *   3: left multiplier
-     */
-    int predictor_transform[16][4] = {
-        {  0,  0,  0,  0},
-        {  0,  0,  0,128},        // PL
-        {  0,  0,128,  0},        // PUR
-        {  0,  0, 53, 75},        // PUR|PL
-        {  0,128,  0,  0},        // PU
-        {  0, 64,  0, 64},        // PU|PL
-        {  0,128,  0,  0},        // PU|PUR
-        {  0,  0, 53, 75},        // PU|PUR|PL
-        {128,  0,  0,  0},        // PUL
-        {  0,  0,  0,128},        // PUL|PL
-        { 64,  0, 64,  0},        // PUL|PUR
-        {  0,  0, 53, 75},        // PUL|PUR|PL
-        {  0,128,  0,  0},        // PUL|PU
-       {-104,116,  0,116},        // PUL|PU|PL
-        { 24, 80, 24,  0},        // PUL|PU|PUR
-       {-104,116,  0,116}         // PUL|PU|PUR|PL
-    };
-
-    /* This table shows which types of blocks can use other blocks for
-     * prediction. For example, INTRA is the only mode in this table to
-     * have a frame number of 0. That means INTRA blocks can only predict
-     * from other INTRA blocks. There are 2 golden frame coding types;
-     * blocks encoding in these modes can only predict from other blocks
-     * that were encoded with these 1 of these 2 modes. */
-    unsigned char compatible_frame[8] = {
-        1,    /* MODE_INTER_NO_MV */
-        0,    /* MODE_INTRA */
-        1,    /* MODE_INTER_PLUS_MV */
-        1,    /* MODE_INTER_LAST_MV */
-        1,    /* MODE_INTER_PRIOR_MV */
-        2,    /* MODE_USING_GOLDEN */
-        2,    /* MODE_GOLDEN_MV */
-        1     /* MODE_INTER_FOUR_MV */
-    };
-    int current_frame_type;
-
-    /* there is a last DC predictor for each of the 3 frame types */
-    short last_dc[3];
-
-    int transform = 0;
-
-    debug_vp3("  vp3: reversing DC prediction\n");
-
-    vul = vu = vur = vl = 0;
-    last_dc[0] = last_dc[1] = last_dc[2] = 0;
-
-    /* for each fragment row... */
-    for (y = 0; y < fragment_height; y++) {
-
-        /* for each fragment in a row... */
-        for (x = 0; x < fragment_width; x++, i++) {
-
-            /* reverse prediction if this block was coded */
-            if (s->all_fragments[i].coding_method != MODE_COPY) {
-
-                current_frame_type =
-                    compatible_frame[s->all_fragments[i].coding_method];
-                debug_dc_pred(" frag %d: orig DC = %d, ",
-                    i, DC_COEFF(i));
-
-                transform= 0;
-                if(x){
-                    l= i-1;
-                    vl = DC_COEFF(l);
-                    if(FRAME_CODED(l) && COMPATIBLE_FRAME(l))
-                        transform |= PL;
-                }
-                if(y){
-                    u= i-fragment_width;
-                    vu = DC_COEFF(u);
-                    if(FRAME_CODED(u) && COMPATIBLE_FRAME(u))
-                        transform |= PU;
-                    if(x){
-                        ul= i-fragment_width-1;
-                        vul = DC_COEFF(ul);
-                        if(FRAME_CODED(ul) && COMPATIBLE_FRAME(ul))
-                            transform |= PUL;
-                    }
-                    if(x + 1 < fragment_width){
-                        ur= i-fragment_width+1;
-                        vur = DC_COEFF(ur);
-                        if(FRAME_CODED(ur) && COMPATIBLE_FRAME(ur))
-                            transform |= PUR;
-                    }
-                }
-
-                debug_dc_pred("transform = %d, ", transform);
-
-                if (transform == 0) {
-
-                    /* if there were no fragments to predict from, use last
-                     * DC saved */
-                    predicted_dc = last_dc[current_frame_type];
-                    debug_dc_pred("from last DC (%d) = %d\n",
-                        current_frame_type, DC_COEFF(i));
-
-                } else {
-
-                    /* apply the appropriate predictor transform */
-                    predicted_dc =
-                        (predictor_transform[transform][0] * vul) +
-                        (predictor_transform[transform][1] * vu) +
-                        (predictor_transform[transform][2] * vur) +
-                        (predictor_transform[transform][3] * vl);
-
-                    predicted_dc /= 128;
-
-                    /* check for outranging on the [ul u l] and
-                     * [ul u ur l] predictors */
-                    if ((transform == 13) || (transform == 15)) {
-                        if (FFABS(predicted_dc - vu) > 128)
-                            predicted_dc = vu;
-                        else if (FFABS(predicted_dc - vl) > 128)
-                            predicted_dc = vl;
-                        else if (FFABS(predicted_dc - vul) > 128)
-                            predicted_dc = vul;
-                    }
-
-                    debug_dc_pred("from pred DC = %d\n",
-                    DC_COEFF(i));
-                }
-
-                /* at long last, apply the predictor */
-                if(s->coeffs[i].index){
-                    *s->next_coeff= s->coeffs[i];
-                    s->coeffs[i].index=0;
-                    s->coeffs[i].coeff=0;
-                    s->coeffs[i].next= s->next_coeff++;
-                }
-                s->coeffs[i].coeff += predicted_dc;
-                /* save the DC */
-                last_dc[current_frame_type] = DC_COEFF(i);
-                if(DC_COEFF(i) && !(s->all_fragments[i].coeff_count&127)){
-                    s->all_fragments[i].coeff_count= 129;
-//                    s->all_fragments[i].next_coeff= s->next_coeff;
-                    s->coeffs[i].next= s->next_coeff;
-                    (s->next_coeff++)->next=NULL;
-                }
-            }
-        }
-    }
-}
-
-
-static void horizontal_filter(unsigned char *first_pixel, int stride,
-    int *bounding_values);
-static void vertical_filter(unsigned char *first_pixel, int stride,
-    int *bounding_values);
-
-/*
- * Perform the final rendering for a particular slice of data.
- * The slice number ranges from 0..(macroblock_height - 1).
- */
-static void render_slice(Vp3DecodeContext *s, int slice)
-{
-    int x;
-    int m, n;
-    int16_t *dequantizer;
-    DECLARE_ALIGNED_16(DCTELEM, block[64]);
-    int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef;
-    int motion_halfpel_index;
-    uint8_t *motion_source;
-    int plane;
-    int current_macroblock_entry = slice * s->macroblock_width * 6;
-
-    if (slice >= s->macroblock_height)
-        return;
-
-    for (plane = 0; plane < 3; plane++) {
-        uint8_t *output_plane = s->current_frame.data    [plane];
-        uint8_t *  last_plane = s->   last_frame.data    [plane];
-        uint8_t *golden_plane = s-> golden_frame.data    [plane];
-        int stride            = s->current_frame.linesize[plane];
-        int plane_width       = s->width  >> !!plane;
-        int plane_height      = s->height >> !!plane;
-        int y =        slice *  FRAGMENT_PIXELS << !plane ;
-        int slice_height = y + (FRAGMENT_PIXELS << !plane);
-        int i = s->macroblock_fragments[current_macroblock_entry + plane + 3*!!plane];
-
-        if (!s->flipped_image) stride = -stride;
-
-
-        if(FFABS(stride) > 2048)
-            return; //various tables are fixed size
-
-        /* for each fragment row in the slice (both of them)... */
-        for (; y < slice_height; y += 8) {
-
-            /* for each fragment in a row... */
-            for (x = 0; x < plane_width; x += 8, i++) {
-
-                if ((i < 0) || (i >= s->fragment_count)) {
-                    av_log(s->avctx, AV_LOG_ERROR, "  vp3:render_slice(): bad fragment number (%d)\n", i);
-                    return;
-                }
-
-                /* transform if this block was coded */
-                if ((s->all_fragments[i].coding_method != MODE_COPY) &&
-                    !((s->avctx->flags & CODEC_FLAG_GRAY) && plane)) {
-
-                    if ((s->all_fragments[i].coding_method == MODE_USING_GOLDEN) ||
-                        (s->all_fragments[i].coding_method == MODE_GOLDEN_MV))
-                        motion_source= golden_plane;
-                    else
-                        motion_source= last_plane;
-
-                    motion_source += s->all_fragments[i].first_pixel;
-                    motion_halfpel_index = 0;
-
-                    /* sort out the motion vector if this fragment is coded
-                     * using a motion vector method */
-                    if ((s->all_fragments[i].coding_method > MODE_INTRA) &&
-                        (s->all_fragments[i].coding_method != MODE_USING_GOLDEN)) {
-                        int src_x, src_y;
-                        motion_x = s->all_fragments[i].motion_x;
-                        motion_y = s->all_fragments[i].motion_y;
-                        if(plane){
-                            motion_x= (motion_x>>1) | (motion_x&1);
-                            motion_y= (motion_y>>1) | (motion_y&1);
-                        }
-
-                        src_x= (motion_x>>1) + x;
-                        src_y= (motion_y>>1) + y;
-                        if ((motion_x == 127) || (motion_y == 127))
-                            av_log(s->avctx, AV_LOG_ERROR, " help! got invalid motion vector! (%X, %X)\n", motion_x, motion_y);
-
-                        motion_halfpel_index = motion_x & 0x01;
-                        motion_source += (motion_x >> 1);
-
-                        motion_halfpel_index |= (motion_y & 0x01) << 1;
-                        motion_source += ((motion_y >> 1) * stride);
-
-                        if(src_x<0 || src_y<0 || src_x + 9 >= plane_width || src_y + 9 >= plane_height){
-                            uint8_t *temp= s->edge_emu_buffer;
-                            if(stride<0) temp -= 9*stride;
-                            else temp += 9*stride;
-
-                            ff_emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
-                            motion_source= temp;
-                        }
-                    }
-
-
-                    /* first, take care of copying a block from either the
-                     * previous or the golden frame */
-                    if (s->all_fragments[i].coding_method != MODE_INTRA) {
-                        /* Note, it is possible to implement all MC cases with
-                           put_no_rnd_pixels_l2 which would look more like the
-                           VP3 source but this would be slower as
-                           put_no_rnd_pixels_tab is better optimzed */
-                        if(motion_halfpel_index != 3){
-                            s->dsp.put_no_rnd_pixels_tab[1][motion_halfpel_index](
-                                output_plane + s->all_fragments[i].first_pixel,
-                                motion_source, stride, 8);
-                        }else{
-                            int d= (motion_x ^ motion_y)>>31; // d is 0 if motion_x and _y have the same sign, else -1
-                            s->dsp.put_no_rnd_pixels_l2[1](
-                                output_plane + s->all_fragments[i].first_pixel,
-                                motion_source - d,
-                                motion_source + stride + 1 + d,
-                                stride, 8);
-                        }
-                        dequantizer = s->qmat[1][plane];
-                    }else{
-                        dequantizer = s->qmat[0][plane];
-                    }
-
-                    /* dequantize the DCT coefficients */
-                    debug_idct("fragment %d, coding mode %d, DC = %d, dequant = %d:\n",
-                        i, s->all_fragments[i].coding_method,
-                        DC_COEFF(i), dequantizer[0]);
-
-                    if(s->avctx->idct_algo==FF_IDCT_VP3){
-                        Coeff *coeff= s->coeffs + i;
-                        memset(block, 0, sizeof(block));
-                        while(coeff->next){
-                            block[coeff->index]= coeff->coeff * dequantizer[coeff->index];
-                            coeff= coeff->next;
-                        }
-                    }else{
-                        Coeff *coeff= s->coeffs + i;
-                        memset(block, 0, sizeof(block));
-                        while(coeff->next){
-                            block[coeff->index]= (coeff->coeff * dequantizer[coeff->index] + 2)>>2;
-                            coeff= coeff->next;
-                        }
-                    }
-
-                    /* invert DCT and place (or add) in final output */
-
-                    if (s->all_fragments[i].coding_method == MODE_INTRA) {
-                        if(s->avctx->idct_algo!=FF_IDCT_VP3)
-                            block[0] += 128<<3;
-                        s->dsp.idct_put(
-                            output_plane + s->all_fragments[i].first_pixel,
-                            stride,
-                            block);
-                    } else {
-                        s->dsp.idct_add(
-                            output_plane + s->all_fragments[i].first_pixel,
-                            stride,
-                            block);
-                    }
-
-                    debug_idct("block after idct_%s():\n",
-                        (s->all_fragments[i].coding_method == MODE_INTRA)?
-                        "put" : "add");
-                    for (m = 0; m < 8; m++) {
-                        for (n = 0; n < 8; n++) {
-                            debug_idct(" %3d", *(output_plane +
-                                s->all_fragments[i].first_pixel + (m * stride + n)));
-                        }
-                        debug_idct("\n");
-                    }
-                    debug_idct("\n");
-
-                } else {
-
-                    /* copy directly from the previous frame */
-                    s->dsp.put_pixels_tab[1][0](
-                        output_plane + s->all_fragments[i].first_pixel,
-                        last_plane + s->all_fragments[i].first_pixel,
-                        stride, 8);
-
-                }
-#if 0
-                /* perform the left edge filter if:
-                 *   - the fragment is not on the left column
-                 *   - the fragment is coded in this frame
-                 *   - the fragment is not coded in this frame but the left
-                 *     fragment is coded in this frame (this is done instead
-                 *     of a right edge filter when rendering the left fragment
-                 *     since this fragment is not available yet) */
-                if ((x > 0) &&
-                    ((s->all_fragments[i].coding_method != MODE_COPY) ||
-                     ((s->all_fragments[i].coding_method == MODE_COPY) &&
-                      (s->all_fragments[i - 1].coding_method != MODE_COPY)) )) {
-                    horizontal_filter(
-                        output_plane + s->all_fragments[i].first_pixel + 7*stride,
-                        -stride, s->bounding_values_array + 127);
-                }
-
-                /* perform the top edge filter if:
-                 *   - the fragment is not on the top row
-                 *   - the fragment is coded in this frame
-                 *   - the fragment is not coded in this frame but the above
-                 *     fragment is coded in this frame (this is done instead
-                 *     of a bottom edge filter when rendering the above
-                 *     fragment since this fragment is not available yet) */
-                if ((y > 0) &&
-                    ((s->all_fragments[i].coding_method != MODE_COPY) ||
-                     ((s->all_fragments[i].coding_method == MODE_COPY) &&
-                      (s->all_fragments[i - fragment_width].coding_method != MODE_COPY)) )) {
-                    vertical_filter(
-                        output_plane + s->all_fragments[i].first_pixel - stride,
-                        -stride, s->bounding_values_array + 127);
-                }
-#endif
-            }
-        }
-    }
-
-     /* this looks like a good place for slice dispatch... */
-     /* algorithm:
-      *   if (slice == s->macroblock_height - 1)
-      *     dispatch (both last slice & 2nd-to-last slice);
-      *   else if (slice > 0)
-      *     dispatch (slice - 1);
-      */
-
-    emms_c();
-}
-
-static void horizontal_filter(unsigned char *first_pixel, int stride,
-    int *bounding_values)
-{
-    unsigned char *end;
-    int filter_value;
-
-    for (end= first_pixel + 8*stride; first_pixel != end; first_pixel += stride) {
-        filter_value =
-            (first_pixel[-2] - first_pixel[ 1])
-         +3*(first_pixel[ 0] - first_pixel[-1]);
-        filter_value = bounding_values[(filter_value + 4) >> 3];
-        first_pixel[-1] = clip_uint8(first_pixel[-1] + filter_value);
-        first_pixel[ 0] = clip_uint8(first_pixel[ 0] - filter_value);
-    }
-}
-
-static void vertical_filter(unsigned char *first_pixel, int stride,
-    int *bounding_values)
-{
-    unsigned char *end;
-    int filter_value;
-    const int nstride= -stride;
-
-    for (end= first_pixel + 8; first_pixel < end; first_pixel++) {
-        filter_value =
-            (first_pixel[2 * nstride] - first_pixel[ stride])
-         +3*(first_pixel[0          ] - first_pixel[nstride]);
-        filter_value = bounding_values[(filter_value + 4) >> 3];
-        first_pixel[nstride] = clip_uint8(first_pixel[nstride] + filter_value);
-        first_pixel[0] = clip_uint8(first_pixel[0] - filter_value);
-    }
-}
-
-static void apply_loop_filter(Vp3DecodeContext *s)
-{
-    int plane;
-    int x, y;
-    int *bounding_values= s->bounding_values_array+127;
-
-#if 0
-    int bounding_values_array[256];
-    int filter_limit;
-
-    /* find the right loop limit value */
-    for (x = 63; x >= 0; x--) {
-        if (vp31_ac_scale_factor[x] >= s->quality_index)
-            break;
-    }
-    filter_limit = vp31_filter_limit_values[s->quality_index];
-
-    /* set up the bounding values */
-    memset(bounding_values_array, 0, 256 * sizeof(int));
-    for (x = 0; x < filter_limit; x++) {
-        bounding_values[-x - filter_limit] = -filter_limit + x;
-        bounding_values[-x] = -x;
-        bounding_values[x] = x;
-        bounding_values[x + filter_limit] = filter_limit - x;
-    }
-#endif
-
-    for (plane = 0; plane < 3; plane++) {
-        int width           = s->fragment_width  >> !!plane;
-        int height          = s->fragment_height >> !!plane;
-        int fragment        = s->fragment_start        [plane];
-        int stride          = s->current_frame.linesize[plane];
-        uint8_t *plane_data = s->current_frame.data    [plane];
-        if (!s->flipped_image) stride = -stride;
-
-        for (y = 0; y < height; y++) {
-
-            for (x = 0; x < width; x++) {
-START_TIMER
-                /* do not perform left edge filter for left columns frags */
-                if ((x > 0) &&
-                    (s->all_fragments[fragment].coding_method != MODE_COPY)) {
-                    horizontal_filter(
-                        plane_data + s->all_fragments[fragment].first_pixel,
-                        stride, bounding_values);
-                }
-
-                /* do not perform top edge filter for top row fragments */
-                if ((y > 0) &&
-                    (s->all_fragments[fragment].coding_method != MODE_COPY)) {
-                    vertical_filter(
-                        plane_data + s->all_fragments[fragment].first_pixel,
-                        stride, bounding_values);
-                }
-
-                /* do not perform right edge filter for right column
-                 * fragments or if right fragment neighbor is also coded
-                 * in this frame (it will be filtered in next iteration) */
-                if ((x < width - 1) &&
-                    (s->all_fragments[fragment].coding_method != MODE_COPY) &&
-                    (s->all_fragments[fragment + 1].coding_method == MODE_COPY)) {
-                    horizontal_filter(
-                        plane_data + s->all_fragments[fragment + 1].first_pixel,
-                        stride, bounding_values);
-                }
-
-                /* do not perform bottom edge filter for bottom row
-                 * fragments or if bottom fragment neighbor is also coded
-                 * in this frame (it will be filtered in the next row) */
-                if ((y < height - 1) &&
-                    (s->all_fragments[fragment].coding_method != MODE_COPY) &&
-                    (s->all_fragments[fragment + width].coding_method == MODE_COPY)) {
-                    vertical_filter(
-                        plane_data + s->all_fragments[fragment + width].first_pixel,
-                        stride, bounding_values);
-                }
-
-                fragment++;
-STOP_TIMER("loop filter")
-            }
-        }
-    }
-}
-
-/*
- * This function computes the first pixel addresses for each fragment.
- * This function needs to be invoked after the first frame is allocated
- * so that it has access to the plane strides.
- */
-static void vp3_calculate_pixel_addresses(Vp3DecodeContext *s)
-{
-
-    int i, x, y;
-
-    /* figure out the first pixel addresses for each of the fragments */
-    /* Y plane */
-    i = 0;
-    for (y = s->fragment_height; y > 0; y--) {
-        for (x = 0; x < s->fragment_width; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[0] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[0] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-
-    /* U plane */
-    i = s->fragment_start[1];
-    for (y = s->fragment_height / 2; y > 0; y--) {
-        for (x = 0; x < s->fragment_width / 2; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[1] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[1] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-
-    /* V plane */
-    i = s->fragment_start[2];
-    for (y = s->fragment_height / 2; y > 0; y--) {
-        for (x = 0; x < s->fragment_width / 2; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[2] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[2] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-}
-
-/* FIXME: this should be merged with the above! */
-static void theora_calculate_pixel_addresses(Vp3DecodeContext *s)
-{
-
-    int i, x, y;
-
-    /* figure out the first pixel addresses for each of the fragments */
-    /* Y plane */
-    i = 0;
-    for (y = 1; y <= s->fragment_height; y++) {
-        for (x = 0; x < s->fragment_width; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[0] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[0] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-
-    /* U plane */
-    i = s->fragment_start[1];
-    for (y = 1; y <= s->fragment_height / 2; y++) {
-        for (x = 0; x < s->fragment_width / 2; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[1] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[1] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-
-    /* V plane */
-    i = s->fragment_start[2];
-    for (y = 1; y <= s->fragment_height / 2; y++) {
-        for (x = 0; x < s->fragment_width / 2; x++) {
-            s->all_fragments[i++].first_pixel =
-                s->golden_frame.linesize[2] * y * FRAGMENT_PIXELS -
-                    s->golden_frame.linesize[2] +
-                    x * FRAGMENT_PIXELS;
-            debug_init("  fragment %d, first pixel @ %d\n",
-                i-1, s->all_fragments[i-1].first_pixel);
-        }
-    }
-}
-
-/*
- * This is the ffmpeg/libavcodec API init function.
- */
-static int vp3_decode_init(AVCodecContext *avctx)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-    int i, inter, plane;
-    int c_width;
-    int c_height;
-    int y_superblock_count;
-    int c_superblock_count;
-
-    if (avctx->codec_tag == MKTAG('V','P','3','0'))
-        s->version = 0;
-    else
-        s->version = 1;
-
-    s->avctx = avctx;
-    s->width = (avctx->width + 15) & 0xFFFFFFF0;
-    s->height = (avctx->height + 15) & 0xFFFFFFF0;
-    avctx->pix_fmt = PIX_FMT_YUV420P;
-    avctx->has_b_frames = 0;
-    if(avctx->idct_algo==FF_IDCT_AUTO)
-        avctx->idct_algo=FF_IDCT_VP3;
-    dsputil_init(&s->dsp, avctx);
-
-    ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
-
-    /* initialize to an impossible value which will force a recalculation
-     * in the first frame decode */
-    s->quality_index = -1;
-
-    s->y_superblock_width = (s->width + 31) / 32;
-    s->y_superblock_height = (s->height + 31) / 32;
-    y_superblock_count = s->y_superblock_width * s->y_superblock_height;
-
-    /* work out the dimensions for the C planes */
-    c_width = s->width / 2;
-    c_height = s->height / 2;
-    s->c_superblock_width = (c_width + 31) / 32;
-    s->c_superblock_height = (c_height + 31) / 32;
-    c_superblock_count = s->c_superblock_width * s->c_superblock_height;
-
-    s->superblock_count = y_superblock_count + (c_superblock_count * 2);
-    s->u_superblock_start = y_superblock_count;
-    s->v_superblock_start = s->u_superblock_start + c_superblock_count;
-    s->superblock_coding = av_malloc(s->superblock_count);
-
-    s->macroblock_width = (s->width + 15) / 16;
-    s->macroblock_height = (s->height + 15) / 16;
-    s->macroblock_count = s->macroblock_width * s->macroblock_height;
-
-    s->fragment_width = s->width / FRAGMENT_PIXELS;
-    s->fragment_height = s->height / FRAGMENT_PIXELS;
-
-    /* fragment count covers all 8x8 blocks for all 3 planes */
-    s->fragment_count = s->fragment_width * s->fragment_height * 3 / 2;
-    s->fragment_start[1] = s->fragment_width * s->fragment_height;
-    s->fragment_start[2] = s->fragment_width * s->fragment_height * 5 / 4;
-
-    debug_init("  Y plane: %d x %d\n", s->width, s->height);
-    debug_init("  C plane: %d x %d\n", c_width, c_height);
-    debug_init("  Y superblocks: %d x %d, %d total\n",
-        s->y_superblock_width, s->y_superblock_height, y_superblock_count);
-    debug_init("  C superblocks: %d x %d, %d total\n",
-        s->c_superblock_width, s->c_superblock_height, c_superblock_count);
-    debug_init("  total superblocks = %d, U starts @ %d, V starts @ %d\n",
-        s->superblock_count, s->u_superblock_start, s->v_superblock_start);
-    debug_init("  macroblocks: %d x %d, %d total\n",
-        s->macroblock_width, s->macroblock_height, s->macroblock_count);
-    debug_init("  %d fragments, %d x %d, u starts @ %d, v starts @ %d\n",
-        s->fragment_count,
-        s->fragment_width,
-        s->fragment_height,
-        s->fragment_start[1],
-        s->fragment_start[2]);
-
-    s->all_fragments = av_malloc(s->fragment_count * sizeof(Vp3Fragment));
-    s->coeffs = av_malloc(s->fragment_count * sizeof(Coeff) * 65);
-    s->coded_fragment_list = av_malloc(s->fragment_count * sizeof(int));
-    s->pixel_addresses_inited = 0;
-
-    if (!s->theora_tables)
-    {
-        for (i = 0; i < 64; i++) {
-            s->coded_dc_scale_factor[i] = vp31_dc_scale_factor[i];
-            s->coded_ac_scale_factor[i] = vp31_ac_scale_factor[i];
-            s->base_matrix[0][i] = vp31_intra_y_dequant[i];
-            s->base_matrix[1][i] = vp31_intra_c_dequant[i];
-            s->base_matrix[2][i] = vp31_inter_dequant[i];
-            s->filter_limit_values[i] = vp31_filter_limit_values[i];
-        }
-
-        for(inter=0; inter<2; inter++){
-            for(plane=0; plane<3; plane++){
-                s->qr_count[inter][plane]= 1;
-                s->qr_size [inter][plane][0]= 63;
-                s->qr_base [inter][plane][0]=
-                s->qr_base [inter][plane][1]= 2*inter + (!!plane)*!inter;
-            }
-        }
-
-        /* init VLC tables */
-        for (i = 0; i < 16; i++) {
-
-            /* DC histograms */
-            init_vlc(&s->dc_vlc[i], 5, 32,
-                &dc_bias[i][0][1], 4, 2,
-                &dc_bias[i][0][0], 4, 2, 0);
-
-            /* group 1 AC histograms */
-            init_vlc(&s->ac_vlc_1[i], 5, 32,
-                &ac_bias_0[i][0][1], 4, 2,
-                &ac_bias_0[i][0][0], 4, 2, 0);
-
-            /* group 2 AC histograms */
-            init_vlc(&s->ac_vlc_2[i], 5, 32,
-                &ac_bias_1[i][0][1], 4, 2,
-                &ac_bias_1[i][0][0], 4, 2, 0);
-
-            /* group 3 AC histograms */
-            init_vlc(&s->ac_vlc_3[i], 5, 32,
-                &ac_bias_2[i][0][1], 4, 2,
-                &ac_bias_2[i][0][0], 4, 2, 0);
-
-            /* group 4 AC histograms */
-            init_vlc(&s->ac_vlc_4[i], 5, 32,
-                &ac_bias_3[i][0][1], 4, 2,
-                &ac_bias_3[i][0][0], 4, 2, 0);
-        }
-    } else {
-        for (i = 0; i < 16; i++) {
-
-            /* DC histograms */
-            init_vlc(&s->dc_vlc[i], 5, 32,
-                &s->huffman_table[i][0][1], 4, 2,
-                &s->huffman_table[i][0][0], 4, 2, 0);
-
-            /* group 1 AC histograms */
-            init_vlc(&s->ac_vlc_1[i], 5, 32,
-                &s->huffman_table[i+16][0][1], 4, 2,
-                &s->huffman_table[i+16][0][0], 4, 2, 0);
-
-            /* group 2 AC histograms */
-            init_vlc(&s->ac_vlc_2[i], 5, 32,
-                &s->huffman_table[i+16*2][0][1], 4, 2,
-                &s->huffman_table[i+16*2][0][0], 4, 2, 0);
-
-            /* group 3 AC histograms */
-            init_vlc(&s->ac_vlc_3[i], 5, 32,
-                &s->huffman_table[i+16*3][0][1], 4, 2,
-                &s->huffman_table[i+16*3][0][0], 4, 2, 0);
-
-            /* group 4 AC histograms */
-            init_vlc(&s->ac_vlc_4[i], 5, 32,
-                &s->huffman_table[i+16*4][0][1], 4, 2,
-                &s->huffman_table[i+16*4][0][0], 4, 2, 0);
-        }
-    }
-
-    init_vlc(&s->superblock_run_length_vlc, 6, 34,
-        &superblock_run_length_vlc_table[0][1], 4, 2,
-        &superblock_run_length_vlc_table[0][0], 4, 2, 0);
-
-    init_vlc(&s->fragment_run_length_vlc, 5, 30,
-        &fragment_run_length_vlc_table[0][1], 4, 2,
-        &fragment_run_length_vlc_table[0][0], 4, 2, 0);
-
-    init_vlc(&s->mode_code_vlc, 3, 8,
-        &mode_code_vlc_table[0][1], 2, 1,
-        &mode_code_vlc_table[0][0], 2, 1, 0);
-
-    init_vlc(&s->motion_vector_vlc, 6, 63,
-        &motion_vector_vlc_table[0][1], 2, 1,
-        &motion_vector_vlc_table[0][0], 2, 1, 0);
-
-    /* work out the block mapping tables */
-    s->superblock_fragments = av_malloc(s->superblock_count * 16 * sizeof(int));
-    s->superblock_macroblocks = av_malloc(s->superblock_count * 4 * sizeof(int));
-    s->macroblock_fragments = av_malloc(s->macroblock_count * 6 * sizeof(int));
-    s->macroblock_coding = av_malloc(s->macroblock_count + 1);
-    init_block_mapping(s);
-
-    for (i = 0; i < 3; i++) {
-        s->current_frame.data[i] = NULL;
-        s->last_frame.data[i] = NULL;
-        s->golden_frame.data[i] = NULL;
-    }
-
-    return 0;
-}
-
-/*
- * This is the ffmpeg/libavcodec API frame decode function.
- */
-static int vp3_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
-                            uint8_t *buf, int buf_size)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-    GetBitContext gb;
-    static int counter = 0;
-    int i;
-
-    init_get_bits(&gb, buf, buf_size * 8);
-
-    if (s->theora && get_bits1(&gb))
-    {
-#if 1
-        av_log(avctx, AV_LOG_ERROR, "Header packet passed to frame decoder, skipping\n");
-        return -1;
-#else
-        int ptype = get_bits(&gb, 7);
-
-        skip_bits(&gb, 6*8); /* "theora" */
-
-        switch(ptype)
-        {
-            case 1:
-                theora_decode_comments(avctx, &gb);
-                break;
-            case 2:
-                theora_decode_tables(avctx, &gb);
-                    init_dequantizer(s);
-                break;
-            default:
-                av_log(avctx, AV_LOG_ERROR, "Unknown Theora config packet: %d\n", ptype);
-        }
-        return buf_size;
-#endif
-    }
-
-    s->keyframe = !get_bits1(&gb);
-    if (!s->theora)
-        skip_bits(&gb, 1);
-    s->last_quality_index = s->quality_index;
-
-    s->nqis=0;
-    do{
-        s->qis[s->nqis++]= get_bits(&gb, 6);
-    } while(s->theora >= 0x030200 && s->nqis<3 && get_bits1(&gb));
-
-    s->quality_index= s->qis[0];
-
-    if (s->avctx->debug & FF_DEBUG_PICT_INFO)
-        av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%d: Q index = %d\n",
-            s->keyframe?"key":"", counter, s->quality_index);
-    counter++;
-
-    if (s->quality_index != s->last_quality_index) {
-        init_dequantizer(s);
-        init_loop_filter(s);
-    }
-
-    if (s->keyframe) {
-        if (!s->theora)
-        {
-            skip_bits(&gb, 4); /* width code */
-            skip_bits(&gb, 4); /* height code */
-            if (s->version)
-            {
-                s->version = get_bits(&gb, 5);
-                if (counter == 1)
-                    av_log(s->avctx, AV_LOG_DEBUG, "VP version: %d\n", s->version);
-            }
-        }
-        if (s->version || s->theora)
-        {
-                if (get_bits1(&gb))
-                    av_log(s->avctx, AV_LOG_ERROR, "Warning, unsupported keyframe coding type?!\n");
-            skip_bits(&gb, 2); /* reserved? */
-        }
-
-        if (s->last_frame.data[0] == s->golden_frame.data[0]) {
-            if (s->golden_frame.data[0])
-                avctx->release_buffer(avctx, &s->golden_frame);
-            s->last_frame= s->golden_frame; /* ensure that we catch any access to this released frame */
-        } else {
-            if (s->golden_frame.data[0])
-                avctx->release_buffer(avctx, &s->golden_frame);
-            if (s->last_frame.data[0])
-                avctx->release_buffer(avctx, &s->last_frame);
-        }
-
-        s->golden_frame.reference = 3;
-        if(avctx->get_buffer(avctx, &s->golden_frame) < 0) {
-            av_log(s->avctx, AV_LOG_ERROR, "vp3: get_buffer() failed\n");
-            return -1;
-        }
-
-        /* golden frame is also the current frame */
-        s->current_frame= s->golden_frame;
-
-        /* time to figure out pixel addresses? */
-        if (!s->pixel_addresses_inited)
-        {
-            if (!s->flipped_image)
-                vp3_calculate_pixel_addresses(s);
-            else
-                theora_calculate_pixel_addresses(s);
-            s->pixel_addresses_inited = 1;
-        }
-    } else {
-        /* allocate a new current frame */
-        s->current_frame.reference = 3;
-        if (!s->pixel_addresses_inited) {
-            av_log(s->avctx, AV_LOG_ERROR, "vp3: first frame not a keyframe\n");
-            return -1;
-        }
-        if(avctx->get_buffer(avctx, &s->current_frame) < 0) {
-            av_log(s->avctx, AV_LOG_ERROR, "vp3: get_buffer() failed\n");
-            return -1;
-        }
-    }
-
-    s->current_frame.qscale_table= s->qscale_table; //FIXME allocate individual tables per AVFrame
-    s->current_frame.qstride= 0;
-
-    {START_TIMER
-    init_frame(s, &gb);
-    STOP_TIMER("init_frame")}
-
-#if KEYFRAMES_ONLY
-if (!s->keyframe) {
-
-    memcpy(s->current_frame.data[0], s->golden_frame.data[0],
-        s->current_frame.linesize[0] * s->height);
-    memcpy(s->current_frame.data[1], s->golden_frame.data[1],
-        s->current_frame.linesize[1] * s->height / 2);
-    memcpy(s->current_frame.data[2], s->golden_frame.data[2],
-        s->current_frame.linesize[2] * s->height / 2);
-
-} else {
-#endif
-
-    {START_TIMER
-    if (unpack_superblocks(s, &gb)){
-        av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n");
-        return -1;
-    }
-    STOP_TIMER("unpack_superblocks")}
-    {START_TIMER
-    if (unpack_modes(s, &gb)){
-        av_log(s->avctx, AV_LOG_ERROR, "error in unpack_modes\n");
-        return -1;
-    }
-    STOP_TIMER("unpack_modes")}
-    {START_TIMER
-    if (unpack_vectors(s, &gb)){
-        av_log(s->avctx, AV_LOG_ERROR, "error in unpack_vectors\n");
-        return -1;
-    }
-    STOP_TIMER("unpack_vectors")}
-    {START_TIMER
-    if (unpack_dct_coeffs(s, &gb)){
-        av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n");
-        return -1;
-    }
-    STOP_TIMER("unpack_dct_coeffs")}
-    {START_TIMER
-
-    reverse_dc_prediction(s, 0, s->fragment_width, s->fragment_height);
-    if ((avctx->flags & CODEC_FLAG_GRAY) == 0) {
-        reverse_dc_prediction(s, s->fragment_start[1],
-            s->fragment_width / 2, s->fragment_height / 2);
-        reverse_dc_prediction(s, s->fragment_start[2],
-            s->fragment_width / 2, s->fragment_height / 2);
-    }
-    STOP_TIMER("reverse_dc_prediction")}
-    {START_TIMER
-
-    for (i = 0; i < s->macroblock_height; i++)
-        render_slice(s, i);
-    STOP_TIMER("render_fragments")}
-
-    {START_TIMER
-    apply_loop_filter(s);
-    STOP_TIMER("apply_loop_filter")}
-#if KEYFRAMES_ONLY
-}
-#endif
-
-    *data_size=sizeof(AVFrame);
-    *(AVFrame*)data= s->current_frame;
-
-    /* release the last frame, if it is allocated and if it is not the
-     * golden frame */
-    if ((s->last_frame.data[0]) &&
-        (s->last_frame.data[0] != s->golden_frame.data[0]))
-        avctx->release_buffer(avctx, &s->last_frame);
-
-    /* shuffle frames (last = current) */
-    s->last_frame= s->current_frame;
-    s->current_frame.data[0]= NULL; /* ensure that we catch any access to this released frame */
-
-    return buf_size;
-}
-
-/*
- * This is the ffmpeg/libavcodec API module cleanup function.
- */
-static int vp3_decode_end(AVCodecContext *avctx)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-
-    av_free(s->all_fragments);
-    av_free(s->coeffs);
-    av_free(s->coded_fragment_list);
-    av_free(s->superblock_fragments);
-    av_free(s->superblock_macroblocks);
-    av_free(s->macroblock_fragments);
-    av_free(s->macroblock_coding);
-
-    /* release all frames */
-    if (s->golden_frame.data[0] && s->golden_frame.data[0] != s->last_frame.data[0])
-        avctx->release_buffer(avctx, &s->golden_frame);
-    if (s->last_frame.data[0])
-        avctx->release_buffer(avctx, &s->last_frame);
-    /* no need to release the current_frame since it will always be pointing
-     * to the same frame as either the golden or last frame */
-
-    return 0;
-}
-
-static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-
-    if (get_bits(gb, 1)) {
-        int token;
-        if (s->entries >= 32) { /* overflow */
-            av_log(avctx, AV_LOG_ERROR, "huffman tree overflow\n");
-            return -1;
-        }
-        token = get_bits(gb, 5);
-        //av_log(avctx, AV_LOG_DEBUG, "hti %d hbits %x token %d entry : %d size %d\n", s->hti, s->hbits, token, s->entries, s->huff_code_size);
-        s->huffman_table[s->hti][token][0] = s->hbits;
-        s->huffman_table[s->hti][token][1] = s->huff_code_size;
-        s->entries++;
-    }
-    else {
-        if (s->huff_code_size >= 32) {/* overflow */
-            av_log(avctx, AV_LOG_ERROR, "huffman tree overflow\n");
-            return -1;
-        }
-        s->huff_code_size++;
-        s->hbits <<= 1;
-        read_huffman_tree(avctx, gb);
-        s->hbits |= 1;
-        read_huffman_tree(avctx, gb);
-        s->hbits >>= 1;
-        s->huff_code_size--;
-    }
-    return 0;
-}
-
-static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-
-    s->theora = get_bits_long(gb, 24);
-    av_log(avctx, AV_LOG_INFO, "Theora bitstream version %X\n", s->theora);
-
-    /* 3.2.0 aka alpha3 has the same frame orientation as original vp3 */
-    /* but previous versions have the image flipped relative to vp3 */
-    if (s->theora < 0x030200)
-    {
-        s->flipped_image = 1;
-        av_log(avctx, AV_LOG_DEBUG, "Old (<alpha3) Theora bitstream, flipped image\n");
-    }
-
-    s->width = get_bits(gb, 16) << 4;
-    s->height = get_bits(gb, 16) << 4;
-
-    if(avcodec_check_dimensions(avctx, s->width, s->height)){
-        av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height);
-        s->width= s->height= 0;
-        return -1;
-    }
-
-    if (s->theora >= 0x030400)
-    {
-        skip_bits(gb, 32); /* total number of superblocks in a frame */
-        // fixme, the next field is 36bits long
-        skip_bits(gb, 32); /* total number of blocks in a frame */
-        skip_bits(gb, 4); /* total number of blocks in a frame */
-        skip_bits(gb, 32); /* total number of macroblocks in a frame */
-
-        skip_bits(gb, 24); /* frame width */
-        skip_bits(gb, 24); /* frame height */
-    }
-    else
-    {
-        skip_bits(gb, 24); /* frame width */
-        skip_bits(gb, 24); /* frame height */
-    }
-
-  if (s->theora >= 0x030200) {
-    skip_bits(gb, 8); /* offset x */
-    skip_bits(gb, 8); /* offset y */
-  }
-
-    skip_bits(gb, 32); /* fps numerator */
-    skip_bits(gb, 32); /* fps denumerator */
-    skip_bits(gb, 24); /* aspect numerator */
-    skip_bits(gb, 24); /* aspect denumerator */
-
-    if (s->theora < 0x030200)
-        skip_bits(gb, 5); /* keyframe frequency force */
-    skip_bits(gb, 8); /* colorspace */
-    if (s->theora >= 0x030400)
-        skip_bits(gb, 2); /* pixel format: 420,res,422,444 */
-    skip_bits(gb, 24); /* bitrate */
-
-    skip_bits(gb, 6); /* quality hint */
-
-    if (s->theora >= 0x030200)
-    {
-        skip_bits(gb, 5); /* keyframe frequency force */
-
-        if (s->theora < 0x030400)
-            skip_bits(gb, 5); /* spare bits */
-    }
-
-//    align_get_bits(gb);
-
-    avctx->width = s->width;
-    avctx->height = s->height;
-
-    return 0;
-}
-
-static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-    int i, n, matrices, inter, plane;
-
-    if (s->theora >= 0x030200) {
-        n = get_bits(gb, 3);
-        /* loop filter limit values table */
-        for (i = 0; i < 64; i++)
-            s->filter_limit_values[i] = get_bits(gb, n);
-    }
-
-    if (s->theora >= 0x030200)
-        n = get_bits(gb, 4) + 1;
-    else
-        n = 16;
-    /* quality threshold table */
-    for (i = 0; i < 64; i++)
-        s->coded_ac_scale_factor[i] = get_bits(gb, n);
-
-    if (s->theora >= 0x030200)
-        n = get_bits(gb, 4) + 1;
-    else
-        n = 16;
-    /* dc scale factor table */
-    for (i = 0; i < 64; i++)
-        s->coded_dc_scale_factor[i] = get_bits(gb, n);
-
-    if (s->theora >= 0x030200)
-        matrices = get_bits(gb, 9) + 1;
-    else
-        matrices = 3;
-
-    if(matrices > 384){
-        av_log(avctx, AV_LOG_ERROR, "invalid number of base matrixes\n");
-        return -1;
-    }
-
-    for(n=0; n<matrices; n++){
-        for (i = 0; i < 64; i++)
-            s->base_matrix[n][i]= get_bits(gb, 8);
-    }
-
-    for (inter = 0; inter <= 1; inter++) {
-        for (plane = 0; plane <= 2; plane++) {
-            int newqr= 1;
-            if (inter || plane > 0)
-                newqr = get_bits(gb, 1);
-            if (!newqr) {
-                int qtj, plj;
-                if(inter && get_bits(gb, 1)){
-                    qtj = 0;
-                    plj = plane;
-                }else{
-                    qtj= (3*inter + plane - 1) / 3;
-                    plj= (plane + 2) % 3;
-                }
-                s->qr_count[inter][plane]= s->qr_count[qtj][plj];
-                memcpy(s->qr_size[inter][plane], s->qr_size[qtj][plj], sizeof(s->qr_size[0][0]));
-                memcpy(s->qr_base[inter][plane], s->qr_base[qtj][plj], sizeof(s->qr_base[0][0]));
-            } else {
-                int qri= 0;
-                int qi = 0;
-
-                for(;;){
-                    i= get_bits(gb, av_log2(matrices-1)+1);
-                    if(i>= matrices){
-                        av_log(avctx, AV_LOG_ERROR, "invalid base matrix index\n");
-                        return -1;
-                    }
-                    s->qr_base[inter][plane][qri]= i;
-                    if(qi >= 63)
-                        break;
-                    i = get_bits(gb, av_log2(63-qi)+1) + 1;
-                    s->qr_size[inter][plane][qri++]= i;
-                    qi += i;
-                }
-
-                if (qi > 63) {
-                    av_log(avctx, AV_LOG_ERROR, "invalid qi %d > 63\n", qi);
-                    return -1;
-                }
-                s->qr_count[inter][plane]= qri;
-            }
-        }
-    }
-
-    /* Huffman tables */
-    for (s->hti = 0; s->hti < 80; s->hti++) {
-        s->entries = 0;
-        s->huff_code_size = 1;
-        if (!get_bits(gb, 1)) {
-            s->hbits = 0;
-            read_huffman_tree(avctx, gb);
-            s->hbits = 1;
-            read_huffman_tree(avctx, gb);
-        }
-    }
-
-    s->theora_tables = 1;
-
-    return 0;
-}
-
-static int theora_decode_init(AVCodecContext *avctx)
-{
-    Vp3DecodeContext *s = avctx->priv_data;
-    GetBitContext gb;
-    int ptype;
-    uint8_t *p= avctx->extradata;
-    int op_bytes, i;
-
-    s->theora = 1;
-
-    if (!avctx->extradata_size)
-    {
-        av_log(avctx, AV_LOG_ERROR, "Missing extradata!\n");
-        return -1;
-    }
-
-  for(i=0;i<3;i++) {
-    op_bytes = *(p++)<<8;
-    op_bytes += *(p++);
-
-    init_get_bits(&gb, p, op_bytes);
-    p += op_bytes;
-
-    ptype = get_bits(&gb, 8);
-    debug_vp3("Theora headerpacket type: %x\n", ptype);
-
-     if (!(ptype & 0x80))
-     {
-        av_log(avctx, AV_LOG_ERROR, "Invalid extradata!\n");
-//        return -1;
-     }
-
-    // FIXME: check for this aswell
-    skip_bits(&gb, 6*8); /* "theora" */
-
-    switch(ptype)
-    {
-        case 0x80:
-            theora_decode_header(avctx, &gb);
-                break;
-        case 0x81:
-// FIXME: is this needed? it breaks sometimes
-//            theora_decode_comments(avctx, gb);
-            break;
-        case 0x82:
-            theora_decode_tables(avctx, &gb);
-            break;
-        default:
-            av_log(avctx, AV_LOG_ERROR, "Unknown Theora config packet: %d\n", ptype&~0x80);
-            break;
-    }
-    if(8*op_bytes != get_bits_count(&gb))
-        av_log(avctx, AV_LOG_ERROR, "%d bits left in packet %X\n", 8*op_bytes - get_bits_count(&gb), ptype);
-    if (s->theora < 0x030200)
-        break;
-  }
-
-    vp3_decode_init(avctx);
-    return 0;
-}
-
-AVCodec vp3_decoder = {
-    "vp3",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_VP3,
-    sizeof(Vp3DecodeContext),
-    vp3_decode_init,
-    NULL,
-    vp3_decode_end,
-    vp3_decode_frame,
-    0,
-    NULL
-};
-
-#ifndef CONFIG_LIBTHEORA
-AVCodec theora_decoder = {
-    "theora",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_THEORA,
-    sizeof(Vp3DecodeContext),
-    theora_decode_init,
-    NULL,
-    vp3_decode_end,
-    vp3_decode_frame,
-    0,
-    NULL
-};
-#endif
--- a/src/ffmpeg/libavcodec/vp3data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3178 +0,0 @@
-/*
- * copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef VP3DATA_H
-#define VP3DATA_H
-
-/* these coefficients dequantize intraframe Y plane coefficients
- * (note: same as JPEG) */
-static const int16_t vp31_intra_y_dequant[64] =
-{       16,  11,  10,  16,  24,  40,  51,  61,
-        12,  12,  14,  19,  26,  58,  60,  55,
-        14,  13,  16,  24,  40,  57,  69,  56,
-        14,  17,  22,  29,  51,  87,  80,  62,
-        18,  22,  37,  58,  68, 109, 103,  77,
-        24,  35,  55,  64,  81, 104, 113,  92,
-        49,  64,  78,  87, 103, 121, 120, 101,
-        72,  92,  95,  98, 112, 100, 103,  99
-};
-
-/* these coefficients dequantize intraframe C plane coefficients
- * (note: same as JPEG) */
-static const int16_t vp31_intra_c_dequant[64] =
-{       17,  18,     24,     47,     99,     99,     99,     99,
-        18,  21,     26,     66,     99,     99,     99,     99,
-        24,  26,     56,     99,     99,     99,     99,     99,
-        47,  66,     99,     99,     99,     99,     99,     99,
-        99,  99,     99,     99,     99,     99,     99,     99,
-        99,  99,     99,     99,     99,     99,     99,     99,
-        99,  99,     99,     99,     99,     99,     99,     99,
-        99,  99,     99,     99,     99,     99,     99,     99
-};
-
-/* these coefficients dequantize interframe coefficients (all planes) */
-static const int16_t vp31_inter_dequant[64] =
-{   16,  16,  16,  20,  24,  28,  32,  40,
-    16,  16,  20,  24,  28,  32,  40,  48,
-    16,  20,  24,  28,  32,  40,  48,  64,
-    20,  24,  28,  32,  40,  48,  64,  64,
-    24,  28,  32,  40,  48,  64,  64,  64,
-    28,  32,  40,  48,  64,  64,  64,  96,
-    32,  40,  48,  64,  64,  64,  96,  128,
-    40,  48,  64,  64,  64,  96,  128, 128
-};
-
-static const int16_t vp31_dc_scale_factor[64] =
-{ 220, 200, 190, 180, 170, 170, 160, 160,
-  150, 150, 140, 140, 130, 130, 120, 120,
-  110, 110, 100, 100, 90,  90,  90,  80,
-  80,  80,  70,  70,  70,  60,  60,  60,
-  60,  50,  50,  50,  50,  40,  40,  40,
-  40,  40,  30,  30,  30,  30,  30,  30,
-  30,  20,  20,  20,  20,  20,  20,  20,
-  20,  10,  10,  10,  10,  10,  10,  10
-};
-
-static const uint32_t vp31_ac_scale_factor[64] =
-{ 500,  450,  400,  370,  340,  310, 285, 265,
-  245,  225,  210,  195,  185,  180, 170, 160,
-  150,  145,  135,  130,  125,  115, 110, 107,
-  100,   96,   93,   89,   85,   82,  75,  74,
-   70,   68,   64,   60,   57,   56,  52,  50,
-   49,   45,   44,   43,   40,   38,  37,  35,
-   33,   32,   30,   29,   28,   25,  24,  22,
-   21,   19,   18,   17,   15,   13,  12,  10
-};
-
-static const uint32_t vp31_filter_limit_values[64] =
-{  30, 25, 20, 20, 15, 15, 14, 14,
-   13, 13, 12, 12, 11, 11, 10, 10,
-    9,  9,  8,  8,  7,  7,  7,  7,
-    6,  6,  6,  6,  5,  5,  5,  5,
-    4,  4,  4,  4,  3,  3,  3,  3,
-    2,  2,  2,  2,  2,  2,  2,  2,
-    0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0
-};
-
-static const uint16_t superblock_run_length_vlc_table[34][2] = {
-    { 0, 1 },
-
-    { 4, 3 },    { 5, 3 },
-
-    { 0xC, 4 },  { 0xD, 4 },
-
-    { 0x38, 6 },    { 0x39, 6 },    { 0x3A, 6 },    { 0x3B, 6 },
-
-    { 0xF0, 8 },    { 0xF1, 8 },    { 0xF2, 8 },    { 0xF3, 8 },
-    { 0xF4, 8 },    { 0xF5, 8 },    { 0xF6, 8 },    { 0xF7, 8 },
-
-    { 0x3E0, 10 },    { 0x3E1, 10 },    { 0x3E2, 10 },    { 0x3E3, 10 },
-    { 0x3E4, 10 },    { 0x3E5, 10 },    { 0x3E6, 10 },    { 0x3E7, 10 },
-    { 0x3E8, 10 },    { 0x3E9, 10 },    { 0x3EA, 10 },    { 0x3EB, 10 },
-    { 0x3EC, 10 },    { 0x3ED, 10 },    { 0x3EE, 10 },    { 0x3EF, 10 },
-
-    { 0x3F, 6 }  /* this last VLC is a special case for reading 12 more
-                    bits from stream and adding the value 34 */
-};
-
-static const uint16_t fragment_run_length_vlc_table[30][2] = {
-    /* 1 -> 2 */
-    { 0x0, 2 },    { 0x1, 2 },
-
-    /* 3 -> 4 */
-    { 0x4, 3 },    { 0x5, 3 },
-
-    /* 5 -> 6 */
-    { 0xC, 4 },    { 0xD, 4 },
-
-    /* 7 -> 10 */
-    { 0x38, 6 },   { 0x39, 6 },
-    { 0x3A, 6 },   { 0x3B, 6 },
-
-    /* 11 -> 14 */
-    { 0x78, 7 },   { 0x79, 7 },
-    { 0x7A, 7 },   { 0x7B, 7 },
-
-    /* 15 -> 30 */
-    { 0x1F0, 9 },  { 0x1F1, 9 },  { 0x1F2, 9 },  { 0x1F3, 9 },
-    { 0x1F4, 9 },  { 0x1F5, 9 },  { 0x1F6, 9 },  { 0x1F7, 9 },
-    { 0x1F8, 9 },  { 0x1F9, 9 },  { 0x1FA, 9 },  { 0x1FB, 9 },
-    { 0x1FC, 9 },  { 0x1FD, 9 },  { 0x1FE, 9 },  { 0x1FF, 9 }
-};
-
-static const uint8_t mode_code_vlc_table[8][2] = {
-    { 0, 1 },      { 2, 2 },
-    { 6, 3 },      { 14, 4 },
-    { 30, 5 },     { 62, 6 },
-    { 126, 7 },    { 127, 7 }
-};
-
-static const uint8_t motion_vector_vlc_table[63][2] = {
-    { 0, 3 },
-    { 1, 3 },
-    { 2, 3 },
-
-    { 6, 4 },    { 7, 4 },
-
-    { 8, 4 },    { 9, 4 },
-
-    { 40, 6 },    { 41, 6 },    { 42, 6 },    { 43, 6 },
-    { 44, 6 },    { 45, 6 },    { 46, 6 },    { 47, 6 },
-
-    { 96, 7 },    { 97, 7 },    { 98, 7 },    { 99, 7 },
-    { 100, 7 },   { 101, 7 },   { 102, 7 },   { 103, 7 },
-    { 104, 7 },   { 105, 7 },   { 106, 7 },   { 107, 7 },
-    { 108, 7 },   { 109, 7 },   { 110, 7 },   { 111, 7 },
-
-    { 0xE0, 8 },  { 0xE1, 8 },  { 0xE2, 8 },  { 0xE3, 8 },
-    { 0xE4, 8 },  { 0xE5, 8 },  { 0xE6, 8 },  { 0xE7, 8 },
-    { 0xE8, 8 },  { 0xE9, 8 },  { 0xEA, 8 },  { 0xEB, 8 },
-    { 0xEC, 8 },  { 0xED, 8 },  { 0xEE, 8 },  { 0xEF, 8 },
-
-    { 0xF0, 8 },  { 0xF1, 8 },  { 0xF2, 8 },  { 0xF3, 8 },
-    { 0xF4, 8 },  { 0xF5, 8 },  { 0xF6, 8 },  { 0xF7, 8 },
-    { 0xF8, 8 },  { 0xF9, 8 },  { 0xFA, 8 },  { 0xFB, 8 },
-    { 0xFC, 8 },  { 0xFD, 8 },  { 0xFE, 8 },  { 0xFF, 8 }
-};
-
-static const int motion_vector_table[63] = {
-    0, 1, -1,
-    2, -2,
-    3, -3,
-    4, -4, 5, -5, 6, -6, 7, -7,
-    8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15,
-    16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23,
-    24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
-};
-
-static const int8_t fixed_motion_vector_table[64] = {
-   0,   0,   1,  -1,   2,  -2,   3,  -3,
-   4,  -4,   5,  -5,   6,  -6,   7,  -7,
-   8,  -8,   9,  -9,  10, -10,  11, -11,
-  12, -12,  13, -13,  14, -14,  15, -15,
-  16, -16,  17, -17,  18, -18,  19, -19,
-  20, -20,  21, -21,  22, -22,  23, -23,
-  24, -24,  25, -25,  26, -26,  27, -27,
-  28, -28,  29, -29,  30, -30,  31, -31
-};
-
-/* only tokens 0..6 indicate eob runs */
-static const int eob_run_base[7] = {
-    1, 2, 3, 4, 8, 16, 0
-};
-static const int eob_run_get_bits[7] = {
-    0, 0, 0, 2, 3, 4, 12
-};
-
-static const int zero_run_base[32] = {
-    0, 0, 0, 0, 0, 0, 0,  /* 0..6 are never used */
-    0, 0,  /* 7..8 */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 9..22 */
-    1, 2, 3, 4, 5,  /* 23..27 */
-    6, 10, 1, 2  /* 28..31 */
-};
-static const int zero_run_get_bits[32] = {
-    0, 0, 0, 0, 0, 0, 0,  /* 0..6 are never used */
-    3, 6,  /* 7..8 */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 9..22 */
-    0, 0, 0, 0, 0,  /* 23..27 */
-    2, 3, 0, 1  /* 28..31 */
-};
-
-static const int coeff_get_bits[32] = {
-    0, 0, 0, 0, 0, 0, 0,  /* 0..6 are never used */
-    0, 0, 0, 0, 0, 0,  /* 7..12 use constant coeffs */
-    1, 1, 1, 1,  /* 13..16 are constants but still need sign bit */
-    2, 3, 4, 5, 6, 10,  /* 17..22, for reading large coeffs */
-    1, 1, 1, 1, 1, 1, 1,  /* 23..29 are constants but still need sign bit */
-    2, 2  /* 30..31 */
-};
-
-static const int16_t coeff_table_token_7_8[1] = { 0 };
-static const int16_t coeff_table_token_9[1] = { 1 };
-static const int16_t coeff_table_token_10[1] = { -1 };
-static const int16_t coeff_table_token_11[1] = { 2 };
-static const int16_t coeff_table_token_12[1] = { -2 };
-
-static const int16_t coeff_table_token_13[2] = { 3, -3 };
-static const int16_t coeff_table_token_14[2] = { 4, -4 };
-static const int16_t coeff_table_token_15[2] = { 5, -5 };
-static const int16_t coeff_table_token_16[2] = { 6, -6 };
-
-static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 };
-static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 };
-static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 };
-
-static const int16_t coeff_table_token_17[4] = {
-    7, 8, -7, -8
-};
-
-static const int16_t coeff_table_token_18[8] = {
-    9, 10, 11, 12, -9, -10, -11, -12
-};
-
-static const int16_t coeff_table_token_19[16] = {
-    13, 14, 15, 16, 17, 18, 19, 20, -13, -14, -15, -16, -17, -18, -19, -20
-};
-
-static const int16_t coeff_table_token_20[32] = {
-    21, 22, 23, 24, 25, 26, 27, 28,
-    29, 30, 31, 32, 33, 34, 35, 36,
-    -21, -22, -23, -24, -25, -26, -27, -28,
-    -29, -30, -31, -32, -33, -34, -35, -36
-};
-
-static const int16_t coeff_table_token_21[64] = {
-    37, 38, 39, 40, 41, 42, 43, 44,
-    45, 46, 47, 48, 49, 50, 51, 52,
-    53, 54, 55, 56, 57, 58, 59, 60,
-    61, 62, 63, 64, 65, 66, 67, 68,
-    -37, -38, -39, -40, -41, -42, -43, -44,
-    -45, -46, -47, -48, -49, -50, -51, -52,
-    -53, -54, -55, -56, -57, -58, -59, -60,
-    -61, -62, -63, -64, -65, -66, -67, -68
-};
-
-static const int16_t coeff_table_token_22[1024] = {
-    69, 70, 71, 72, 73, 74, 75, 76,
-    77, 78, 79, 80, 81, 82, 83, 84,
-    85, 86, 87, 88, 89, 90, 91, 92,
-    93, 94, 95, 96, 97, 98, 99, 100,
-    101, 102, 103, 104, 105, 106, 107, 108,
-    109, 110, 111, 112, 113, 114, 115, 116,
-    117, 118, 119, 120, 121, 122, 123, 124,
-    125, 126, 127, 128, 129, 130, 131, 132,
-    133, 134, 135, 136, 137, 138, 139, 140,
-    141, 142, 143, 144, 145, 146, 147, 148,
-    149, 150, 151, 152, 153, 154, 155, 156,
-    157, 158, 159, 160, 161, 162, 163, 164,
-    165, 166, 167, 168, 169, 170, 171, 172,
-    173, 174, 175, 176, 177, 178, 179, 180,
-    181, 182, 183, 184, 185, 186, 187, 188,
-    189, 190, 191, 192, 193, 194, 195, 196,
-    197, 198, 199, 200, 201, 202, 203, 204,
-    205, 206, 207, 208, 209, 210, 211, 212,
-    213, 214, 215, 216, 217, 218, 219, 220,
-    221, 222, 223, 224, 225, 226, 227, 228,
-    229, 230, 231, 232, 233, 234, 235, 236,
-    237, 238, 239, 240, 241, 242, 243, 244,
-    245, 246, 247, 248, 249, 250, 251, 252,
-    253, 254, 255, 256, 257, 258, 259, 260,
-    261, 262, 263, 264, 265, 266, 267, 268,
-    269, 270, 271, 272, 273, 274, 275, 276,
-    277, 278, 279, 280, 281, 282, 283, 284,
-    285, 286, 287, 288, 289, 290, 291, 292,
-    293, 294, 295, 296, 297, 298, 299, 300,
-    301, 302, 303, 304, 305, 306, 307, 308,
-    309, 310, 311, 312, 313, 314, 315, 316,
-    317, 318, 319, 320, 321, 322, 323, 324,
-    325, 326, 327, 328, 329, 330, 331, 332,
-    333, 334, 335, 336, 337, 338, 339, 340,
-    341, 342, 343, 344, 345, 346, 347, 348,
-    349, 350, 351, 352, 353, 354, 355, 356,
-    357, 358, 359, 360, 361, 362, 363, 364,
-    365, 366, 367, 368, 369, 370, 371, 372,
-    373, 374, 375, 376, 377, 378, 379, 380,
-    381, 382, 383, 384, 385, 386, 387, 388,
-    389, 390, 391, 392, 393, 394, 395, 396,
-    397, 398, 399, 400, 401, 402, 403, 404,
-    405, 406, 407, 408, 409, 410, 411, 412,
-    413, 414, 415, 416, 417, 418, 419, 420,
-    421, 422, 423, 424, 425, 426, 427, 428,
-    429, 430, 431, 432, 433, 434, 435, 436,
-    437, 438, 439, 440, 441, 442, 443, 444,
-    445, 446, 447, 448, 449, 450, 451, 452,
-    453, 454, 455, 456, 457, 458, 459, 460,
-    461, 462, 463, 464, 465, 466, 467, 468,
-    469, 470, 471, 472, 473, 474, 475, 476,
-    477, 478, 479, 480, 481, 482, 483, 484,
-    485, 486, 487, 488, 489, 490, 491, 492,
-    493, 494, 495, 496, 497, 498, 499, 500,
-    501, 502, 503, 504, 505, 506, 507, 508,
-    509, 510, 511, 512, 513, 514, 515, 516,
-    517, 518, 519, 520, 521, 522, 523, 524,
-    525, 526, 527, 528, 529, 530, 531, 532,
-    533, 534, 535, 536, 537, 538, 539, 540,
-    541, 542, 543, 544, 545, 546, 547, 548,
-    549, 550, 551, 552, 553, 554, 555, 556,
-    557, 558, 559, 560, 561, 562, 563, 564,
-    565, 566, 567, 568, 569, 570, 571, 572,
-    573, 574, 575, 576, 577, 578, 579, 580,
-    -69, -70, -71, -72, -73, -74, -75, -76,
-    -77, -78, -79, -80, -81, -82, -83, -84,
-    -85, -86, -87, -88, -89, -90, -91, -92,
-    -93, -94, -95, -96, -97, -98, -99, -100,
-    -101, -102, -103, -104, -105, -106, -107, -108,
-    -109, -110, -111, -112, -113, -114, -115, -116,
-    -117, -118, -119, -120, -121, -122, -123, -124,
-    -125, -126, -127, -128, -129, -130, -131, -132,
-    -133, -134, -135, -136, -137, -138, -139, -140,
-    -141, -142, -143, -144, -145, -146, -147, -148,
-    -149, -150, -151, -152, -153, -154, -155, -156,
-    -157, -158, -159, -160, -161, -162, -163, -164,
-    -165, -166, -167, -168, -169, -170, -171, -172,
-    -173, -174, -175, -176, -177, -178, -179, -180,
-    -181, -182, -183, -184, -185, -186, -187, -188,
-    -189, -190, -191, -192, -193, -194, -195, -196,
-    -197, -198, -199, -200, -201, -202, -203, -204,
-    -205, -206, -207, -208, -209, -210, -211, -212,
-    -213, -214, -215, -216, -217, -218, -219, -220,
-    -221, -222, -223, -224, -225, -226, -227, -228,
-    -229, -230, -231, -232, -233, -234, -235, -236,
-    -237, -238, -239, -240, -241, -242, -243, -244,
-    -245, -246, -247, -248, -249, -250, -251, -252,
-    -253, -254, -255, -256, -257, -258, -259, -260,
-    -261, -262, -263, -264, -265, -266, -267, -268,
-    -269, -270, -271, -272, -273, -274, -275, -276,
-    -277, -278, -279, -280, -281, -282, -283, -284,
-    -285, -286, -287, -288, -289, -290, -291, -292,
-    -293, -294, -295, -296, -297, -298, -299, -300,
-    -301, -302, -303, -304, -305, -306, -307, -308,
-    -309, -310, -311, -312, -313, -314, -315, -316,
-    -317, -318, -319, -320, -321, -322, -323, -324,
-    -325, -326, -327, -328, -329, -330, -331, -332,
-    -333, -334, -335, -336, -337, -338, -339, -340,
-    -341, -342, -343, -344, -345, -346, -347, -348,
-    -349, -350, -351, -352, -353, -354, -355, -356,
-    -357, -358, -359, -360, -361, -362, -363, -364,
-    -365, -366, -367, -368, -369, -370, -371, -372,
-    -373, -374, -375, -376, -377, -378, -379, -380,
-    -381, -382, -383, -384, -385, -386, -387, -388,
-    -389, -390, -391, -392, -393, -394, -395, -396,
-    -397, -398, -399, -400, -401, -402, -403, -404,
-    -405, -406, -407, -408, -409, -410, -411, -412,
-    -413, -414, -415, -416, -417, -418, -419, -420,
-    -421, -422, -423, -424, -425, -426, -427, -428,
-    -429, -430, -431, -432, -433, -434, -435, -436,
-    -437, -438, -439, -440, -441, -442, -443, -444,
-    -445, -446, -447, -448, -449, -450, -451, -452,
-    -453, -454, -455, -456, -457, -458, -459, -460,
-    -461, -462, -463, -464, -465, -466, -467, -468,
-    -469, -470, -471, -472, -473, -474, -475, -476,
-    -477, -478, -479, -480, -481, -482, -483, -484,
-    -485, -486, -487, -488, -489, -490, -491, -492,
-    -493, -494, -495, -496, -497, -498, -499, -500,
-    -501, -502, -503, -504, -505, -506, -507, -508,
-    -509, -510, -511, -512, -513, -514, -515, -516,
-    -517, -518, -519, -520, -521, -522, -523, -524,
-    -525, -526, -527, -528, -529, -530, -531, -532,
-    -533, -534, -535, -536, -537, -538, -539, -540,
-    -541, -542, -543, -544, -545, -546, -547, -548,
-    -549, -550, -551, -552, -553, -554, -555, -556,
-    -557, -558, -559, -560, -561, -562, -563, -564,
-    -565, -566, -567, -568, -569, -570, -571, -572,
-    -573, -574, -575, -576, -577, -578, -579, -580
-};
-
-static const int16_t *coeff_tables[32] = {
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    coeff_table_token_7_8,
-
-    coeff_table_token_7_8,
-    coeff_table_token_9,
-    coeff_table_token_10,
-    coeff_table_token_11,
-    coeff_table_token_12,
-    coeff_table_token_13,
-    coeff_table_token_14,
-    coeff_table_token_15,
-
-    coeff_table_token_16,
-    coeff_table_token_17,
-    coeff_table_token_18,
-    coeff_table_token_19,
-    coeff_table_token_20,
-    coeff_table_token_21,
-    coeff_table_token_22,
-    coeff_table_token_23_24_25_26_27_28_29,
-
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_23_24_25_26_27_28_29,
-    coeff_table_token_30,
-    coeff_table_token_31
-};
-
-static const uint16_t dc_bias[16][32][2] = {
-  {  /* DC bias table 0 */
-    { 0x2D, 6 },
-    { 0x26, 7 },
-    { 0x166, 9 },
-    { 0x4E, 8 },
-    { 0x2CE, 10 },
-    { 0x59E, 11 },
-    { 0x27D, 11 },
-    { 0x8, 5 },
-    { 0x4F9, 12 },
-    { 0xF, 4 },
-    { 0xE, 4 },
-    { 0x1B, 5 },
-    { 0x6, 4 },
-    { 0x8, 4 },
-    { 0x5, 4 },
-    { 0x1A, 5 },
-    { 0x15, 5 },
-    { 0x7, 4 },
-    { 0xC, 4 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0x9, 4 },
-    { 0x17, 5 },
-    { 0x29, 6 },
-    { 0x28, 6 },
-    { 0xB2, 8 },
-    { 0x4F8, 12 },
-    { 0x59F, 11 },
-    { 0x9E, 9 },
-    { 0x13F, 10 },
-    { 0x12, 6 },
-    { 0x58, 7 }
-  },
-  {  /* DC bias table 1 */
-    { 0x10, 5 },
-    { 0x47, 7 },
-    { 0x1FF, 9 },
-    { 0x8C, 8 },
-    { 0x3FC, 10 },
-    { 0x46A, 11 },
-    { 0x469, 11 },
-    { 0x22, 6 },
-    { 0x11A1, 13 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0x4, 4 },
-    { 0x5, 4 },
-    { 0x9, 4 },
-    { 0x6, 4 },
-    { 0x1E, 5 },
-    { 0x16, 5 },
-    { 0x7, 4 },
-    { 0xC, 4 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xA, 4 },
-    { 0x17, 5 },
-    { 0x7D, 7 },
-    { 0x7E, 7 },
-    { 0x11B, 9 },
-    { 0x8D1, 12 },
-    { 0x3FD, 10 },
-    { 0x46B, 11 },
-    { 0x11A0, 13 },
-    { 0x7C, 7 },
-    { 0xFE, 8 }
-  },
-  {  /* DC bias table 2 */
-    { 0x16, 5 },
-    { 0x20, 6 },
-    { 0x86, 8 },
-    { 0x87, 8 },
-    { 0x367, 10 },
-    { 0x6CC, 11 },
-    { 0x6CB, 11 },
-    { 0x6E, 7 },
-    { 0x366D, 14 },
-    { 0xF, 4 },
-    { 0xE, 4 },
-    { 0x4, 4 },
-    { 0x5, 4 },
-    { 0xA, 4 },
-    { 0x6, 4 },
-    { 0x1A, 5 },
-    { 0x11, 5 },
-    { 0x7, 4 },
-    { 0xC, 4 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0x9, 4 },
-    { 0x17, 5 },
-    { 0x6F, 7 },
-    { 0x6D, 7 },
-    { 0x364, 10 },
-    { 0xD9A, 12 },
-    { 0x6CA, 11 },
-    { 0x1B37, 13 },
-    { 0x366C, 14 },
-    { 0x42, 7 },
-    { 0xD8, 8 }
-  },
-  {  /* DC bias table 3 */
-    { 0x0, 4 },
-    { 0x2D, 6 },
-    { 0xF7, 8 },
-    { 0x58, 7 },
-    { 0x167, 9 },
-    { 0x2CB, 10 },
-    { 0x2CA, 10 },
-    { 0xE, 6 },
-    { 0x1661, 13 },
-    { 0x3, 3 },
-    { 0x2, 3 },
-    { 0x8, 4 },
-    { 0x9, 4 },
-    { 0xD, 4 },
-    { 0x2, 4 },
-    { 0x1F, 5 },
-    { 0x17, 5 },
-    { 0x1, 4 },
-    { 0xC, 4 },
-    { 0xE, 4 },
-    { 0xA, 4 },
-    { 0x6, 5 },
-    { 0x78, 7 },
-    { 0xF, 6 },
-    { 0x7A, 7 },
-    { 0x164, 9 },
-    { 0x599, 11 },
-    { 0x2CD, 10 },
-    { 0xB31, 12 },
-    { 0x1660, 13 },
-    { 0x79, 7 },
-    { 0xF6, 8 }
-  },
-  {  /* DC bias table 4 */
-    { 0x3, 4 },
-    { 0x3C, 6 },
-    { 0xF, 7 },
-    { 0x7A, 7 },
-    { 0x1D, 8 },
-    { 0x20, 9 },
-    { 0x72, 10 },
-    { 0x6, 6 },
-    { 0x399, 13 },
-    { 0x4, 3 },
-    { 0x5, 3 },
-    { 0x5, 4 },
-    { 0x6, 4 },
-    { 0xE, 4 },
-    { 0x4, 4 },
-    { 0x0, 4 },
-    { 0x19, 5 },
-    { 0x2, 4 },
-    { 0xD, 4 },
-    { 0x7, 4 },
-    { 0x1F, 5 },
-    { 0x30, 6 },
-    { 0x11, 8 },
-    { 0x31, 6 },
-    { 0x5, 6 },
-    { 0x21, 9 },
-    { 0xE7, 11 },
-    { 0x38, 9 },
-    { 0x1CD, 12 },
-    { 0x398, 13 },
-    { 0x7B, 7 },
-    { 0x9, 7 }
-  },
-  {  /* DC bias table 5 */
-    { 0x9, 4 },
-    { 0x2, 5 },
-    { 0x74, 7 },
-    { 0x7, 6 },
-    { 0xEC, 8 },
-    { 0xD1, 9 },
-    { 0x1A6, 10 },
-    { 0x6, 6 },
-    { 0xD21, 13 },
-    { 0x5, 3 },
-    { 0x6, 3 },
-    { 0x8, 4 },
-    { 0x7, 4 },
-    { 0xF, 4 },
-    { 0x4, 4 },
-    { 0x0, 4 },
-    { 0x1C, 5 },
-    { 0x2, 4 },
-    { 0x5, 4 },
-    { 0x3, 4 },
-    { 0xC, 5 },
-    { 0x35, 7 },
-    { 0x1A7, 10 },
-    { 0x1B, 6 },
-    { 0x77, 7 },
-    { 0x1A5, 10 },
-    { 0x349, 11 },
-    { 0xD0, 9 },
-    { 0x691, 12 },
-    { 0xD20, 13 },
-    { 0x75, 7 },
-    { 0xED, 8 }
-  },
-  {  /* DC bias table 6 */
-    { 0xA, 4 },
-    { 0xC, 5 },
-    { 0x12, 6 },
-    { 0x1B, 6 },
-    { 0xB7, 8 },
-    { 0x16C, 9 },
-    { 0x99, 9 },
-    { 0x5A, 7 },
-    { 0x16D8, 13 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x0, 3 },
-    { 0x5, 4 },
-    { 0x17, 5 },
-    { 0xE, 5 },
-    { 0x2, 4 },
-    { 0x3, 4 },
-    { 0xF, 5 },
-    { 0x1A, 6 },
-    { 0x4D, 8 },
-    { 0x2DB3, 14 },
-    { 0x2C, 6 },
-    { 0x11, 6 },
-    { 0x2DA, 10 },
-    { 0x5B7, 11 },
-    { 0x98, 9 },
-    { 0xB6D, 12 },
-    { 0x2DB2, 14 },
-    { 0x10, 6 },
-    { 0x27, 7 }
-  },
-  {  /* DC bias table 7 */
-    { 0xD, 4 },
-    { 0xF, 5 },
-    { 0x1D, 6 },
-    { 0x8, 5 },
-    { 0x51, 7 },
-    { 0x56, 8 },
-    { 0xAF, 9 },
-    { 0x2A, 7 },
-    { 0x148A, 13 },
-    { 0x7, 3 },
-    { 0x0, 2 },
-    { 0x8, 4 },
-    { 0x9, 4 },
-    { 0xC, 4 },
-    { 0x6, 4 },
-    { 0x17, 5 },
-    { 0xB, 5 },
-    { 0x16, 5 },
-    { 0x15, 5 },
-    { 0x9, 5 },
-    { 0x50, 7 },
-    { 0xAE, 9 },
-    { 0x2917, 14 },
-    { 0x1C, 6 },
-    { 0x14, 6 },
-    { 0x290, 10 },
-    { 0x523, 11 },
-    { 0x149, 9 },
-    { 0xA44, 12 },
-    { 0x2916, 14 },
-    { 0x53, 7 },
-    { 0xA5, 8 }
-  },
-  {  /* DC bias table 8 */
-    { 0x1, 4 },
-    { 0x1D, 6 },
-    { 0xF5, 8 },
-    { 0xF4, 8 },
-    { 0x24D, 10 },
-    { 0x499, 11 },
-    { 0x498, 11 },
-    { 0x1, 5 },
-    { 0x21, 6 },
-    { 0x6, 3 },
-    { 0x5, 3 },
-    { 0x6, 4 },
-    { 0x5, 4 },
-    { 0x2, 4 },
-    { 0x7, 5 },
-    { 0x25, 6 },
-    { 0x7B, 7 },
-    { 0x1C, 6 },
-    { 0x20, 6 },
-    { 0xD, 6 },
-    { 0x48, 7 },
-    { 0x92, 8 },
-    { 0x127, 9 },
-    { 0xE, 4 },
-    { 0x4, 4 },
-    { 0x11, 5 },
-    { 0xC, 6 },
-    { 0x3C, 6 },
-    { 0xF, 5 },
-    { 0x0, 5 },
-    { 0x1F, 5 },
-    { 0x13, 5 }
-  },
-  {  /* DC bias table 9 */
-    { 0x5, 4 },
-    { 0x3C, 6 },
-    { 0x40, 7 },
-    { 0xD, 7 },
-    { 0x31, 9 },
-    { 0x61, 10 },
-    { 0x60, 10 },
-    { 0x2, 5 },
-    { 0xF5, 8 },
-    { 0x6, 3 },
-    { 0x5, 3 },
-    { 0x7, 4 },
-    { 0x6, 4 },
-    { 0x2, 4 },
-    { 0x9, 5 },
-    { 0x25, 6 },
-    { 0x7, 6 },
-    { 0x21, 6 },
-    { 0x24, 6 },
-    { 0x10, 6 },
-    { 0x41, 7 },
-    { 0xF4, 8 },
-    { 0x19, 8 },
-    { 0xE, 4 },
-    { 0x3, 4 },
-    { 0x11, 5 },
-    { 0x11, 6 },
-    { 0x3F, 6 },
-    { 0x3E, 6 },
-    { 0x7B, 7 },
-    { 0x0, 4 },
-    { 0x13, 5 }
-  },
-  {  /* DC bias table 10 */
-    { 0xA, 4 },
-    { 0x7, 5 },
-    { 0x1, 6 },
-    { 0x9, 6 },
-    { 0x131, 9 },
-    { 0x261, 10 },
-    { 0x260, 10 },
-    { 0x15, 6 },
-    { 0x1, 7 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x8, 4 },
-    { 0x7, 4 },
-    { 0x6, 4 },
-    { 0x12, 5 },
-    { 0x2F, 6 },
-    { 0x14, 6 },
-    { 0x27, 6 },
-    { 0x2D, 6 },
-    { 0x16, 6 },
-    { 0x4D, 7 },
-    { 0x99, 8 },
-    { 0x0, 7 },
-    { 0x4, 4 },
-    { 0x1, 4 },
-    { 0x5, 5 },
-    { 0x17, 6 },
-    { 0x2E, 6 },
-    { 0x2C, 6 },
-    { 0x8, 6 },
-    { 0x6, 5 },
-    { 0x1, 5 }
-  },
-  {  /* DC bias table 11 */
-    { 0x0, 3 },
-    { 0xE, 5 },
-    { 0x17, 6 },
-    { 0x2A, 6 },
-    { 0x10, 7 },
-    { 0xF9, 10 },
-    { 0xF8, 10 },
-    { 0x1E, 7 },
-    { 0x3F, 8 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x6, 4 },
-    { 0xF, 5 },
-    { 0x5, 5 },
-    { 0x16, 6 },
-    { 0x29, 6 },
-    { 0x2B, 6 },
-    { 0x15, 6 },
-    { 0x50, 7 },
-    { 0x11, 7 },
-    { 0x7D, 9 },
-    { 0x4, 4 },
-    { 0x17, 5 },
-    { 0x6, 5 },
-    { 0x14, 6 },
-    { 0x2C, 6 },
-    { 0x2D, 6 },
-    { 0xE, 6 },
-    { 0x9, 6 },
-    { 0x51, 7 }
-  },
-  {  /* DC bias table 12 */
-    { 0x2, 3 },
-    { 0x18, 5 },
-    { 0x2F, 6 },
-    { 0xD, 5 },
-    { 0x53, 7 },
-    { 0x295, 10 },
-    { 0x294, 10 },
-    { 0xA4, 8 },
-    { 0x7C, 8 },
-    { 0x0, 2 },
-    { 0x7, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x1B, 5 },
-    { 0xC, 5 },
-    { 0x28, 6 },
-    { 0x6A, 7 },
-    { 0x1E, 6 },
-    { 0x1D, 6 },
-    { 0x69, 7 },
-    { 0xD7, 8 },
-    { 0x7D, 8 },
-    { 0x14B, 9 },
-    { 0x19, 5 },
-    { 0x16, 5 },
-    { 0x2E, 6 },
-    { 0x1C, 6 },
-    { 0x2B, 6 },
-    { 0x2A, 6 },
-    { 0x68, 7 },
-    { 0x3F, 7 },
-    { 0xD6, 8 }
-  },
-  {  /* DC bias table 13 */
-    { 0x2, 3 },
-    { 0x1B, 5 },
-    { 0xC, 5 },
-    { 0x18, 5 },
-    { 0x29, 6 },
-    { 0x7F, 8 },
-    { 0x2F0, 10 },
-    { 0x198, 9 },
-    { 0x179, 9 },
-    { 0x0, 2 },
-    { 0x7, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x1A, 5 },
-    { 0xD, 5 },
-    { 0x2A, 6 },
-    { 0x64, 7 },
-    { 0x1E, 6 },
-    { 0x67, 7 },
-    { 0x5F, 7 },
-    { 0xCD, 8 },
-    { 0x7E, 8 },
-    { 0x2F1, 10 },
-    { 0x16, 5 },
-    { 0xE, 5 },
-    { 0x2E, 6 },
-    { 0x65, 7 },
-    { 0x2B, 6 },
-    { 0x28, 6 },
-    { 0x3E, 7 },
-    { 0xBD, 8 },
-    { 0x199, 9 }
-  },
-  {  /* DC bias table 14 */
-    { 0x2, 3 },
-    { 0x7, 4 },
-    { 0x16, 5 },
-    { 0x6, 4 },
-    { 0x36, 6 },
-    { 0x5C, 7 },
-    { 0x15D, 9 },
-    { 0x15C, 9 },
-    { 0x2BF, 10 },
-    { 0x0, 2 },
-    { 0x7, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x18, 5 },
-    { 0x34, 6 },
-    { 0x2A, 6 },
-    { 0x5E, 7 },
-    { 0x6A, 7 },
-    { 0x64, 7 },
-    { 0x5D, 7 },
-    { 0xCB, 8 },
-    { 0xAD, 8 },
-    { 0x2BE, 10 },
-    { 0x14, 5 },
-    { 0x33, 6 },
-    { 0x6E, 7 },
-    { 0x5F, 7 },
-    { 0x6F, 7 },
-    { 0x6B, 7 },
-    { 0xCA, 8 },
-    { 0xAC, 8 },
-    { 0x15E, 9 }
-  },
-  {  /* DC bias table 15 */
-    { 0xF, 4 },
-    { 0x1D, 5 },
-    { 0x18, 5 },
-    { 0xB, 4 },
-    { 0x19, 5 },
-    { 0x29, 6 },
-    { 0xD6, 8 },
-    { 0x551, 11 },
-    { 0xAA1, 12 },
-    { 0x1, 2 },
-    { 0x0, 2 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x1B, 5 },
-    { 0x38, 6 },
-    { 0x28, 6 },
-    { 0x57, 7 },
-    { 0x6A, 7 },
-    { 0x68, 7 },
-    { 0x56, 7 },
-    { 0xE5, 8 },
-    { 0x155, 9 },
-    { 0xAA0, 12 },
-    { 0x73, 7 },
-    { 0x69, 7 },
-    { 0xD7, 8 },
-    { 0xAB, 8 },
-    { 0xE4, 8 },
-    { 0xA9, 8 },
-    { 0x151, 9 },
-    { 0x150, 9 },
-    { 0x2A9, 10 }
-  }
-};
-
-static const uint16_t ac_bias_0[16][32][2] = {
-  {  /* AC bias group 1, table 0 */
-    { 0x8, 5 },
-    { 0x25, 7 },
-    { 0x17A, 9 },
-    { 0x2F7, 10 },
-    { 0xBDB, 12 },
-    { 0x17B4, 13 },
-    { 0x2F6B, 14 },
-    { 0x1D, 5 },
-    { 0x2F6A, 14 },
-    { 0x8, 4 },
-    { 0x7, 4 },
-    { 0x1, 4 },
-    { 0x2, 4 },
-    { 0xA, 4 },
-    { 0x6, 4 },
-    { 0x0, 4 },
-    { 0x1C, 5 },
-    { 0x9, 4 },
-    { 0xD, 4 },
-    { 0xF, 4 },
-    { 0xC, 4 },
-    { 0x3, 4 },
-    { 0xA, 5 },
-    { 0x16, 5 },
-    { 0x13, 6 },
-    { 0x5D, 7 },
-    { 0x24, 7 },
-    { 0xBC, 8 },
-    { 0x5C, 7 },
-    { 0x5EC, 11 },
-    { 0xB, 5 },
-    { 0x5F, 7 }
-  },
-  {  /* AC bias group 1, table 1 */
-    { 0xF, 5 },
-    { 0x10, 6 },
-    { 0x4B, 8 },
-    { 0xC6, 8 },
-    { 0x31D, 10 },
-    { 0xC71, 12 },
-    { 0xC70, 12 },
-    { 0x1, 4 },
-    { 0xC73, 12 },
-    { 0x8, 4 },
-    { 0x9, 4 },
-    { 0x2, 4 },
-    { 0x3, 4 },
-    { 0xB, 4 },
-    { 0x6, 4 },
-    { 0x0, 4 },
-    { 0x1C, 5 },
-    { 0x5, 4 },
-    { 0xD, 4 },
-    { 0xF, 4 },
-    { 0xA, 4 },
-    { 0x19, 5 },
-    { 0x13, 6 },
-    { 0x1D, 5 },
-    { 0x30, 6 },
-    { 0x62, 7 },
-    { 0x24, 7 },
-    { 0x4A, 8 },
-    { 0x18F, 9 },
-    { 0xC72, 12 },
-    { 0xE, 5 },
-    { 0x11, 6 }
-  },
-  {  /* AC bias group 1, table 2 */
-    { 0x1B, 5 },
-    { 0x3, 6 },
-    { 0x8D, 8 },
-    { 0x40, 7 },
-    { 0x239, 10 },
-    { 0x471, 11 },
-    { 0x8E0, 12 },
-    { 0x3, 4 },
-    { 0x11C3, 13 },
-    { 0xA, 4 },
-    { 0x9, 4 },
-    { 0x4, 4 },
-    { 0x5, 4 },
-    { 0xE, 4 },
-    { 0x7, 4 },
-    { 0x1, 4 },
-    { 0x1E, 5 },
-    { 0x6, 4 },
-    { 0xC, 4 },
-    { 0xB, 4 },
-    { 0x2, 4 },
-    { 0x0, 5 },
-    { 0x41, 7 },
-    { 0x1F, 5 },
-    { 0x22, 6 },
-    { 0x2, 6 },
-    { 0x8F, 8 },
-    { 0x8C, 8 },
-    { 0x11D, 9 },
-    { 0x11C2, 13 },
-    { 0x1A, 5 },
-    { 0x21, 6 }
-  },
-  {  /* AC bias group 1, table 3 */
-    { 0x1F, 5 },
-    { 0x3, 6 },
-    { 0x3, 7 },
-    { 0x43, 7 },
-    { 0xB, 9 },
-    { 0x15, 10 },
-    { 0x51, 12 },
-    { 0x3, 4 },
-    { 0x50, 12 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x4, 4 },
-    { 0x6, 4 },
-    { 0xE, 4 },
-    { 0xA, 4 },
-    { 0x1, 4 },
-    { 0x1E, 5 },
-    { 0x5, 4 },
-    { 0x9, 4 },
-    { 0x7, 4 },
-    { 0x11, 5 },
-    { 0x2, 6 },
-    { 0x4, 8 },
-    { 0x2, 4 },
-    { 0x2D, 6 },
-    { 0x20, 6 },
-    { 0x42, 7 },
-    { 0x1, 7 },
-    { 0x0, 7 },
-    { 0x29, 11 },
-    { 0x17, 5 },
-    { 0x2C, 6 }
-  },
-  {  /* AC bias group 1, table 4 */
-    { 0x3, 4 },
-    { 0x1F, 6 },
-    { 0x3A, 7 },
-    { 0x5D, 7 },
-    { 0x173, 9 },
-    { 0x2E4, 10 },
-    { 0x172D, 13 },
-    { 0x4, 4 },
-    { 0x172C, 13 },
-    { 0xF, 4 },
-    { 0xE, 4 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0xC, 4 },
-    { 0xA, 4 },
-    { 0x1, 4 },
-    { 0x16, 5 },
-    { 0x2, 4 },
-    { 0x5, 4 },
-    { 0x1A, 5 },
-    { 0x2F, 6 },
-    { 0x38, 7 },
-    { 0x5CA, 11 },
-    { 0x6, 4 },
-    { 0x37, 6 },
-    { 0x1E, 6 },
-    { 0x3B, 7 },
-    { 0x39, 7 },
-    { 0xB8, 8 },
-    { 0xB97, 12 },
-    { 0x0, 4 },
-    { 0x36, 6 }
-  },
-  {  /* AC bias group 1, table 5 */
-    { 0x6, 4 },
-    { 0x37, 6 },
-    { 0x5D, 7 },
-    { 0xC, 6 },
-    { 0xB9, 8 },
-    { 0x2E3, 10 },
-    { 0x5C4, 11 },
-    { 0x4, 4 },
-    { 0x1715, 13 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0x8, 4 },
-    { 0x7, 4 },
-    { 0xC, 4 },
-    { 0x9, 4 },
-    { 0x1D, 5 },
-    { 0x16, 5 },
-    { 0x1C, 5 },
-    { 0x1A, 5 },
-    { 0xB, 5 },
-    { 0x5E, 7 },
-    { 0x170, 9 },
-    { 0x1714, 13 },
-    { 0xA, 4 },
-    { 0xA, 5 },
-    { 0x36, 6 },
-    { 0x5F, 7 },
-    { 0x1B, 7 },
-    { 0x1A, 7 },
-    { 0xB8B, 12 },
-    { 0x2, 4 },
-    { 0x7, 5 }
-  },
-  {  /* AC bias group 1, table 6 */
-    { 0xC, 4 },
-    { 0xB, 5 },
-    { 0x79, 7 },
-    { 0x22, 6 },
-    { 0xF0, 8 },
-    { 0x119, 9 },
-    { 0x230, 10 },
-    { 0x1D, 5 },
-    { 0x8C4, 12 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xA, 4 },
-    { 0x9, 4 },
-    { 0xB, 4 },
-    { 0x7, 4 },
-    { 0x1C, 5 },
-    { 0x3D, 6 },
-    { 0xD, 5 },
-    { 0x8, 5 },
-    { 0x15, 6 },
-    { 0x8D, 8 },
-    { 0x118B, 13 },
-    { 0x118A, 13 },
-    { 0xD, 4 },
-    { 0x10, 5 },
-    { 0x9, 5 },
-    { 0x14, 6 },
-    { 0x47, 7 },
-    { 0xF1, 8 },
-    { 0x463, 11 },
-    { 0x1F, 5 },
-    { 0xC, 5 }
-  },
-  {  /* AC bias group 1, table 7 */
-    { 0x0, 3 },
-    { 0x1A, 5 },
-    { 0x33, 6 },
-    { 0xC, 5 },
-    { 0x46, 7 },
-    { 0x1E3, 9 },
-    { 0x3C5, 10 },
-    { 0x17, 5 },
-    { 0x1E21, 13 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x9, 4 },
-    { 0xA, 4 },
-    { 0x7, 4 },
-    { 0x1B, 5 },
-    { 0x3D, 6 },
-    { 0x1B, 6 },
-    { 0x22, 6 },
-    { 0x79, 7 },
-    { 0xF0, 8 },
-    { 0x1E20, 13 },
-    { 0x1E23, 13 },
-    { 0x1E22, 13 },
-    { 0xE, 4 },
-    { 0x16, 5 },
-    { 0x18, 5 },
-    { 0x32, 6 },
-    { 0x1A, 6 },
-    { 0x47, 7 },
-    { 0x789, 11 },
-    { 0x1F, 5 },
-    { 0x10, 5 }
-  },
-  {  /* AC bias group 1, table 8 */
-    { 0x1D, 5 },
-    { 0x61, 7 },
-    { 0x4E, 8 },
-    { 0x9E, 9 },
-    { 0x27C, 11 },
-    { 0x9F5, 13 },
-    { 0x9F4, 13 },
-    { 0x3, 4 },
-    { 0x60, 7 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0xB, 4 },
-    { 0xA, 4 },
-    { 0x9, 4 },
-    { 0x5, 4 },
-    { 0xD, 5 },
-    { 0x31, 6 },
-    { 0x8, 5 },
-    { 0x38, 6 },
-    { 0x12, 6 },
-    { 0x26, 7 },
-    { 0x13F, 10 },
-    { 0x4FB, 12 },
-    { 0xD, 4 },
-    { 0x2, 4 },
-    { 0xC, 5 },
-    { 0x39, 6 },
-    { 0x1C, 6 },
-    { 0xF, 5 },
-    { 0x1D, 6 },
-    { 0x8, 4 },
-    { 0x19, 5 }
-  },
-  {  /* AC bias group 1, table 9 */
-    { 0x7, 4 },
-    { 0x19, 6 },
-    { 0xAB, 8 },
-    { 0xAA, 8 },
-    { 0x119, 10 },
-    { 0x461, 12 },
-    { 0x460, 12 },
-    { 0x1B, 5 },
-    { 0x47, 8 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xC, 4 },
-    { 0xB, 4 },
-    { 0x9, 4 },
-    { 0x5, 4 },
-    { 0xD, 5 },
-    { 0x35, 6 },
-    { 0x3D, 6 },
-    { 0x3C, 6 },
-    { 0x18, 6 },
-    { 0x22, 7 },
-    { 0x8D, 9 },
-    { 0x231, 11 },
-    { 0xE, 4 },
-    { 0x1F, 5 },
-    { 0x9, 5 },
-    { 0x2B, 6 },
-    { 0x10, 6 },
-    { 0x34, 6 },
-    { 0x54, 7 },
-    { 0x8, 4 },
-    { 0x14, 5 }
-  },
-  {  /* AC bias group 1, table 10 */
-    { 0xC, 4 },
-    { 0x5, 5 },
-    { 0x8, 6 },
-    { 0x5B, 7 },
-    { 0x4D, 9 },
-    { 0x131, 11 },
-    { 0x261, 12 },
-    { 0x1A, 5 },
-    { 0x12, 7 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0xA, 4 },
-    { 0x9, 4 },
-    { 0x6, 4 },
-    { 0x1B, 5 },
-    { 0x6, 5 },
-    { 0x1C, 6 },
-    { 0x2C, 6 },
-    { 0x15, 6 },
-    { 0x5A, 7 },
-    { 0x27, 8 },
-    { 0x99, 10 },
-    { 0x260, 12 },
-    { 0xE, 4 },
-    { 0x4, 4 },
-    { 0xF, 5 },
-    { 0x7, 5 },
-    { 0x1D, 6 },
-    { 0xB, 5 },
-    { 0x14, 6 },
-    { 0x8, 4 },
-    { 0x17, 5 }
-  },
-  {  /* AC bias group 1, table 11 */
-    { 0xF, 4 },
-    { 0x13, 5 },
-    { 0x75, 7 },
-    { 0x24, 6 },
-    { 0x95, 8 },
-    { 0x251, 10 },
-    { 0x4A0, 11 },
-    { 0x10, 5 },
-    { 0xC8, 8 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x1, 4 },
-    { 0x0, 4 },
-    { 0x1A, 5 },
-    { 0x11, 5 },
-    { 0x2C, 6 },
-    { 0x65, 7 },
-    { 0x74, 7 },
-    { 0x4B, 7 },
-    { 0xC9, 8 },
-    { 0x129, 9 },
-    { 0x943, 12 },
-    { 0x942, 12 },
-    { 0x3, 3 },
-    { 0xA, 4 },
-    { 0x1C, 5 },
-    { 0x18, 5 },
-    { 0x33, 6 },
-    { 0x17, 5 },
-    { 0x2D, 6 },
-    { 0x1B, 5 },
-    { 0x3B, 6 }
-  },
-  {  /* AC bias group 1, table 12 */
-    { 0x3, 3 },
-    { 0x1A, 5 },
-    { 0x2D, 6 },
-    { 0x38, 6 },
-    { 0x28, 7 },
-    { 0x395, 10 },
-    { 0xE51, 12 },
-    { 0x37, 6 },
-    { 0xE4, 8 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0x1F, 5 },
-    { 0x1E, 5 },
-    { 0x17, 5 },
-    { 0x3A, 6 },
-    { 0x73, 7 },
-    { 0x2A, 7 },
-    { 0x2B, 7 },
-    { 0x29, 7 },
-    { 0x1CB, 9 },
-    { 0x729, 11 },
-    { 0x1CA1, 13 },
-    { 0x1CA0, 13 },
-    { 0x4, 3 },
-    { 0xA, 4 },
-    { 0x4, 4 },
-    { 0x18, 5 },
-    { 0x36, 6 },
-    { 0xB, 5 },
-    { 0x2C, 6 },
-    { 0x19, 5 },
-    { 0x3B, 6 }
-  },
-  {  /* AC bias group 1, table 13 */
-    { 0x4, 3 },
-    { 0x4, 4 },
-    { 0x3F, 6 },
-    { 0x17, 5 },
-    { 0x75, 7 },
-    { 0x1F5, 9 },
-    { 0x7D1, 11 },
-    { 0x17, 6 },
-    { 0x1F6, 9 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0x1B, 5 },
-    { 0x1A, 5 },
-    { 0xA, 5 },
-    { 0x32, 6 },
-    { 0x74, 7 },
-    { 0xF8, 8 },
-    { 0xF9, 8 },
-    { 0x1F7, 9 },
-    { 0x3E9, 10 },
-    { 0xFA0, 12 },
-    { 0x1F43, 13 },
-    { 0x1F42, 13 },
-    { 0x3, 3 },
-    { 0xA, 4 },
-    { 0x1E, 5 },
-    { 0x1C, 5 },
-    { 0x3B, 6 },
-    { 0x18, 5 },
-    { 0x16, 6 },
-    { 0x16, 5 },
-    { 0x33, 6 }
-  },
-  {  /* AC bias group 1, table 14 */
-    { 0x4, 3 },
-    { 0x7, 4 },
-    { 0x18, 5 },
-    { 0x1E, 5 },
-    { 0x36, 6 },
-    { 0x31, 7 },
-    { 0x177, 9 },
-    { 0x77, 7 },
-    { 0x176, 9 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0x1A, 5 },
-    { 0x19, 5 },
-    { 0x3A, 6 },
-    { 0x19, 6 },
-    { 0x5C, 7 },
-    { 0xBA, 8 },
-    { 0x61, 8 },
-    { 0xC1, 9 },
-    { 0x180, 10 },
-    { 0x302, 11 },
-    { 0x607, 12 },
-    { 0x606, 12 },
-    { 0x2, 3 },
-    { 0xA, 4 },
-    { 0x1F, 5 },
-    { 0x1C, 5 },
-    { 0x37, 6 },
-    { 0x16, 5 },
-    { 0x76, 7 },
-    { 0xD, 5 },
-    { 0x2F, 6 }
-  },
-  {  /* AC bias group 1, table 15 */
-    { 0x0, 3 },
-    { 0xA, 4 },
-    { 0x1A, 5 },
-    { 0xC, 4 },
-    { 0x1D, 5 },
-    { 0x39, 6 },
-    { 0x78, 7 },
-    { 0x5E, 7 },
-    { 0x393, 11 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x16, 5 },
-    { 0xF, 5 },
-    { 0x2E, 6 },
-    { 0x5F, 7 },
-    { 0x73, 8 },
-    { 0xE5, 9 },
-    { 0x1C8, 10 },
-    { 0xE4A, 13 },
-    { 0x1C97, 14 },
-    { 0x1C96, 14 },
-    { 0xE49, 13 },
-    { 0xE48, 13 },
-    { 0x4, 3 },
-    { 0x6, 4 },
-    { 0x1F, 5 },
-    { 0x1B, 5 },
-    { 0x1D, 6 },
-    { 0x38, 6 },
-    { 0x38, 7 },
-    { 0x3D, 6 },
-    { 0x79, 7 }
-  }
-};
-
-static const uint16_t ac_bias_1[16][32][2] = {
-  {  /* AC bias group 2, table 0 */
-    { 0xB, 5 },
-    { 0x2B, 7 },
-    { 0x54, 8 },
-    { 0x1B7, 9 },
-    { 0x6D9, 11 },
-    { 0xDB1, 12 },
-    { 0xDB0, 12 },
-    { 0x2, 4 },
-    { 0xAB, 9 },
-    { 0x9, 4 },
-    { 0xA, 4 },
-    { 0x7, 4 },
-    { 0x8, 4 },
-    { 0xF, 4 },
-    { 0xC, 4 },
-    { 0x3, 4 },
-    { 0x1D, 5 },
-    { 0x4, 4 },
-    { 0xB, 4 },
-    { 0x6, 4 },
-    { 0x1A, 5 },
-    { 0x3, 6 },
-    { 0xAA, 9 },
-    { 0x1, 4 },
-    { 0x0, 5 },
-    { 0x14, 6 },
-    { 0x6C, 7 },
-    { 0xDA, 8 },
-    { 0x2, 6 },
-    { 0x36D, 10 },
-    { 0x1C, 5 },
-    { 0x37, 6 }
-  },
-  {  /* AC bias group 2, table 1 */
-    { 0x1D, 5 },
-    { 0x4, 6 },
-    { 0xB6, 8 },
-    { 0x6A, 8 },
-    { 0x5B9, 11 },
-    { 0x16E1, 13 },
-    { 0x16E0, 13 },
-    { 0x7, 4 },
-    { 0x16F, 9 },
-    { 0xC, 4 },
-    { 0xD, 4 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0xF, 4 },
-    { 0xA, 4 },
-    { 0x3, 4 },
-    { 0x17, 5 },
-    { 0x2, 4 },
-    { 0x4, 4 },
-    { 0x1C, 5 },
-    { 0x2C, 6 },
-    { 0x6B, 8 },
-    { 0xB71, 12 },
-    { 0x5, 4 },
-    { 0x3, 5 },
-    { 0x1B, 6 },
-    { 0x5A, 7 },
-    { 0x34, 7 },
-    { 0x5, 6 },
-    { 0x2DD, 10 },
-    { 0x0, 4 },
-    { 0xC, 5 }
-  },
-  {  /* AC bias group 2, table 2 */
-    { 0x3, 4 },
-    { 0x7F, 7 },
-    { 0xA1, 8 },
-    { 0xA0, 8 },
-    { 0x20C, 10 },
-    { 0x834, 12 },
-    { 0x106B, 13 },
-    { 0x7, 4 },
-    { 0x82, 8 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0x0, 3 },
-    { 0x9, 4 },
-    { 0x2, 4 },
-    { 0x11, 5 },
-    { 0x1E, 5 },
-    { 0x15, 5 },
-    { 0x3E, 6 },
-    { 0x40, 7 },
-    { 0x41B, 11 },
-    { 0x106A, 13 },
-    { 0x6, 4 },
-    { 0xA, 5 },
-    { 0x29, 6 },
-    { 0x7E, 7 },
-    { 0x51, 7 },
-    { 0x21, 6 },
-    { 0x107, 9 },
-    { 0x4, 4 },
-    { 0xB, 5 }
-  },
-  {  /* AC bias group 2, table 3 */
-    { 0x7, 4 },
-    { 0x1B, 6 },
-    { 0xF6, 8 },
-    { 0xE9, 8 },
-    { 0x3A1, 10 },
-    { 0x740, 11 },
-    { 0xE82, 12 },
-    { 0x1F, 5 },
-    { 0x1EF, 9 },
-    { 0x1, 3 },
-    { 0x2, 3 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0xD, 4 },
-    { 0x8, 4 },
-    { 0x1C, 5 },
-    { 0x3, 5 },
-    { 0x12, 5 },
-    { 0x2, 5 },
-    { 0x75, 7 },
-    { 0x1D1, 9 },
-    { 0x1D07, 13 },
-    { 0x1D06, 13 },
-    { 0xA, 4 },
-    { 0x13, 5 },
-    { 0x3B, 6 },
-    { 0x1A, 6 },
-    { 0x7A, 7 },
-    { 0x3C, 6 },
-    { 0x1EE, 9 },
-    { 0x0, 4 },
-    { 0xC, 5 }
-  },
-  {  /* AC bias group 2, table 4 */
-    { 0xD, 4 },
-    { 0x3D, 6 },
-    { 0x42, 7 },
-    { 0x37, 7 },
-    { 0xD9, 9 },
-    { 0x362, 11 },
-    { 0x6C6, 12 },
-    { 0x1F, 5 },
-    { 0x86, 8 },
-    { 0x1, 3 },
-    { 0x2, 3 },
-    { 0xC, 4 },
-    { 0xB, 4 },
-    { 0xA, 4 },
-    { 0x1, 4 },
-    { 0xF, 5 },
-    { 0x25, 6 },
-    { 0x3C, 6 },
-    { 0x1A, 6 },
-    { 0x87, 8 },
-    { 0x1B0, 10 },
-    { 0xD8F, 13 },
-    { 0xD8E, 13 },
-    { 0xE, 4 },
-    { 0x13, 5 },
-    { 0xC, 5 },
-    { 0x24, 6 },
-    { 0x20, 6 },
-    { 0x11, 5 },
-    { 0x6D, 8 },
-    { 0x0, 4 },
-    { 0xE, 5 }
-  },
-  {  /* AC bias group 2, table 5 */
-    { 0x0, 3 },
-    { 0x12, 5 },
-    { 0x76, 7 },
-    { 0x77, 7 },
-    { 0x14D, 9 },
-    { 0x533, 11 },
-    { 0x14C9, 13 },
-    { 0x13, 5 },
-    { 0xA5, 8 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0x8, 4 },
-    { 0x1A, 5 },
-    { 0x2B, 6 },
-    { 0x75, 7 },
-    { 0x74, 7 },
-    { 0xA7, 8 },
-    { 0x298, 10 },
-    { 0x14C8, 13 },
-    { 0x14CB, 13 },
-    { 0x14CA, 13 },
-    { 0xF, 4 },
-    { 0x1C, 5 },
-    { 0x7, 5 },
-    { 0x2A, 6 },
-    { 0x28, 6 },
-    { 0x1B, 5 },
-    { 0xA4, 8 },
-    { 0x2, 4 },
-    { 0x6, 5 }
-  },
-  {  /* AC bias group 2, table 6 */
-    { 0x2, 3 },
-    { 0x1A, 5 },
-    { 0x2B, 6 },
-    { 0x3A, 6 },
-    { 0xED, 8 },
-    { 0x283, 10 },
-    { 0xA0A, 12 },
-    { 0x4, 5 },
-    { 0xA1, 8 },
-    { 0x4, 3 },
-    { 0x3, 3 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0x1F, 5 },
-    { 0x6, 5 },
-    { 0x77, 7 },
-    { 0xA3, 8 },
-    { 0xA2, 8 },
-    { 0x140, 9 },
-    { 0x1417, 13 },
-    { 0x1416, 13 },
-    { 0xA09, 12 },
-    { 0xA08, 12 },
-    { 0x0, 3 },
-    { 0x1E, 5 },
-    { 0x7, 5 },
-    { 0x2A, 6 },
-    { 0x29, 6 },
-    { 0x1C, 5 },
-    { 0xEC, 8 },
-    { 0x1B, 5 },
-    { 0x5, 5 }
-  },
-  {  /* AC bias group 2, table 7 */
-    { 0x2, 3 },
-    { 0x2, 4 },
-    { 0x18, 5 },
-    { 0x1D, 5 },
-    { 0x35, 6 },
-    { 0xE4, 8 },
-    { 0x1CF, 11 },
-    { 0x1D, 7 },
-    { 0x72, 9 },
-    { 0x4, 3 },
-    { 0x5, 3 },
-    { 0x6, 4 },
-    { 0x7, 4 },
-    { 0x6, 5 },
-    { 0x73, 7 },
-    { 0x38, 8 },
-    { 0x1CE, 11 },
-    { 0x39B, 12 },
-    { 0x398, 12 },
-    { 0x733, 13 },
-    { 0x732, 13 },
-    { 0x735, 13 },
-    { 0x734, 13 },
-    { 0x0, 3 },
-    { 0x1F, 5 },
-    { 0x1B, 5 },
-    { 0x34, 6 },
-    { 0xF, 6 },
-    { 0x1E, 5 },
-    { 0xE5, 8 },
-    { 0x19, 5 },
-    { 0x38, 6 }
-  },
-  {  /* AC bias group 2, table 8 */
-    { 0x16, 5 },
-    { 0x50, 7 },
-    { 0x172, 9 },
-    { 0x2E7, 10 },
-    { 0x1732, 13 },
-    { 0x2E67, 14 },
-    { 0x2E66, 14 },
-    { 0x6, 4 },
-    { 0x51, 7 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x9, 4 },
-    { 0x1C, 5 },
-    { 0x9, 5 },
-    { 0x1C, 6 },
-    { 0x1D, 6 },
-    { 0x5D, 7 },
-    { 0xB8, 8 },
-    { 0x5CD, 11 },
-    { 0x1731, 13 },
-    { 0x1730, 13 },
-    { 0xF, 4 },
-    { 0x5, 4 },
-    { 0xF, 5 },
-    { 0x8, 5 },
-    { 0x29, 6 },
-    { 0x1D, 5 },
-    { 0x2F, 6 },
-    { 0x8, 4 },
-    { 0x15, 5 }
-  },
-  {  /* AC bias group 2, table 9 */
-    { 0x9, 4 },
-    { 0x21, 6 },
-    { 0x40, 7 },
-    { 0xAD, 8 },
-    { 0x2B0, 10 },
-    { 0x1589, 13 },
-    { 0x1588, 13 },
-    { 0x1C, 5 },
-    { 0x5F, 7 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x6, 4 },
-    { 0x11, 5 },
-    { 0x2A, 6 },
-    { 0x57, 7 },
-    { 0x5E, 7 },
-    { 0x41, 7 },
-    { 0x159, 9 },
-    { 0x563, 11 },
-    { 0x158B, 13 },
-    { 0x158A, 13 },
-    { 0x1, 3 },
-    { 0x5, 4 },
-    { 0x14, 5 },
-    { 0x3B, 6 },
-    { 0x2E, 6 },
-    { 0x4, 4 },
-    { 0x3A, 6 },
-    { 0x7, 4 },
-    { 0x16, 5 }
-  },
-  {  /* AC bias group 2, table 10 */
-    { 0xE, 4 },
-    { 0x7, 5 },
-    { 0x46, 7 },
-    { 0x45, 7 },
-    { 0x64, 9 },
-    { 0x32A, 12 },
-    { 0x657, 13 },
-    { 0x18, 5 },
-    { 0xD, 6 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0xA, 4 },
-    { 0xB, 4 },
-    { 0x1A, 5 },
-    { 0x36, 6 },
-    { 0x47, 7 },
-    { 0x44, 7 },
-    { 0x18, 7 },
-    { 0x33, 8 },
-    { 0xCB, 10 },
-    { 0x656, 13 },
-    { 0x329, 12 },
-    { 0x328, 12 },
-    { 0x2, 3 },
-    { 0x6, 4 },
-    { 0x19, 5 },
-    { 0xE, 5 },
-    { 0x37, 6 },
-    { 0x9, 4 },
-    { 0xF, 5 },
-    { 0x2, 4 },
-    { 0x10, 5 }
-  },
-  {  /* AC bias group 2, table 11 */
-    { 0x3, 3 },
-    { 0x18, 5 },
-    { 0x23, 6 },
-    { 0x77, 7 },
-    { 0x194, 9 },
-    { 0x1956, 13 },
-    { 0x32AF, 14 },
-    { 0x3A, 6 },
-    { 0x76, 7 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x1F, 5 },
-    { 0x1E, 5 },
-    { 0x14, 5 },
-    { 0x22, 6 },
-    { 0x64, 7 },
-    { 0x197, 9 },
-    { 0x196, 9 },
-    { 0x32B, 10 },
-    { 0x654, 11 },
-    { 0x32AE, 14 },
-    { 0x1955, 13 },
-    { 0x1954, 13 },
-    { 0x0, 3 },
-    { 0x9, 4 },
-    { 0x1C, 5 },
-    { 0x15, 5 },
-    { 0x10, 5 },
-    { 0xD, 4 },
-    { 0x17, 5 },
-    { 0x16, 5 },
-    { 0x33, 6 }
-  },
-  {  /* AC bias group 2, table 12 */
-    { 0x5, 3 },
-    { 0x6, 4 },
-    { 0x3E, 6 },
-    { 0x10, 5 },
-    { 0x48, 7 },
-    { 0x93F, 12 },
-    { 0x24FA, 14 },
-    { 0x32, 6 },
-    { 0x67, 7 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x1B, 5 },
-    { 0x1E, 5 },
-    { 0x34, 6 },
-    { 0x66, 7 },
-    { 0x92, 8 },
-    { 0x126, 9 },
-    { 0x24E, 10 },
-    { 0x49E, 11 },
-    { 0x49F7, 15 },
-    { 0x49F6, 15 },
-    { 0x24F9, 14 },
-    { 0x24F8, 14 },
-    { 0x0, 3 },
-    { 0x7, 4 },
-    { 0x18, 5 },
-    { 0x11, 5 },
-    { 0x3F, 6 },
-    { 0xE, 4 },
-    { 0x13, 5 },
-    { 0x35, 6 },
-    { 0x25, 6 }
-  },
-  {  /* AC bias group 2, table 13 */
-    { 0x5, 3 },
-    { 0x8, 4 },
-    { 0x12, 5 },
-    { 0x1C, 5 },
-    { 0x1C, 6 },
-    { 0xEA, 9 },
-    { 0x1D75, 14 },
-    { 0x1E, 6 },
-    { 0x66, 7 },
-    { 0x1, 3 },
-    { 0x2, 3 },
-    { 0x1B, 5 },
-    { 0x1A, 5 },
-    { 0x1F, 6 },
-    { 0x3B, 7 },
-    { 0x74, 8 },
-    { 0x1D6, 10 },
-    { 0x3AF, 11 },
-    { 0x1D74, 14 },
-    { 0x1D77, 14 },
-    { 0x1D76, 14 },
-    { 0xEB9, 13 },
-    { 0xEB8, 13 },
-    { 0xF, 4 },
-    { 0x6, 4 },
-    { 0x13, 5 },
-    { 0x3B, 6 },
-    { 0x3A, 6 },
-    { 0x0, 3 },
-    { 0x18, 5 },
-    { 0x32, 6 },
-    { 0x67, 7 }
-  },
-  {  /* AC bias group 2, table 14 */
-    { 0x4, 3 },
-    { 0xA, 4 },
-    { 0x1B, 5 },
-    { 0xC, 4 },
-    { 0xD, 5 },
-    { 0xE6, 8 },
-    { 0x684, 11 },
-    { 0x72, 7 },
-    { 0xE7, 8 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x17, 5 },
-    { 0x16, 5 },
-    { 0x18, 6 },
-    { 0xD1, 8 },
-    { 0x1A0, 9 },
-    { 0x686, 11 },
-    { 0xD0F, 12 },
-    { 0xD0A, 12 },
-    { 0x1A17, 13 },
-    { 0x1A16, 13 },
-    { 0x1A1D, 13 },
-    { 0x1A1C, 13 },
-    { 0xF, 4 },
-    { 0x1D, 5 },
-    { 0xE, 5 },
-    { 0x35, 6 },
-    { 0x38, 6 },
-    { 0x0, 3 },
-    { 0xF, 5 },
-    { 0x19, 6 },
-    { 0x69, 7 }
-  },
-  {  /* AC bias group 2, table 15 */
-    { 0x3, 3 },
-    { 0xC, 4 },
-    { 0x1B, 5 },
-    { 0x0, 3 },
-    { 0x3, 4 },
-    { 0x2E, 6 },
-    { 0x51, 9 },
-    { 0xBC, 8 },
-    { 0x53, 9 },
-    { 0x4, 3 },
-    { 0x2, 3 },
-    { 0x16, 5 },
-    { 0x15, 5 },
-    { 0x15, 7 },
-    { 0x50, 9 },
-    { 0xA4, 10 },
-    { 0x294, 12 },
-    { 0x52B, 13 },
-    { 0x52A, 13 },
-    { 0x52D, 13 },
-    { 0x52C, 13 },
-    { 0x52F, 13 },
-    { 0x52E, 13 },
-    { 0xE, 4 },
-    { 0x1A, 5 },
-    { 0x4, 5 },
-    { 0x28, 6 },
-    { 0x29, 6 },
-    { 0xF, 4 },
-    { 0xB, 6 },
-    { 0x5F, 7 },
-    { 0xBD, 8 }
-  }
-};
-
-static const uint16_t ac_bias_2[16][32][2] = {
-  {  /* AC bias group 3, table 0 */
-    { 0x3, 4 },
-    { 0x9, 6 },
-    { 0xD0, 8 },
-    { 0x1A3, 9 },
-    { 0x344, 10 },
-    { 0xD14, 12 },
-    { 0x1A2B, 13 },
-    { 0x4, 4 },
-    { 0x15, 7 },
-    { 0x0, 3 },
-    { 0xF, 4 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0xE, 4 },
-    { 0x9, 4 },
-    { 0x1B, 5 },
-    { 0xA, 5 },
-    { 0x14, 5 },
-    { 0xD, 5 },
-    { 0x2A, 6 },
-    { 0x14, 7 },
-    { 0x68B, 11 },
-    { 0x1A2A, 13 },
-    { 0x8, 4 },
-    { 0xB, 5 },
-    { 0x2B, 6 },
-    { 0xB, 6 },
-    { 0x69, 7 },
-    { 0x35, 6 },
-    { 0x8, 6 },
-    { 0x7, 4 },
-    { 0xC, 5 }
-  },
-  {  /* AC bias group 3, table 1 */
-    { 0xA, 4 },
-    { 0x3C, 6 },
-    { 0x32, 7 },
-    { 0x30, 7 },
-    { 0xC5, 9 },
-    { 0x621, 12 },
-    { 0x620, 12 },
-    { 0x1F, 5 },
-    { 0x33, 7 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x4, 4 },
-    { 0xD, 5 },
-    { 0x26, 6 },
-    { 0x27, 6 },
-    { 0x14, 6 },
-    { 0x63, 8 },
-    { 0x189, 10 },
-    { 0x623, 12 },
-    { 0x622, 12 },
-    { 0xB, 4 },
-    { 0x12, 5 },
-    { 0x3D, 6 },
-    { 0x22, 6 },
-    { 0x15, 6 },
-    { 0xB, 5 },
-    { 0x23, 6 },
-    { 0x7, 4 },
-    { 0x10, 5 }
-  },
-  {  /* AC bias group 3, table 2 */
-    { 0xF, 4 },
-    { 0xC, 5 },
-    { 0x43, 7 },
-    { 0x10, 6 },
-    { 0x44, 8 },
-    { 0x114, 10 },
-    { 0x455, 12 },
-    { 0x18, 5 },
-    { 0x23, 7 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0x9, 4 },
-    { 0x19, 5 },
-    { 0x9, 5 },
-    { 0x17, 6 },
-    { 0x16, 6 },
-    { 0x42, 7 },
-    { 0x8B, 9 },
-    { 0x454, 12 },
-    { 0x457, 12 },
-    { 0x456, 12 },
-    { 0xB, 4 },
-    { 0x15, 5 },
-    { 0xA, 5 },
-    { 0x29, 6 },
-    { 0x20, 6 },
-    { 0xD, 5 },
-    { 0x28, 6 },
-    { 0x7, 4 },
-    { 0x11, 5 }
-  },
-  {  /* AC bias group 3, table 3 */
-    { 0x1, 3 },
-    { 0x1A, 5 },
-    { 0x29, 6 },
-    { 0x2A, 6 },
-    { 0xA0, 8 },
-    { 0x285, 10 },
-    { 0x1425, 13 },
-    { 0x2, 5 },
-    { 0x0, 7 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0xC, 4 },
-    { 0xB, 4 },
-    { 0x8, 4 },
-    { 0x12, 5 },
-    { 0x1, 6 },
-    { 0x51, 7 },
-    { 0x1, 7 },
-    { 0x143, 9 },
-    { 0x508, 11 },
-    { 0x1424, 13 },
-    { 0x1427, 13 },
-    { 0x1426, 13 },
-    { 0xF, 4 },
-    { 0x1C, 5 },
-    { 0x3, 5 },
-    { 0x37, 6 },
-    { 0x2B, 6 },
-    { 0x13, 5 },
-    { 0x36, 6 },
-    { 0x1D, 5 },
-    { 0x1, 5 }
-  },
-  {  /* AC bias group 3, table 4 */
-    { 0x4, 3 },
-    { 0x1F, 5 },
-    { 0x3D, 6 },
-    { 0x6, 5 },
-    { 0x16, 7 },
-    { 0x53, 9 },
-    { 0x14A, 11 },
-    { 0x34, 6 },
-    { 0x2A, 8 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0xB, 4 },
-    { 0xC, 4 },
-    { 0x1C, 5 },
-    { 0x37, 6 },
-    { 0x17, 7 },
-    { 0x2B, 8 },
-    { 0x28, 8 },
-    { 0xA4, 10 },
-    { 0x52D, 13 },
-    { 0x52C, 13 },
-    { 0x52F, 13 },
-    { 0x52E, 13 },
-    { 0x0, 3 },
-    { 0x1D, 5 },
-    { 0x7, 5 },
-    { 0x4, 5 },
-    { 0x35, 6 },
-    { 0x14, 5 },
-    { 0x36, 6 },
-    { 0x15, 5 },
-    { 0x3C, 6 }
-  },
-  {  /* AC bias group 3, table 5 */
-    { 0x4, 3 },
-    { 0xA, 4 },
-    { 0x7, 5 },
-    { 0x1D, 5 },
-    { 0x9, 6 },
-    { 0x1F3, 9 },
-    { 0x7C7, 11 },
-    { 0x8, 6 },
-    { 0x1F0, 9 },
-    { 0x3, 3 },
-    { 0x2, 3 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x17, 5 },
-    { 0x7D, 7 },
-    { 0x1F2, 9 },
-    { 0x7C6, 11 },
-    { 0x7C5, 11 },
-    { 0x1F12, 13 },
-    { 0x3E27, 14 },
-    { 0x3E26, 14 },
-    { 0x1F11, 13 },
-    { 0x1F10, 13 },
-    { 0x0, 3 },
-    { 0x1E, 5 },
-    { 0x6, 5 },
-    { 0x39, 6 },
-    { 0x38, 6 },
-    { 0x3F, 6 },
-    { 0x2C, 6 },
-    { 0x5, 5 },
-    { 0x2D, 6 }
-  },
-  {  /* AC bias group 3, table 6 */
-    { 0x2, 3 },
-    { 0x7, 4 },
-    { 0x18, 5 },
-    { 0x3, 4 },
-    { 0x5, 5 },
-    { 0x35, 7 },
-    { 0x4F, 9 },
-    { 0x12, 7 },
-    { 0x4E5, 13 },
-    { 0x5, 3 },
-    { 0x4, 3 },
-    { 0xD, 4 },
-    { 0xE, 4 },
-    { 0x33, 6 },
-    { 0x26, 8 },
-    { 0x9D, 10 },
-    { 0x4E4, 13 },
-    { 0x4E7, 13 },
-    { 0x4E6, 13 },
-    { 0x4E1, 13 },
-    { 0x4E0, 13 },
-    { 0x4E3, 13 },
-    { 0x4E2, 13 },
-    { 0x0, 3 },
-    { 0x1F, 5 },
-    { 0xC, 5 },
-    { 0x3D, 6 },
-    { 0x3C, 6 },
-    { 0x32, 6 },
-    { 0x34, 7 },
-    { 0x1B, 6 },
-    { 0x8, 6 }
-  },
-  {  /* AC bias group 3, table 7 */
-    { 0x0, 3 },
-    { 0x4, 4 },
-    { 0x1C, 5 },
-    { 0xF, 4 },
-    { 0x2, 4 },
-    { 0x7, 5 },
-    { 0x75, 7 },
-    { 0xE8, 8 },
-    { 0x1D2A, 13 },
-    { 0x5, 3 },
-    { 0x4, 3 },
-    { 0xD, 4 },
-    { 0xC, 4 },
-    { 0x77, 7 },
-    { 0xE96, 12 },
-    { 0x3A57, 14 },
-    { 0x3A56, 14 },
-    { 0x3A5D, 14 },
-    { 0x3A5C, 14 },
-    { 0x3A5F, 14 },
-    { 0x3A5E, 14 },
-    { 0x1D29, 13 },
-    { 0x1D28, 13 },
-    { 0x3, 3 },
-    { 0x6, 5 },
-    { 0xA, 5 },
-    { 0x2C, 7 },
-    { 0x17, 6 },
-    { 0x76, 7 },
-    { 0x1D3, 9 },
-    { 0x3A4, 10 },
-    { 0x2D, 7 }
-  },
-  {  /* AC bias group 3, table 8 */
-    { 0xA, 4 },
-    { 0x24, 6 },
-    { 0xBF, 8 },
-    { 0x85, 8 },
-    { 0x211, 10 },
-    { 0x842, 12 },
-    { 0x1087, 13 },
-    { 0x18, 5 },
-    { 0x20, 6 },
-    { 0x1, 3 },
-    { 0x2, 3 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0x7, 4 },
-    { 0x13, 5 },
-    { 0x25, 6 },
-    { 0x5E, 7 },
-    { 0x43, 7 },
-    { 0xBE, 8 },
-    { 0x109, 9 },
-    { 0x1086, 13 },
-    { 0x841, 12 },
-    { 0x840, 12 },
-    { 0xF, 4 },
-    { 0x1, 4 },
-    { 0x11, 5 },
-    { 0x0, 5 },
-    { 0x2E, 6 },
-    { 0x19, 5 },
-    { 0x1, 5 },
-    { 0x6, 4 },
-    { 0x16, 5 }
-  },
-  {  /* AC bias group 3, table 9 */
-    { 0x2, 3 },
-    { 0xF, 5 },
-    { 0x6F, 7 },
-    { 0x61, 7 },
-    { 0x374, 10 },
-    { 0x1BA8, 13 },
-    { 0x3753, 14 },
-    { 0x12, 5 },
-    { 0x36, 6 },
-    { 0x0, 3 },
-    { 0x1, 3 },
-    { 0xA, 4 },
-    { 0xB, 4 },
-    { 0x1A, 5 },
-    { 0x31, 6 },
-    { 0x60, 7 },
-    { 0xDC, 8 },
-    { 0x1BB, 9 },
-    { 0x6EB, 11 },
-    { 0x1BAB, 13 },
-    { 0x3752, 14 },
-    { 0x3755, 14 },
-    { 0x3754, 14 },
-    { 0xE, 4 },
-    { 0x6, 4 },
-    { 0x13, 5 },
-    { 0xE, 5 },
-    { 0x3E, 6 },
-    { 0x8, 4 },
-    { 0x1E, 5 },
-    { 0x19, 5 },
-    { 0x3F, 6 }
-  },
-  {  /* AC bias group 3, table 10 */
-    { 0x3, 3 },
-    { 0x1C, 5 },
-    { 0x25, 6 },
-    { 0x24, 6 },
-    { 0x1DA, 9 },
-    { 0x1DBD, 13 },
-    { 0x3B7C, 14 },
-    { 0x3C, 6 },
-    { 0x3D, 6 },
-    { 0x0, 3 },
-    { 0x1, 3 },
-    { 0xB, 4 },
-    { 0xA, 4 },
-    { 0xB, 5 },
-    { 0x77, 7 },
-    { 0xEC, 8 },
-    { 0x3B6, 10 },
-    { 0x76E, 11 },
-    { 0x1DBF, 13 },
-    { 0x76FB, 15 },
-    { 0x76FA, 15 },
-    { 0x3B79, 14 },
-    { 0x3B78, 14 },
-    { 0xD, 4 },
-    { 0x1F, 5 },
-    { 0x13, 5 },
-    { 0xA, 5 },
-    { 0x8, 5 },
-    { 0xC, 4 },
-    { 0x8, 4 },
-    { 0x9, 5 },
-    { 0x3A, 6 }
-  },
-  {  /* AC bias group 3, table 11 */
-    { 0x5, 3 },
-    { 0x3, 4 },
-    { 0x4, 5 },
-    { 0x10, 5 },
-    { 0x8F, 8 },
-    { 0x475, 11 },
-    { 0x11D1, 13 },
-    { 0x79, 7 },
-    { 0x27, 6 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0x1, 4 },
-    { 0x0, 4 },
-    { 0x26, 6 },
-    { 0x46, 7 },
-    { 0x11C, 9 },
-    { 0x477, 11 },
-    { 0x8ED, 12 },
-    { 0x11D0, 13 },
-    { 0x11D3, 13 },
-    { 0x11D2, 13 },
-    { 0x11D9, 13 },
-    { 0x11D8, 13 },
-    { 0xD, 4 },
-    { 0x1F, 5 },
-    { 0x12, 5 },
-    { 0x5, 5 },
-    { 0x3D, 6 },
-    { 0xC, 4 },
-    { 0xE, 4 },
-    { 0x22, 6 },
-    { 0x78, 7 }
-  },
-  {  /* AC bias group 3, table 12 */
-    { 0x5, 3 },
-    { 0xC, 4 },
-    { 0x1B, 5 },
-    { 0x0, 4 },
-    { 0x6, 6 },
-    { 0x3E2, 10 },
-    { 0x3E3D, 14 },
-    { 0xF, 7 },
-    { 0x34, 6 },
-    { 0x3, 3 },
-    { 0x2, 3 },
-    { 0x1E, 5 },
-    { 0x1D, 5 },
-    { 0x7D, 7 },
-    { 0x1F0, 9 },
-    { 0x7C6, 11 },
-    { 0x3E3C, 14 },
-    { 0x3E3F, 14 },
-    { 0x3E3E, 14 },
-    { 0x3E39, 14 },
-    { 0x3E38, 14 },
-    { 0x3E3B, 14 },
-    { 0x3E3A, 14 },
-    { 0x8, 4 },
-    { 0x1C, 5 },
-    { 0x2, 5 },
-    { 0x3F, 6 },
-    { 0x35, 6 },
-    { 0x9, 4 },
-    { 0x1, 3 },
-    { 0xE, 7 },
-    { 0xF9, 8 }
-  },
-  {  /* AC bias group 3, table 13 */
-    { 0x4, 3 },
-    { 0xB, 4 },
-    { 0x1, 4 },
-    { 0xA, 4 },
-    { 0x1E, 6 },
-    { 0xE0, 9 },
-    { 0xE1E, 13 },
-    { 0x71, 8 },
-    { 0x39, 7 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0xD, 5 },
-    { 0xC, 5 },
-    { 0x20, 7 },
-    { 0x1C2, 10 },
-    { 0x1C3F, 14 },
-    { 0x1C3E, 14 },
-    { 0xE19, 13 },
-    { 0xE18, 13 },
-    { 0xE1B, 13 },
-    { 0xE1A, 13 },
-    { 0xE1D, 13 },
-    { 0xE1C, 13 },
-    { 0x0, 4 },
-    { 0x9, 5 },
-    { 0x1D, 6 },
-    { 0x1F, 6 },
-    { 0x11, 6 },
-    { 0x5, 4 },
-    { 0x1, 3 },
-    { 0x43, 8 },
-    { 0x42, 8 }
-  },
-  {  /* AC bias group 3, table 14 */
-    { 0x4, 3 },
-    { 0xD, 4 },
-    { 0x7, 4 },
-    { 0x2, 3 },
-    { 0x14, 5 },
-    { 0x16C, 9 },
-    { 0x16D1, 13 },
-    { 0x2DF, 10 },
-    { 0x16E, 9 },
-    { 0x0, 2 },
-    { 0x7, 3 },
-    { 0x2C, 6 },
-    { 0x2B, 6 },
-    { 0x2DE, 10 },
-    { 0x16D0, 13 },
-    { 0x16D3, 13 },
-    { 0x16D2, 13 },
-    { 0x2DB5, 14 },
-    { 0x2DB4, 14 },
-    { 0x2DB7, 14 },
-    { 0x2DB6, 14 },
-    { 0x16D9, 13 },
-    { 0x16D8, 13 },
-    { 0xC, 5 },
-    { 0x2A, 6 },
-    { 0x5A, 7 },
-    { 0x1B, 6 },
-    { 0x1A, 6 },
-    { 0x17, 5 },
-    { 0xC, 4 },
-    { 0x5B7, 11 },
-    { 0x5B5, 11 }
-  },
-  {  /* AC bias group 3, table 15 */
-    { 0x2, 2 },
-    { 0xF, 4 },
-    { 0x1C, 5 },
-    { 0xC, 4 },
-    { 0x3B, 6 },
-    { 0x1AC, 9 },
-    { 0x1AD8, 13 },
-    { 0x35B3, 14 },
-    { 0x35B2, 14 },
-    { 0x1, 2 },
-    { 0x0, 2 },
-    { 0x69, 7 },
-    { 0x68, 7 },
-    { 0x35BD, 14 },
-    { 0x35BC, 14 },
-    { 0x35BF, 14 },
-    { 0x35BE, 14 },
-    { 0x35B9, 14 },
-    { 0x35B8, 14 },
-    { 0x35BB, 14 },
-    { 0x35BA, 14 },
-    { 0x35B5, 14 },
-    { 0x35B4, 14 },
-    { 0x1A9, 9 },
-    { 0x1A8, 9 },
-    { 0x35A, 10 },
-    { 0xD7, 8 },
-    { 0xD5, 8 },
-    { 0x3A, 6 },
-    { 0x1B, 5 },
-    { 0x35B7, 14 },
-    { 0x35B6, 14 }
-  }
-};
-
-static const uint16_t ac_bias_3[16][32][2] = {
-  {  /* AC bias group 4, table 0 */
-    { 0x0, 3 },
-    { 0x10, 5 },
-    { 0x72, 7 },
-    { 0x71, 7 },
-    { 0x154, 9 },
-    { 0xAAB, 12 },
-    { 0xAA8, 12 },
-    { 0x14, 5 },
-    { 0x70, 7 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0xC, 4 },
-    { 0xB, 4 },
-    { 0x3, 4 },
-    { 0x11, 5 },
-    { 0x73, 7 },
-    { 0x54, 7 },
-    { 0xAB, 8 },
-    { 0x2AB, 10 },
-    { 0x1553, 13 },
-    { 0x1552, 13 },
-    { 0x1555, 13 },
-    { 0x1554, 13 },
-    { 0xD, 4 },
-    { 0x1E, 5 },
-    { 0x12, 5 },
-    { 0x3E, 6 },
-    { 0x2B, 6 },
-    { 0x2, 4 },
-    { 0x3F, 6 },
-    { 0x1D, 5 },
-    { 0x13, 5 }
-  },
-  {  /* AC bias group 4, table 1 */
-    { 0x3, 3 },
-    { 0x1F, 5 },
-    { 0x29, 6 },
-    { 0x3D, 6 },
-    { 0xC, 7 },
-    { 0x69, 10 },
-    { 0x345, 13 },
-    { 0x2, 5 },
-    { 0x28, 6 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0xE, 4 },
-    { 0xC, 4 },
-    { 0x15, 5 },
-    { 0x7, 6 },
-    { 0x1B, 8 },
-    { 0x6B, 10 },
-    { 0x6A, 10 },
-    { 0x344, 13 },
-    { 0x347, 13 },
-    { 0x346, 13 },
-    { 0x1A1, 12 },
-    { 0x1A0, 12 },
-    { 0xB, 4 },
-    { 0x1A, 5 },
-    { 0x12, 5 },
-    { 0x0, 5 },
-    { 0x3C, 6 },
-    { 0x8, 4 },
-    { 0x1B, 5 },
-    { 0x13, 5 },
-    { 0x1, 5 }
-  },
-  {  /* AC bias group 4, table 2 */
-    { 0x4, 3 },
-    { 0x4, 4 },
-    { 0x3F, 6 },
-    { 0x14, 5 },
-    { 0x56, 7 },
-    { 0x15C, 9 },
-    { 0x15D5, 13 },
-    { 0x3C, 6 },
-    { 0x2A, 6 },
-    { 0x0, 3 },
-    { 0x1, 3 },
-    { 0xE, 4 },
-    { 0xD, 4 },
-    { 0xC, 5 },
-    { 0xAF, 8 },
-    { 0x2BB, 10 },
-    { 0x15D4, 13 },
-    { 0x15D7, 13 },
-    { 0x15D6, 13 },
-    { 0x15D1, 13 },
-    { 0x15D0, 13 },
-    { 0x15D3, 13 },
-    { 0x15D2, 13 },
-    { 0xB, 4 },
-    { 0x19, 5 },
-    { 0xD, 5 },
-    { 0x3E, 6 },
-    { 0x31, 6 },
-    { 0x7, 4 },
-    { 0x5, 4 },
-    { 0x3D, 6 },
-    { 0x30, 6 }
-  },
-  {  /* AC bias group 4, table 3 */
-    { 0x5, 3 },
-    { 0x8, 4 },
-    { 0x1A, 5 },
-    { 0x0, 4 },
-    { 0x36, 6 },
-    { 0x11, 8 },
-    { 0x106, 12 },
-    { 0xA, 7 },
-    { 0x6E, 7 },
-    { 0x2, 3 },
-    { 0x3, 3 },
-    { 0x3, 4 },
-    { 0x2, 4 },
-    { 0x6F, 7 },
-    { 0x21, 9 },
-    { 0x20F, 13 },
-    { 0x20E, 13 },
-    { 0x101, 12 },
-    { 0x100, 12 },
-    { 0x103, 12 },
-    { 0x102, 12 },
-    { 0x105, 12 },
-    { 0x104, 12 },
-    { 0xC, 4 },
-    { 0x1E, 5 },
-    { 0x3, 5 },
-    { 0x3E, 6 },
-    { 0x3F, 6 },
-    { 0x9, 4 },
-    { 0xE, 4 },
-    { 0xB, 7 },
-    { 0x9, 7 }
-  },
-  {  /* AC bias group 4, table 4 */
-    { 0x2, 3 },
-    { 0xE, 4 },
-    { 0x1E, 5 },
-    { 0xC, 4 },
-    { 0x1F, 5 },
-    { 0x6E, 7 },
-    { 0xAD, 10 },
-    { 0xAF, 10 },
-    { 0x14, 7 },
-    { 0x4, 3 },
-    { 0x3, 3 },
-    { 0x1A, 5 },
-    { 0x17, 5 },
-    { 0x2A, 8 },
-    { 0x576, 13 },
-    { 0xAEF, 14 },
-    { 0xAEE, 14 },
-    { 0x571, 13 },
-    { 0x570, 13 },
-    { 0x573, 13 },
-    { 0x572, 13 },
-    { 0x575, 13 },
-    { 0x574, 13 },
-    { 0x3, 4 },
-    { 0x16, 5 },
-    { 0x4, 5 },
-    { 0x36, 6 },
-    { 0xB, 6 },
-    { 0xA, 4 },
-    { 0x0, 3 },
-    { 0x6F, 7 },
-    { 0xAC, 10 }
-  },
-  {  /* AC bias group 4, table 5 */
-    { 0x4, 3 },
-    { 0x5, 4 },
-    { 0x3, 3 },
-    { 0x1, 3 },
-    { 0x4, 4 },
-    { 0x2F, 6 },
-    { 0x526, 11 },
-    { 0x1495, 13 },
-    { 0xA6, 8 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x2D, 6 },
-    { 0x2C, 6 },
-    { 0x1494, 13 },
-    { 0x1497, 13 },
-    { 0x1496, 13 },
-    { 0x1491, 13 },
-    { 0x1490, 13 },
-    { 0x1493, 13 },
-    { 0x1492, 13 },
-    { 0x293D, 14 },
-    { 0x293C, 14 },
-    { 0x293F, 14 },
-    { 0x0, 3 },
-    { 0x28, 6 },
-    { 0xA5, 8 },
-    { 0x148, 9 },
-    { 0xA7, 8 },
-    { 0x2E, 6 },
-    { 0x15, 5 },
-    { 0xA4E, 12 },
-    { 0x293E, 14 }
-  },
-  {  /* AC bias group 4, table 6 */
-    { 0x4, 3 },
-    { 0x5, 4 },
-    { 0x3, 3 },
-    { 0x1, 3 },
-    { 0x4, 4 },
-    { 0x2F, 6 },
-    { 0x526, 11 },
-    { 0x1495, 13 },
-    { 0xA6, 8 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x2D, 6 },
-    { 0x2C, 6 },
-    { 0x1494, 13 },
-    { 0x1497, 13 },
-    { 0x1496, 13 },
-    { 0x1491, 13 },
-    { 0x1490, 13 },
-    { 0x1493, 13 },
-    { 0x1492, 13 },
-    { 0x293D, 14 },
-    { 0x293C, 14 },
-    { 0x293F, 14 },
-    { 0x0, 3 },
-    { 0x28, 6 },
-    { 0xA5, 8 },
-    { 0x148, 9 },
-    { 0xA7, 8 },
-    { 0x2E, 6 },
-    { 0x15, 5 },
-    { 0xA4E, 12 },
-    { 0x293E, 14 }
-  },
-  {  /* AC bias group 4, table 7 */
-    { 0x4, 3 },
-    { 0x5, 4 },
-    { 0x3, 3 },
-    { 0x1, 3 },
-    { 0x4, 4 },
-    { 0x2F, 6 },
-    { 0x526, 11 },
-    { 0x1495, 13 },
-    { 0xA6, 8 },
-    { 0x7, 3 },
-    { 0x6, 3 },
-    { 0x2D, 6 },
-    { 0x2C, 6 },
-    { 0x1494, 13 },
-    { 0x1497, 13 },
-    { 0x1496, 13 },
-    { 0x1491, 13 },
-    { 0x1490, 13 },
-    { 0x1493, 13 },
-    { 0x1492, 13 },
-    { 0x293D, 14 },
-    { 0x293C, 14 },
-    { 0x293F, 14 },
-    { 0x0, 3 },
-    { 0x28, 6 },
-    { 0xA5, 8 },
-    { 0x148, 9 },
-    { 0xA7, 8 },
-    { 0x2E, 6 },
-    { 0x15, 5 },
-    { 0xA4E, 12 },
-    { 0x293E, 14 }
-  },
-  {  /* AC bias group 4, table 8 */
-    { 0x3, 3 },
-    { 0x11, 5 },
-    { 0x20, 6 },
-    { 0x74, 7 },
-    { 0x10D, 9 },
-    { 0x863, 12 },
-    { 0x860, 12 },
-    { 0xA, 5 },
-    { 0x75, 7 },
-    { 0x1, 3 },
-    { 0x0, 3 },
-    { 0xB, 4 },
-    { 0xA, 4 },
-    { 0x18, 5 },
-    { 0x38, 6 },
-    { 0x42, 7 },
-    { 0x10F, 9 },
-    { 0x10E, 9 },
-    { 0x219, 10 },
-    { 0x10C3, 13 },
-    { 0x10C2, 13 },
-    { 0x10C5, 13 },
-    { 0x10C4, 13 },
-    { 0xF, 4 },
-    { 0x4, 4 },
-    { 0x19, 5 },
-    { 0xB, 5 },
-    { 0x39, 6 },
-    { 0x9, 4 },
-    { 0x1B, 5 },
-    { 0x1A, 5 },
-    { 0x3B, 6 }
-  },
-  {  /* AC bias group 4, table 9 */
-    { 0x5, 3 },
-    { 0x1, 4 },
-    { 0x3E, 6 },
-    { 0x1, 5 },
-    { 0xE2, 8 },
-    { 0x1C6F, 13 },
-    { 0x38D9, 14 },
-    { 0x39, 6 },
-    { 0x1F, 6 },
-    { 0x2, 3 },
-    { 0x1, 3 },
-    { 0x9, 4 },
-    { 0x8, 4 },
-    { 0x0, 5 },
-    { 0x70, 7 },
-    { 0x1C7, 9 },
-    { 0x38C, 10 },
-    { 0x71A, 11 },
-    { 0x38D8, 14 },
-    { 0x38DB, 14 },
-    { 0x38DA, 14 },
-    { 0x38DD, 14 },
-    { 0x38DC, 14 },
-    { 0xD, 4 },
-    { 0x1D, 5 },
-    { 0xE, 5 },
-    { 0x3F, 6 },
-    { 0x3C, 6 },
-    { 0xC, 4 },
-    { 0x6, 4 },
-    { 0x3D, 6 },
-    { 0x1E, 6 }
-  },
-  {  /* AC bias group 4, table 10 */
-    { 0x6, 3 },
-    { 0xB, 4 },
-    { 0x11, 5 },
-    { 0x1E, 5 },
-    { 0x74, 7 },
-    { 0x3AA, 10 },
-    { 0x1D5C, 13 },
-    { 0x1, 6 },
-    { 0x21, 6 },
-    { 0x1, 3 },
-    { 0x2, 3 },
-    { 0x7, 4 },
-    { 0x6, 4 },
-    { 0x3E, 6 },
-    { 0xEB, 8 },
-    { 0x1D4, 9 },
-    { 0xEAF, 12 },
-    { 0x3ABB, 14 },
-    { 0x3ABA, 14 },
-    { 0x1D59, 13 },
-    { 0x1D58, 13 },
-    { 0x1D5B, 13 },
-    { 0x1D5A, 13 },
-    { 0xA, 4 },
-    { 0x1C, 5 },
-    { 0x1, 5 },
-    { 0x3F, 6 },
-    { 0x3B, 6 },
-    { 0x1, 4 },
-    { 0x9, 4 },
-    { 0x20, 6 },
-    { 0x0, 6 }
-  },
-  {  /* AC bias group 4, table 11 */
-    { 0x4, 3 },
-    { 0xA, 4 },
-    { 0x17, 5 },
-    { 0x4, 4 },
-    { 0x16, 6 },
-    { 0x16A, 9 },
-    { 0x16B1, 13 },
-    { 0x17, 7 },
-    { 0x5B, 7 },
-    { 0x6, 3 },
-    { 0x7, 3 },
-    { 0x1, 4 },
-    { 0x0, 4 },
-    { 0xA, 6 },
-    { 0x2D7, 10 },
-    { 0xB5A, 12 },
-    { 0x16B0, 13 },
-    { 0x16B3, 13 },
-    { 0x16B2, 13 },
-    { 0x2D6D, 14 },
-    { 0x2D6C, 14 },
-    { 0x2D6F, 14 },
-    { 0x2D6E, 14 },
-    { 0x6, 4 },
-    { 0xA, 5 },
-    { 0x4, 5 },
-    { 0x2C, 6 },
-    { 0x17, 6 },
-    { 0x3, 4 },
-    { 0x7, 4 },
-    { 0x16, 7 },
-    { 0xB4, 8 }
-  },
-  {  /* AC bias group 4, table 12 */
-    { 0x5, 3 },
-    { 0xD, 4 },
-    { 0x5, 4 },
-    { 0x9, 4 },
-    { 0x33, 6 },
-    { 0x193, 9 },
-    { 0x192C, 13 },
-    { 0x61, 8 },
-    { 0x31, 7 },
-    { 0x0, 2 },
-    { 0x7, 3 },
-    { 0x10, 5 },
-    { 0x11, 5 },
-    { 0xC8, 8 },
-    { 0x192F, 13 },
-    { 0x325B, 14 },
-    { 0x325A, 14 },
-    { 0x1929, 13 },
-    { 0x1928, 13 },
-    { 0x192B, 13 },
-    { 0x192A, 13 },
-    { 0x325D, 14 },
-    { 0x325C, 14 },
-    { 0x18, 5 },
-    { 0x1A, 6 },
-    { 0x1B, 6 },
-    { 0x65, 7 },
-    { 0x19, 6 },
-    { 0x4, 4 },
-    { 0x7, 4 },
-    { 0x60, 8 },
-    { 0x324, 10 }
-  },
-  {  /* AC bias group 4, table 13 */
-    { 0x6, 3 },
-    { 0x0, 3 },
-    { 0x2, 4 },
-    { 0xF, 4 },
-    { 0x39, 6 },
-    { 0x1D9, 9 },
-    { 0x1D82, 13 },
-    { 0x761, 11 },
-    { 0x3BE, 10 },
-    { 0x1, 2 },
-    { 0x2, 2 },
-    { 0xF, 6 },
-    { 0xE, 6 },
-    { 0x762, 11 },
-    { 0x3B07, 14 },
-    { 0x3B06, 14 },
-    { 0x3B1D, 14 },
-    { 0x3B1C, 14 },
-    { 0x3B1F, 14 },
-    { 0x3B1E, 14 },
-    { 0x3B19, 14 },
-    { 0x3B18, 14 },
-    { 0x3B1B, 14 },
-    { 0x38, 6 },
-    { 0x1DE, 9 },
-    { 0xED, 8 },
-    { 0x3BF, 10 },
-    { 0xEE, 8 },
-    { 0x3A, 6 },
-    { 0x6, 5 },
-    { 0xEC0, 12 },
-    { 0x3B1A, 14 }
-  },
-  {  /* AC bias group 4, table 14 */
-    { 0x0, 2 },
-    { 0x2, 3 },
-    { 0xF, 5 },
-    { 0x6, 4 },
-    { 0x1C, 6 },
-    { 0x1D0, 10 },
-    { 0xE8C, 13 },
-    { 0x1D1B, 14 },
-    { 0x1D1A, 14 },
-    { 0x3, 2 },
-    { 0x2, 2 },
-    { 0xEA, 9 },
-    { 0xE9, 9 },
-    { 0xE89, 13 },
-    { 0xE88, 13 },
-    { 0xE8B, 13 },
-    { 0xE8A, 13 },
-    { 0x1D65, 14 },
-    { 0x1D64, 14 },
-    { 0x1D67, 14 },
-    { 0x1D66, 14 },
-    { 0x1D61, 14 },
-    { 0x1D60, 14 },
-    { 0x3AD, 11 },
-    { 0x1D63, 14 },
-    { 0x1D62, 14 },
-    { 0x1D1D, 14 },
-    { 0x1D1C, 14 },
-    { 0x3B, 7 },
-    { 0x1D7, 10 },
-    { 0x1D1F, 14 },
-    { 0x1D1E, 14 }
-  },
-  {  /* AC bias group 4, table 15 */
-    { 0x2, 2 },
-    { 0xF, 4 },
-    { 0x1C, 5 },
-    { 0xC, 4 },
-    { 0x3B, 6 },
-    { 0x1AC, 9 },
-    { 0x1AD8, 13 },
-    { 0x35B3, 14 },
-    { 0x35B2, 14 },
-    { 0x1, 2 },
-    { 0x0, 2 },
-    { 0x69, 7 },
-    { 0x68, 7 },
-    { 0x35BD, 14 },
-    { 0x35BC, 14 },
-    { 0x35BF, 14 },
-    { 0x35BE, 14 },
-    { 0x35B9, 14 },
-    { 0x35B8, 14 },
-    { 0x35BB, 14 },
-    { 0x35BA, 14 },
-    { 0x35B5, 14 },
-    { 0x35B4, 14 },
-    { 0x1A9, 9 },
-    { 0x1A8, 9 },
-    { 0x35A, 10 },
-    { 0xD7, 8 },
-    { 0xD5, 8 },
-    { 0x3A, 6 },
-    { 0x1B, 5 },
-    { 0x35B7, 14 },
-    { 0x35B6, 14 }
-  }
-};
-
-#endif /* VP3DATA_H */
--- a/src/ffmpeg/libavcodec/vp3dsp.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2004 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file vp3dsp.c
- * Standard C DSP-oriented functions cribbed from the original VP3
- * source code.
- */
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-
-#define IdctAdjustBeforeShift 8
-#define xC1S7 64277
-#define xC2S6 60547
-#define xC3S5 54491
-#define xC4S4 46341
-#define xC5S3 36410
-#define xC6S2 25080
-#define xC7S1 12785
-
-#define M(a,b) (((a) * (b))>>16)
-
-static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int type)
-{
-    int16_t *ip = input;
-    uint8_t *cm = cropTbl + MAX_NEG_CROP;
-
-    int A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H;
-    int Ed, Gd, Add, Bdd, Fd, Hd;
-
-    int i;
-
-    /* Inverse DCT on the rows now */
-    for (i = 0; i < 8; i++) {
-        /* Check for non-zero values */
-        if ( ip[0] | ip[1] | ip[2] | ip[3] | ip[4] | ip[5] | ip[6] | ip[7] ) {
-            A = M(xC1S7, ip[1]) + M(xC7S1, ip[7]);
-            B = M(xC7S1, ip[1]) - M(xC1S7, ip[7]);
-            C = M(xC3S5, ip[3]) + M(xC5S3, ip[5]);
-            D = M(xC3S5, ip[5]) - M(xC5S3, ip[3]);
-
-            Ad = M(xC4S4, (A - C));
-            Bd = M(xC4S4, (B - D));
-
-            Cd = A + C;
-            Dd = B + D;
-
-            E = M(xC4S4, (ip[0] + ip[4]));
-            F = M(xC4S4, (ip[0] - ip[4]));
-
-            G = M(xC2S6, ip[2]) + M(xC6S2, ip[6]);
-            H = M(xC6S2, ip[2]) - M(xC2S6, ip[6]);
-
-            Ed = E - G;
-            Gd = E + G;
-
-            Add = F + Ad;
-            Bdd = Bd - H;
-
-            Fd = F - Ad;
-            Hd = Bd + H;
-
-            /*  Final sequence of operations over-write original inputs. */
-            ip[0] = Gd + Cd ;
-            ip[7] = Gd - Cd ;
-
-            ip[1] = Add + Hd;
-            ip[2] = Add - Hd;
-
-            ip[3] = Ed + Dd ;
-            ip[4] = Ed - Dd ;
-
-            ip[5] = Fd + Bdd;
-            ip[6] = Fd - Bdd;
-        }
-
-        ip += 8;            /* next row */
-    }
-
-    ip = input;
-
-    for ( i = 0; i < 8; i++) {
-        /* Check for non-zero values (bitwise or faster than ||) */
-        if ( ip[1 * 8] | ip[2 * 8] | ip[3 * 8] |
-             ip[4 * 8] | ip[5 * 8] | ip[6 * 8] | ip[7 * 8] ) {
-
-            A = M(xC1S7, ip[1*8]) + M(xC7S1, ip[7*8]);
-            B = M(xC7S1, ip[1*8]) - M(xC1S7, ip[7*8]);
-            C = M(xC3S5, ip[3*8]) + M(xC5S3, ip[5*8]);
-            D = M(xC3S5, ip[5*8]) - M(xC5S3, ip[3*8]);
-
-            Ad = M(xC4S4, (A - C));
-            Bd = M(xC4S4, (B - D));
-
-            Cd = A + C;
-            Dd = B + D;
-
-            E = M(xC4S4, (ip[0*8] + ip[4*8])) + 8;
-            F = M(xC4S4, (ip[0*8] - ip[4*8])) + 8;
-
-            if(type==1){  //HACK
-                E += 16*128;
-                F += 16*128;
-            }
-
-            G = M(xC2S6, ip[2*8]) + M(xC6S2, ip[6*8]);
-            H = M(xC6S2, ip[2*8]) - M(xC2S6, ip[6*8]);
-
-            Ed = E - G;
-            Gd = E + G;
-
-            Add = F + Ad;
-            Bdd = Bd - H;
-
-            Fd = F - Ad;
-            Hd = Bd + H;
-
-            /* Final sequence of operations over-write original inputs. */
-            if(type==0){
-                ip[0*8] = (Gd + Cd )  >> 4;
-                ip[7*8] = (Gd - Cd )  >> 4;
-
-                ip[1*8] = (Add + Hd ) >> 4;
-                ip[2*8] = (Add - Hd ) >> 4;
-
-                ip[3*8] = (Ed + Dd )  >> 4;
-                ip[4*8] = (Ed - Dd )  >> 4;
-
-                ip[5*8] = (Fd + Bdd ) >> 4;
-                ip[6*8] = (Fd - Bdd ) >> 4;
-            }else if(type==1){
-                dst[0*stride] = cm[(Gd + Cd )  >> 4];
-                dst[7*stride] = cm[(Gd - Cd )  >> 4];
-
-                dst[1*stride] = cm[(Add + Hd ) >> 4];
-                dst[2*stride] = cm[(Add - Hd ) >> 4];
-
-                dst[3*stride] = cm[(Ed + Dd )  >> 4];
-                dst[4*stride] = cm[(Ed - Dd )  >> 4];
-
-                dst[5*stride] = cm[(Fd + Bdd ) >> 4];
-                dst[6*stride] = cm[(Fd - Bdd ) >> 4];
-            }else{
-                dst[0*stride] = cm[dst[0*stride] + ((Gd + Cd )  >> 4)];
-                dst[7*stride] = cm[dst[7*stride] + ((Gd - Cd )  >> 4)];
-
-                dst[1*stride] = cm[dst[1*stride] + ((Add + Hd ) >> 4)];
-                dst[2*stride] = cm[dst[2*stride] + ((Add - Hd ) >> 4)];
-
-                dst[3*stride] = cm[dst[3*stride] + ((Ed + Dd )  >> 4)];
-                dst[4*stride] = cm[dst[4*stride] + ((Ed - Dd )  >> 4)];
-
-                dst[5*stride] = cm[dst[5*stride] + ((Fd + Bdd ) >> 4)];
-                dst[6*stride] = cm[dst[6*stride] + ((Fd - Bdd ) >> 4)];
-            }
-
-        } else {
-            if(type==0){
-                ip[0*8] =
-                ip[1*8] =
-                ip[2*8] =
-                ip[3*8] =
-                ip[4*8] =
-                ip[5*8] =
-                ip[6*8] =
-                ip[7*8] = ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20);
-            }else if(type==1){
-                dst[0*stride]=
-                dst[1*stride]=
-                dst[2*stride]=
-                dst[3*stride]=
-                dst[4*stride]=
-                dst[5*stride]=
-                dst[6*stride]=
-                dst[7*stride]= 128 + ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20);
-            }else{
-                if(ip[0*8]){
-                    int v= ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20);
-                    dst[0*stride] = cm[dst[0*stride] + v];
-                    dst[1*stride] = cm[dst[1*stride] + v];
-                    dst[2*stride] = cm[dst[2*stride] + v];
-                    dst[3*stride] = cm[dst[3*stride] + v];
-                    dst[4*stride] = cm[dst[4*stride] + v];
-                    dst[5*stride] = cm[dst[5*stride] + v];
-                    dst[6*stride] = cm[dst[6*stride] + v];
-                    dst[7*stride] = cm[dst[7*stride] + v];
-                }
-            }
-        }
-
-        ip++;            /* next column */
-        dst++;
-    }
-}
-
-void ff_vp3_idct_c(DCTELEM *block/* align 16*/){
-    idct(NULL, 0, block, 0);
-}
-
-void ff_vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
-    idct(dest, line_size, block, 1);
-}
-
-void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
-    idct(dest, line_size, block, 2);
-}
--- a/src/ffmpeg/libavcodec/vp5.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/**
- * @file vp5.c
- * VP5 compatible video decoder
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include "avcodec.h"
-#include "dsputil.h"
-#include "bitstream.h"
-#include "mpegvideo.h"
-
-#include "vp56.h"
-#include "vp56data.h"
-#include "vp5data.h"
-
-
-static int vp5_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
-                            int *golden_frame)
-{
-    vp56_range_coder_t *c = &s->c;
-    int rows, cols;
-
-    vp56_init_range_decoder(&s->c, buf, buf_size);
-    s->frames[VP56_FRAME_CURRENT].key_frame = !vp56_rac_get(c);
-    vp56_rac_get(c);
-    vp56_init_dequant(s, vp56_rac_gets(c, 6));
-    if (s->frames[VP56_FRAME_CURRENT].key_frame)
-    {
-        vp56_rac_gets(c, 8);
-        if(vp56_rac_gets(c, 5) > 5)
-            return 0;
-        vp56_rac_gets(c, 2);
-        if (vp56_rac_get(c)) {
-            av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
-            return 0;
-        }
-        rows = vp56_rac_gets(c, 8);  /* number of stored macroblock rows */
-        cols = vp56_rac_gets(c, 8);  /* number of stored macroblock cols */
-        vp56_rac_gets(c, 8);  /* number of displayed macroblock rows */
-        vp56_rac_gets(c, 8);  /* number of displayed macroblock cols */
-        vp56_rac_gets(c, 2);
-        if (16*cols != s->avctx->coded_width ||
-            16*rows != s->avctx->coded_height) {
-            avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
-            return 2;
-        }
-    }
-    return 1;
-}
-
-/* Gives very similar result than the vp6 version except in a few cases */
-static int vp5_adjust(int v, int t)
-{
-    int s2, s1 = v >> 31;
-    v ^= s1;
-    v -= s1;
-    v *= v < 2*t;
-    v -= t;
-    s2 = v >> 31;
-    v ^= s2;
-    v -= s2;
-    v = t - v;
-    v += s1;
-    v ^= s1;
-    return v;
-}
-
-static void vp5_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
-{
-    vp56_range_coder_t *c = &s->c;
-    int comp, di;
-
-    for (comp=0; comp<2; comp++) {
-        int delta = 0;
-        if (vp56_rac_get_prob(c, s->vector_model_dct[comp])) {
-            int sign = vp56_rac_get_prob(c, s->vector_model_sig[comp]);
-            di  = vp56_rac_get_prob(c, s->vector_model_pdi[comp][0]);
-            di |= vp56_rac_get_prob(c, s->vector_model_pdi[comp][1]) << 1;
-            delta = vp56_rac_get_tree(c, vp56_pva_tree,
-                                      s->vector_model_pdv[comp]);
-            delta = di | (delta << 2);
-            delta = (delta ^ -sign) + sign;
-        }
-        if (!comp)
-            vect->x = delta;
-        else
-            vect->y = delta;
-    }
-}
-
-static void vp5_parse_vector_models(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    int comp, node;
-
-    for (comp=0; comp<2; comp++) {
-        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][0]))
-            s->vector_model_dct[comp] = vp56_rac_gets_nn(c, 7);
-        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][1]))
-            s->vector_model_sig[comp] = vp56_rac_gets_nn(c, 7);
-        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][2]))
-            s->vector_model_pdi[comp][0] = vp56_rac_gets_nn(c, 7);
-        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][3]))
-            s->vector_model_pdi[comp][1] = vp56_rac_gets_nn(c, 7);
-    }
-
-    for (comp=0; comp<2; comp++)
-        for (node=0; node<7; node++)
-            if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][4 + node]))
-                s->vector_model_pdv[comp][node] = vp56_rac_gets_nn(c, 7);
-}
-
-static void vp5_parse_coeff_models(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    uint8_t def_prob[11];
-    int node, cg, ctx;
-    int ct;    /* code type */
-    int pt;    /* plane type (0 for Y, 1 for U or V) */
-
-    memset(def_prob, 0x80, sizeof(def_prob));
-
-    for (pt=0; pt<2; pt++)
-        for (node=0; node<11; node++)
-            if (vp56_rac_get_prob(c, vp5_dccv_pct[pt][node])) {
-                def_prob[node] = vp56_rac_gets_nn(c, 7);
-                s->coeff_model_dccv[pt][node] = def_prob[node];
-            } else if (s->frames[VP56_FRAME_CURRENT].key_frame) {
-                s->coeff_model_dccv[pt][node] = def_prob[node];
-            }
-
-    for (ct=0; ct<3; ct++)
-        for (pt=0; pt<2; pt++)
-            for (cg=0; cg<6; cg++)
-                for (node=0; node<11; node++)
-                    if (vp56_rac_get_prob(c, vp5_ract_pct[ct][pt][cg][node])) {
-                        def_prob[node] = vp56_rac_gets_nn(c, 7);
-                        s->coeff_model_ract[pt][ct][cg][node] = def_prob[node];
-                    } else if (s->frames[VP56_FRAME_CURRENT].key_frame) {
-                        s->coeff_model_ract[pt][ct][cg][node] = def_prob[node];
-                    }
-
-    /* coeff_model_dcct is a linear combination of coeff_model_dccv */
-    for (pt=0; pt<2; pt++)
-        for (ctx=0; ctx<36; ctx++)
-            for (node=0; node<5; node++)
-                s->coeff_model_dcct[pt][ctx][node] = clip(((s->coeff_model_dccv[pt][node] * vp5_dccv_lc[node][ctx][0] + 128) >> 8) + vp5_dccv_lc[node][ctx][1], 1, 254);
-
-    /* coeff_model_acct is a linear combination of coeff_model_ract */
-    for (ct=0; ct<3; ct++)
-        for (pt=0; pt<2; pt++)
-            for (cg=0; cg<3; cg++)
-                for (ctx=0; ctx<6; ctx++)
-                    for (node=0; node<5; node++)
-                        s->coeff_model_acct[pt][ct][cg][ctx][node] = clip(((s->coeff_model_ract[pt][ct][cg][node] * vp5_ract_lc[ct][cg][node][ctx][0] + 128) >> 8) + vp5_ract_lc[ct][cg][node][ctx][1], 1, 254);
-}
-
-static void vp5_parse_coeff(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    uint8_t *permute = s->scantable.permutated;
-    uint8_t *model, *model2;
-    int coeff, sign, coeff_idx;
-    int b, i, cg, idx, ctx, ctx_last;
-    int pt = 0;    /* plane type (0 for Y, 1 for U or V) */
-
-    for (b=0; b<6; b++) {
-        int ct = 1;    /* code type */
-
-        if (b > 3) pt = 1;
-
-        ctx = 6*s->coeff_ctx[vp56_b6to4[b]][0]
-              + s->above_blocks[s->above_block_idx[b]].not_null_dc;
-        model = s->coeff_model_dccv[pt];
-        model2 = s->coeff_model_dcct[pt][ctx];
-
-        for (coeff_idx=0; coeff_idx<64; ) {
-            if (vp56_rac_get_prob(c, model2[0])) {
-                if (vp56_rac_get_prob(c, model2[2])) {
-                    if (vp56_rac_get_prob(c, model2[3])) {
-                        s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 4;
-                        idx = vp56_rac_get_tree(c, vp56_pc_tree, model);
-                        sign = vp56_rac_get(c);
-                        coeff = vp56_coeff_bias[idx];
-                        for (i=vp56_coeff_bit_length[idx]; i>=0; i--)
-                            coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i;
-                    } else {
-                        if (vp56_rac_get_prob(c, model2[4])) {
-                            coeff = 3 + vp56_rac_get_prob(c, model[5]);
-                            s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 3;
-                        } else {
-                            coeff = 2;
-                            s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 2;
-                        }
-                        sign = vp56_rac_get(c);
-                    }
-                    ct = 2;
-                } else {
-                    ct = 1;
-                    s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 1;
-                    sign = vp56_rac_get(c);
-                    coeff = 1;
-                }
-                coeff = (coeff ^ -sign) + sign;
-                if (coeff_idx)
-                    coeff *= s->dequant_ac;
-                s->block_coeff[b][permute[coeff_idx]] = coeff;
-            } else {
-                if (ct && !vp56_rac_get_prob(c, model2[1]))
-                    break;
-                ct = 0;
-                s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 0;
-            }
-
-            cg = vp5_coeff_groups[++coeff_idx];
-            ctx = s->coeff_ctx[vp56_b6to4[b]][coeff_idx];
-            model = s->coeff_model_ract[pt][ct][cg];
-            model2 = cg > 2 ? model : s->coeff_model_acct[pt][ct][cg][ctx];
-        }
-
-        ctx_last = FFMIN(s->coeff_ctx_last[vp56_b6to4[b]], 24);
-        s->coeff_ctx_last[vp56_b6to4[b]] = coeff_idx;
-        if (coeff_idx < ctx_last)
-            for (i=coeff_idx; i<=ctx_last; i++)
-                s->coeff_ctx[vp56_b6to4[b]][i] = 5;
-        s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[vp56_b6to4[b]][0];
-    }
-}
-
-static void vp5_default_models_init(vp56_context_t *s)
-{
-    int i;
-
-    for (i=0; i<2; i++) {
-        s->vector_model_sig[i] = 0x80;
-        s->vector_model_dct[i] = 0x80;
-        s->vector_model_pdi[i][0] = 0x55;
-        s->vector_model_pdi[i][1] = 0x80;
-    }
-    memcpy(s->mb_types_stats, vp56_def_mb_types_stats, sizeof(s->mb_types_stats));
-    memset(s->vector_model_pdv, 0x80, sizeof(s->vector_model_pdv));
-}
-
-static int vp5_decode_init(AVCodecContext *avctx)
-{
-    vp56_context_t *s = avctx->priv_data;
-
-    vp56_init(s, avctx, 1);
-    s->vp56_coord_div = vp5_coord_div;
-    s->parse_vector_adjustment = vp5_parse_vector_adjustment;
-    s->adjust = vp5_adjust;
-    s->parse_coeff = vp5_parse_coeff;
-    s->default_models_init = vp5_default_models_init;
-    s->parse_vector_models = vp5_parse_vector_models;
-    s->parse_coeff_models = vp5_parse_coeff_models;
-    s->parse_header = vp5_parse_header;
-
-    return 0;
-}
-
-AVCodec vp5_decoder = {
-    "vp5",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_VP5,
-    sizeof(vp56_context_t),
-    vp5_decode_init,
-    NULL,
-    vp56_free,
-    vp56_decode_frame,
-};
--- a/src/ffmpeg/libavcodec/vp56.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,665 +0,0 @@
-/**
- * @file vp56.c
- * VP5 and VP6 compatible video decoder (common features)
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "avcodec.h"
-
-#include "vp56.h"
-#include "vp56data.h"
-
-
-void vp56_init_dequant(vp56_context_t *s, int quantizer)
-{
-    s->quantizer = quantizer;
-    s->dequant_dc = vp56_dc_dequant[quantizer] << 2;
-    s->dequant_ac = vp56_ac_dequant[quantizer] << 2;
-}
-
-static int vp56_get_vectors_predictors(vp56_context_t *s, int row, int col,
-                                       vp56_frame_t ref_frame)
-{
-    int nb_pred = 0;
-    vp56_mv_t vect[2] = {{0,0}, {0,0}};
-    int pos, offset;
-    vp56_mv_t mvp;
-
-    for (pos=0; pos<12; pos++) {
-        mvp.x = col + vp56_candidate_predictor_pos[pos][0];
-        mvp.y = row + vp56_candidate_predictor_pos[pos][1];
-        if (mvp.x < 0 || mvp.x >= s->mb_width ||
-            mvp.y < 0 || mvp.y >= s->mb_height)
-            continue;
-        offset = mvp.x + s->mb_width*mvp.y;
-
-        if (vp56_reference_frame[s->macroblocks[offset].type] != ref_frame)
-            continue;
-        if ((s->macroblocks[offset].mv.x == vect[0].x &&
-             s->macroblocks[offset].mv.y == vect[0].y) ||
-            (s->macroblocks[offset].mv.x == 0 &&
-             s->macroblocks[offset].mv.y == 0))
-            continue;
-
-        vect[nb_pred++] = s->macroblocks[offset].mv;
-        if (nb_pred > 1) {
-            nb_pred = -1;
-            break;
-        }
-        s->vector_candidate_pos = pos;
-    }
-
-    s->vector_candidate[0] = vect[0];
-    s->vector_candidate[1] = vect[1];
-
-    return nb_pred+1;
-}
-
-static void vp56_parse_mb_type_models(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    int i, ctx, type;
-
-    for (ctx=0; ctx<3; ctx++) {
-        if (vp56_rac_get_prob(c, 174)) {
-            int idx = vp56_rac_gets(c, 4);
-            memcpy(s->mb_types_stats[ctx],vp56_pre_def_mb_type_stats[idx][ctx],
-                   sizeof(s->mb_types_stats[ctx]));
-        }
-        if (vp56_rac_get_prob(c, 254)) {
-            for (type=0; type<10; type++) {
-                for(i=0; i<2; i++) {
-                    if (vp56_rac_get_prob(c, 205)) {
-                        int delta, sign = vp56_rac_get(c);
-
-                        delta = vp56_rac_get_tree(c, vp56_pmbtm_tree,
-                                                  vp56_mb_type_model_model);
-                        if (!delta)
-                            delta = 4 * vp56_rac_gets(c, 7);
-                        s->mb_types_stats[ctx][type][i] += (delta ^ -sign) + sign;
-                    }
-                }
-            }
-        }
-    }
-
-    /* compute MB type probability tables based on previous MB type */
-    for (ctx=0; ctx<3; ctx++) {
-        int p[10];
-
-        for (type=0; type<10; type++)
-            p[type] = 100 * s->mb_types_stats[ctx][type][1];
-
-        for (type=0; type<10; type++) {
-            int p02, p34, p0234, p17, p56, p89, p5689, p156789;
-
-            /* conservative MB type probability */
-            s->mb_type_model[ctx][type][0] = 255 - (255 * s->mb_types_stats[ctx][type][0]) / (1 + s->mb_types_stats[ctx][type][0] + s->mb_types_stats[ctx][type][1]);
-
-            p[type] = 0;    /* same MB type => weight is null */
-
-            /* binary tree parsing probabilities */
-            p02 = p[0] + p[2];
-            p34 = p[3] + p[4];
-            p0234 = p02 + p34;
-            p17 = p[1] + p[7];
-            p56 = p[5] + p[6];
-            p89 = p[8] + p[9];
-            p5689 = p56 + p89;
-            p156789 = p17 + p5689;
-
-            s->mb_type_model[ctx][type][1] = 1 + 255 * p0234/(1+p0234+p156789);
-            s->mb_type_model[ctx][type][2] = 1 + 255 * p02  / (1+p0234);
-            s->mb_type_model[ctx][type][3] = 1 + 255 * p17  / (1+p156789);
-            s->mb_type_model[ctx][type][4] = 1 + 255 * p[0] / (1+p02);
-            s->mb_type_model[ctx][type][5] = 1 + 255 * p[3] / (1+p34);
-            s->mb_type_model[ctx][type][6] = 1 + 255 * p[1] / (1+p17);
-            s->mb_type_model[ctx][type][7] = 1 + 255 * p56  / (1+p5689);
-            s->mb_type_model[ctx][type][8] = 1 + 255 * p[5] / (1+p56);
-            s->mb_type_model[ctx][type][9] = 1 + 255 * p[8] / (1+p89);
-
-            /* restore initial value */
-            p[type] = 100 * s->mb_types_stats[ctx][type][1];
-        }
-    }
-}
-
-static vp56_mb_t vp56_parse_mb_type(vp56_context_t *s,
-                                    vp56_mb_t prev_type, int ctx)
-{
-    uint8_t *mb_type_model = s->mb_type_model[ctx][prev_type];
-    vp56_range_coder_t *c = &s->c;
-
-    if (vp56_rac_get_prob(c, mb_type_model[0]))
-        return prev_type;
-    else
-        return vp56_rac_get_tree(c, vp56_pmbt_tree, mb_type_model);
-}
-
-static void vp56_decode_4mv(vp56_context_t *s, int row, int col)
-{
-    vp56_mv_t mv = {0,0};
-    int type[4];
-    int b;
-
-    /* parse each block type */
-    for (b=0; b<4; b++) {
-        type[b] = vp56_rac_gets(&s->c, 2);
-        if (type[b])
-            type[b]++;  /* only returns 0, 2, 3 or 4 (all INTER_PF) */
-    }
-
-    /* get vectors */
-    for (b=0; b<4; b++) {
-        switch (type[b]) {
-            case VP56_MB_INTER_NOVEC_PF:
-                s->mv[b] = (vp56_mv_t) {0,0};
-                break;
-            case VP56_MB_INTER_DELTA_PF:
-                s->parse_vector_adjustment(s, &s->mv[b]);
-                break;
-            case VP56_MB_INTER_V1_PF:
-                s->mv[b] = s->vector_candidate[0];
-                break;
-            case VP56_MB_INTER_V2_PF:
-                s->mv[b] = s->vector_candidate[1];
-                break;
-        }
-        mv.x += s->mv[b].x;
-        mv.y += s->mv[b].y;
-    }
-
-    /* this is the one selected for the whole MB for prediction */
-    s->macroblocks[row * s->mb_width + col].mv = s->mv[3];
-
-    /* chroma vectors are average luma vectors */
-    if (s->avctx->codec->id == CODEC_ID_VP5) {
-        s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
-        s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
-    } else {
-        s->mv[4] = s->mv[5] = (vp56_mv_t) {mv.x/4, mv.y/4};
-    }
-}
-
-static vp56_mb_t vp56_decode_mv(vp56_context_t *s, int row, int col)
-{
-    vp56_mv_t *mv, vect = {0,0};
-    int ctx, b;
-
-    ctx = vp56_get_vectors_predictors(s, row, col, VP56_FRAME_PREVIOUS);
-    s->mb_type = vp56_parse_mb_type(s, s->mb_type, ctx);
-    s->macroblocks[row * s->mb_width + col].type = s->mb_type;
-
-    switch (s->mb_type) {
-        case VP56_MB_INTER_V1_PF:
-            mv = &s->vector_candidate[0];
-            break;
-
-        case VP56_MB_INTER_V2_PF:
-            mv = &s->vector_candidate[1];
-            break;
-
-        case VP56_MB_INTER_V1_GF:
-            vp56_get_vectors_predictors(s, row, col, VP56_FRAME_GOLDEN);
-            mv = &s->vector_candidate[0];
-            break;
-
-        case VP56_MB_INTER_V2_GF:
-            vp56_get_vectors_predictors(s, row, col, VP56_FRAME_GOLDEN);
-            mv = &s->vector_candidate[1];
-            break;
-
-        case VP56_MB_INTER_DELTA_PF:
-            s->parse_vector_adjustment(s, &vect);
-            mv = &vect;
-            break;
-
-        case VP56_MB_INTER_DELTA_GF:
-            vp56_get_vectors_predictors(s, row, col, VP56_FRAME_GOLDEN);
-            s->parse_vector_adjustment(s, &vect);
-            mv = &vect;
-            break;
-
-        case VP56_MB_INTER_4V:
-            vp56_decode_4mv(s, row, col);
-            return s->mb_type;
-
-        default:
-            mv = &vect;
-            break;
-    }
-
-    s->macroblocks[row*s->mb_width + col].mv = *mv;
-
-    /* same vector for all blocks */
-    for (b=0; b<6; b++)
-        s->mv[b] = *mv;
-
-    return s->mb_type;
-}
-
-static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
-{
-    int idx = s->scantable.permutated[0];
-    int i;
-
-    for (i=0; i<6; i++) {
-        vp56_ref_dc_t *ab = &s->above_blocks[s->above_block_idx[i]];
-        vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[i]];
-        int count = 0;
-        int dc = 0;
-
-        if (ref_frame == lb->ref_frame) {
-            dc += lb->dc_coeff;
-            count++;
-        }
-        if (ref_frame == ab->ref_frame) {
-            dc += ab->dc_coeff;
-            count++;
-        }
-        if (s->avctx->codec->id == CODEC_ID_VP5) {
-            if (count < 2 && ref_frame == ab[-1].ref_frame) {
-                dc += ab[-1].dc_coeff;
-                count++;
-            }
-            if (count < 2 && ref_frame == ab[1].ref_frame) {
-                dc += ab[1].dc_coeff;
-                count++;
-            }
-        }
-        if (count == 0)
-            dc = s->prev_dc[vp56_b6to3[i]][ref_frame];
-        else if (count == 2)
-            dc /= 2;
-
-        s->block_coeff[i][idx] += dc;
-        s->prev_dc[vp56_b6to3[i]][ref_frame] = s->block_coeff[i][idx];
-        ab->dc_coeff = s->block_coeff[i][idx];
-        ab->ref_frame = ref_frame;
-        lb->dc_coeff = s->block_coeff[i][idx];
-        lb->ref_frame = ref_frame;
-        s->block_coeff[i][idx] *= s->dequant_dc;
-    }
-}
-
-static void vp56_edge_filter(vp56_context_t *s, uint8_t *yuv,
-                             int pix_inc, int line_inc, int t)
-{
-    int pix2_inc = 2 * pix_inc;
-    int i, v;
-
-    for (i=0; i<12; i++) {
-        v = (yuv[-pix2_inc] + 3*(yuv[0]-yuv[-pix_inc]) - yuv[pix_inc] + 4) >>3;
-        v = s->adjust(v, t);
-        yuv[-pix_inc] = clip_uint8(yuv[-pix_inc] + v);
-        yuv[0] = clip_uint8(yuv[0] - v);
-        yuv += line_inc;
-    }
-}
-
-static void vp56_deblock_filter(vp56_context_t *s, uint8_t *yuv,
-                                int stride, int dx, int dy)
-{
-    int t = vp56_filter_threshold[s->quantizer];
-    if (dx)  vp56_edge_filter(s, yuv +         10-dx ,      1, stride, t);
-    if (dy)  vp56_edge_filter(s, yuv + stride*(10-dy), stride,      1, t);
-}
-
-static void vp56_mc(vp56_context_t *s, int b, uint8_t *src,
-                    int stride, int x, int y)
-{
-    int plane = vp56_b6to3[b];
-    uint8_t *dst= s->frames[VP56_FRAME_CURRENT].data[plane]+s->block_offset[b];
-    uint8_t *src_block;
-    int src_offset;
-    int overlap_offset = 0;
-    int mask = s->vp56_coord_div[b] - 1;
-    int deblock_filtering = s->deblock_filtering;
-    int dx;
-    int dy;
-
-    if (s->avctx->skip_loop_filter >= AVDISCARD_ALL ||
-        (s->avctx->skip_loop_filter >= AVDISCARD_NONKEY
-         && !s->frames[VP56_FRAME_CURRENT].key_frame))
-        deblock_filtering = 0;
-
-    dx = s->mv[b].x / s->vp56_coord_div[b];
-    dy = s->mv[b].y / s->vp56_coord_div[b];
-
-    if (b >= 4) {
-        x /= 2;
-        y /= 2;
-    }
-    x += dx - 2;
-    y += dy - 2;
-
-    if (x<0 || x+12>=s->plane_width[plane] ||
-        y<0 || y+12>=s->plane_height[plane]) {
-        ff_emulated_edge_mc(s->edge_emu_buffer,
-                            src + s->block_offset[b] + (dy-2)*stride + (dx-2),
-                            stride, 12, 12, x, y,
-                            s->plane_width[plane],
-                            s->plane_height[plane]);
-        src_block = s->edge_emu_buffer;
-        src_offset = 2 + 2*stride;
-    } else if (deblock_filtering) {
-        /* only need a 12x12 block, but there is no such dsp function, */
-        /* so copy a 16x12 block */
-        s->dsp.put_pixels_tab[0][0](s->edge_emu_buffer,
-                                    src + s->block_offset[b] + (dy-2)*stride + (dx-2),
-                                    stride, 12);
-        src_block = s->edge_emu_buffer;
-        src_offset = 2 + 2*stride;
-    } else {
-        src_block = src;
-        src_offset = s->block_offset[b] + dy*stride + dx;
-    }
-
-    if (deblock_filtering)
-        vp56_deblock_filter(s, src_block, stride, dx&7, dy&7);
-
-    if (s->mv[b].x & mask)
-        overlap_offset += (s->mv[b].x > 0) ? 1 : -1;
-    if (s->mv[b].y & mask)
-        overlap_offset += (s->mv[b].y > 0) ? stride : -stride;
-
-    if (overlap_offset) {
-        if (s->filter)
-            s->filter(s, dst, src_block, src_offset, src_offset+overlap_offset,
-                      stride, s->mv[b], mask, s->filter_selection, b<4);
-        else
-            s->dsp.put_no_rnd_pixels_l2[1](dst, src_block+src_offset,
-                                           src_block+src_offset+overlap_offset,
-                                           stride, 8);
-    } else {
-        s->dsp.put_pixels_tab[1][0](dst, src_block+src_offset, stride, 8);
-    }
-}
-
-static void vp56_decode_mb(vp56_context_t *s, int row, int col)
-{
-    AVFrame *frame_current, *frame_ref;
-    vp56_mb_t mb_type;
-    vp56_frame_t ref_frame;
-    int b, plan, off;
-
-    if (s->frames[VP56_FRAME_CURRENT].key_frame)
-        mb_type = VP56_MB_INTRA;
-    else
-        mb_type = vp56_decode_mv(s, row, col);
-    ref_frame = vp56_reference_frame[mb_type];
-
-    memset(s->block_coeff, 0, sizeof(s->block_coeff));
-
-    s->parse_coeff(s);
-
-    vp56_add_predictors_dc(s, ref_frame);
-
-    frame_current = &s->frames[VP56_FRAME_CURRENT];
-    frame_ref = &s->frames[ref_frame];
-
-    switch (mb_type) {
-        case VP56_MB_INTRA:
-            for (b=0; b<6; b++) {
-                plan = vp56_b6to3[b];
-                s->dsp.idct_put(frame_current->data[plan] + s->block_offset[b],
-                                s->stride[plan], s->block_coeff[b]);
-            }
-            break;
-
-        case VP56_MB_INTER_NOVEC_PF:
-        case VP56_MB_INTER_NOVEC_GF:
-            for (b=0; b<6; b++) {
-                plan = vp56_b6to3[b];
-                off = s->block_offset[b];
-                s->dsp.put_pixels_tab[1][0](frame_current->data[plan] + off,
-                                            frame_ref->data[plan] + off,
-                                            s->stride[plan], 8);
-                s->dsp.idct_add(frame_current->data[plan] + off,
-                                s->stride[plan], s->block_coeff[b]);
-            }
-            break;
-
-        case VP56_MB_INTER_DELTA_PF:
-        case VP56_MB_INTER_V1_PF:
-        case VP56_MB_INTER_V2_PF:
-        case VP56_MB_INTER_DELTA_GF:
-        case VP56_MB_INTER_4V:
-        case VP56_MB_INTER_V1_GF:
-        case VP56_MB_INTER_V2_GF:
-            for (b=0; b<6; b++) {
-                int x_off = b==1 || b==3 ? 8 : 0;
-                int y_off = b==2 || b==3 ? 8 : 0;
-                plan = vp56_b6to3[b];
-                vp56_mc(s, b, frame_ref->data[plan], s->stride[plan],
-                        16*col+x_off, 16*row+y_off);
-                s->dsp.idct_add(frame_current->data[plan] + s->block_offset[b],
-                                s->stride[plan], s->block_coeff[b]);
-            }
-            break;
-    }
-}
-
-static int vp56_size_changed(AVCodecContext *avctx, vp56_context_t *s)
-{
-    int stride = s->frames[VP56_FRAME_CURRENT].linesize[0];
-    int i;
-
-    s->plane_width[0] = s->avctx->width;
-    s->plane_width[1] = s->plane_width[2] = s->avctx->width/2;
-    s->plane_height[0] = s->avctx->height;
-    s->plane_height[1] = s->plane_height[2] = s->avctx->height/2;
-
-    for (i=0; i<3; i++)
-        s->stride[i] = s->flip * s->frames[VP56_FRAME_CURRENT].linesize[i];
-
-    s->mb_width = (s->avctx->width+15) / 16;
-    s->mb_height = (s->avctx->height+15) / 16;
-
-    if (s->mb_width > 1000 || s->mb_height > 1000) {
-        av_log(avctx, AV_LOG_ERROR, "picture too big\n");
-        return -1;
-    }
-
-    s->above_blocks = av_realloc(s->above_blocks,
-                                 (4*s->mb_width+6) * sizeof(*s->above_blocks));
-    s->macroblocks = av_realloc(s->macroblocks,
-                                s->mb_width*s->mb_height*sizeof(*s->macroblocks));
-    av_free(s->edge_emu_buffer_alloc);
-    s->edge_emu_buffer_alloc = av_malloc(16*stride);
-    s->edge_emu_buffer = s->edge_emu_buffer_alloc;
-    if (s->flip < 0)
-        s->edge_emu_buffer += 15 * stride;
-
-    return 0;
-}
-
-int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                      uint8_t *buf, int buf_size)
-{
-    vp56_context_t *s = avctx->priv_data;
-    AVFrame *const p = &s->frames[VP56_FRAME_CURRENT];
-    AVFrame *picture = data;
-    int mb_row, mb_col, mb_row_flip, mb_offset = 0;
-    int block, y, uv, stride_y, stride_uv;
-    int golden_frame = 0;
-    int res;
-
-    res = s->parse_header(s, buf, buf_size, &golden_frame);
-    if (!res)
-        return -1;
-
-    p->reference = 1;
-    if (avctx->get_buffer(avctx, p) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-        return -1;
-    }
-
-    if (res == 2)
-        if (vp56_size_changed(avctx, s)) {
-            avctx->release_buffer(avctx, p);
-            return -1;
-        }
-
-    if (p->key_frame) {
-        p->pict_type = FF_I_TYPE;
-        s->default_models_init(s);
-        for (block=0; block<s->mb_height*s->mb_width; block++)
-            s->macroblocks[block].type = VP56_MB_INTRA;
-    } else {
-        p->pict_type = FF_P_TYPE;
-        vp56_parse_mb_type_models(s);
-        s->parse_vector_models(s);
-        s->mb_type = VP56_MB_INTER_NOVEC_PF;
-    }
-
-    s->parse_coeff_models(s);
-
-    memset(s->prev_dc, 0, sizeof(s->prev_dc));
-    s->prev_dc[1][VP56_FRAME_CURRENT] = 128;
-    s->prev_dc[2][VP56_FRAME_CURRENT] = 128;
-
-    for (block=0; block < 4*s->mb_width+6; block++) {
-        s->above_blocks[block].ref_frame = -1;
-        s->above_blocks[block].dc_coeff = 0;
-        s->above_blocks[block].not_null_dc = 0;
-    }
-    s->above_blocks[2*s->mb_width + 2].ref_frame = 0;
-    s->above_blocks[3*s->mb_width + 4].ref_frame = 0;
-
-    stride_y  = p->linesize[0];
-    stride_uv = p->linesize[1];
-
-    if (s->flip < 0)
-        mb_offset = 7;
-
-    /* main macroblocks loop */
-    for (mb_row=0; mb_row<s->mb_height; mb_row++) {
-        if (s->flip < 0)
-            mb_row_flip = s->mb_height - mb_row - 1;
-        else
-            mb_row_flip = mb_row;
-
-        for (block=0; block<4; block++) {
-            s->left_block[block].ref_frame = -1;
-            s->left_block[block].dc_coeff = 0;
-            s->left_block[block].not_null_dc = 0;
-            memset(s->coeff_ctx[block], 0, 64*sizeof(s->coeff_ctx[block][0]));
-        }
-        memset(s->coeff_ctx_last, 24, sizeof(s->coeff_ctx_last));
-
-        s->above_block_idx[0] = 1;
-        s->above_block_idx[1] = 2;
-        s->above_block_idx[2] = 1;
-        s->above_block_idx[3] = 2;
-        s->above_block_idx[4] = 2*s->mb_width + 2 + 1;
-        s->above_block_idx[5] = 3*s->mb_width + 4 + 1;
-
-        s->block_offset[s->frbi] = (mb_row_flip*16 + mb_offset) * stride_y;
-        s->block_offset[s->srbi] = s->block_offset[s->frbi] + 8*stride_y;
-        s->block_offset[1] = s->block_offset[0] + 8;
-        s->block_offset[3] = s->block_offset[2] + 8;
-        s->block_offset[4] = (mb_row_flip*8 + mb_offset) * stride_uv;
-        s->block_offset[5] = s->block_offset[4];
-
-        for (mb_col=0; mb_col<s->mb_width; mb_col++) {
-            vp56_decode_mb(s, mb_row, mb_col);
-
-            for (y=0; y<4; y++) {
-                s->above_block_idx[y] += 2;
-                s->block_offset[y] += 16;
-            }
-
-            for (uv=4; uv<6; uv++) {
-                s->above_block_idx[uv] += 1;
-                s->block_offset[uv] += 8;
-            }
-        }
-    }
-
-    if (s->frames[VP56_FRAME_PREVIOUS].data[0]
-        && (s->frames[VP56_FRAME_PREVIOUS].data[0]
-            != s->frames[VP56_FRAME_GOLDEN].data[0])) {
-        avctx->release_buffer(avctx, &s->frames[VP56_FRAME_PREVIOUS]);
-    }
-    if (p->key_frame || golden_frame) {
-        if (s->frames[VP56_FRAME_GOLDEN].data[0])
-            avctx->release_buffer(avctx, &s->frames[VP56_FRAME_GOLDEN]);
-        s->frames[VP56_FRAME_GOLDEN] = *p;
-    }
-    s->frames[VP56_FRAME_PREVIOUS] = *p;
-
-    *picture = *p;
-    *data_size = sizeof(AVPicture);
-
-    return buf_size;
-}
-
-void vp56_init(vp56_context_t *s, AVCodecContext *avctx, int flip)
-{
-    int i;
-
-    s->avctx = avctx;
-    avctx->pix_fmt = PIX_FMT_YUV420P;
-
-    if (s->avctx->idct_algo == FF_IDCT_AUTO)
-        s->avctx->idct_algo = FF_IDCT_VP3;
-    dsputil_init(&s->dsp, s->avctx);
-    ff_init_scantable(s->dsp.idct_permutation, &s->scantable,ff_zigzag_direct);
-
-    avcodec_set_dimensions(s->avctx, 0, 0);
-
-    for (i=0; i<3; i++)
-        s->frames[i].data[0] = NULL;
-    s->edge_emu_buffer_alloc = NULL;
-
-    s->above_blocks = NULL;
-    s->macroblocks = NULL;
-    s->quantizer = -1;
-    s->deblock_filtering = 1;
-
-    s->filter = NULL;
-
-    if (flip) {
-        s->flip = -1;
-        s->frbi = 2;
-        s->srbi = 0;
-    } else {
-        s->flip = 1;
-        s->frbi = 0;
-        s->srbi = 2;
-    }
-}
-
-int vp56_free(AVCodecContext *avctx)
-{
-    vp56_context_t *s = avctx->priv_data;
-
-    av_free(s->above_blocks);
-    av_free(s->macroblocks);
-    av_free(s->edge_emu_buffer_alloc);
-    if (s->frames[VP56_FRAME_GOLDEN].data[0]
-        && (s->frames[VP56_FRAME_PREVIOUS].data[0]
-            != s->frames[VP56_FRAME_GOLDEN].data[0]))
-        avctx->release_buffer(avctx, &s->frames[VP56_FRAME_GOLDEN]);
-    if (s->frames[VP56_FRAME_PREVIOUS].data[0])
-        avctx->release_buffer(avctx, &s->frames[VP56_FRAME_PREVIOUS]);
-    return 0;
-}
--- a/src/ffmpeg/libavcodec/vp56.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/**
- * @file vp56.h
- * VP5 and VP6 compatible video decoder (common features)
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef VP56_H
-#define VP56_H
-
-#include <stdint.h>
-
-#include "vp56data.h"
-#include "dsputil.h"
-#include "mpegvideo.h"
-
-
-typedef struct vp56_context vp56_context_t;
-typedef struct vp56_mv vp56_mv_t;
-
-typedef void (*vp56_parse_vector_adjustment_t)(vp56_context_t *s,
-                                               vp56_mv_t *vect);
-typedef int (*vp56_adjust_t)(int v, int t);
-typedef void (*vp56_filter_t)(vp56_context_t *s, uint8_t *dst, uint8_t *src,
-                              int offset1, int offset2, int stride,
-                              vp56_mv_t mv, int mask, int select, int luma);
-typedef void (*vp56_parse_coeff_t)(vp56_context_t *s);
-typedef void (*vp56_default_models_init_t)(vp56_context_t *s);
-typedef void (*vp56_parse_vector_models_t)(vp56_context_t *s);
-typedef void (*vp56_parse_coeff_models_t)(vp56_context_t *s);
-typedef int (*vp56_parse_header_t)(vp56_context_t *s, uint8_t *buf,
-                                   int buf_size, int *golden_frame);
-
-typedef struct {
-    int high;
-    int bits;
-    const uint8_t *buffer;
-    unsigned long code_word;
-} vp56_range_coder_t;
-
-typedef struct {
-    uint8_t not_null_dc;
-    vp56_frame_t ref_frame;
-    DCTELEM dc_coeff;
-} vp56_ref_dc_t;
-
-struct vp56_mv {
-    int x;
-    int y;
-};
-
-typedef struct {
-    uint8_t type;
-    vp56_mv_t mv;
-} vp56_macroblock_t;
-
-struct vp56_context {
-    AVCodecContext *avctx;
-    DSPContext dsp;
-    ScanTable scantable;
-    AVFrame frames[3];
-    uint8_t *edge_emu_buffer_alloc;
-    uint8_t *edge_emu_buffer;
-    vp56_range_coder_t c;
-
-    /* frame info */
-    int plane_width[3];
-    int plane_height[3];
-    int mb_width;   /* number of horizontal MB */
-    int mb_height;  /* number of vertical MB */
-    int block_offset[6];
-
-    int quantizer;
-    uint16_t dequant_dc;
-    uint16_t dequant_ac;
-
-    /* DC predictors management */
-    vp56_ref_dc_t *above_blocks;
-    vp56_ref_dc_t left_block[4];
-    int above_block_idx[6];
-    DCTELEM prev_dc[3][3];    /* [plan][ref_frame] */
-
-    /* blocks / macroblock */
-    vp56_mb_t mb_type;
-    vp56_macroblock_t *macroblocks;
-    DECLARE_ALIGNED_16(DCTELEM, block_coeff[6][64]);
-    uint8_t coeff_reorder[64];       /* used in vp6 only */
-    uint8_t coeff_index_to_pos[64];  /* used in vp6 only */
-
-    /* motion vectors */
-    vp56_mv_t mv[6];  /* vectors for each block in MB */
-    vp56_mv_t vector_candidate[2];
-    int vector_candidate_pos;
-
-    /* filtering hints */
-    int deblock_filtering;
-    int filter_selection;
-    int filter_mode;
-    int max_vector_length;
-    int sample_variance_threshold;
-
-    /* AC models */
-    uint8_t vector_model_sig[2];           /* delta sign */
-    uint8_t vector_model_dct[2];           /* delta coding types */
-    uint8_t vector_model_pdi[2][2];        /* predefined delta init */
-    uint8_t vector_model_pdv[2][7];        /* predefined delta values */
-    uint8_t vector_model_fdv[2][8];        /* 8 bit delta value definition */
-    uint8_t mb_type_model[3][10][10];      /* model for decoding MB type */
-    uint8_t coeff_model_dccv[2][11];       /* DC coeff value */
-    uint8_t coeff_model_ract[2][3][6][11]; /* Run/AC coding type and AC coeff value */
-    uint8_t coeff_model_acct[2][3][3][6][5];/* vp5 only AC coding type for coding group < 3 */
-    uint8_t coeff_model_dcct[2][36][5];    /* DC coeff coding type */
-    uint8_t coeff_model_runv[2][14];       /* run value (vp6 only) */
-    uint8_t mb_types_stats[3][10][2];      /* contextual, next MB type stats */
-    uint8_t coeff_ctx[4][64];              /* used in vp5 only */
-    uint8_t coeff_ctx_last[4];             /* used in vp5 only */
-
-    /* upside-down flipping hints */
-    int flip;  /* are we flipping ? */
-    int frbi;  /* first row block index in MB */
-    int srbi;  /* second row block index in MB */
-    int stride[3];  /* stride for each plan */
-
-    const uint8_t *vp56_coord_div;
-    vp56_parse_vector_adjustment_t parse_vector_adjustment;
-    vp56_adjust_t adjust;
-    vp56_filter_t filter;
-    vp56_parse_coeff_t parse_coeff;
-    vp56_default_models_init_t default_models_init;
-    vp56_parse_vector_models_t parse_vector_models;
-    vp56_parse_coeff_models_t parse_coeff_models;
-    vp56_parse_header_t parse_header;
-};
-
-
-void vp56_init(vp56_context_t *s, AVCodecContext *avctx, int flip);
-int vp56_free(AVCodecContext *avctx);
-void vp56_init_dequant(vp56_context_t *s, int quantizer);
-int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                      uint8_t *buf, int buf_size);
-
-
-/**
- * vp56 specific range coder implementation
- */
-
-static inline void vp56_init_range_decoder(vp56_range_coder_t *c,
-                                           const uint8_t *buf, int buf_size)
-{
-    c->high = 255;
-    c->bits = 8;
-    c->buffer = buf;
-    c->code_word = *c->buffer++ << 8;
-    c->code_word |= *c->buffer++;
-}
-
-static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob)
-{
-    unsigned int low = 1 + (((c->high - 1) * prob) / 256);
-    unsigned int low_shift = low << 8;
-    int bit = c->code_word >= low_shift;
-
-    if (bit) {
-        c->high -= low;
-        c->code_word -= low_shift;
-    } else {
-        c->high = low;
-    }
-
-    /* normalize */
-    while (c->high < 128) {
-        c->high <<= 1;
-        c->code_word <<= 1;
-        if (--c->bits == 0) {
-            c->bits = 8;
-            c->code_word |= *c->buffer++;
-        }
-    }
-    return bit;
-}
-
-static inline int vp56_rac_get(vp56_range_coder_t *c)
-{
-    /* equiprobable */
-    int low = (c->high + 1) >> 1;
-    unsigned int low_shift = low << 8;
-    int bit = c->code_word >= low_shift;
-    if (bit) {
-        c->high = (c->high - low) << 1;
-        c->code_word -= low_shift;
-    } else {
-        c->high = low << 1;
-    }
-
-    /* normalize */
-    c->code_word <<= 1;
-    if (--c->bits == 0) {
-        c->bits = 8;
-        c->code_word |= *c->buffer++;
-    }
-    return bit;
-}
-
-static inline int vp56_rac_gets(vp56_range_coder_t *c, int bits)
-{
-    int value = 0;
-
-    while (bits--) {
-        value = (value << 1) | vp56_rac_get(c);
-    }
-
-    return value;
-}
-
-static inline int vp56_rac_gets_nn(vp56_range_coder_t *c, int bits)
-{
-    int v = vp56_rac_gets(c, 7) << 1;
-    return v + !v;
-}
-
-static inline int vp56_rac_get_tree(vp56_range_coder_t *c,
-                                    const vp56_tree_t *tree,
-                                    const uint8_t *probs)
-{
-    while (tree->val > 0) {
-        if (vp56_rac_get_prob(c, probs[tree->prob_idx]))
-            tree += tree->val;
-        else
-            tree++;
-    }
-    return -tree->val;
-}
-
-#endif /* VP56_H */
--- a/src/ffmpeg/libavcodec/vp56data.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/**
- * @file vp56data.c
- * VP5 and VP6 compatible video decoder (common data)
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <inttypes.h>
-#include "vp56data.h"
-
-const uint8_t vp56_b6to3[] = { 0, 0, 0, 0, 1, 2 };
-const uint8_t vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 };
-
-const uint8_t vp56_coeff_parse_table[6][11] = {
-    { 159,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 },
-    { 145, 165,   0,   0,   0,   0,   0,   0,   0,   0,   0 },
-    { 140, 148, 173,   0,   0,   0,   0,   0,   0,   0,   0 },
-    { 135, 140, 155, 176,   0,   0,   0,   0,   0,   0,   0 },
-    { 130, 134, 141, 157, 180,   0,   0,   0,   0,   0,   0 },
-    { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254 },
-};
-
-const uint8_t vp56_def_mb_types_stats[3][10][2] = {
-    { {  69, 42 }, {   1,  2 }, {  1,   7 }, {  44, 42 }, {  6, 22 },
-      {   1,  3 }, {   0,  2 }, {  1,   5 }, {   0,  1 }, {  0,  0 }, },
-    { { 229,  8 }, {   1,  1 }, {  0,   8 }, {   0,  0 }, {  0,  0 },
-      {   1,  2 }, {   0,  1 }, {  0,   0 }, {   1,  1 }, {  0,  0 }, },
-    { { 122, 35 }, {   1,  1 }, {  1,   6 }, {  46, 34 }, {  0,  0 },
-      {   1,  2 }, {   0,  1 }, {  0,   1 }, {   1,  1 }, {  0,  0 }, },
-};
-
-const vp56_tree_t vp56_pva_tree[] = {
-    { 8, 0},
-    { 4, 1},
-    { 2, 2}, {-0}, {-1},
-    { 2, 3}, {-2}, {-3},
-    { 4, 4},
-    { 2, 5}, {-4}, {-5},
-    { 2, 6}, {-6}, {-7},
-};
-
-const vp56_tree_t vp56_pc_tree[] = {
-    { 4, 6},
-    { 2, 7}, {-0}, {-1},
-    { 4, 8},
-    { 2, 9}, {-2}, {-3},
-    { 2,10}, {-4}, {-5},
-};
-
-const uint8_t vp56_coeff_bias[] = { 5, 7, 11, 19, 35, 67 };
-const uint8_t vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 };
--- a/src/ffmpeg/libavcodec/vp56data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/**
- * @file vp56data.h
- * VP5 and VP6 compatible video decoder (common data)
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef VP56DATA_H
-#define VP56DATA_H
-
-#include <inttypes.h>
-
-typedef enum {
-    VP56_FRAME_CURRENT  = 0,
-    VP56_FRAME_PREVIOUS = 1,
-    VP56_FRAME_GOLDEN   = 2,
-} vp56_frame_t;
-
-typedef enum {
-    VP56_MB_INTER_NOVEC_PF = 0,  /**< Inter MB, no vector, from previous frame */
-    VP56_MB_INTRA          = 1,  /**< Intra MB */
-    VP56_MB_INTER_DELTA_PF = 2,  /**< Inter MB, above/left vector + delta, from previous frame */
-    VP56_MB_INTER_V1_PF    = 3,  /**< Inter MB, first vector, from previous frame */
-    VP56_MB_INTER_V2_PF    = 4,  /**< Inter MB, second vector, from previous frame */
-    VP56_MB_INTER_NOVEC_GF = 5,  /**< Inter MB, no vector, from golden frame */
-    VP56_MB_INTER_DELTA_GF = 6,  /**< Inter MB, above/left vector + delta, from golden frame */
-    VP56_MB_INTER_4V       = 7,  /**< Inter MB, 4 vectors, from previous frame */
-    VP56_MB_INTER_V1_GF    = 8,  /**< Inter MB, first vector, from golden frame */
-    VP56_MB_INTER_V2_GF    = 9,  /**< Inter MB, second vector, from golden frame */
-} vp56_mb_t;
-
-typedef struct {
-  int8_t val;
-  int8_t prob_idx;
-} vp56_tree_t;
-
-extern const uint8_t vp56_b6to3[];
-extern const uint8_t vp56_b6to4[];
-extern const uint8_t vp56_coeff_parse_table[6][11];
-extern const uint8_t vp56_def_mb_types_stats[3][10][2];
-extern const vp56_tree_t vp56_pva_tree[];
-extern const vp56_tree_t vp56_pc_tree[];
-extern const uint8_t vp56_coeff_bias[];
-extern const uint8_t vp56_coeff_bit_length[];
-
-static const vp56_frame_t vp56_reference_frame[] = {
-    VP56_FRAME_PREVIOUS,  /* VP56_MB_INTER_NOVEC_PF */
-    VP56_FRAME_CURRENT,   /* VP56_MB_INTRA */
-    VP56_FRAME_PREVIOUS,  /* VP56_MB_INTER_DELTA_PF */
-    VP56_FRAME_PREVIOUS,  /* VP56_MB_INTER_V1_PF */
-    VP56_FRAME_PREVIOUS,  /* VP56_MB_INTER_V2_PF */
-    VP56_FRAME_GOLDEN,    /* VP56_MB_INTER_NOVEC_GF */
-    VP56_FRAME_GOLDEN,    /* VP56_MB_INTER_DELTA_GF */
-    VP56_FRAME_PREVIOUS,  /* VP56_MB_INTER_4V */
-    VP56_FRAME_GOLDEN,    /* VP56_MB_INTER_V1_GF */
-    VP56_FRAME_GOLDEN,    /* VP56_MB_INTER_V2_GF */
-};
-
-static const uint8_t vp56_ac_dequant[64] = {
-    94, 92, 90, 88, 86, 82, 78, 74,
-    70, 66, 62, 58, 54, 53, 52, 51,
-    50, 49, 48, 47, 46, 45, 44, 43,
-    42, 40, 39, 37, 36, 35, 34, 33,
-    32, 31, 30, 29, 28, 27, 26, 25,
-    24, 23, 22, 21, 20, 19, 18, 17,
-    16, 15, 14, 13, 12, 11, 10,  9,
-     8,  7,  6,  5,  4,  3,  2,  1,
-};
-
-static const uint8_t vp56_dc_dequant[64] = {
-    47, 47, 47, 47, 45, 43, 43, 43,
-    43, 43, 42, 41, 41, 40, 40, 40,
-    40, 35, 35, 35, 35, 33, 33, 33,
-    33, 32, 32, 32, 27, 27, 26, 26,
-    25, 25, 24, 24, 23, 23, 19, 19,
-    19, 19, 18, 18, 17, 16, 16, 16,
-    16, 16, 15, 11, 11, 11, 10, 10,
-     9,  8,  7,  5,  3,  3,  2,  2,
-};
-
-static const uint8_t vp56_pre_def_mb_type_stats[16][3][10][2] = {
-  { { {   9, 15 }, {  32, 25 }, {  7,  19 }, {   9, 21 }, {  1, 12 },
-      {  14, 12 }, {   3, 18 }, { 14,  23 }, {   3, 10 }, {  0,  4 }, },
-    { {  41, 22 }, {   1,  0 }, {  1,  31 }, {   0,  0 }, {  0,  0 },
-      {   0,  1 }, {   1,  7 }, {  0,   1 }, {  98, 25 }, {  4, 10 }, },
-    { {   2,  3 }, {   2,  3 }, {  0,   2 }, {   0,  2 }, {  0,  0 },
-      {  11,  4 }, {   1,  4 }, {  0,   2 }, {   3,  2 }, {  0,  4 }, }, },
-  { { {  48, 39 }, {   1,  2 }, { 11,  27 }, {  29, 44 }, {  7, 27 },
-      {   1,  4 }, {   0,  3 }, {  1,   6 }, {   1,  2 }, {  0,  0 }, },
-    { { 123, 37 }, {   6,  4 }, {  1,  27 }, {   0,  0 }, {  0,  0 },
-      {   5,  8 }, {   1,  7 }, {  0,   1 }, {  12, 10 }, {  0,  2 }, },
-    { {  49, 46 }, {   3,  4 }, {  7,  31 }, {  42, 41 }, {  0,  0 },
-      {   2,  6 }, {   1,  7 }, {  1,   4 }, {   2,  4 }, {  0,  1 }, }, },
-  { { {  21, 32 }, {   1,  2 }, {  4,  10 }, {  32, 43 }, {  6, 23 },
-      {   2,  3 }, {   1, 19 }, {  1,   6 }, {  12, 21 }, {  0,  7 }, },
-    { {  26, 14 }, {  14, 12 }, {  0,  24 }, {   0,  0 }, {  0,  0 },
-      {  55, 17 }, {   1,  9 }, {  0,  36 }, {   5,  7 }, {  1,  3 }, },
-    { {  26, 25 }, {   1,  1 }, {  2,  10 }, {  67, 39 }, {  0,  0 },
-      {   1,  1 }, {   0, 14 }, {  0,   2 }, {  31, 26 }, {  1,  6 }, }, },
-  { { {  69, 83 }, {   0,  0 }, {  0,   2 }, {  10, 29 }, {  3, 12 },
-      {   0,  1 }, {   0,  3 }, {  0,   3 }, {   2,  2 }, {  0,  0 }, },
-    { { 209,  5 }, {   0,  0 }, {  0,  27 }, {   0,  0 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   0,  0 }, {  0,  0 }, },
-    { { 103, 46 }, {   1,  2 }, {  2,  10 }, {  33, 42 }, {  0,  0 },
-      {   1,  4 }, {   0,  3 }, {  0,   1 }, {   1,  3 }, {  0,  0 }, }, },
-  { { {  11, 20 }, {   1,  4 }, { 18,  36 }, {  43, 48 }, { 13, 35 },
-      {   0,  2 }, {   0,  5 }, {  3,  12 }, {   1,  2 }, {  0,  0 }, },
-    { {   2,  5 }, {   4,  5 }, {  0, 121 }, {   0,  0 }, {  0,  0 },
-      {   0,  3 }, {   2,  4 }, {  1,   4 }, {   2,  2 }, {  0,  1 }, },
-    { {  14, 31 }, {   9, 13 }, { 14,  54 }, {  22, 29 }, {  0,  0 },
-      {   2,  6 }, {   4, 18 }, {  6,  13 }, {   1,  5 }, {  0,  1 }, }, },
-  { { {  70, 44 }, {   0,  1 }, {  2,  10 }, {  37, 46 }, {  8, 26 },
-      {   0,  2 }, {   0,  2 }, {  0,   2 }, {   0,  1 }, {  0,  0 }, },
-    { { 175,  5 }, {   0,  1 }, {  0,  48 }, {   0,  0 }, {  0,  0 },
-      {   0,  2 }, {   0,  1 }, {  0,   2 }, {   0,  1 }, {  0,  0 }, },
-    { {  85, 39 }, {   0,  0 }, {  1,   9 }, {  69, 40 }, {  0,  0 },
-      {   0,  1 }, {   0,  3 }, {  0,   1 }, {   2,  3 }, {  0,  0 }, }, },
-  { { {   8, 15 }, {   0,  1 }, {  8,  21 }, {  74, 53 }, { 22, 42 },
-      {   0,  1 }, {   0,  2 }, {  0,   3 }, {   1,  2 }, {  0,  0 }, },
-    { {  83,  5 }, {   2,  3 }, {  0, 102 }, {   0,  0 }, {  0,  0 },
-      {   1,  3 }, {   0,  2 }, {  0,   1 }, {   0,  0 }, {  0,  0 }, },
-    { {  31, 28 }, {   0,  0 }, {  3,  14 }, { 130, 34 }, {  0,  0 },
-      {   0,  1 }, {   0,  3 }, {  0,   1 }, {   3,  3 }, {  0,  1 }, }, },
-  { { { 141, 42 }, {   0,  0 }, {  1,   4 }, {  11, 24 }, {  1, 11 },
-      {   0,  1 }, {   0,  1 }, {  0,   2 }, {   0,  0 }, {  0,  0 }, },
-    { { 233,  6 }, {   0,  0 }, {  0,   8 }, {   0,  0 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   0 }, {   0,  1 }, {  0,  0 }, },
-    { { 171, 25 }, {   0,  0 }, {  1,   5 }, {  25, 21 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   0 }, {   0,  0 }, {  0,  0 }, }, },
-  { { {   8, 19 }, {   4, 10 }, { 24,  45 }, {  21, 37 }, {  9, 29 },
-      {   0,  3 }, {   1,  7 }, { 11,  25 }, {   0,  2 }, {  0,  1 }, },
-    { {  34, 16 }, { 112, 21 }, {  1,  28 }, {   0,  0 }, {  0,  0 },
-      {   6,  8 }, {   1,  7 }, {  0,   3 }, {   2,  5 }, {  0,  2 }, },
-    { {  17, 21 }, {  68, 29 }, {  6,  15 }, {  13, 22 }, {  0,  0 },
-      {   6, 12 }, {   3, 14 }, {  4,  10 }, {   1,  7 }, {  0,  3 }, }, },
-  { { {  46, 42 }, {   0,  1 }, {  2,  10 }, {  54, 51 }, { 10, 30 },
-      {   0,  2 }, {   0,  2 }, {  0,   1 }, {   0,  1 }, {  0,  0 }, },
-    { { 159, 35 }, {   2,  2 }, {  0,  25 }, {   0,  0 }, {  0,  0 },
-      {   3,  6 }, {   0,  5 }, {  0,   1 }, {   4,  4 }, {  0,  1 }, },
-    { {  51, 39 }, {   0,  1 }, {  2,  12 }, {  91, 44 }, {  0,  0 },
-      {   0,  2 }, {   0,  3 }, {  0,   1 }, {   2,  3 }, {  0,  1 }, }, },
-  { { {  28, 32 }, {   0,  0 }, {  3,  10 }, {  75, 51 }, { 14, 33 },
-      {   0,  1 }, {   0,  2 }, {  0,   1 }, {   1,  2 }, {  0,  0 }, },
-    { {  75, 39 }, {   5,  7 }, {  2,  48 }, {   0,  0 }, {  0,  0 },
-      {   3, 11 }, {   2, 16 }, {  1,   4 }, {   7, 10 }, {  0,  2 }, },
-    { {  81, 25 }, {   0,  0 }, {  2,   9 }, { 106, 26 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   1,  1 }, {  0,  0 }, }, },
-  { { { 100, 46 }, {   0,  1 }, {  3,   9 }, {  21, 37 }, {  5, 20 },
-      {   0,  1 }, {   0,  2 }, {  1,   2 }, {   0,  1 }, {  0,  0 }, },
-    { { 212, 21 }, {   0,  1 }, {  0,   9 }, {   0,  0 }, {  0,  0 },
-      {   1,  2 }, {   0,  2 }, {  0,   0 }, {   2,  2 }, {  0,  0 }, },
-    { { 140, 37 }, {   0,  1 }, {  1,   8 }, {  24, 33 }, {  0,  0 },
-      {   1,  2 }, {   0,  2 }, {  0,   1 }, {   1,  2 }, {  0,  0 }, }, },
-  { { {  27, 29 }, {   0,  1 }, {  9,  25 }, {  53, 51 }, { 12, 34 },
-      {   0,  1 }, {   0,  3 }, {  1,   5 }, {   0,  2 }, {  0,  0 }, },
-    { {   4,  2 }, {   0,  0 }, {  0, 172 }, {   0,  0 }, {  0,  0 },
-      {   0,  1 }, {   0,  2 }, {  0,   0 }, {   2,  0 }, {  0,  0 }, },
-    { {  14, 23 }, {   1,  3 }, { 11,  53 }, {  90, 31 }, {  0,  0 },
-      {   0,  3 }, {   1,  5 }, {  2,   6 }, {   1,  2 }, {  0,  0 }, }, },
-  { { {  80, 38 }, {   0,  0 }, {  1,   4 }, {  69, 33 }, {  5, 16 },
-      {   0,  1 }, {   0,  1 }, {  0,   0 }, {   0,  1 }, {  0,  0 }, },
-    { { 187, 22 }, {   1,  1 }, {  0,  17 }, {   0,  0 }, {  0,  0 },
-      {   3,  6 }, {   0,  4 }, {  0,   1 }, {   4,  4 }, {  0,  1 }, },
-    { { 123, 29 }, {   0,  0 }, {  1,   7 }, {  57, 30 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   0,  1 }, {  0,  0 }, }, },
-  { { {  16, 20 }, {   0,  0 }, {  2,   8 }, { 104, 49 }, { 15, 33 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   1,  1 }, {  0,  0 }, },
-    { { 133,  6 }, {   1,  2 }, {  1,  70 }, {   0,  0 }, {  0,  0 },
-      {   0,  2 }, {   0,  4 }, {  0,   3 }, {   1,  1 }, {  0,  0 }, },
-    { {  13, 14 }, {   0,  0 }, {  4,  20 }, { 175, 20 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   1,  1 }, {  0,  0 }, }, },
-  { { { 194, 16 }, {   0,  0 }, {  1,   1 }, {   1,  9 }, {  1,  3 },
-      {   0,  0 }, {   0,  1 }, {  0,   1 }, {   0,  0 }, {  0,  0 }, },
-    { { 251,  1 }, {   0,  0 }, {  0,   2 }, {   0,  0 }, {  0,  0 },
-      {   0,  0 }, {   0,  0 }, {  0,   0 }, {   0,  0 }, {  0,  0 }, },
-    { { 202, 23 }, {   0,  0 }, {  1,   3 }, {   2,  9 }, {  0,  0 },
-      {   0,  1 }, {   0,  1 }, {  0,   1 }, {   0,  0 }, {  0,  0 }, }, },
-};
-
-static const uint8_t vp56_filter_threshold[] = {
-    14, 14, 13, 13, 12, 12, 10, 10,
-    10, 10,  8,  8,  8,  8,  8,  8,
-     8,  8,  8,  8,  8,  8,  8,  8,
-     8,  8,  8,  8,  8,  8,  8,  8,
-     8,  8,  8,  8,  7,  7,  7,  7,
-     7,  7,  6,  6,  6,  6,  6,  6,
-     5,  5,  5,  5,  4,  4,  4,  4,
-     4,  4,  4,  3,  3,  3,  3,  2,
-};
-
-static const uint8_t vp56_mb_type_model_model[] = {
-    171, 83, 199, 140, 125, 104,
-};
-
-static const vp56_tree_t vp56_pmbtm_tree[] = {
-    { 4, 0},
-    { 2, 1}, {-8}, {-4},
-    { 8, 2},
-    { 6, 3},
-    { 4, 4},
-    { 2, 5}, {-24}, {-20}, {-16}, {-12}, {-0},
-};
-
-static const vp56_tree_t vp56_pmbt_tree[] = {
-    { 8, 1},
-    { 4, 2},
-    { 2, 4}, {-VP56_MB_INTER_NOVEC_PF}, {-VP56_MB_INTER_DELTA_PF},
-    { 2, 5}, {-VP56_MB_INTER_V1_PF},    {-VP56_MB_INTER_V2_PF},
-    { 4, 3},
-    { 2, 6}, {-VP56_MB_INTRA},          {-VP56_MB_INTER_4V},
-    { 4, 7},
-    { 2, 8}, {-VP56_MB_INTER_NOVEC_GF}, {-VP56_MB_INTER_DELTA_GF},
-    { 2, 9}, {-VP56_MB_INTER_V1_GF},    {-VP56_MB_INTER_V2_GF},
-};
-
-/* relative pos of surrounding blocks, from closest to farthest */
-static const int8_t vp56_candidate_predictor_pos[12][2] = {
-    {  0, -1 },
-    { -1,  0 },
-    { -1, -1 },
-    {  1, -1 },
-    {  0, -2 },
-    { -2,  0 },
-    { -2, -1 },
-    { -1, -2 },
-    {  1, -2 },
-    {  2, -1 },
-    { -2, -2 },
-    {  2, -2 },
-};
-
-#endif /* VP56DATA */
--- a/src/ffmpeg/libavcodec/vp5data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/**
- * @file vp5data.h
- * VP5 compatible video decoder
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef VP5DATA_H
-#define VP5DATA_H
-
-#include <inttypes.h>
-
-static const uint8_t vp5_coeff_groups[] = {
-    -1, 0, 1, 1, 2, 1, 1, 2,
-     2, 1, 1, 2, 2, 2, 1, 2,
-     2, 2, 2, 2, 1, 1, 2, 2,
-     3, 3, 4, 3, 4, 4, 4, 3,
-     3, 3, 3, 3, 4, 3, 3, 3,
-     4, 4, 4, 4, 4, 3, 3, 4,
-     4, 4, 3, 4, 4, 4, 4, 4,
-     4, 4, 5, 5, 5, 5, 5, 5,
-};
-
-static const uint8_t vp5_vmc_pct[2][11] = {
-    { 243, 220, 251, 253, 237, 232, 241, 245, 247, 251, 253 },
-    { 235, 211, 246, 249, 234, 231, 248, 249, 252, 252, 254 },
-};
-
-static const uint8_t vp5_dccv_pct[2][11] = {
-    { 146, 197, 181, 207, 232, 243, 238, 251, 244, 250, 249 },
-    { 179, 219, 214, 240, 250, 254, 244, 254, 254, 254, 254 },
-};
-
-static const uint8_t vp5_ract_pct[3][2][6][11] = {
-    { { { 227, 246, 230, 247, 244, 254, 254, 254, 254, 254, 254 },
-        { 202, 254, 209, 231, 231, 249, 249, 253, 254, 254, 254 },
-        { 206, 254, 225, 242, 241, 251, 253, 254, 254, 254, 254 },
-        { 235, 254, 241, 253, 252, 254, 254, 254, 254, 254, 254 },
-        { 234, 254, 248, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } },
-      { { 240, 254, 248, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 238, 254, 240, 253, 254, 254, 254, 254, 254, 254, 254 },
-        { 244, 254, 251, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } },
-    { { { 206, 203, 227, 239, 247, 254, 253, 254, 254, 254, 254 },
-        { 207, 199, 220, 236, 243, 252, 252, 254, 254, 254, 254 },
-        { 212, 219, 230, 243, 244, 253, 252, 254, 254, 254, 254 },
-        { 236, 237, 247, 252, 253, 254, 254, 254, 254, 254, 254 },
-        { 240, 240, 248, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } },
-      { { 230, 233, 249, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 238, 238, 250, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 248, 251, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } },
-    { { { 225, 239, 227, 231, 244, 253, 243, 254, 254, 253, 254 },
-        { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 254 },
-        { 235, 249, 238, 240, 251, 254, 249, 254, 253, 253, 254 },
-        { 249, 253, 251, 250, 254, 254, 254, 254, 254, 254, 254 },
-        { 251, 250, 249, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } },
-      { { 243, 244, 250, 250, 254, 254, 254, 254, 254, 254, 254 },
-        { 249, 248, 250, 253, 254, 254, 254, 254, 254, 254, 254 },
-        { 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 },
-        { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } },
-};
-
-static const int16_t vp5_dccv_lc[5][36][2] = {
-    { {154,  61}, {141,  54}, { 90,  45}, { 54,  34}, { 54,  13}, {128, 109},
-      {136,  54}, {148,  45}, { 92,  41}, { 54,  33}, { 51,  15}, { 87, 113},
-      { 87,  44}, { 97,  40}, { 67,  36}, { 46,  29}, { 41,  15}, { 64,  80},
-      { 59,  33}, { 61,  31}, { 51,  28}, { 44,  22}, { 33,  12}, { 49,  63},
-      { 69,  12}, { 59,  16}, { 46,  14}, { 31,  13}, { 26,   6}, { 92,  26},
-      {128, 108}, { 77, 119}, { 54,  84}, { 26,  71}, { 87,  19}, { 95, 155} },
-    { {154,   4}, {182,   0}, {159,  -8}, {128,  -5}, {143,  -5}, {187,  55},
-      {182,   0}, {228,  -3}, {187,  -7}, {174,  -9}, {189, -11}, {169,  79},
-      {161,  -9}, {192,  -8}, {187,  -9}, {169, -10}, {136,  -9}, {184,  40},
-      {164, -11}, {179, -10}, {174, -10}, {161, -10}, {115,  -7}, {197,  20},
-      {195, -11}, {195, -11}, {146, -10}, {110,  -6}, { 95,  -4}, {195,  39},
-      {182,  55}, {172,  77}, {177,  37}, {169,  29}, {172,  52}, { 92, 162} },
-    { {174,  80}, {164,  80}, { 95,  80}, { 46,  66}, { 56,  24}, { 36, 193},
-      {164,  80}, {166,  77}, {105,  76}, { 49,  68}, { 46,  31}, { 49, 186},
-      { 97,  78}, {110,  74}, { 72,  72}, { 44,  60}, { 33,  30}, { 69, 131},
-      { 61,  61}, { 69,  63}, { 51,  57}, { 31,  48}, { 26,  27}, { 64,  89},
-      { 67,  23}, { 51,  32}, { 36,  33}, { 26,  28}, { 20,  12}, { 44,  68},
-      { 26, 197}, { 41, 189}, { 61, 129}, { 28, 103}, { 49,  52}, {-12, 245} },
-    { {102, 141}, { 79, 166}, { 72, 162}, { 97, 125}, {179,   4}, {307,   0},
-      { 72, 168}, { 69, 175}, { 84, 160}, {105, 127}, {148,  34}, {310,   0},
-      { 84, 151}, { 82, 161}, { 87, 153}, { 87, 135}, {115,  51}, {317,   0},
-      { 97, 125}, {102, 131}, {105, 125}, { 87, 122}, { 84,  64}, { 54, 184},
-      {166,  18}, {146,  43}, {125,  51}, { 90,  64}, { 95,   7}, { 38, 154},
-      {294,   0}, { 13, 225}, { 10, 225}, { 67, 168}, {  0, 167}, {161,  94} },
-    { {172,  76}, {172,  75}, {136,  80}, { 64,  98}, { 74,  67}, {315,   0},
-      {169,  76}, {207,  56}, {164,  66}, { 97,  80}, { 67,  72}, {328,   0},
-      {136,  80}, {187,  53}, {154,  62}, { 72,  85}, { -2, 105}, {305,   0},
-      { 74,  91}, {128,  64}, {113,  64}, { 61,  77}, { 41,  75}, {259,   0},
-      { 46,  84}, { 51,  81}, { 28,  89}, { 31,  78}, { 23,  77}, {202,   0},
-      {323,   0}, {323,   0}, {300,   0}, {236,   0}, {195,   0}, {328,   0} },
-};
-
-static const int16_t vp5_ract_lc[3][3][5][6][2] = {
-    { { { {276,  0}, {238,  0}, {195,  0}, {156,  0}, {113,  0}, {274,  0} },
-        { {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1} },
-        { {192, 59}, {182, 50}, {141, 48}, {110, 40}, { 92, 19}, {125,128} },
-        { {169, 87}, {169, 83}, {184, 62}, {220, 16}, {184,  0}, {264,  0} },
-        { {212, 40}, {212, 36}, {169, 49}, {174, 27}, {  8,120}, {182, 71} } },
-      { { {259, 10}, {197, 19}, {143, 22}, {123, 16}, {110,  8}, {133, 88} },
-        { {  0,  1}, {256,  0}, {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1} },
-        { {207, 46}, {187, 50}, { 97, 83}, { 23,100}, { 41, 56}, { 56,188} },
-        { {166, 90}, {146,108}, {161, 88}, {136, 95}, {174,  0}, {266,  0} },
-        { {264,  7}, {243, 18}, {184, 43}, {-14,154}, { 20,112}, { 20,199} } },
-      { { {230, 26}, {197, 22}, {159, 20}, {146, 12}, {136,  4}, { 54,162} },
-        { {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1}, {  0,  1} },
-        { {192, 59}, {156, 72}, { 84,101}, { 49,101}, { 79, 47}, { 79,167} },
-        { {138,115}, {136,116}, {166, 80}, {238,  0}, {195,  0}, {261,  0} },
-        { {225, 33}, {205, 42}, {159, 61}, { 79, 96}, { 92, 66}, { 28,195} } },
-    }, {
-      { { {200, 37}, {197, 18}, {159, 13}, {143,  7}, {102,  5}, {123,126} },
-        { {197,  3}, {220, -9}, {210,-12}, {187, -6}, {151, -2}, {174, 80} },
-        { {200, 53}, {187, 47}, {159, 40}, {118, 38}, {100, 18}, {141,111} },
-        { {179, 78}, {166, 86}, {197, 50}, {207, 27}, {187,  0}, {115,139} },
-        { {218, 34}, {220, 29}, {174, 46}, {128, 61}, { 54, 89}, {187, 65} } },
-      { { {238, 14}, {197, 18}, {125, 26}, { 90, 25}, { 82, 13}, {161, 86} },
-        { {189,  1}, {205, -2}, {156, -4}, {143, -4}, {146, -4}, {172, 72} },
-        { {230, 31}, {192, 45}, {102, 76}, { 38, 85}, { 56, 41}, { 64,173} },
-        { {166, 91}, {141,111}, {128,116}, {118,109}, {177,  0}, { 23,222} },
-        { {253, 14}, {236, 21}, {174, 49}, { 33,118}, { 44, 93}, { 23,187} } },
-      { { {218, 28}, {179, 28}, {118, 35}, { 95, 30}, { 72, 24}, {128,108} },
-        { {187,  1}, {174, -1}, {125, -1}, {110, -1}, {108, -1}, {202, 52} },
-        { {197, 53}, {146, 75}, { 46,118}, { 33,103}, { 64, 50}, {118,126} },
-        { {138,114}, {128,122}, {161, 86}, {243, -6}, {195,  0}, { 38,210} },
-        { {215, 39}, {179, 58}, { 97,101}, { 95, 85}, { 87, 70}, { 69,152} } },
-    }, {
-      { { {236, 24}, {205, 18}, {172, 12}, {154,  6}, {125,  1}, {169, 75} },
-        { {187,  4}, {230, -2}, {228, -4}, {236, -4}, {241, -2}, {192, 66} },
-        { {200, 46}, {187, 42}, {159, 34}, {136, 25}, {105, 10}, {179, 62} },
-        { {207, 55}, {192, 63}, {192, 54}, {195, 36}, {177,  1}, {143, 98} },
-        { {225, 27}, {207, 34}, {200, 30}, {131, 57}, { 97, 60}, {197, 45} } },
-      { { {271,  8}, {218, 13}, {133, 19}, { 90, 19}, { 72,  7}, {182, 51} },
-        { {179,  1}, {225, -1}, {154, -2}, {110, -1}, { 92,  0}, {195, 41} },
-        { {241, 26}, {189, 40}, { 82, 64}, { 33, 60}, { 67, 17}, {120, 94} },
-        { {192, 68}, {151, 94}, {146, 90}, {143, 72}, {161,  0}, {113,128} },
-        { {256, 12}, {218, 29}, {166, 48}, { 44, 99}, { 31, 87}, {148, 78} } },
-      { { {238, 20}, {184, 22}, {113, 27}, { 90, 22}, { 74,  9}, {192, 37} },
-        { {184,  0}, {215, -1}, {141, -1}, { 97,  0}, { 49,  0}, {264, 13} },
-        { {182, 51}, {138, 61}, { 95, 63}, { 54, 59}, { 64, 25}, {200, 45} },
-        { {179, 75}, {156, 87}, {174, 65}, {177, 44}, {174,  0}, {164, 85} },
-        { {195, 45}, {148, 65}, {105, 79}, { 95, 72}, { 87, 60}, {169, 63} } },
-    }
-};
-
-static const uint8_t vp5_coord_div[] = { 2, 2, 2, 2, 4, 4 };
-
-#endif /* VP5DATA_H */
--- a/src/ffmpeg/libavcodec/vp6.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,514 +0,0 @@
-/**
- * @file vp6.c
- * VP6 compatible video decoder
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "avcodec.h"
-#include "dsputil.h"
-#include "bitstream.h"
-#include "mpegvideo.h"
-
-#include "vp56.h"
-#include "vp56data.h"
-#include "vp6data.h"
-
-
-static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
-                            int *golden_frame)
-{
-    vp56_range_coder_t *c = &s->c;
-    int parse_filter_info;
-    int rows, cols;
-    int res = 1;
-
-    if (buf[0] & 1)
-        return 0;
-
-    s->frames[VP56_FRAME_CURRENT].key_frame = !(buf[0] & 0x80);
-    vp56_init_dequant(s, (buf[0] >> 1) & 0x3F);
-
-    if (s->frames[VP56_FRAME_CURRENT].key_frame) {
-        if ((buf[1] & 0xFE) != 0x46)  /* would be 0x36 for VP61 */
-            return 0;
-        if (buf[1] & 1) {
-            av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
-            return 0;
-        }
-
-        rows = buf[2];  /* number of stored macroblock rows */
-        cols = buf[3];  /* number of stored macroblock cols */
-        /* buf[4] is number of displayed macroblock rows */
-        /* buf[5] is number of displayed macroblock cols */
-
-        if (16*cols != s->avctx->coded_width ||
-            16*rows != s->avctx->coded_height) {
-            avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
-            res = 2;
-        }
-
-        vp56_init_range_decoder(c, buf+6, buf_size-6);
-        vp56_rac_gets(c, 2);
-
-        parse_filter_info = 1;
-    } else {
-        vp56_init_range_decoder(c, buf+1, buf_size-1);
-
-        *golden_frame = vp56_rac_get(c);
-        s->deblock_filtering = vp56_rac_get(c);
-        if (s->deblock_filtering)
-            vp56_rac_get(c);
-        parse_filter_info = vp56_rac_get(c);
-    }
-
-    if (parse_filter_info) {
-        if (vp56_rac_get(c)) {
-            s->filter_mode = 2;
-            s->sample_variance_threshold = vp56_rac_gets(c, 5);
-            s->max_vector_length = 2 << vp56_rac_gets(c, 3);
-        } else if (vp56_rac_get(c)) {
-            s->filter_mode = 1;
-        } else {
-            s->filter_mode = 0;
-        }
-        s->filter_selection = vp56_rac_gets(c, 4);
-    }
-
-    vp56_rac_get(c);
-    return res;
-}
-
-static void vp6_coeff_order_table_init(vp56_context_t *s)
-{
-    int i, pos, idx = 1;
-
-    s->coeff_index_to_pos[0] = 0;
-    for (i=0; i<16; i++)
-        for (pos=1; pos<64; pos++)
-            if (s->coeff_reorder[pos] == i)
-                s->coeff_index_to_pos[idx++] = pos;
-}
-
-static void vp6_default_models_init(vp56_context_t *s)
-{
-    s->vector_model_dct[0] = 0xA2;
-    s->vector_model_dct[1] = 0xA4;
-    s->vector_model_sig[0] = 0x80;
-    s->vector_model_sig[1] = 0x80;
-
-    memcpy(s->mb_types_stats, vp56_def_mb_types_stats, sizeof(s->mb_types_stats));
-    memcpy(s->vector_model_fdv, vp6_def_fdv_vector_model, sizeof(s->vector_model_fdv));
-    memcpy(s->vector_model_pdv, vp6_def_pdv_vector_model, sizeof(s->vector_model_pdv));
-    memcpy(s->coeff_model_runv, vp6_def_runv_coeff_model, sizeof(s->coeff_model_runv));
-    memcpy(s->coeff_reorder, vp6_def_coeff_reorder, sizeof(s->coeff_reorder));
-
-    vp6_coeff_order_table_init(s);
-}
-
-static void vp6_parse_vector_models(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    int comp, node;
-
-    for (comp=0; comp<2; comp++) {
-        if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][0]))
-            s->vector_model_dct[comp] = vp56_rac_gets_nn(c, 7);
-        if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][1]))
-            s->vector_model_sig[comp] = vp56_rac_gets_nn(c, 7);
-    }
-
-    for (comp=0; comp<2; comp++)
-        for (node=0; node<7; node++)
-            if (vp56_rac_get_prob(c, vp6_pdv_pct[comp][node]))
-                s->vector_model_pdv[comp][node] = vp56_rac_gets_nn(c, 7);
-
-    for (comp=0; comp<2; comp++)
-        for (node=0; node<8; node++)
-            if (vp56_rac_get_prob(c, vp6_fdv_pct[comp][node]))
-                s->vector_model_fdv[comp][node] = vp56_rac_gets_nn(c, 7);
-}
-
-static void vp6_parse_coeff_models(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    int def_prob[11];
-    int node, cg, ctx, pos;
-    int ct;    /* code type */
-    int pt;    /* plane type (0 for Y, 1 for U or V) */
-
-    memset(def_prob, 0x80, sizeof(def_prob));
-
-    for (pt=0; pt<2; pt++)
-        for (node=0; node<11; node++)
-            if (vp56_rac_get_prob(c, vp6_dccv_pct[pt][node])) {
-                def_prob[node] = vp56_rac_gets_nn(c, 7);
-                s->coeff_model_dccv[pt][node] = def_prob[node];
-            } else if (s->frames[VP56_FRAME_CURRENT].key_frame) {
-                s->coeff_model_dccv[pt][node] = def_prob[node];
-            }
-
-    if (vp56_rac_get(c)) {
-        for (pos=1; pos<64; pos++)
-            if (vp56_rac_get_prob(c, vp6_coeff_reorder_pct[pos]))
-                s->coeff_reorder[pos] = vp56_rac_gets(c, 4);
-        vp6_coeff_order_table_init(s);
-    }
-
-    for (cg=0; cg<2; cg++)
-        for (node=0; node<14; node++)
-            if (vp56_rac_get_prob(c, vp6_runv_pct[cg][node]))
-                s->coeff_model_runv[cg][node] = vp56_rac_gets_nn(c, 7);
-
-    for (ct=0; ct<3; ct++)
-        for (pt=0; pt<2; pt++)
-            for (cg=0; cg<6; cg++)
-                for (node=0; node<11; node++)
-                    if (vp56_rac_get_prob(c, vp6_ract_pct[ct][pt][cg][node])) {
-                        def_prob[node] = vp56_rac_gets_nn(c, 7);
-                        s->coeff_model_ract[pt][ct][cg][node] = def_prob[node];
-                    } else if (s->frames[VP56_FRAME_CURRENT].key_frame) {
-                        s->coeff_model_ract[pt][ct][cg][node] = def_prob[node];
-                    }
-
-    /* coeff_model_dcct is a linear combination of coeff_model_dccv */
-    for (pt=0; pt<2; pt++)
-        for (ctx=0; ctx<3; ctx++)
-            for (node=0; node<5; node++)
-                s->coeff_model_dcct[pt][ctx][node] = clip(((s->coeff_model_dccv[pt][node] * vp6_dccv_lc[ctx][node][0] + 128) >> 8) + vp6_dccv_lc[ctx][node][1], 1, 255);
-}
-
-static void vp6_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
-{
-    vp56_range_coder_t *c = &s->c;
-    int comp;
-
-    *vect = (vp56_mv_t) {0,0};
-    if (s->vector_candidate_pos < 2)
-        *vect = s->vector_candidate[0];
-
-    for (comp=0; comp<2; comp++) {
-        int i, delta = 0;
-
-        if (vp56_rac_get_prob(c, s->vector_model_dct[comp])) {
-            static const uint8_t prob_order[] = {0, 1, 2, 7, 6, 5, 4};
-            for (i=0; i<sizeof(prob_order); i++) {
-                int j = prob_order[i];
-                delta |= vp56_rac_get_prob(c, s->vector_model_fdv[comp][j])<<j;
-            }
-            if (delta & 0xF0)
-                delta |= vp56_rac_get_prob(c, s->vector_model_fdv[comp][3])<<3;
-            else
-                delta |= 8;
-        } else {
-            delta = vp56_rac_get_tree(c, vp56_pva_tree,
-                                      s->vector_model_pdv[comp]);
-        }
-
-        if (delta && vp56_rac_get_prob(c, s->vector_model_sig[comp]))
-            delta = -delta;
-
-        if (!comp)
-            vect->x += delta;
-        else
-            vect->y += delta;
-    }
-}
-
-static void vp6_parse_coeff(vp56_context_t *s)
-{
-    vp56_range_coder_t *c = &s->c;
-    uint8_t *permute = s->scantable.permutated;
-    uint8_t *model, *model2, *model3;
-    int coeff, sign, coeff_idx;
-    int b, i, cg, idx, ctx;
-    int pt = 0;    /* plane type (0 for Y, 1 for U or V) */
-
-    for (b=0; b<6; b++) {
-        int ct = 1;    /* code type */
-        int run = 1;
-
-        if (b > 3) pt = 1;
-
-        ctx = s->left_block[vp56_b6to4[b]].not_null_dc
-              + s->above_blocks[s->above_block_idx[b]].not_null_dc;
-        model = s->coeff_model_dccv[pt];
-        model2 = s->coeff_model_dcct[pt][ctx];
-
-        for (coeff_idx=0; coeff_idx<64; ) {
-            if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) {
-                /* parse a coeff */
-                if (coeff_idx == 0) {
-                    s->left_block[vp56_b6to4[b]].not_null_dc = 1;
-                    s->above_blocks[s->above_block_idx[b]].not_null_dc = 1;
-                }
-
-                if (vp56_rac_get_prob(c, model2[2])) {
-                    if (vp56_rac_get_prob(c, model2[3])) {
-                        idx = vp56_rac_get_tree(c, vp56_pc_tree, model);
-                        coeff = vp56_coeff_bias[idx];
-                        for (i=vp56_coeff_bit_length[idx]; i>=0; i--)
-                            coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i;
-                    } else {
-                        if (vp56_rac_get_prob(c, model2[4]))
-                            coeff = 3 + vp56_rac_get_prob(c, model[5]);
-                        else
-                            coeff = 2;
-                    }
-                    ct = 2;
-                } else {
-                    ct = 1;
-                    coeff = 1;
-                }
-                sign = vp56_rac_get(c);
-                coeff = (coeff ^ -sign) + sign;
-                if (coeff_idx)
-                    coeff *= s->dequant_ac;
-                idx = s->coeff_index_to_pos[coeff_idx];
-                s->block_coeff[b][permute[idx]] = coeff;
-                run = 1;
-            } else {
-                /* parse a run */
-                ct = 0;
-                if (coeff_idx == 0) {
-                    s->left_block[vp56_b6to4[b]].not_null_dc = 0;
-                    s->above_blocks[s->above_block_idx[b]].not_null_dc = 0;
-                } else {
-                    if (!vp56_rac_get_prob(c, model2[1]))
-                        break;
-
-                    model3 = s->coeff_model_runv[coeff_idx >= 6];
-                    run = vp56_rac_get_tree(c, vp6_pcr_tree, model3);
-                    if (!run)
-                        for (run=9, i=0; i<6; i++)
-                            run += vp56_rac_get_prob(c, model3[i+8]) << i;
-                }
-            }
-
-            cg = vp6_coeff_groups[coeff_idx+=run];
-            model = model2 = s->coeff_model_ract[pt][ct][cg];
-        }
-    }
-}
-
-static int vp6_adjust(int v, int t)
-{
-    int V = v, s = v >> 31;
-    V ^= s;
-    V -= s;
-    if (V-t-1 >= (unsigned)(t-1))
-        return v;
-    V = 2*t - V;
-    V += s;
-    V ^= s;
-    return V;
-}
-
-static int vp6_block_variance(uint8_t *src, int stride)
-{
-    int sum = 0, square_sum = 0;
-    int y, x;
-
-    for (y=0; y<8; y+=2) {
-        for (x=0; x<8; x+=2) {
-            sum += src[x];
-            square_sum += src[x]*src[x];
-        }
-        src += 2*stride;
-    }
-    return (16*square_sum - sum*sum) / (16*16);
-}
-
-static void vp6_filter_hv2(vp56_context_t *s, uint8_t *dst, uint8_t *src,
-                           int stride, int delta, int16_t weight)
-{
-    s->dsp.put_pixels_tab[1][0](dst, src, stride, 8);
-    s->dsp.biweight_h264_pixels_tab[3](dst, src+delta, stride, 2,
-                                       8-weight, weight, 0);
-}
-
-static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride,
-                           int delta, const int16_t *weights)
-{
-    int x, y;
-
-    for (y=0; y<8; y++) {
-        for (x=0; x<8; x++) {
-            dst[x] = clip_uint8((  src[x-delta  ] * weights[0]
-                                 + src[x        ] * weights[1]
-                                 + src[x+delta  ] * weights[2]
-                                 + src[x+2*delta] * weights[3] + 64) >> 7);
-        }
-        src += stride;
-        dst += stride;
-    }
-}
-
-static void vp6_filter_diag2(vp56_context_t *s, uint8_t *dst, uint8_t *src,
-                             int stride, int h_weight, int v_weight)
-{
-    uint8_t *tmp = s->edge_emu_buffer+16;
-    int x, xmax;
-
-    s->dsp.put_pixels_tab[1][0](tmp, src, stride, 8);
-    s->dsp.biweight_h264_pixels_tab[3](tmp, src+1, stride, 2,
-                                       8-h_weight, h_weight, 0);
-    /* we need a 8x9 block to do vertical filter, so compute one more line */
-    for (x=8*stride, xmax=x+8; x<xmax; x++)
-        tmp[x] = (src[x]*(8-h_weight) + src[x+1]*h_weight + 4) >> 3;
-
-    s->dsp.put_pixels_tab[1][0](dst, tmp, stride, 8);
-    s->dsp.biweight_h264_pixels_tab[3](dst, tmp+stride, stride, 2,
-                                       8-v_weight, v_weight, 0);
-}
-
-static void vp6_filter_diag4(uint8_t *dst, uint8_t *src, int stride,
-                             const int16_t *h_weights,const int16_t *v_weights)
-{
-    int x, y;
-    int tmp[8*11];
-    int *t = tmp;
-
-    src -= stride;
-
-    for (y=0; y<11; y++) {
-        for (x=0; x<8; x++) {
-            t[x] = clip_uint8((  src[x-1] * h_weights[0]
-                               + src[x  ] * h_weights[1]
-                               + src[x+1] * h_weights[2]
-                               + src[x+2] * h_weights[3] + 64) >> 7);
-        }
-        src += stride;
-        t += 8;
-    }
-
-    t = tmp + 8;
-    for (y=0; y<8; y++) {
-        for (x=0; x<8; x++) {
-            dst[x] = clip_uint8((  t[x-8 ] * v_weights[0]
-                                 + t[x   ] * v_weights[1]
-                                 + t[x+8 ] * v_weights[2]
-                                 + t[x+16] * v_weights[3] + 64) >> 7);
-        }
-        dst += stride;
-        t += 8;
-    }
-}
-
-static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src,
-                       int offset1, int offset2, int stride,
-                       vp56_mv_t mv, int mask, int select, int luma)
-{
-    int filter4 = 0;
-    int x8 = mv.x & mask;
-    int y8 = mv.y & mask;
-
-    if (luma) {
-        x8 *= 2;
-        y8 *= 2;
-        filter4 = s->filter_mode;
-        if (filter4 == 2) {
-            if (s->max_vector_length &&
-                (FFABS(mv.x) > s->max_vector_length ||
-                 FFABS(mv.y) > s->max_vector_length)) {
-                filter4 = 0;
-            } else if (!s->sample_variance_threshold
-                       || (vp6_block_variance(src+offset1, stride)
-                           < s->sample_variance_threshold)) {
-                filter4 = 0;
-            }
-        }
-    }
-
-    if ((y8 && (offset2-offset1)*s->flip<0) || (!y8 && offset1 > offset2)) {
-        offset1 = offset2;
-    }
-
-    if (filter4) {
-        if (!y8) {                      /* left or right combine */
-            vp6_filter_hv4(dst, src+offset1, stride, 1,
-                           vp6_block_copy_filter[select][x8]);
-        } else if (!x8) {               /* above or below combine */
-            vp6_filter_hv4(dst, src+offset1, stride, stride,
-                           vp6_block_copy_filter[select][y8]);
-        } else if ((mv.x^mv.y) >> 31) { /* lower-left or upper-right combine */
-            vp6_filter_diag4(dst, src+offset1-1, stride,
-                             vp6_block_copy_filter[select][x8],
-                             vp6_block_copy_filter[select][y8]);
-        } else {                        /* lower-right or upper-left combine */
-            vp6_filter_diag4(dst, src+offset1, stride,
-                             vp6_block_copy_filter[select][x8],
-                             vp6_block_copy_filter[select][y8]);
-        }
-    } else {
-        if (!y8) {                      /* left or right combine */
-            vp6_filter_hv2(s, dst, src+offset1, stride, 1, x8);
-        } else if (!x8) {               /* above or below combine */
-            vp6_filter_hv2(s, dst, src+offset1, stride, stride, y8);
-        } else if ((mv.x^mv.y) >> 31) { /* lower-left or upper-right combine */
-            vp6_filter_diag2(s, dst, src+offset1-1, stride, x8, y8);
-        } else {                        /* lower-right or upper-left combine */
-            vp6_filter_diag2(s, dst, src+offset1, stride, x8, y8);
-        }
-    }
-}
-
-static int vp6_decode_init(AVCodecContext *avctx)
-{
-    vp56_context_t *s = avctx->priv_data;
-
-    vp56_init(s, avctx, avctx->codec->id == CODEC_ID_VP6);
-    s->vp56_coord_div = vp6_coord_div;
-    s->parse_vector_adjustment = vp6_parse_vector_adjustment;
-    s->adjust = vp6_adjust;
-    s->filter = vp6_filter;
-    s->parse_coeff = vp6_parse_coeff;
-    s->default_models_init = vp6_default_models_init;
-    s->parse_vector_models = vp6_parse_vector_models;
-    s->parse_coeff_models = vp6_parse_coeff_models;
-    s->parse_header = vp6_parse_header;
-
-    return 0;
-}
-
-AVCodec vp6_decoder = {
-    "vp6",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_VP6,
-    sizeof(vp56_context_t),
-    vp6_decode_init,
-    NULL,
-    vp56_free,
-    vp56_decode_frame,
-};
-
-/* flash version, not flipped upside-down */
-AVCodec vp6f_decoder = {
-    "vp6f",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_VP6F,
-    sizeof(vp56_context_t),
-    vp6_decode_init,
-    NULL,
-    vp56_free,
-    vp56_decode_frame,
-};
--- a/src/ffmpeg/libavcodec/vp6data.h	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/**
- * @file vp6data.h
- * VP6 compatible video decoder
- *
- * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef VP6DATA_H
-#define VP6DATA_H
-
-#include <inttypes.h>
-#include "vp56data.h"
-
-static const uint8_t vp6_def_fdv_vector_model[2][8] = {
-    { 247, 210, 135, 68, 138, 220, 239, 246 },
-    { 244, 184, 201, 44, 173, 221, 239, 253 },
-};
-
-static const uint8_t vp6_def_pdv_vector_model[2][7] = {
-    { 225, 146, 172, 147, 214,  39, 156 },
-    { 204, 170, 119, 235, 140, 230, 228 },
-};
-
-static const uint8_t vp6_def_coeff_reorder[] = {
-     0,  0,  1,  1,  1,  2,  2,  2,
-     2,  2,  2,  3,  3,  4,  4,  4,
-     5,  5,  5,  5,  6,  6,  7,  7,
-     7,  7,  7,  8,  8,  9,  9,  9,
-     9,  9,  9, 10, 10, 11, 11, 11,
-    11, 11, 11, 12, 12, 12, 12, 12,
-    12, 13, 13, 13, 13, 13, 14, 14,
-    14, 14, 15, 15, 15, 15, 15, 15,
-};
-
-static const uint8_t vp6_def_runv_coeff_model[2][14] = {
-    { 198, 197, 196, 146, 198, 204, 169, 142, 130, 136, 149, 149, 191, 249 },
-    { 135, 201, 181, 154,  98, 117, 132, 126, 146, 169, 184, 240, 246, 254 },
-};
-
-static const uint8_t vp6_sig_dct_pct[2][2] = {
-    { 237, 246 },
-    { 231, 243 },
-};
-
-static const uint8_t vp6_pdv_pct[2][7] = {
-    { 253, 253, 254, 254, 254, 254, 254 },
-    { 245, 253, 254, 254, 254, 254, 254 },
-};
-
-static const uint8_t vp6_fdv_pct[2][8] = {
-    { 254, 254, 254, 254, 254, 250, 250, 252 },
-    { 254, 254, 254, 254, 254, 251, 251, 254 },
-};
-
-static const uint8_t vp6_dccv_pct[2][11] = {
-    { 146, 255, 181, 207, 232, 243, 238, 251, 244, 250, 249 },
-    { 179, 255, 214, 240, 250, 255, 244, 255, 255, 255, 255 },
-};
-
-static const uint8_t vp6_coeff_reorder_pct[] =  {
-    255, 132, 132, 159, 153, 151, 161, 170,
-    164, 162, 136, 110, 103, 114, 129, 118,
-    124, 125, 132, 136, 114, 110, 142, 135,
-    134, 123, 143, 126, 153, 183, 166, 161,
-    171, 180, 179, 164, 203, 218, 225, 217,
-    215, 206, 203, 217, 229, 241, 248, 243,
-    253, 255, 253, 255, 255, 255, 255, 255,
-    255, 255, 255, 255, 255, 255, 255, 255,
-};
-
-static const uint8_t vp6_runv_pct[2][14] = {
-  { 219, 246, 238, 249, 232, 239, 249, 255, 248, 253, 239, 244, 241, 248 },
-  { 198, 232, 251, 253, 219, 241, 253, 255, 248, 249, 244, 238, 251, 255 },
-};
-
-static const uint8_t vp6_ract_pct[3][2][6][11] = {
-  { { { 227, 246, 230, 247, 244, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 209, 231, 231, 249, 249, 253, 255, 255, 255 },
-      { 255, 255, 225, 242, 241, 251, 253, 255, 255, 255, 255 },
-      { 255, 255, 241, 253, 252, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
-    { { 240, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 240, 253, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } },
-  { { { 206, 203, 227, 239, 247, 255, 253, 255, 255, 255, 255 },
-      { 207, 199, 220, 236, 243, 252, 252, 255, 255, 255, 255 },
-      { 212, 219, 230, 243, 244, 253, 252, 255, 255, 255, 255 },
-      { 236, 237, 247, 252, 253, 255, 255, 255, 255, 255, 255 },
-      { 240, 240, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
-    { { 230, 233, 249, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 238, 238, 250, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 248, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } },
-  { { { 225, 239, 227, 231, 244, 253, 243, 255, 255, 253, 255 },
-      { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 255 },
-      { 235, 249, 238, 240, 251, 255, 249, 255, 253, 253, 255 },
-      { 249, 253, 251, 250, 255, 255, 255, 255, 255, 255, 255 },
-      { 251, 250, 249, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
-    { { 243, 244, 250, 250, 255, 255, 255, 255, 255, 255, 255 },
-      { 249, 248, 250, 253, 255, 255, 255, 255, 255, 255, 255 },
-      { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
-      { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }
-};
-
-static const int vp6_dccv_lc[3][5][2] = {
-  { { 122, 133 }, { 0, 1 }, { 78,  171 }, { 139, 117 }, { 168, 79 } },
-  { { 133,  51 }, { 0, 1 }, { 169,  71 }, { 214,  44 }, { 210, 38 } },
-  { { 142, -16 }, { 0, 1 }, { 221, -30 }, { 246,  -3 }, { 203, 17 } },
-};
-
-static const uint8_t vp6_coeff_groups[] = {
-    0, 0, 1, 1, 1, 2, 2, 2,
-    2, 2, 2, 3, 3, 3, 3, 3,
-    3, 3, 3, 3, 3, 3, 4, 4,
-    4, 4, 4, 4, 4, 4, 4, 4,
-    4, 4, 4, 4, 4, 5, 5, 5,
-    5, 5, 5, 5, 5, 5, 5, 5,
-    5, 5, 5, 5, 5, 5, 5, 5,
-    5, 5, 5, 5, 5, 5, 5, 5,
-};
-
-static const int16_t vp6_block_copy_filter[16][8][4] = {
-  { {   0, 128,   0,   0  },  /* 0 */
-    {  -3, 122,   9,   0  },
-    {  -4, 109,  24,  -1  },
-    {  -5,  91,  45,  -3  },
-    {  -4,  68,  68,  -4  },
-    {  -3,  45,  91,  -5  },
-    {  -1,  24, 109,  -4  },
-    {   0,   9, 122,  -3  } },
-  { {   0, 128,   0,   0  },  /* 1 */
-    {  -4, 124,   9,  -1  },
-    {  -5, 110,  25,  -2  },
-    {  -6,  91,  46,  -3  },
-    {  -5,  69,  69,  -5  },
-    {  -3,  46,  91,  -6  },
-    {  -2,  25, 110,  -5  },
-    {  -1,   9, 124,  -4  } },
-  { {   0, 128,   0,   0  },  /* 2 */
-    {  -4, 123,  10,  -1  },
-    {  -6, 110,  26,  -2  },
-    {  -7,  92,  47,  -4  },
-    {  -6,  70,  70,  -6  },
-    {  -4,  47,  92,  -7  },
-    {  -2,  26, 110,  -6  },
-    {  -1,  10, 123,  -4  } },
-  { {   0, 128,   0,   0  },  /* 3 */
-    {  -5, 124,  10,  -1  },
-    {  -7, 110,  27,  -2  },
-    {  -7,  91,  48,  -4  },
-    {  -6,  70,  70,  -6  },
-    {  -4,  48,  92,  -8  },
-    {  -2,  27, 110,  -7  },
-    {  -1,  10, 124,  -5  } },
-  { {   0, 128,   0,   0  },  /* 4 */
-    {  -6, 124,  11,  -1  },
-    {  -8, 111,  28,  -3  },
-    {  -8,  92,  49,  -5  },
-    {  -7,  71,  71,  -7  },
-    {  -5,  49,  92,  -8  },
-    {  -3,  28, 111,  -8  },
-    {  -1,  11, 124,  -6  } },
-  { {  0,  128,   0,   0  },  /* 5 */
-    {  -6, 123,  12,  -1  },
-    {  -9, 111,  29,  -3  },
-    {  -9,  93,  50,  -6  },
-    {  -8,  72,  72,  -8  },
-    {  -6,  50,  93,  -9  },
-    {  -3,  29, 111,  -9  },
-    {  -1,  12, 123,  -6  } },
-  { {   0, 128,   0,   0  },  /* 6 */
-    {  -7, 124,  12,  -1  },
-    { -10, 111,  30,  -3  },
-    { -10,  93,  51,  -6  },
-    {  -9,  73,  73,  -9  },
-    {  -6,  51,  93, -10  },
-    {  -3,  30, 111, -10  },
-    {  -1,  12, 124,  -7  } },
-  { {   0, 128,   0,   0  },  /* 7 */
-    {  -7, 123,  13,  -1  },
-    { -11, 112,  31,  -4  },
-    { -11,  94,  52,  -7  },
-    { -10,  74,  74, -10  },
-    {  -7,  52,  94, -11  },
-    {  -4,  31, 112, -11  },
-    {  -1,  13, 123,  -7  } },
-  { {   0, 128,   0,  0  },  /* 8 */
-    {  -8, 124,  13,  -1  },
-    { -12, 112,  32,  -4  },
-    { -12,  94,  53,  -7  },
-    { -10,  74,  74, -10  },
-    {  -7,  53,  94, -12  },
-    {  -4,  32, 112, -12  },
-    {  -1,  13, 124,  -8  } },
-  { {   0, 128,   0,   0  },  /* 9 */
-    {  -9, 124,  14,  -1  },
-    { -13, 112,  33,  -4  },
-    { -13,  95,  54,  -8  },
-    { -11,  75,  75, -11  },
-    {  -8,  54,  95, -13  },
-    {  -4,  33, 112, -13  },
-    {  -1,  14, 124,  -9  } },
-  { {   0, 128,   0,   0  },  /* 10 */
-    {  -9, 123,  15,  -1  },
-    { -14, 113,  34,  -5  },
-    { -14,  95,  55,  -8  },
-    { -12,  76,  76, -12  },
-    {  -8,  55,  95, -14  },
-    {  -5,  34, 112, -13  },
-    {  -1,  15, 123,  -9  } },
-  { {   0, 128,   0,   0  },  /* 11 */
-    { -10, 124,  15,  -1  },
-    { -14, 113,  34,  -5  },
-    { -15,  96,  56,  -9  },
-    { -13,  77,  77, -13  },
-    {  -9,  56,  96, -15  },
-    {  -5,  34, 113, -14  },
-    {  -1,  15, 124, -10  } },
-  { {   0, 128,   0,   0  },  /* 12 */
-    { -10, 123,  16,  -1  },
-    { -15, 113,  35,  -5  },
-    { -16,  98,  56, -10  },
-    { -14,  78,  78, -14  },
-    { -10,  56,  98, -16  },
-    {  -5,  35, 113, -15  },
-    {  -1,  16, 123, -10  } },
-  { {   0, 128,   0,   0  },  /* 13 */
-    { -11, 124,  17,  -2  },
-    { -16, 113,  36,  -5  },
-    { -17,  98,  57, -10  },
-    { -14,  78,  78, -14  },
-    { -10,  57,  98, -17  },
-    {  -5,  36, 113, -16  },
-    {  -2,  17, 124, -11  } },
-  { {   0, 128,   0,   0  },  /* 14 */
-    { -12, 125,  17,  -2  },
-    { -17, 114,  37,  -6  },
-    { -18,  99,  58, -11  },
-    { -15,  79,  79, -15  },
-    { -11,  58,  99, -18  },
-    {  -6,  37, 114, -17  },
-    {  -2,  17, 125, -12  } },
-  { {   0, 128,   0,   0  },  /* 15 */
-    { -12, 124,  18,  -2  },
-    { -18, 114,  38,  -6  },
-    { -19,  99,  59, -11  },
-    { -16,  80,  80, -16  },
-    { -11,  59,  99, -19  },
-    {  -6,  38, 114, -18  },
-    {  -2,  18, 124, -12  } },
-};
-
-const vp56_tree_t vp6_pcr_tree[] = {
-    { 8, 0},
-    { 4, 1},
-    { 2, 2}, {-1}, {-2},
-    { 2, 3}, {-3}, {-4},
-    { 8, 4},
-    { 4, 5},
-    { 2, 6}, {-5}, {-6},
-    { 2, 7}, {-7}, {-8},
-             {-0},
-};
-
-static const uint8_t vp6_coord_div[] = { 4, 4, 4, 4, 8, 8 };
-
-#endif /* VP6DATA_H */
--- a/src/ffmpeg/libavcodec/vqavideo.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,610 +0,0 @@
-/*
- * Westwood Studios VQA Video Decoder
- * Copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file vqavideo.c
- * VQA Video Decoder by Mike Melanson (melanson@pcisys.net)
- * For more information about the RPZA format, visit:
- *   http://www.pcisys.net/~melanson/codecs/
- *
- * The VQA video decoder outputs PAL8 or RGB555 colorspace data, depending
- * on the type of data in the file.
- *
- * This decoder needs the 42-byte VQHD header from the beginning
- * of the VQA file passed through the extradata field. The VQHD header
- * is laid out as:
- *
- *   bytes 0-3   chunk fourcc: 'VQHD'
- *   bytes 4-7   chunk size in big-endian format, should be 0x0000002A
- *   bytes 8-49  VQHD chunk data
- *
- * Bytes 8-49 are what this decoder expects to see.
- *
- * Briefly, VQA is a vector quantized animation format that operates in a
- * VGA palettized colorspace. It operates on pixel vectors (blocks)
- * of either 4x2 or 4x4 in size. Compressed VQA chunks can contain vector
- * codebooks, palette information, and code maps for rendering vectors onto
- * frames. Any of these components can also be compressed with a run-length
- * encoding (RLE) algorithm commonly referred to as "format80".
- *
- * VQA takes a novel approach to rate control. Each group of n frames
- * (usually, n = 8) relies on a different vector codebook. Rather than
- * transporting an entire codebook every 8th frame, the new codebook is
- * broken up into 8 pieces and sent along with the compressed video chunks
- * for each of the 8 frames preceding the 8 frames which require the
- * codebook. A full codebook is also sent on the very first frame of a
- * file. This is an interesting technique, although it makes random file
- * seeking difficult despite the fact that the frames are all intracoded.
- *
- * V1,2 VQA uses 12-bit codebook indices. If the 12-bit indices were
- * packed into bytes and then RLE compressed, bytewise, the results would
- * be poor. That is why the coding method divides each index into 2 parts,
- * the top 4 bits and the bottom 8 bits, then RL encodes the 4-bit pieces
- * together and the 8-bit pieces together. If most of the vectors are
- * clustered into one group of 256 vectors, most of the 4-bit index pieces
- * should be the same.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-#include "dsputil.h"
-
-#define PALETTE_COUNT 256
-#define VQA_HEADER_SIZE 0x2A
-#define CHUNK_PREAMBLE_SIZE 8
-
-/* allocate the maximum vector space, regardless of the file version:
- * (0xFF00 codebook vectors + 0x100 solid pixel vectors) * (4x4 pixels/block) */
-#define MAX_CODEBOOK_VECTORS 0xFF00
-#define SOLID_PIXEL_VECTORS 0x100
-#define MAX_VECTORS (MAX_CODEBOOK_VECTORS + SOLID_PIXEL_VECTORS)
-#define MAX_CODEBOOK_SIZE (MAX_VECTORS * 4 * 4)
-
-#define CBF0_TAG MKBETAG('C', 'B', 'F', '0')
-#define CBFZ_TAG MKBETAG('C', 'B', 'F', 'Z')
-#define CBP0_TAG MKBETAG('C', 'B', 'P', '0')
-#define CBPZ_TAG MKBETAG('C', 'B', 'P', 'Z')
-#define CPL0_TAG MKBETAG('C', 'P', 'L', '0')
-#define CPLZ_TAG MKBETAG('C', 'P', 'L', 'Z')
-#define VPTZ_TAG MKBETAG('V', 'P', 'T', 'Z')
-
-#define VQA_DEBUG 0
-
-#if VQA_DEBUG
-#define vqa_debug printf
-#else
-static inline void vqa_debug(const char *format, ...) { }
-#endif
-
-typedef struct VqaContext {
-
-    AVCodecContext *avctx;
-    DSPContext dsp;
-    AVFrame frame;
-
-    unsigned char *buf;
-    int size;
-
-    uint32_t palette[PALETTE_COUNT];
-
-    int width;   /* width of a frame */
-    int height;   /* height of a frame */
-    int vector_width;  /* width of individual vector */
-    int vector_height;  /* height of individual vector */
-    int vqa_version;  /* this should be either 1, 2 or 3 */
-
-    unsigned char *codebook;         /* the current codebook */
-    int codebook_size;
-    unsigned char *next_codebook_buffer;  /* accumulator for next codebook */
-    int next_codebook_buffer_index;
-
-    unsigned char *decode_buffer;
-    int decode_buffer_size;
-
-    /* number of frames to go before replacing codebook */
-    int partial_countdown;
-    int partial_count;
-
-} VqaContext;
-
-static int vqa_decode_init(AVCodecContext *avctx)
-{
-    VqaContext *s = (VqaContext *)avctx->priv_data;
-    unsigned char *vqa_header;
-    int i, j, codebook_index;;
-
-    s->avctx = avctx;
-    avctx->pix_fmt = PIX_FMT_PAL8;
-    avctx->has_b_frames = 0;
-    dsputil_init(&s->dsp, avctx);
-
-    /* make sure the extradata made it */
-    if (s->avctx->extradata_size != VQA_HEADER_SIZE) {
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA video: expected extradata size of %d\n", VQA_HEADER_SIZE);
-        return -1;
-    }
-
-    /* load up the VQA parameters from the header */
-    vqa_header = (unsigned char *)s->avctx->extradata;
-    s->vqa_version = vqa_header[0];
-    s->width = LE_16(&vqa_header[6]);
-    s->height = LE_16(&vqa_header[8]);
-    if(avcodec_check_dimensions(avctx, s->width, s->height)){
-        s->width= s->height= 0;
-        return -1;
-    }
-    s->vector_width = vqa_header[10];
-    s->vector_height = vqa_header[11];
-    s->partial_count = s->partial_countdown = vqa_header[13];
-
-    /* the vector dimensions have to meet very stringent requirements */
-    if ((s->vector_width != 4) ||
-        ((s->vector_height != 2) && (s->vector_height != 4))) {
-        /* return without further initialization */
-        return -1;
-    }
-
-    /* allocate codebooks */
-    s->codebook_size = MAX_CODEBOOK_SIZE;
-    s->codebook = av_malloc(s->codebook_size);
-    s->next_codebook_buffer = av_malloc(s->codebook_size);
-
-    /* initialize the solid-color vectors */
-    if (s->vector_height == 4) {
-        codebook_index = 0xFF00 * 16;
-        for (i = 0; i < 256; i++)
-            for (j = 0; j < 16; j++)
-                s->codebook[codebook_index++] = i;
-    } else {
-        codebook_index = 0xF00 * 8;
-        for (i = 0; i < 256; i++)
-            for (j = 0; j < 8; j++)
-                s->codebook[codebook_index++] = i;
-    }
-    s->next_codebook_buffer_index = 0;
-
-    /* allocate decode buffer */
-    s->decode_buffer_size = (s->width / s->vector_width) *
-        (s->height / s->vector_height) * 2;
-    s->decode_buffer = av_malloc(s->decode_buffer_size);
-
-    s->frame.data[0] = NULL;
-
-    return 0;
-}
-
-#define CHECK_COUNT() \
-    if (dest_index + count > dest_size) { \
-        av_log(NULL, AV_LOG_ERROR, "  VQA video: decode_format80 problem: next op would overflow dest_index\n"); \
-        av_log(NULL, AV_LOG_ERROR, "  VQA video: current dest_index = %d, count = %d, dest_size = %d\n", \
-            dest_index, count, dest_size); \
-        return; \
-    }
-
-static void decode_format80(unsigned char *src, int src_size,
-    unsigned char *dest, int dest_size, int check_size) {
-
-    int src_index = 0;
-    int dest_index = 0;
-    int count;
-    int src_pos;
-    unsigned char color;
-    int i;
-
-    while (src_index < src_size) {
-
-        vqa_debug("      opcode %02X: ", src[src_index]);
-
-        /* 0x80 means that frame is finished */
-        if (src[src_index] == 0x80)
-            return;
-
-        if (dest_index >= dest_size) {
-            av_log(NULL, AV_LOG_ERROR, "  VQA video: decode_format80 problem: dest_index (%d) exceeded dest_size (%d)\n",
-                dest_index, dest_size);
-            return;
-        }
-
-        if (src[src_index] == 0xFF) {
-
-            src_index++;
-            count = LE_16(&src[src_index]);
-            src_index += 2;
-            src_pos = LE_16(&src[src_index]);
-            src_index += 2;
-            vqa_debug("(1) copy %X bytes from absolute pos %X\n", count, src_pos);
-            CHECK_COUNT();
-            for (i = 0; i < count; i++)
-                dest[dest_index + i] = dest[src_pos + i];
-            dest_index += count;
-
-        } else if (src[src_index] == 0xFE) {
-
-            src_index++;
-            count = LE_16(&src[src_index]);
-            src_index += 2;
-            color = src[src_index++];
-            vqa_debug("(2) set %X bytes to %02X\n", count, color);
-            CHECK_COUNT();
-            memset(&dest[dest_index], color, count);
-            dest_index += count;
-
-        } else if ((src[src_index] & 0xC0) == 0xC0) {
-
-            count = (src[src_index++] & 0x3F) + 3;
-            src_pos = LE_16(&src[src_index]);
-            src_index += 2;
-            vqa_debug("(3) copy %X bytes from absolute pos %X\n", count, src_pos);
-            CHECK_COUNT();
-            for (i = 0; i < count; i++)
-                dest[dest_index + i] = dest[src_pos + i];
-            dest_index += count;
-
-        } else if (src[src_index] > 0x80) {
-
-            count = src[src_index++] & 0x3F;
-            vqa_debug("(4) copy %X bytes from source to dest\n", count);
-            CHECK_COUNT();
-            memcpy(&dest[dest_index], &src[src_index], count);
-            src_index += count;
-            dest_index += count;
-
-        } else {
-
-            count = ((src[src_index] & 0x70) >> 4) + 3;
-            src_pos = BE_16(&src[src_index]) & 0x0FFF;
-            src_index += 2;
-            vqa_debug("(5) copy %X bytes from relpos %X\n", count, src_pos);
-            CHECK_COUNT();
-            for (i = 0; i < count; i++)
-                dest[dest_index + i] = dest[dest_index - src_pos + i];
-            dest_index += count;
-        }
-    }
-
-    /* validate that the entire destination buffer was filled; this is
-     * important for decoding frame maps since each vector needs to have a
-     * codebook entry; it is not important for compressed codebooks because
-     * not every entry needs to be filled */
-    if (check_size)
-        if (dest_index < dest_size)
-            av_log(NULL, AV_LOG_ERROR, "  VQA video: decode_format80 problem: decode finished with dest_index (%d) < dest_size (%d)\n",
-                dest_index, dest_size);
-}
-
-static void vqa_decode_chunk(VqaContext *s)
-{
-    unsigned int chunk_type;
-    unsigned int chunk_size;
-    int byte_skip;
-    unsigned int index = 0;
-    int i;
-    unsigned char r, g, b;
-    int index_shift;
-
-    int cbf0_chunk = -1;
-    int cbfz_chunk = -1;
-    int cbp0_chunk = -1;
-    int cbpz_chunk = -1;
-    int cpl0_chunk = -1;
-    int cplz_chunk = -1;
-    int vptz_chunk = -1;
-
-    int x, y;
-    int lines = 0;
-    int pixel_ptr;
-    int vector_index = 0;
-    int lobyte = 0;
-    int hibyte = 0;
-    int lobytes = 0;
-    int hibytes = s->decode_buffer_size / 2;
-
-    /* first, traverse through the frame and find the subchunks */
-    while (index < s->size) {
-
-        chunk_type = BE_32(&s->buf[index]);
-        chunk_size = BE_32(&s->buf[index + 4]);
-
-        switch (chunk_type) {
-
-        case CBF0_TAG:
-            cbf0_chunk = index;
-            break;
-
-        case CBFZ_TAG:
-            cbfz_chunk = index;
-            break;
-
-        case CBP0_TAG:
-            cbp0_chunk = index;
-            break;
-
-        case CBPZ_TAG:
-            cbpz_chunk = index;
-            break;
-
-        case CPL0_TAG:
-            cpl0_chunk = index;
-            break;
-
-        case CPLZ_TAG:
-            cplz_chunk = index;
-            break;
-
-        case VPTZ_TAG:
-            vptz_chunk = index;
-            break;
-
-        default:
-            av_log(s->avctx, AV_LOG_ERROR, "  VQA video: Found unknown chunk type: %c%c%c%c (%08X)\n",
-            (chunk_type >> 24) & 0xFF,
-            (chunk_type >> 16) & 0xFF,
-            (chunk_type >>  8) & 0xFF,
-            (chunk_type >>  0) & 0xFF,
-            chunk_type);
-            break;
-        }
-
-        byte_skip = chunk_size & 0x01;
-        index += (CHUNK_PREAMBLE_SIZE + chunk_size + byte_skip);
-    }
-
-    /* next, deal with the palette */
-    if ((cpl0_chunk != -1) && (cplz_chunk != -1)) {
-
-        /* a chunk should not have both chunk types */
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: found both CPL0 and CPLZ chunks\n");
-        return;
-    }
-
-    /* decompress the palette chunk */
-    if (cplz_chunk != -1) {
-
-/* yet to be handled */
-
-    }
-
-    /* convert the RGB palette into the machine's endian format */
-    if (cpl0_chunk != -1) {
-
-        chunk_size = BE_32(&s->buf[cpl0_chunk + 4]);
-        /* sanity check the palette size */
-        if (chunk_size / 3 > 256) {
-            av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: found a palette chunk with %d colors\n",
-                chunk_size / 3);
-            return;
-        }
-        cpl0_chunk += CHUNK_PREAMBLE_SIZE;
-        for (i = 0; i < chunk_size / 3; i++) {
-            /* scale by 4 to transform 6-bit palette -> 8-bit */
-            r = s->buf[cpl0_chunk++] * 4;
-            g = s->buf[cpl0_chunk++] * 4;
-            b = s->buf[cpl0_chunk++] * 4;
-            s->palette[i] = (r << 16) | (g << 8) | (b);
-        }
-    }
-
-    /* next, look for a full codebook */
-    if ((cbf0_chunk != -1) && (cbfz_chunk != -1)) {
-
-        /* a chunk should not have both chunk types */
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: found both CBF0 and CBFZ chunks\n");
-        return;
-    }
-
-    /* decompress the full codebook chunk */
-    if (cbfz_chunk != -1) {
-
-        chunk_size = BE_32(&s->buf[cbfz_chunk + 4]);
-        cbfz_chunk += CHUNK_PREAMBLE_SIZE;
-        decode_format80(&s->buf[cbfz_chunk], chunk_size,
-            s->codebook, s->codebook_size, 0);
-    }
-
-    /* copy a full codebook */
-    if (cbf0_chunk != -1) {
-
-        chunk_size = BE_32(&s->buf[cbf0_chunk + 4]);
-        /* sanity check the full codebook size */
-        if (chunk_size > MAX_CODEBOOK_SIZE) {
-            av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: CBF0 chunk too large (0x%X bytes)\n",
-                chunk_size);
-            return;
-        }
-        cbf0_chunk += CHUNK_PREAMBLE_SIZE;
-
-        memcpy(s->codebook, &s->buf[cbf0_chunk], chunk_size);
-    }
-
-    /* decode the frame */
-    if (vptz_chunk == -1) {
-
-        /* something is wrong if there is no VPTZ chunk */
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: no VPTZ chunk found\n");
-        return;
-    }
-
-    chunk_size = BE_32(&s->buf[vptz_chunk + 4]);
-    vptz_chunk += CHUNK_PREAMBLE_SIZE;
-    decode_format80(&s->buf[vptz_chunk], chunk_size,
-        s->decode_buffer, s->decode_buffer_size, 1);
-
-    /* render the final PAL8 frame */
-    if (s->vector_height == 4)
-        index_shift = 4;
-    else
-        index_shift = 3;
-    for (y = 0; y < s->frame.linesize[0] * s->height;
-        y += s->frame.linesize[0] * s->vector_height) {
-
-        for (x = y; x < y + s->width; x += 4, lobytes++, hibytes++) {
-            pixel_ptr = x;
-
-            /* get the vector index, the method for which varies according to
-             * VQA file version */
-            switch (s->vqa_version) {
-
-            case 1:
-/* still need sample media for this case (only one game, "Legend of
- * Kyrandia III : Malcolm's Revenge", is known to use this version) */
-                lines = 0;
-                break;
-
-            case 2:
-                lobyte = s->decode_buffer[lobytes];
-                hibyte = s->decode_buffer[hibytes];
-                vector_index = (hibyte << 8) | lobyte;
-                vector_index <<= index_shift;
-                lines = s->vector_height;
-                break;
-
-            case 3:
-/* not implemented yet */
-                lines = 0;
-                break;
-            }
-
-            while (lines--) {
-                s->frame.data[0][pixel_ptr + 0] = s->codebook[vector_index++];
-                s->frame.data[0][pixel_ptr + 1] = s->codebook[vector_index++];
-                s->frame.data[0][pixel_ptr + 2] = s->codebook[vector_index++];
-                s->frame.data[0][pixel_ptr + 3] = s->codebook[vector_index++];
-                pixel_ptr += s->frame.linesize[0];
-            }
-        }
-    }
-
-    /* handle partial codebook */
-    if ((cbp0_chunk != -1) && (cbpz_chunk != -1)) {
-        /* a chunk should not have both chunk types */
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: found both CBP0 and CBPZ chunks\n");
-        return;
-    }
-
-    if (cbp0_chunk != -1) {
-
-        chunk_size = BE_32(&s->buf[cbp0_chunk + 4]);
-        cbp0_chunk += CHUNK_PREAMBLE_SIZE;
-
-        /* accumulate partial codebook */
-        memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
-            &s->buf[cbp0_chunk], chunk_size);
-        s->next_codebook_buffer_index += chunk_size;
-
-        s->partial_countdown--;
-        if (s->partial_countdown == 0) {
-
-            /* time to replace codebook */
-            memcpy(s->codebook, s->next_codebook_buffer,
-                s->next_codebook_buffer_index);
-
-            /* reset accounting */
-            s->next_codebook_buffer_index = 0;
-            s->partial_countdown = s->partial_count;
-        }
-    }
-
-    if (cbpz_chunk != -1) {
-
-        chunk_size = BE_32(&s->buf[cbpz_chunk + 4]);
-        cbpz_chunk += CHUNK_PREAMBLE_SIZE;
-
-        /* accumulate partial codebook */
-        memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
-            &s->buf[cbpz_chunk], chunk_size);
-        s->next_codebook_buffer_index += chunk_size;
-
-        s->partial_countdown--;
-        if (s->partial_countdown == 0) {
-
-            /* decompress codebook */
-            decode_format80(s->next_codebook_buffer,
-                s->next_codebook_buffer_index,
-                s->codebook, s->codebook_size, 0);
-
-            /* reset accounting */
-            s->next_codebook_buffer_index = 0;
-            s->partial_countdown = s->partial_count;
-        }
-    }
-}
-
-static int vqa_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
-                            uint8_t *buf, int buf_size)
-{
-    VqaContext *s = (VqaContext *)avctx->priv_data;
-
-    s->buf = buf;
-    s->size = buf_size;
-
-    if (s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    if (avctx->get_buffer(avctx, &s->frame)) {
-        av_log(s->avctx, AV_LOG_ERROR, "  VQA Video: get_buffer() failed\n");
-        return -1;
-    }
-
-    vqa_decode_chunk(s);
-
-    /* make the palette available on the way out */
-    memcpy(s->frame.data[1], s->palette, PALETTE_COUNT * 4);
-    s->frame.palette_has_changed = 1;
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = s->frame;
-
-    /* report that the buffer was completely consumed */
-    return buf_size;
-}
-
-static int vqa_decode_end(AVCodecContext *avctx)
-{
-    VqaContext *s = (VqaContext *)avctx->priv_data;
-
-    av_free(s->codebook);
-    av_free(s->next_codebook_buffer);
-    av_free(s->decode_buffer);
-
-    if (s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
-    return 0;
-}
-
-AVCodec vqa_decoder = {
-    "vqavideo",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_WS_VQA,
-    sizeof(VqaContext),
-    vqa_decode_init,
-    NULL,
-    vqa_decode_end,
-    vqa_decode_frame,
-    CODEC_CAP_DR1,
-};
--- a/src/ffmpeg/libavcodec/xan.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,492 +0,0 @@
-/*
- * Wing Commander/Xan Video Decoder
- * Copyright (C) 2003 the ffmpeg project
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file xan.c
- * Xan video decoder for Wing Commander III computer game
- * by Mario Brito (mbrito@student.dei.uc.pt)
- * and Mike Melanson (melanson@pcisys.net)
- *
- * The xan_wc3 decoder outputs PAL8 data.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "common.h"
-#include "avcodec.h"
-
-typedef struct XanContext {
-
-    AVCodecContext *avctx;
-    AVFrame last_frame;
-    AVFrame current_frame;
-
-    unsigned char *buf;
-    int size;
-
-    /* scratch space */
-    unsigned char *buffer1;
-    int buffer1_size;
-    unsigned char *buffer2;
-    int buffer2_size;
-
-    int frame_size;
-
-} XanContext;
-
-static int xan_decode_init(AVCodecContext *avctx)
-{
-    XanContext *s = avctx->priv_data;
-
-    s->avctx = avctx;
-    s->frame_size = 0;
-
-    if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&
-        (s->avctx->palctrl == NULL)) {
-        av_log(avctx, AV_LOG_ERROR, " WC3 Xan video: palette expected.\n");
-        return -1;
-    }
-
-    avctx->pix_fmt = PIX_FMT_PAL8;
-    avctx->has_b_frames = 0;
-
-    if(avcodec_check_dimensions(avctx, avctx->width, avctx->height))
-        return -1;
-
-    s->buffer1_size = avctx->width * avctx->height;
-    s->buffer1 = av_malloc(s->buffer1_size);
-    s->buffer2_size = avctx->width * avctx->height;
-    s->buffer2 = av_malloc(s->buffer2_size);
-    if (!s->buffer1 || !s->buffer2)
-        return -1;
-
-    return 0;
-}
-
-/* This function is used in lieu of memcpy(). This decoder can not use
- * memcpy because the memory locations often overlap and
- * memcpy doesn't like that; it's not uncommon, for example, for
- * dest = src+1, to turn byte A into  pattern AAAAAAAA.
- * This was originally repz movsb in Intel x86 ASM. */
-static inline void bytecopy(unsigned char *dest, unsigned char *src, int count)
-{
-    int i;
-
-    for (i = 0; i < count; i++)
-        dest[i] = src[i];
-}
-
-static int xan_huffman_decode(unsigned char *dest, unsigned char *src,
-    int dest_len)
-{
-    unsigned char byte = *src++;
-    unsigned char ival = byte + 0x16;
-    unsigned char * ptr = src + byte*2;
-    unsigned char val = ival;
-    int counter = 0;
-    unsigned char *dest_end = dest + dest_len;
-
-    unsigned char bits = *ptr++;
-
-    while ( val != 0x16 ) {
-        if ( (1 << counter) & bits )
-            val = src[byte + val - 0x17];
-        else
-            val = src[val - 0x17];
-
-        if ( val < 0x16 ) {
-            if (dest + 1 > dest_end)
-                return 0;
-            *dest++ = val;
-            val = ival;
-        }
-
-        if (counter++ == 7) {
-            counter = 0;
-            bits = *ptr++;
-        }
-    }
-
-    return 0;
-}
-
-static void xan_unpack(unsigned char *dest, unsigned char *src, int dest_len)
-{
-    unsigned char opcode;
-    int size;
-    int offset;
-    int byte1, byte2, byte3;
-    unsigned char *dest_end = dest + dest_len;
-
-    for (;;) {
-        opcode = *src++;
-
-        if ( (opcode & 0x80) == 0 ) {
-
-            offset = *src++;
-
-            size = opcode & 3;
-            if (dest + size > dest_end)
-                return;
-            bytecopy(dest, src, size);  dest += size;  src += size;
-
-            size = ((opcode & 0x1c) >> 2) + 3;
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest, dest - (((opcode & 0x60) << 3) + offset + 1), size);
-            dest += size;
-
-        } else if ( (opcode & 0x40) == 0 ) {
-
-            byte1 = *src++;
-            byte2 = *src++;
-
-            size = byte1 >> 6;
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
-
-            size = (opcode & 0x3f) + 4;
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest, dest - (((byte1 & 0x3f) << 8) + byte2 + 1), size);
-            dest += size;
-
-        } else if ( (opcode & 0x20) == 0 ) {
-
-            byte1 = *src++;
-            byte2 = *src++;
-            byte3 = *src++;
-
-            size = opcode & 3;
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
-
-            size = byte3 + 5 + ((opcode & 0xc) << 6);
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest,
-                dest - ((((opcode & 0x10) >> 4) << 0x10) + 1 + (byte1 << 8) + byte2),
-                size);
-            dest += size;
-        } else {
-            size = ((opcode & 0x1f) << 2) + 4;
-
-            if (size > 0x70)
-                break;
-
-            if (dest + size > dest_end)
-                return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
-        }
-    }
-
-    size = opcode & 3;
-    bytecopy(dest, src, size);  dest += size;  src += size;
-}
-
-static void inline xan_wc3_output_pixel_run(XanContext *s,
-    unsigned char *pixel_buffer, int x, int y, int pixel_count)
-{
-    int stride;
-    int line_inc;
-    int index;
-    int current_x;
-    int width = s->avctx->width;
-    unsigned char *palette_plane;
-
-    palette_plane = s->current_frame.data[0];
-    stride = s->current_frame.linesize[0];
-    line_inc = stride - width;
-    index = y * stride + x;
-    current_x = x;
-    while((pixel_count--) && (index < s->frame_size)) {
-
-        /* don't do a memcpy() here; keyframes generally copy an entire
-         * frame of data and the stride needs to be accounted for */
-        palette_plane[index++] = *pixel_buffer++;
-
-        current_x++;
-        if (current_x >= width) {
-            index += line_inc;
-            current_x = 0;
-        }
-    }
-}
-
-static void inline xan_wc3_copy_pixel_run(XanContext *s,
-    int x, int y, int pixel_count, int motion_x, int motion_y)
-{
-    int stride;
-    int line_inc;
-    int curframe_index, prevframe_index;
-    int curframe_x, prevframe_x;
-    int width = s->avctx->width;
-    unsigned char *palette_plane, *prev_palette_plane;
-
-    palette_plane = s->current_frame.data[0];
-    prev_palette_plane = s->last_frame.data[0];
-    stride = s->current_frame.linesize[0];
-    line_inc = stride - width;
-    curframe_index = y * stride + x;
-    curframe_x = x;
-    prevframe_index = (y + motion_y) * stride + x + motion_x;
-    prevframe_x = x + motion_x;
-    while((pixel_count--) && (curframe_index < s->frame_size)) {
-
-        palette_plane[curframe_index++] =
-            prev_palette_plane[prevframe_index++];
-
-        curframe_x++;
-        if (curframe_x >= width) {
-            curframe_index += line_inc;
-            curframe_x = 0;
-        }
-
-        prevframe_x++;
-        if (prevframe_x >= width) {
-            prevframe_index += line_inc;
-            prevframe_x = 0;
-        }
-    }
-}
-
-static void xan_wc3_decode_frame(XanContext *s) {
-
-    int width = s->avctx->width;
-    int height = s->avctx->height;
-    int total_pixels = width * height;
-    unsigned char opcode;
-    unsigned char flag = 0;
-    int size = 0;
-    int motion_x, motion_y;
-    int x, y;
-
-    unsigned char *opcode_buffer = s->buffer1;
-    int opcode_buffer_size = s->buffer1_size;
-    unsigned char *imagedata_buffer = s->buffer2;
-    int imagedata_buffer_size = s->buffer2_size;
-
-    /* pointers to segments inside the compressed chunk */
-    unsigned char *huffman_segment;
-    unsigned char *size_segment;
-    unsigned char *vector_segment;
-    unsigned char *imagedata_segment;
-
-    huffman_segment =   s->buf + LE_16(&s->buf[0]);
-    size_segment =      s->buf + LE_16(&s->buf[2]);
-    vector_segment =    s->buf + LE_16(&s->buf[4]);
-    imagedata_segment = s->buf + LE_16(&s->buf[6]);
-
-    xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size);
-
-    if (imagedata_segment[0] == 2)
-        xan_unpack(imagedata_buffer, &imagedata_segment[1],
-            imagedata_buffer_size);
-    else
-        imagedata_buffer = &imagedata_segment[1];
-
-    /* use the decoded data segments to build the frame */
-    x = y = 0;
-    while (total_pixels) {
-
-        opcode = *opcode_buffer++;
-        size = 0;
-
-        switch (opcode) {
-
-        case 0:
-            flag ^= 1;
-            continue;
-
-        case 1:
-        case 2:
-        case 3:
-        case 4:
-        case 5:
-        case 6:
-        case 7:
-        case 8:
-            size = opcode;
-            break;
-
-        case 12:
-        case 13:
-        case 14:
-        case 15:
-        case 16:
-        case 17:
-        case 18:
-            size += (opcode - 10);
-            break;
-
-        case 9:
-        case 19:
-            size = *size_segment++;
-            break;
-
-        case 10:
-        case 20:
-            size = BE_16(&size_segment[0]);
-            size_segment += 2;
-            break;
-
-        case 11:
-        case 21:
-            size = (size_segment[0] << 16) | (size_segment[1] << 8) |
-                size_segment[2];
-            size_segment += 3;
-            break;
-        }
-
-        if (opcode < 12) {
-            flag ^= 1;
-            if (flag) {
-                /* run of (size) pixels is unchanged from last frame */
-                xan_wc3_copy_pixel_run(s, x, y, size, 0, 0);
-            } else {
-                /* output a run of pixels from imagedata_buffer */
-                xan_wc3_output_pixel_run(s, imagedata_buffer, x, y, size);
-                imagedata_buffer += size;
-            }
-        } else {
-            /* run-based motion compensation from last frame */
-            motion_x = (*vector_segment >> 4) & 0xF;
-            motion_y = *vector_segment & 0xF;
-            vector_segment++;
-
-            /* sign extension */
-            if (motion_x & 0x8)
-                motion_x |= 0xFFFFFFF0;
-            if (motion_y & 0x8)
-                motion_y |= 0xFFFFFFF0;
-
-            /* copy a run of pixels from the previous frame */
-            xan_wc3_copy_pixel_run(s, x, y, size, motion_x, motion_y);
-
-            flag = 0;
-        }
-
-        /* coordinate accounting */
-        total_pixels -= size;
-        while (size) {
-            if (x + size >= width) {
-                y++;
-                size -= (width - x);
-                x = 0;
-            } else {
-                x += size;
-                size = 0;
-            }
-        }
-    }
-}
-
-static void xan_wc4_decode_frame(XanContext *s) {
-}
-
-static int xan_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
-                            uint8_t *buf, int buf_size)
-{
-    XanContext *s = avctx->priv_data;
-    AVPaletteControl *palette_control = avctx->palctrl;
-
-    if (avctx->get_buffer(avctx, &s->current_frame)) {
-        av_log(s->avctx, AV_LOG_ERROR, "  Xan Video: get_buffer() failed\n");
-        return -1;
-    }
-    s->current_frame.reference = 3;
-
-    if (!s->frame_size)
-        s->frame_size = s->current_frame.linesize[0] * s->avctx->height;
-
-    palette_control->palette_changed = 0;
-    memcpy(s->current_frame.data[1], palette_control->palette,
-        AVPALETTE_SIZE);
-    s->current_frame.palette_has_changed = 1;
-
-    s->buf = buf;
-    s->size = buf_size;
-
-    if (avctx->codec->id == CODEC_ID_XAN_WC3)
-        xan_wc3_decode_frame(s);
-    else if (avctx->codec->id == CODEC_ID_XAN_WC4)
-        xan_wc4_decode_frame(s);
-
-    /* release the last frame if it is allocated */
-    if (s->last_frame.data[0])
-        avctx->release_buffer(avctx, &s->last_frame);
-
-    /* shuffle frames */
-    s->last_frame = s->current_frame;
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = s->current_frame;
-
-    /* always report that the buffer was completely consumed */
-    return buf_size;
-}
-
-static int xan_decode_end(AVCodecContext *avctx)
-{
-    XanContext *s = avctx->priv_data;
-
-    /* release the last frame */
-    if (s->last_frame.data[0])
-        avctx->release_buffer(avctx, &s->last_frame);
-
-    av_free(s->buffer1);
-    av_free(s->buffer2);
-
-    return 0;
-}
-
-AVCodec xan_wc3_decoder = {
-    "xan_wc3",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_XAN_WC3,
-    sizeof(XanContext),
-    xan_decode_init,
-    NULL,
-    xan_decode_end,
-    xan_decode_frame,
-    CODEC_CAP_DR1,
-};
-
-/*
-AVCodec xan_wc4_decoder = {
-    "xan_wc4",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_XAN_WC4,
-    sizeof(XanContext),
-    xan_decode_init,
-    NULL,
-    xan_decode_end,
-    xan_decode_frame,
-    CODEC_CAP_DR1,
-};
-*/
--- a/src/ffmpeg/libavcodec/xl.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
- * Miro VideoXL codec
- * Copyright (c) 2004 Konstantin Shishkov
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/**
- * @file xl.c
- * Miro VideoXL codec.
- */
-
-#include "avcodec.h"
-#include "mpegvideo.h"
-
-typedef struct VideoXLContext{
-    AVCodecContext *avctx;
-    AVFrame pic;
-} VideoXLContext;
-
-const int xl_table[32] = {
-   0,   1,   2,   3,   4,   5,   6,   7,
-   8,   9,  12,  15,  20,  25,  34,  46,
-  64,  82,  94, 103, 108, 113, 116, 119,
- 120, 121, 122, 123, 124, 125, 126, 127};
-
-static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
-                        uint8_t *buf, int buf_size)
-{
-    VideoXLContext * const a = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&a->pic;
-    uint8_t *Y, *U, *V;
-    int i, j;
-    int stride;
-    uint32_t val;
-    int y0, y1, y2, y3, c0, c1;
-
-    if(p->data[0])
-        avctx->release_buffer(avctx, p);
-
-    p->reference = 0;
-    if(avctx->get_buffer(avctx, p) < 0){
-        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-        return -1;
-    }
-    p->pict_type= I_TYPE;
-    p->key_frame= 1;
-
-    Y = a->pic.data[0];
-    U = a->pic.data[1];
-    V = a->pic.data[2];
-
-    stride = avctx->width - 4;
-    for (i = 0; i < avctx->height; i++) {
-        /* lines are stored in reversed order */
-        buf += stride;
-
-        for (j = 0; j < avctx->width; j += 4) {
-            /* value is stored in LE dword with word swapped */
-            val = LE_32(buf);
-            buf -= 4;
-            val = ((val >> 16) & 0xFFFF) | ((val & 0xFFFF) << 16);
-
-            if(!j)
-                y0 = (val & 0x1F) << 2;
-            else
-                y0 = y3 + xl_table[val & 0x1F];
-            val >>= 5;
-            y1 = y0 + xl_table[val & 0x1F];
-            val >>= 5;
-            y2 = y1 + xl_table[val & 0x1F];
-            val >>= 6; /* align to word */
-            y3 = y2 + xl_table[val & 0x1F];
-            val >>= 5;
-            if(!j)
-                c0 = (val & 0x1F) << 2;
-            else
-                c0 += xl_table[val & 0x1F];
-            val >>= 5;
-            if(!j)
-                c1 = (val & 0x1F) << 2;
-            else
-                c1 += xl_table[val & 0x1F];
-
-            Y[j + 0] = y0 << 1;
-            Y[j + 1] = y1 << 1;
-            Y[j + 2] = y2 << 1;
-            Y[j + 3] = y3 << 1;
-
-            U[j >> 2] = c0 << 1;
-            V[j >> 2] = c1 << 1;
-        }
-
-        buf += avctx->width + 4;
-        Y += a->pic.linesize[0];
-        U += a->pic.linesize[1];
-        V += a->pic.linesize[2];
-    }
-
-    *data_size = sizeof(AVFrame);
-    *(AVFrame*)data = a->pic;
-
-    return buf_size;
-}
-
-static int decode_init(AVCodecContext *avctx){
-//    VideoXLContext * const a = avctx->priv_data;
-
-    avctx->pix_fmt= PIX_FMT_YUV411P;
-
-    return 0;
-}
-
-AVCodec xl_decoder = {
-    "xl",
-    CODEC_TYPE_VIDEO,
-    CODEC_ID_VIXL,
-    sizeof(VideoXLContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame,
-    CODEC_CAP_DR1,
-};
--- a/src/ffmpeg/libavcodec/xvmcvideo.c	Mon Mar 12 11:38:51 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-/*
- * XVideo Motion Compensation
- * Copyright (c) 2003 Ivan Kalvachev
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <limits.h>
-
-//avcodec include
-#include "avcodec.h"
-#include "dsputil.h"
-#include "mpegvideo.h"
-
-#undef NDEBUG
-#include <assert.h>
-
-#ifdef USE_FASTMEMCPY
-#include "libvo/fastmemcpy.h"
-#endif
-
-#ifdef HAVE_XVMC
-
-//X11 includes are in the xvmc_render.h
-//by replacing it with none-X one
-//XvMC emulation could be performed
-
-#include "xvmc_render.h"
-
-//#include "xvmc_debug.h"
-
-//set s->block
-inline void XVMC_init_block(MpegEncContext *s){
-xvmc_render_state_t * render;
-    render = (xvmc_render_state_t*)s->current_picture.data[2];
-    assert(render != NULL);
-    if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ){
-        assert(0);
-        return;//make sure that this is render packet
-    }
-    s->block =(DCTELEM *)(render->data_blocks+(render->next_free_data_block_num)*64);
-}
-
-void XVMC_pack_pblocks(MpegEncContext *s, int cbp){
-int i,j;
-const int mb_block_count = 4+(1<<s->chroma_format);
-
-    j=0;
-    cbp<<= 12-mb_block_count;
-    for(i=0; i<mb_block_count; i++){
-        if(cbp & (1<<11)) {
-           s->pblocks[i] = (short *)(&s->block[(j++)]);
-        }else{
-           s->pblocks[i] = NULL;
-        }
-        cbp+=cbp;
-//        printf("s->pblocks[%d]=%p ,s->block=%p cbp=%d\n",i,s->pblocks[i],s->block,cbp);
-    }
-}
-
-//these functions should be called on every new field or/and frame
-//They should be safe if they are called few times for same field!
-int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){
-xvmc_render_state_t * render,* last, * next;
-
-    assert(avctx != NULL);
-
-    render = (xvmc_render_state_t*)s->current_picture.data[2];
-    assert(render != NULL);
-    if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) )
-        return -1;//make sure that this is render packet
-
-    render->picture_structure = s->picture_structure;
-    render->flags = (s->first_field)? 0: XVMC_SECOND_FIELD;
-
-//make sure that all data is drawn by XVMC_end_frame
-    assert(render->filled_mv_blocks_num==0);
-
-    render->p_future_surface = NULL;
-    render->p_past_surface = NULL;
-
-    switch(s->pict_type){
-        case  I_TYPE:
-            return 0;// no prediction from other frames
-        case  B_TYPE:
-            next = (xvmc_render_state_t*)s->next_picture.data[2];
-            assert(next!=NULL);
-            assert(next->state & MP_XVMC_STATE_PREDICTION);
-            if(next == NULL) return -1;
-            if(next->magic != MP_XVMC_RENDER_MAGIC) return -1;
-            render->p_future_surface = next->p_surface;
-            //no return here, going to set forward prediction
-        case  P_TYPE:
-            last = (xvmc_render_state_t*)s->last_picture.data[2];
-            if(last == NULL)// && !s->first_field)
-                last = render;//predict second field from the first
-            if(last->magic != MP_XVMC_RENDER_MAGIC) return -1;
-            assert(last->state & MP_XVMC_STATE_PREDICTION);
-            render->p_past_surface = last->p_surface;
-            return 0;
-    }
-
-return -1;
-}
-
-void XVMC_field_end(MpegEncContext *s){
-xvmc_render_state_t * render;
-    render = (xvmc_render_state_t*)s->current_picture.data[2];
-    assert(render != NULL);
-
-    if(render->filled_mv_blocks_num > 0){
-//        printf("xvmcvideo.c: rendering %d left blocks after last slice!!!\n",render->filled_mv_blocks_num );
-        ff_draw_horiz_band(s,0,0);
-    }
-}
-
-void XVMC_decode_mb(MpegEncContext *s){
-XvMCMacroBlock * mv_block;
-xvmc_render_state_t * render;
-int i,cbp,blocks_per_mb;
-
-const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
-
-
-    if(s->encoding){
-        av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n");
-        return;
-    }
-
-   //from MPV_decode_mb(),
-    /* update DC predictors for P macroblocks */
-    if (!s->mb_intra) {
-        s->last_dc[0] =
-        s->last_dc[1] =
-        s->last_dc[2] =  128 << s->intra_dc_precision;
-    }
-
-   //MC doesn't skip blocks
-    s->mb_skipped = 0;
-
-
-   // do I need to export quant when I could not perform postprocessing?
-   // anyway, it doesn't hurrt
-    s->current_picture.qscale_table[mb_xy] = s->qscale;
-
-//START OF XVMC specific code
-    render = (xvmc_render_state_t*)s->current_picture.data[2];
-    assert(render!=NULL);
-    assert(render->magic==MP_XVMC_RENDER_MAGIC);
-    assert(render->mv_blocks);
-
-    //take the next free macroblock
-    mv_block = &render->mv_blocks[render->start_mv_blocks_num +
-                                   render->filled_mv_blocks_num ];
-
-// memset(mv_block,0,sizeof(XvMCMacroBlock));
-
-    mv_block->x = s->mb_x;
-    mv_block->y = s->mb_y;
-    mv_block->dct_type = s->interlaced_dct;//XVMC_DCT_TYPE_FRAME/FIELD;
-//    mv_block->motion_type = 0;  //zero to silense warnings
-    if(s->mb_intra){
-        mv_block->macroblock_type = XVMC_MB_TYPE_INTRA;//no MC, all done
-    }else{
-        mv_block->macroblock_type = XVMC_MB_TYPE_PATTERN;
-
-        if(s->mv_dir & MV_DIR_FORWARD){
-            mv_block->macroblock_type|= XVMC_MB_TYPE_MOTION_FORWARD;
-            //pmv[n][dir][xy]=mv[dir][n][xy]
-            mv_block->PMV[0][0][0] = s->mv[0][0][0];
-            mv_block->PMV[0][0][1] = s->mv[0][0][1];
-            mv_block->PMV[1][0][0] = s->mv[0][1][0];
-            mv_block->PMV[1][0][1] = s->mv[0][1][1];
-        }
-        if(s->mv_dir & MV_DIR_BACKWARD){
-            mv_block->macroblock_type|=XVMC_MB_TYPE_MOTION_BACKWARD;
-            mv_block->PMV[0][1][0] = s->mv[1][0][0];
-            mv_block->PMV[0][1][1] = s->mv[1][0][1];
-            mv_block->PMV[1][1][0] = s->mv[1][1][0];
-            mv_block->PMV[1][1][1] = s->mv[1][1][1];
-        }
-
-        switch(s->mv_type){
-            case  MV_TYPE_16X16:
-                mv_block->motion_type = XVMC_PREDICTION_FRAME;
-                break;
-            case  MV_TYPE_16X8:
-                mv_block->motion_type = XVMC_PREDICTION_16x8;
-                break;
-            case  MV_TYPE_FIELD:
-                mv_block->motion_type = XVMC_PREDICTION_FIELD;
-                if(s->picture_structure == PICT_FRAME){
-                    mv_block->PMV[0][0][1]<<=1;
-                    mv_block->PMV[1][0][1]<<=1;
-                    mv_block->PMV[0][1][1]<<=1;
-                    mv_block->PMV[1][1][1]<<=1;
-                }
-                break;
-            case  MV_TYPE_DMV:
-                mv_block->motion_type = XVMC_PREDICTION_DUAL_PRIME;
-                if(s->picture_structure == PICT_FRAME){
-
-                    mv_block->PMV[0][0][0] = s->mv[0][0][0];//top from top
-                    mv_block->PMV[0][0][1] = s->mv[0][0][1]<<1;
-
-                    mv_block->PMV[0][1][0] = s->mv[0][0][0];//bottom from bottom
-                    mv_block->PMV[0][1][1] = s->mv[0][0][1]<<1;
-
-                    mv_block->PMV[1][0][0] = s->mv[0][2][0];//dmv00, top from bottom
-                    mv_block->PMV[1][0][1] = s->mv[0][2][1]<<1;//dmv01
-
-                    mv_block->PMV[1][1][0] = s->mv[0][3][0];//dmv10, bottom from top
-                    mv_block->PMV[1][1][1] = s->mv[0][3][1]<<1;//dmv11
-
-                }else{
-                    mv_block->PMV[0][1][0] = s->mv[0][2][0];//dmv00
-                    mv_block->PMV[0][1][1] = s->mv[0][2][1];//dmv01
-                }
-                break;
-            default:
-                assert(0);
-        }
-
-        mv_block->motion_vertical_field_select = 0;
-
-//set correct field referenses
-        if(s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8){
-            if( s->field_select[0][0] ) mv_block->motion_vertical_field_select|=1;
-            if( s->field_select[1][0] ) mv_block->motion_vertical_field_select|=2;
-            if( s->field_select[0][1] ) mv_block->motion_vertical_field_select|=4;
-            if( s->field_select[1][1] ) mv_block->motion_vertical_field_select|=8;
-        }
-    }//!intra
-//time to handle data blocks;
-    mv_block->index = render->next_free_data_block_num;
-
-    blocks_per_mb = 6;
-    if( s->chroma_format >= 2){
-        blocks_per_mb = 4 + (1 << (s->chroma_format));
-    }
-
-//  calculate cbp
-    cbp = 0;
-    for(i=0; i<blocks_per_mb; i++) {
-        cbp+= cbp;
-        if(s->block_last_index[i] >= 0)
-            cbp++;
-    }
-
-    if(s->flags & CODEC_FLAG_GRAY){
-        if(s->mb_intra){//intra frames are alwasy full chroma block
-            for(i=4; i<blocks_per_mb; i++){
-                memset(s->pblocks[i],0,sizeof(short)*8*8);//so we need to clear them
-                if(!render->unsigned_intra)
-                    s->pblocks[i][0] = 1<<10;
-            }
-        }else{
-            cbp&= 0xf << (blocks_per_mb - 4);
-            blocks_per_mb = 4;//Luminance blocks only
-        }
-    }
-    mv_block->coded_block_pattern = cbp;
-    if(cbp == 0)
-        mv_block->macroblock_type &= ~XVMC_MB_TYPE_PATTERN;
-
-    for(i=0; i<blocks_per_mb; i++){
-        if(s->block_last_index[i] >= 0){
-            // i do not have unsigned_intra MOCO to test, hope it is OK
-            if( (s->mb_intra) && ( render->idct || (!render->idct && !render->unsigned_intra)) )
-                s->pblocks[i][0]-=1<<10;
-            if(!render->idct){
-                s->dsp.idct(s->pblocks[i]);
-                //!!TODO!clip!!!
-            }
-//copy blocks only if the codec doesn't support pblocks reordering
-            if(s->avctx->xvmc_acceleration == 1){
-                memcpy(&render->data_blocks[(render->next_free_data_block_num)*64],
-                        s->pblocks[i],sizeof(short)*8*8);
-            }else{
-/*              if(s->pblocks[i] != &render->data_blocks[
-                        (render->next_free_data_block_num)*64]){
-                   printf("ERROR mb(%d,%d) s->pblocks[i]=%p data_block[]=%p\n",
-                   s->mb_x,s->mb_y, s->pblocks[i],
-                   &render->data_blocks[(render->next_free_data_block_num)*64]);
-                }*/
-            }
-            render->next_free_data_block_num++;
-        }
-    }
-    render->filled_mv_blocks_num++;
-
-    assert(render->filled_mv_blocks_num <= render->total_number_of_mv_blocks);
-    assert(render->next_free_data_block_num <= render->total_number_of_data_blocks);
-
-
-    if(render->filled_mv_blocks_num >= render->total_number_of_mv_blocks)
-        ff_draw_horiz_band(s,0,0);
-
-// DumpRenderInfo(render);
-// DumpMBlockInfo(mv_block);
-
-}
-
-#endif