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

static int decode_i_picture_primary_header ( VC9Context v  )  [static]

I frame header decoding, primary part

See also:
Tables 5+7, p53-54 and 55-57
Parameters:
v VC9 context
Returns:
Status
Todo:
Support Advanced Profile headers

Definition at line 1323 of file vc9.c.

References MpegEncContext::avctx, MpegEncContext::gb, VC9Context::halfpq, VC9Context::pq, VC9Context::pquantizer, VC9Context::profile, QUANT_FRAME_EXPLICIT, QUANT_FRAME_IMPLICIT, VC9Context::quantizer_mode, and VC9Context::s.

Referenced by standard_decode_picture_primary_header().

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

    /* Prolog common to all frametypes should be done in caller */
    //BF = Buffer Fullness
    if (v->profile < PROFILE_ADVANCED && get_bits(gb, 7))
    {
        av_log(v->s.avctx, AV_LOG_DEBUG, "I BufferFullness not 0\n");
    }

    /* Quantizer stuff */
    pqindex = get_bits(gb, 5);
    if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
        v->pq = pquant_table[0][pqindex];
    else
    {
        v->pq = pquant_table[v->quantizer_mode-1][pqindex];
    }
    if (pqindex < 9) v->halfpq = get_bits(gb, 1);
    if (v->quantizer_mode == QUANT_FRAME_EXPLICIT)
        v->pquantizer = get_bits(gb, 1);
    av_log(v->s.avctx, AV_LOG_DEBUG, "I frame: QP=%i (+%i/2)\n",
           v->pq, v->halfpq);
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index