Logo Search packages:      
Sourcecode: blender version File versions  Download package

static int vop_dquant_decoding ( VC9Context v  )  [static]

VOP Dquant decoding

Parameters:
v VC9 Context

Definition at line 1125 of file vc9.c.

References VC9Context::altpq, VC9Context::dqbilevel, VC9Context::dqprofile, VC9Context::dqsbedge, VC9Context::dquant, VC9Context::dquantfrm, MpegEncContext::gb, VC9Context::pq, and VC9Context::s.

Referenced by decode_b_picture_secondary_header(), and decode_p_picture_secondary_header().

{
    GetBitContext *gb = &v->s.gb;
    int pqdiff;

    //variable size
    if (v->dquant == 2)
    {
        pqdiff = get_bits(gb, 3);
        if (pqdiff == 7) v->altpq = get_bits(gb, 5);
        else v->altpq = v->pq + pqdiff + 1;
    }
    else
    {
        v->dquantfrm = get_bits(gb, 1);
        if ( v->dquantfrm )
        {
            v->dqprofile = get_bits(gb, 2);
            switch (v->dqprofile)
            {
            case DQPROFILE_SINGLE_EDGE:
            case DQPROFILE_DOUBLE_EDGES:
                v->dqsbedge = get_bits(gb, 2);
                break;
            case DQPROFILE_ALL_MBS:
                v->dqbilevel = get_bits(gb, 1);
            default: break; //Forbidden ?
            }
            if (!v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS)
            {
                pqdiff = get_bits(gb, 3);
                if (pqdiff == 7) v->altpq = get_bits(gb, 5);
                else v->altpq = v->pq + pqdiff + 1;
            }
        }
    }
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index