static void decode_plane_bitstream(HYuvContext *s, int count, int plane)

{

    int i;



    count /= 2;



    if (s->bps <= 8) {

        OPEN_READER(re, &s->gb);

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits);

            }

        } else {

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

                READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits);

            }

        }

        CLOSE_READER(re, &s->gb);

    } else if (s->bps <= 14) {

        OPEN_READER(re, &s->gb);

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits);

            }

        } else {

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

                READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits);

            }

        }

        CLOSE_READER(re, &s->gb);

    } else {

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE16(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane);

            }

        } else {

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

                READ_2PIX_PLANE16(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane);

            }

        }

    }

}

static void decode_plane_bitstream(HYuvContext *s, int count, int plane)

{

    int i;



    count /= 2;



    if (s->bps <= 8) {

        OPEN_READER(re, &s->gb);

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits);

            }

        } else {

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

                READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits);

            }

        }

        CLOSE_READER(re, &s->gb);

    } else if (s->bps <= 14) {

        OPEN_READER(re, &s->gb);

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits);

            }

        } else {

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

                READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits);

            }

        }

        CLOSE_READER(re, &s->gb);

    } else {

        if (count >= (get_bits_left(&s->gb)) / (32 * 2)) {

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {

                READ_2PIX_PLANE16(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane);

            }

        } else {

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

                READ_2PIX_PLANE16(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane);

            }

        }

    }

}

            for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {             for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {
static void FUNC_0(HYuvContext *VAR_0, int VAR_1, int VAR_2)

{

    int VAR_3;



    VAR_1 /= 2;



    if (VAR_0->bps <= 8) {

        OPEN_READER(re, &VAR_0->gb);

        if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) {

            for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) {

                READ_2PIX_PLANE(VAR_0->temp[0][2 * VAR_3], VAR_0->temp[0][2 * VAR_3 + 1], VAR_2, OP8bits);

            }

        } else {

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

                READ_2PIX_PLANE(VAR_0->temp[0][2 * VAR_3], VAR_0->temp[0][2 * VAR_3 + 1], VAR_2, OP8bits);

            }

        }

        CLOSE_READER(re, &VAR_0->gb);

    } else if (VAR_0->bps <= 14) {

        OPEN_READER(re, &VAR_0->gb);

        if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) {

            for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) {

                READ_2PIX_PLANE(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2, OP14bits);

            }

        } else {

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

                READ_2PIX_PLANE(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2, OP14bits);

            }

        }

        CLOSE_READER(re, &VAR_0->gb);

    } else {

        if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) {

            for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) {

                READ_2PIX_PLANE16(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2);

            }

        } else {

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

                READ_2PIX_PLANE16(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2);

            }

        }

    }

}

static void FUNC_0(HYuvContext *VAR_0, int VAR_1, int VAR_2)
{ int VAR_3; VAR_1 /= 2; if (VAR_0->bps <= 8) { OPEN_READER(re, &VAR_0->gb); if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) { for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) { READ_2PIX_PLANE(VAR_0->temp[0][2 * VAR_3], VAR_0->temp[0][2 * VAR_3 + 1], VAR_2, OP8bits); } } else { for(VAR_3=0; VAR_3<VAR_1; VAR_3++){ READ_2PIX_PLANE(VAR_0->temp[0][2 * VAR_3], VAR_0->temp[0][2 * VAR_3 + 1], VAR_2, OP8bits); } } CLOSE_READER(re, &VAR_0->gb); } else if (VAR_0->bps <= 14) { OPEN_READER(re, &VAR_0->gb); if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) { for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) { READ_2PIX_PLANE(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2, OP14bits); } } else { for(VAR_3=0; VAR_3<VAR_1; VAR_3++){ READ_2PIX_PLANE(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2, OP14bits); } } CLOSE_READER(re, &VAR_0->gb); } else { if (VAR_1 >= (get_bits_left(&VAR_0->gb)) / (32 * 2)) { for (VAR_3 = 0; VAR_3 < VAR_1 && get_bits_left(&VAR_0->gb) > 0; VAR_3++) { READ_2PIX_PLANE16(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2); } } else { for(VAR_3=0; VAR_3<VAR_1; VAR_3++){ READ_2PIX_PLANE16(VAR_0->temp16[0][2 * VAR_3], VAR_0->temp16[0][2 * VAR_3 + 1], VAR_2); } } } }