void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)

{

    int i, j = 0;

    const int mb_block_count = 4 + (1 << s->chroma_format);



    cbp <<= 12-mb_block_count;

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

        if (cbp & (1 << 11))

            s->pblocks[i] = &s->block[j++];

        else

            s->pblocks[i] = NULL;

        cbp += cbp;

    }

}

void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)

{

    int i, j = 0;

    const int mb_block_count = 4 + (1 << s->chroma_format);



    cbp <<= 12-mb_block_count;

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

        if (cbp & (1 << 11))

            s->pblocks[i] = &s->block[j++];

        else

            s->pblocks[i] = NULL;

        cbp += cbp;

    }

}

void FUNC_0(MpegEncContext *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3 = 0;

    const int VAR_4 = 4 + (1 << VAR_0->chroma_format);



    VAR_1 <<= 12-VAR_4;

    for (VAR_2 = 0; VAR_2 < VAR_4; VAR_2++) {

        if (VAR_1 & (1 << 11))

            VAR_0->pblocks[VAR_2] = &VAR_0->block[VAR_3++];

        else

            VAR_0->pblocks[VAR_2] = NULL;

        VAR_1 += VAR_1;

    }

}

void FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{ int VAR_2, VAR_3 = 0; const int VAR_4 = 4 + (1 << VAR_0->chroma_format); VAR_1 <<= 12-VAR_4; for (VAR_2 = 0; VAR_2 < VAR_4; VAR_2++) { if (VAR_1 & (1 << 11))
VAR_0->pblocks[VAR_2] = &VAR_0->block[VAR_3++]; else
VAR_0->pblocks[VAR_2] = NULL; VAR_1 += VAR_1; } }