VC9 Block-level functions


Defines

#define GET_MQUANT()
 Get macroblock-level quantizer scale.
#define GET_MVDATA(_dmv_x, _dmv_y)
 Get MV differentials.

Functions

static int vc9_pred_dc (MpegEncContext *s, int n, uint16_t **dc_val_ptr, int *dir_ptr)
int vc9_decode_block (VC9Context *v, DCTELEM block[64], int n, int coded, int mquant)

Detailed Description

See also:
7.1.4, p91 and 8.1.1.7, p(1)04
Todo:
TODO: Integrate to MpegEncContext facilities

Define Documentation

 
#define GET_MQUANT (  ) 

Value:

if (v->dquantfrm)                                            \
  {                                                            \
    if (v->dqprofile == DQPROFILE_ALL_MBS)                     \
    {                                                          \
      if (v->dqbilevel)                                        \
      {                                                        \
        mquant = (get_bits(gb, 1)) ? v->pq : v->altpq;         \
      }                                                        \
      else                                                     \
      {                                                        \
        mqdiff = get_bits(gb, 3);                              \
        if (mqdiff != 7) mquant = v->pq + mqdiff;              \
        else mquant = get_bits(gb, 5);                         \
      }                                                        \
    }                                                          \
    else mquant = v->pq;                                       \
  }
Get macroblock-level quantizer scale.

Warning:
XXX: qdiff to the frame quant, not previous quant ? XXX: Don't know how to initialize mquant otherwise in last case

Definition at line 1689 of file vc9.c.

Referenced by vc9_decode_b_mb(), and vc9_decode_p_mb().

#define GET_MVDATA ( _dmv_x,
_dmv_y   ) 

Get MV differentials.

See also:
MVDATA decoding from 8.3.5.2, p(1)20
Parameters:
_dmv_x Horizontal differential for decoded MV
_dmv_y Vertical differential for decoded MV
Todo:
TODO: Use MpegEncContext arrays to store them

Definition at line 1716 of file vc9.c.

Referenced by vc9_decode_b_mb(), and vc9_decode_p_mb().


Function Documentation

int vc9_decode_block ( VC9Context v,
DCTELEM  block[64],
int  n,
int  coded,
int  mquant 
)

Decode one block, inter or intra

Parameters:
v The VC9 context
block 8x8 DCT block
n Block index in the current MB (<4=>luma)
coded If the block is coded
mquant Quantizer step for the current block
See also:
Inter TT: Table 21, p73 + p91-85

Intra TT: Table 20, p72 + p(1)05-(1)07

Todo:
TODO: Process the blocks
Todo:
TODO: Use M$ MPEG-4 cbp prediction

Definition at line 1835 of file vc9.c.

References MpegEncContext::ac_pred, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, MpegEncContext::c_dc_scale, MpegEncContext::c_dc_scale_table, MpegEncContext::dc_table_index, DC_VLC_BITS, decode012(), MpegEncContext::gb, get_bits(), get_vlc2(), MpegEncContext::mb_intra, mpeg4_pred_ac(), VC9Context::pq, s, VC9Context::s, VLC::table, VC9Context::tt_index, VC9Context::ttblk4x4, VC9Context::ttmb, vc9_pred_dc(), VC9_SUBBLKPAT_VLC_BITS, VC9_TTBLK_VLC_BITS, MpegEncContext::y_dc_scale, and MpegEncContext::y_dc_scale_table.

Referenced by vc9_decode_b_mb(), vc9_decode_i_mb(), and vc9_decode_p_mb().

Here is the call graph for this function:

static int vc9_pred_dc ( MpegEncContext s,
int  n,
uint16_t **  dc_val_ptr,
int *  dir_ptr 
) [inline, static]

Get predicted DC value prediction dir: left=0, top=1

Parameters:
s MpegEncContext
[in] n block index in the current MB
dc_val_ptr Pointer to DC predictor
dir_ptr Prediction direction for use in AC prediction
Todo:
TODO: Actually do it the VC9 way
Todo:
TODO: Handle properly edges

Definition at line 1759 of file vc9.c.

References a, b, BI_TYPE, MpegEncContext::block_index, MpegEncContext::block_wrap, c, MpegEncContext::c_dc_scale, MpegEncContext::dc_val, MpegEncContext::first_slice_line, I_TYPE, MpegEncContext::mb_x, MpegEncContext::pict_type, pred(), and MpegEncContext::y_dc_scale.

Referenced by vc9_decode_block().

Here is the call graph for this function:


Generated on Mon Apr 28 14:09:25 2008 for Cinelerra by  doxygen 1.5.5