static int read_old_huffman_tables(HYuvContext *s){

#if 1

    GetBitContext gb;

    int i;



    init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);

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

        return -1;

    init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8);

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

        return -1;



    for(i=0; i<256; i++) s->bits[0][i] = classic_add_luma  [i];

    for(i=0; i<256; i++) s->bits[1][i] = classic_add_chroma[i];



    if(s->bitstream_bpp >= 24){

        memcpy(s->bits[1], s->bits[0], 256*sizeof(uint32_t));

        memcpy(s->len[1] , s->len [0], 256*sizeof(uint8_t));

    }

    memcpy(s->bits[2], s->bits[1], 256*sizeof(uint32_t));

    memcpy(s->len[2] , s->len [1], 256*sizeof(uint8_t));



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

        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 0;

#else

    av_log(s->avctx, AV_LOG_DEBUG, "v1 huffyuv is not supported \n");

    return -1;

#endif

}

static int read_old_huffman_tables(HYuvContext *s){

#if 1

    GetBitContext gb;

    int i;



    init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);

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

        return -1;

    init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8);

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

        return -1;



    for(i=0; i<256; i++) s->bits[0][i] = classic_add_luma  [i];

    for(i=0; i<256; i++) s->bits[1][i] = classic_add_chroma[i];



    if(s->bitstream_bpp >= 24){

        memcpy(s->bits[1], s->bits[0], 256*sizeof(uint32_t));

        memcpy(s->len[1] , s->len [0], 256*sizeof(uint8_t));

    }

    memcpy(s->bits[2], s->bits[1], 256*sizeof(uint32_t));

    memcpy(s->len[2] , s->len [1], 256*sizeof(uint8_t));



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

        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 0;

#else

    av_log(s->avctx, AV_LOG_DEBUG, "v1 huffyuv is not supported \n");

    return -1;

#endif

}

    init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);     init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8);
static int FUNC_0(HYuvContext *VAR_0){

#if 1

    GetBitContext gb;

    int VAR_1;



    init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);

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

        return -1;

    init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8);

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

        return -1;



    for(VAR_1=0; VAR_1<256; VAR_1++) VAR_0->bits[0][VAR_1] = classic_add_luma  [VAR_1];

    for(VAR_1=0; VAR_1<256; VAR_1++) VAR_0->bits[1][VAR_1] = classic_add_chroma[VAR_1];



    if(VAR_0->bitstream_bpp >= 24){

        memcpy(VAR_0->bits[1], VAR_0->bits[0], 256*sizeof(uint32_t));

        memcpy(VAR_0->len[1] , VAR_0->len [0], 256*sizeof(uint8_t));

    }

    memcpy(VAR_0->bits[2], VAR_0->bits[1], 256*sizeof(uint32_t));

    memcpy(VAR_0->len[2] , VAR_0->len [1], 256*sizeof(uint8_t));



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

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

        init_vlc(&VAR_0->vlc[VAR_1], VLC_BITS, 256, VAR_0->len[VAR_1], 1, 1, VAR_0->bits[VAR_1], 4, 4, 0);

    }



    generate_joint_tables(VAR_0);



    return 0;

#else

    av_log(VAR_0->avctx, AV_LOG_DEBUG, "v1 huffyuv is not supported \n");

    return -1;

#endif

}

static int FUNC_0(HYuvContext *VAR_0){ #if 1
GetBitContext gb; int VAR_1; init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8); if(read_len_table(VAR_0->len[0], &gb)<0)
return -1; init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8); if(read_len_table(VAR_0->len[1], &gb)<0)
return -1; for(VAR_1=0; VAR_1<256; VAR_1++) VAR_0->bits[0][VAR_1] = classic_add_luma  [VAR_1]; for(VAR_1=0; VAR_1<256; VAR_1++) VAR_0->bits[1][VAR_1] = classic_add_chroma[VAR_1]; if(VAR_0->bitstream_bpp >= 24){ memcpy(VAR_0->bits[1], VAR_0->bits[0], 256*sizeof(uint32_t)); memcpy(VAR_0->len[1] , VAR_0->len [0], 256*sizeof(uint8_t)); } memcpy(VAR_0->bits[2], VAR_0->bits[1], 256*sizeof(uint32_t)); memcpy(VAR_0->len[2] , VAR_0->len [1], 256*sizeof(uint8_t)); for(VAR_1=0; VAR_1<3; VAR_1++){ ff_free_vlc(&VAR_0->vlc[VAR_1]); init_vlc(&VAR_0->vlc[VAR_1], VLC_BITS, 256, VAR_0->len[VAR_1], 1, 1, VAR_0->bits[VAR_1], 4, 4, 0); } generate_joint_tables(VAR_0); return 0; #else
av_log(VAR_0->avctx, AV_LOG_DEBUG, "v1 huffyuv is not supported \n"); return -1; #endif
}