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

vc9.c File Reference


Detailed Description

VC-9 and WMV3 decoder

TODO: most AP stuff, optimize, most of MB layer, transform, filtering and motion compensation, etc TODO: use MPV_ !!

Definition in file vc9.c.

#include "common.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "vc9data.h"
#include <assert.h>

Go to the source code of this file.

Classes

struct  BitPlane
struct  VC9Context

VC-9 VLC tables and defines

Todo:
TODO move this into the context


#define VC9_4MV_BLOCK_PATTERN_VLC_BITS   6
#define VC9_BFRACTION_VLC_BITS   7
#define VC9_CBPCY_P_VLC_BITS   9
#define VC9_IMODE_VLC_BITS   4
#define VC9_MV_DIFF_VLC_BITS   9
#define VC9_NORM2_VLC_BITS   3
#define VC9_NORM6_VLC_BITS   9
#define VC9_SUBBLKPAT_VLC_BITS   6
#define VC9_TTBLK_VLC_BITS   5
#define VC9_TTMB_VLC_BITS   9
static VLC vc9_4mv_block_pattern_vlc [4]
static VLC vc9_bfraction_vlc
static VLC vc9_cbpcy_p_vlc [4]
static VLC vc9_imode_vlc
static VLC vc9_mv_diff_vlc [4]
static VLC vc9_norm2_vlc
static VLC vc9_norm6_vlc
static VLC vc9_subblkpat_vlc [3]
static VLC vc9_ttblk_vlc [3]
static VLC vc9_ttmb_vlc [3]

Defines

#define BI_TYPE   7
#define DC_VLC_BITS   9
#define GET_MQUANT()
 Get macroblock-level quantizer scale.
#define GET_MVDATA(_dmv_x, _dmv_y)
 Get MV differentials.
#define HAS_ADVANCED_PROFILE   0
#define IMODE_COLSKIP   6
#define IMODE_DIFF2   2
#define IMODE_DIFF6   4
#define IMODE_NORM2   1
#define IMODE_NORM6   3
#define IMODE_RAW   0
#define IMODE_ROWSKIP   5
#define INIT_VLC(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, use_static)
#define MB_INTRA_VLC_BITS   9
#define TRACE   1
MV types for B frames


#define BMV_TYPE_BACKWARD   0
#define BMV_TYPE_BACKWARD   0
#define BMV_TYPE_FORWARD   1
#define BMV_TYPE_INTERPOLATED   3
#define DQDOUBLE_BEDGE_BOTTOMLEFT   3
#define DQDOUBLE_BEDGE_BOTTOMRIGHT   2
#define DQDOUBLE_BEDGE_TOPLEFT   0
#define DQDOUBLE_BEDGE_TOPRIGHT   1
#define DQPROFILE_ALL_MBS   3
#define DQPROFILE_DOUBLE_EDGES   1
#define DQPROFILE_SINGLE_EDGE   2
Where quant can be changed
#define DQPROFILE_FOUR_EDGES   0
#define DQPROFILE_FOUR_EDGES   0
#define DQSINGLE_BEDGE_BOTTOM   3
#define DQSINGLE_BEDGE_LEFT   0
#define DQSINGLE_BEDGE_RIGHT   2
#define DQSINGLE_BEDGE_TOP   1
#define MV_PMODE_1MV   1
#define MV_PMODE_1MV_HPEL   2
#define MV_PMODE_1MV_HPEL_BILIN   0
#define MV_PMODE_INTENSITY_COMP   4
#define MV_PMODE_MIXED_MV   3
#define PROFILE_ADVANCED   3
#define PROFILE_COMPLEX   2
 TODO: WMV9 specific.
#define PROFILE_MAIN   1
#define PROFILE_SIMPLE   0
#define QUANT_FRAME_EXPLICIT   1
 Explicitly specified at frame level.
#define QUANT_FRAME_IMPLICIT   0
 Implicitly specified at frame level.
#define QUANT_NON_UNIFORM   2
 Non-uniform quant used for all frames.
#define QUANT_UNIFORM   3
 Uniform quant used for all frames.

Functions

static int alloc_bitplane (BitPlane *bp, int width, int height)
static int bitplane_decoding (BitPlane *bp, VC9Context *v)
static int decode_b_picture_primary_header (VC9Context *v)
static int decode_b_picture_secondary_header (VC9Context *v)
static void decode_colskip (uint8_t *plane, int width, int height, int stride, GetBitContext *gb)
static int decode_i_picture_primary_header (VC9Context *v)
static int decode_i_picture_secondary_header (VC9Context *v)
static int decode_p_picture_primary_header (VC9Context *v)
static int decode_p_picture_secondary_header (VC9Context *v)
static void decode_rowskip (uint8_t *plane, int width, int height, int stride, GetBitContext *gb)
static int decode_sequence_header (AVCodecContext *avctx, GetBitContext *gb)
static void free_bitplane (BitPlane *bp)
static int get_prefix (GetBitContext *gb, int stop, int len)
static int standard_decode_mbs (VC9Context *v)
static int standard_decode_picture_primary_header (VC9Context *v)
static int standard_decode_picture_secondary_header (VC9Context *v)
static int vc9_coded_block_pred (MpegEncContext *s, int n, uint8_t **coded_block_ptr)
static int vc9_decode_b_mb (VC9Context *v, DCTELEM block[6][64])
static int vc9_decode_block (VC9Context *v, DCTELEM block[64], int n, int coded, int mquant)
static int vc9_decode_end (AVCodecContext *avctx)
static int vc9_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static int vc9_decode_i_mb (VC9Context *v, DCTELEM block[6][64])
static int vc9_decode_init (AVCodecContext *avctx)
static int vc9_decode_p_mb (VC9Context *v, DCTELEM block[6][64])
static int vc9_init_common (VC9Context *v)
static int vc9_pred_dc (MpegEncContext *s, int n, uint16_t **dc_val_ptr, int *dir_ptr)
static int vop_dquant_decoding (VC9Context *v)

Variables

VLC ff_msmp4_dc_chroma_vlc [2]
VLC ff_msmp4_dc_luma_vlc [2]
VLC ff_msmp4_mb_i_vlc
const uint32_t ff_table0_dc_chroma [120][2]
const uint32_t ff_table0_dc_lum [120][2]
const uint32_t ff_table1_dc_chroma [120][2]
const uint32_t ff_table1_dc_lum [120][2]
static const int fps_dr [2] = { 1000, 1001 }
static const int fps_nr [5] = { 24, 25, 30, 50, 60 }
static const uint8_t mv_pmode_table [2][5]
static const uint8_t pquant_table [3][32]
static const uint16_t table_mb_intra [64][2]
AVCodec vc9_decoder
AVCodec wmv3_decoder


Generated by  Doxygen 1.6.0   Back to index