static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)

{

    GetBitContext gb;

    int flags, i, j, x, y, op;

    unsigned char c[3];

    unsigned char *dst;

    uint32_t *palette;



    flags = *data++;



    if (flags & 1) {

        palette = (uint32_t *)seq->frame.data[1];

        for (i = 0; i < 256; i++) {

            for (j = 0; j < 3; j++, data++)

                c[j] = (*data << 2) | (*data >> 4);

            palette[i] = AV_RB24(c);

        }

        seq->frame.palette_has_changed = 1;

    }



    if (flags & 2) {

        init_get_bits(&gb, data, 128 * 8); data += 128;

        for (y = 0; y < 128; y += 8)

            for (x = 0; x < 256; x += 8) {

                dst = &seq->frame.data[0][y * seq->frame.linesize[0] + x];

                op = get_bits(&gb, 2);

                switch (op) {

                case 1:

                    data = seq_decode_op1(seq, data, dst);

                    break;

                case 2:

                    data = seq_decode_op2(seq, data, dst);

                    break;

                case 3:

                    data = seq_decode_op3(seq, data, dst);

                    break;

                }

            }

    }

}

static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)

{

    GetBitContext gb;

    int flags, i, j, x, y, op;

    unsigned char c[3];

    unsigned char *dst;

    uint32_t *palette;



    flags = *data++;



    if (flags & 1) {

        palette = (uint32_t *)seq->frame.data[1];

        for (i = 0; i < 256; i++) {

            for (j = 0; j < 3; j++, data++)

                c[j] = (*data << 2) | (*data >> 4);

            palette[i] = AV_RB24(c);

        }

        seq->frame.palette_has_changed = 1;

    }



    if (flags & 2) {

        init_get_bits(&gb, data, 128 * 8); data += 128;

        for (y = 0; y < 128; y += 8)

            for (x = 0; x < 256; x += 8) {

                dst = &seq->frame.data[0][y * seq->frame.linesize[0] + x];

                op = get_bits(&gb, 2);

                switch (op) {

                case 1:

                    data = seq_decode_op1(seq, data, dst);

                    break;

                case 2:

                    data = seq_decode_op2(seq, data, dst);

                    break;

                case 3:

                    data = seq_decode_op3(seq, data, dst);

                    break;

                }

            }

    }

}

static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)                     data = seq_decode_op1(seq, data, dst);                     data = seq_decode_op2(seq, data, dst);                     data = seq_decode_op3(seq, data, dst);
static void FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, int VAR_2)

{

    GetBitContext gb;

    int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;

    unsigned char VAR_9[3];

    unsigned char *VAR_10;

    uint32_t *palette;



    VAR_3 = *VAR_1++;



    if (VAR_3 & 1) {

        palette = (uint32_t *)VAR_0->frame.VAR_1[1];

        for (VAR_4 = 0; VAR_4 < 256; VAR_4++) {

            for (VAR_5 = 0; VAR_5 < 3; VAR_5++, VAR_1++)

                VAR_9[VAR_5] = (*VAR_1 << 2) | (*VAR_1 >> 4);

            palette[VAR_4] = AV_RB24(VAR_9);

        }

        VAR_0->frame.palette_has_changed = 1;

    }



    if (VAR_3 & 2) {

        init_get_bits(&gb, VAR_1, 128 * 8); VAR_1 += 128;

        for (VAR_7 = 0; VAR_7 < 128; VAR_7 += 8)

            for (VAR_6 = 0; VAR_6 < 256; VAR_6 += 8) {

                VAR_10 = &VAR_0->frame.VAR_1[0][VAR_7 * VAR_0->frame.linesize[0] + VAR_6];

                VAR_8 = get_bits(&gb, 2);

                switch (VAR_8) {

                case 1:

                    VAR_1 = seq_decode_op1(VAR_0, VAR_1, VAR_10);

                    break;

                case 2:

                    VAR_1 = seq_decode_op2(VAR_0, VAR_1, VAR_10);

                    break;

                case 3:

                    VAR_1 = seq_decode_op3(VAR_0, VAR_1, VAR_10);

                    break;

                }

            }

    }

}

static void FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, int VAR_2)
{ GetBitContext gb; int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8; unsigned char VAR_9[3]; unsigned char *VAR_10; uint32_t *palette; VAR_3 = *VAR_1++; if (VAR_3 & 1) { palette = (uint32_t *)VAR_0->frame.VAR_1[1]; for (VAR_4 = 0; VAR_4 < 256; VAR_4++) { for (VAR_5 = 0; VAR_5 < 3; VAR_5++, VAR_1++) VAR_9[VAR_5] = (*VAR_1 << 2) | (*VAR_1 >> 4); palette[VAR_4] = AV_RB24(VAR_9); } VAR_0->frame.palette_has_changed = 1; } if (VAR_3 & 2) { init_get_bits(&gb, VAR_1, 128 * 8); VAR_1 += 128; for (VAR_7 = 0; VAR_7 < 128; VAR_7 += 8) for (VAR_6 = 0; VAR_6 < 256; VAR_6 += 8) { VAR_10 = &VAR_0->frame.VAR_1[0][VAR_7 * VAR_0->frame.linesize[0] + VAR_6]; VAR_8 = get_bits(&gb, 2); switch (VAR_8) { case 1:
VAR_1 = seq_decode_op1(VAR_0, VAR_1, VAR_10); break; case 2:
VAR_1 = seq_decode_op2(VAR_0, VAR_1, VAR_10); break; case 3:
VAR_1 = seq_decode_op3(VAR_0, VAR_1, VAR_10); break; } } } }