static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)

{

    GetBitContext gb;

    int i;



    init_get_bits(&gb, src, length * 8);



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

        if (read_len_table(s->len[i], &gb) < 0)

            return -1;

        if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0)

            return -1;

        ff_free_vlc(&s->vlc[i]);

        init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,

                 s->bits[i], 4, 4, 0);

    }



    generate_joint_tables(s);



    return (get_bits_count(&gb) + 7) / 8;

}

static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)

{

    GetBitContext gb;

    int i;



    init_get_bits(&gb, src, length * 8);



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

        if (read_len_table(s->len[i], &gb) < 0)

            return -1;

        if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0)

            return -1;

        ff_free_vlc(&s->vlc[i]);

        init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,

                 s->bits[i], 4, 4, 0);

    }



    generate_joint_tables(s);



    return (get_bits_count(&gb) + 7) / 8;

}

    int i;     init_get_bits(&gb, src, length * 8);         if (read_len_table(s->len[i], &gb) < 0)             return -1;         if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0)             return -1;         init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,                  s->bits[i], 4, 4, 0);     generate_joint_tables(s);     int i;         init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,                  s->bits[i], 4, 4, 0);     generate_joint_tables(s);             return -1;             return -1;     int i;             return -1;             return -1;             return -1;
static int FUNC_0(HYuvContext *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

    GetBitContext gb;

    int VAR_3;



    init_get_bits(&gb, VAR_1, VAR_2 * 8);



    for (VAR_3 = 0; VAR_3 < 3; VAR_3++) {

        if (read_len_table(VAR_0->len[VAR_3], &gb) < 0)

            return -1;

        if (ff_huffyuv_generate_bits_table(VAR_0->bits[VAR_3], VAR_0->len[VAR_3]) < 0)

            return -1;

        ff_free_vlc(&VAR_0->vlc[VAR_3]);

        init_vlc(&VAR_0->vlc[VAR_3], VLC_BITS, 256, VAR_0->len[VAR_3], 1, 1,

                 VAR_0->bits[VAR_3], 4, 4, 0);

    }



    generate_joint_tables(VAR_0);



    return (get_bits_count(&gb) + 7) / 8;

}

static int FUNC_0(HYuvContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ GetBitContext gb; int VAR_3; init_get_bits(&gb, VAR_1, VAR_2 * 8); for (VAR_3 = 0; VAR_3 < 3; VAR_3++) { if (read_len_table(VAR_0->len[VAR_3], &gb) < 0)
return -1; if (ff_huffyuv_generate_bits_table(VAR_0->bits[VAR_3], VAR_0->len[VAR_3]) < 0)
return -1; ff_free_vlc(&VAR_0->vlc[VAR_3]); init_vlc(&VAR_0->vlc[VAR_3], VLC_BITS, 256, VAR_0->len[VAR_3], 1, 1,
VAR_0->bits[VAR_3], 4, 4, 0); } generate_joint_tables(VAR_0); return (get_bits_count(&gb) + 7) / 8; }