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

static int vc9_decode_i_mb ( VC9Context v,
DCTELEM  block[6][64] 
) [static]

Decode one I-frame MB (in Simple/Main profile)

Todo:
TODO: Extend to AP

Definition at line 1982 of file vc9.c.

References MpegEncContext::ac_pred, MpegEncContext::avctx, MpegEncContext::gb, MpegEncContext::mb_intra, MpegEncContext::mb_x, MpegEncContext::mb_y, VC9Context::pq, VC9Context::s, and vc9_decode_block().

Referenced by standard_decode_mbs().

{
    int i, cbp, val;
    uint8_t *coded_val;
//    uint32_t * const mb_type_ptr= &v->s.current_picture.mb_type[ v->s.mb_x + v->s.mb_y*v->s.mb_stride ];

    v->s.mb_intra = 1;
    cbp = get_vlc2(&v->s.gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2);
    if (cbp < 0) return -1;
    v->s.ac_pred = get_bits(&v->s.gb, 1);

    for (i=0; i<6; i++)
    {
        val = ((cbp >> (5 - i)) & 1);
        if (i < 4) {
            int pred = vc9_coded_block_pred(&v->s, i, &coded_val);
            val = val ^ pred;
            *coded_val = val;
        }
        cbp |= val << (5 - i);
        if (vc9_decode_block(v, block[i], i, val, v->pq) < 0) //FIXME Should be mquant
        {
            av_log(v->s.avctx, AV_LOG_ERROR,
                   "\nerror while decoding block: %d x %d (%d)\n", v->s.mb_x, v->s.mb_y, i);
            return -1;
        }
    }
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index