static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,

                        Plane *plane, const uint8_t *data, int32_t data_size,

                        int32_t strip_width)

{

    Cell            curr_cell;

    int             num_vectors;



    /* each plane data starts with mc_vector_count field, */

    /* an optional array of motion vectors followed by the vq data */

    num_vectors = bytestream_get_le32(&data);

    ctx->mc_vectors  = num_vectors ? data : 0;



    /* init the bitreader */

    init_get_bits(&ctx->gb, &data[num_vectors * 2], data_size << 3);

    ctx->skip_bits   = 0;

    ctx->need_resync = 0;



    ctx->last_byte = data + data_size - 1;



    /* initialize the 1st cell and set its dimensions to whole plane */

    curr_cell.xpos   = curr_cell.ypos = 0;

    curr_cell.width  = plane->width  >> 2;

    curr_cell.height = plane->height >> 2;

    curr_cell.tree   = 0; // we are in the MC tree now

    curr_cell.mv_ptr = 0; // no motion vector = INTRA cell



    return parse_bintree(ctx, avctx, plane, INTRA_NULL, &curr_cell, CELL_STACK_MAX, strip_width);

}

static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,

                        Plane *plane, const uint8_t *data, int32_t data_size,

                        int32_t strip_width)

{

    Cell            curr_cell;

    int             num_vectors;



    

    

    num_vectors = bytestream_get_le32(&data);

    ctx->mc_vectors  = num_vectors ? data : 0;



    

    init_get_bits(&ctx->gb, &data[num_vectors * 2], data_size << 3);

    ctx->skip_bits   = 0;

    ctx->need_resync = 0;



    ctx->last_byte = data + data_size - 1;



    

    curr_cell.xpos   = curr_cell.ypos = 0;

    curr_cell.width  = plane->width  >> 2;

    curr_cell.height = plane->height >> 2;

    curr_cell.tree   = 0; 

    curr_cell.mv_ptr = 0; 



    return parse_bintree(ctx, avctx, plane, INTRA_NULL, &curr_cell, CELL_STACK_MAX, strip_width);

}

    init_get_bits(&ctx->gb, &data[num_vectors * 2], data_size << 3);
static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,

                        Plane *VAR_2, const uint8_t *VAR_3, int32_t VAR_4,

                        int32_t VAR_5)

{

    Cell            curr_cell;

    int             VAR_6;



    

    

    VAR_6 = bytestream_get_le32(&VAR_3);

    VAR_0->mc_vectors  = VAR_6 ? VAR_3 : 0;



    

    init_get_bits(&VAR_0->gb, &VAR_3[VAR_6 * 2], VAR_4 << 3);

    VAR_0->skip_bits   = 0;

    VAR_0->need_resync = 0;



    VAR_0->last_byte = VAR_3 + VAR_4 - 1;



    

    curr_cell.xpos   = curr_cell.ypos = 0;

    curr_cell.width  = VAR_2->width  >> 2;

    curr_cell.height = VAR_2->height >> 2;

    curr_cell.tree   = 0; 

    curr_cell.mv_ptr = 0; 



    return parse_bintree(VAR_0, VAR_1, VAR_2, INTRA_NULL, &curr_cell, CELL_STACK_MAX, VAR_5);

}

static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,
Plane *VAR_2, const uint8_t *VAR_3, int32_t VAR_4,
int32_t VAR_5)
{ Cell            curr_cell; int             VAR_6; VAR_6 = bytestream_get_le32(&VAR_3); VAR_0->mc_vectors  = VAR_6 ? VAR_3 : 0; init_get_bits(&VAR_0->gb, &VAR_3[VAR_6 * 2], VAR_4 << 3); VAR_0->skip_bits   = 0; VAR_0->need_resync = 0; VAR_0->last_byte = VAR_3 + VAR_4 - 1; curr_cell.xpos   = curr_cell.ypos = 0; curr_cell.width  = VAR_2->width  >> 2; curr_cell.height = VAR_2->height >> 2; curr_cell.tree   = 0; curr_cell.mv_ptr = 0; return parse_bintree(VAR_0, VAR_1, VAR_2, INTRA_NULL, &curr_cell, CELL_STACK_MAX, VAR_5); }