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

        }

    }

}

                    if(dat_pos > s->size) {
static void FUNC_0(IdcinContext *VAR_0)

{

    hnode_t *hnodes;

    long VAR_1, VAR_2;

    int VAR_3;

    unsigned char VAR_4 = 0;

    int VAR_5, VAR_6, VAR_7;



    VAR_3 = VAR_5 = VAR_7 = 0;

    for (VAR_2 = 0; VAR_2 < (VAR_0->frame.linesize[0] * VAR_0->avctx->height);

        VAR_2 += VAR_0->frame.linesize[0]) {

        for (VAR_1 = VAR_2; VAR_1 < VAR_2 + VAR_0->avctx->width; VAR_1++) {

            VAR_6 = VAR_0->num_huff_nodes[VAR_3];

            hnodes = VAR_0->huff_nodes[VAR_3];



            while(VAR_6 >= HUF_TOKENS) {

                if(!VAR_5) {

                    if(VAR_7 > VAR_0->size) {

                        av_log(VAR_0->avctx, AV_LOG_ERROR, "Huffman decode error.\n");

                        return;

                    }

                    VAR_5 = 8;

                    VAR_4 = VAR_0->buf[VAR_7++];

                }



                VAR_6 = hnodes[VAR_6].children[VAR_4 & 0x01];

                VAR_4 = VAR_4 >> 1;

                VAR_5--;

            }



            VAR_0->frame.data[0][VAR_1] = VAR_6;

            VAR_3 = VAR_6;

        }

    }

}

static void FUNC_0(IdcinContext *VAR_0)
{ hnode_t *hnodes; long VAR_1, VAR_2; int VAR_3; unsigned char VAR_4 = 0; int VAR_5, VAR_6, VAR_7; VAR_3 = VAR_5 = VAR_7 = 0; for (VAR_2 = 0; VAR_2 < (VAR_0->frame.linesize[0] * VAR_0->avctx->height); VAR_2 += VAR_0->frame.linesize[0]) { for (VAR_1 = VAR_2; VAR_1 < VAR_2 + VAR_0->avctx->width; VAR_1++) { VAR_6 = VAR_0->num_huff_nodes[VAR_3]; hnodes = VAR_0->huff_nodes[VAR_3]; while(VAR_6 >= HUF_TOKENS) { if(!VAR_5) { if(VAR_7 > VAR_0->size) { av_log(VAR_0->avctx, AV_LOG_ERROR, "Huffman decode error.\n"); return; } VAR_5 = 8; VAR_4 = VAR_0->buf[VAR_7++]; } VAR_6 = hnodes[VAR_6].children[VAR_4 & 0x01]; VAR_4 = VAR_4 >> 1; VAR_5--; } VAR_0->frame.data[0][VAR_1] = VAR_6; VAR_3 = VAR_6; } } }