hvirtual/quicktime/ffmpeg/libavcodec/msmpeg4.c File Reference

#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "msmpeg4data.h"
#include "wmv2.c"

Include dependency graph for msmpeg4.c:

Go to the source code of this file.

Defines

#define DC_VLC_BITS   9
#define CBPY_VLC_BITS   6
#define INTER_INTRA_VLC_BITS   3
#define V1_INTRA_CBPC_VLC_BITS   6
#define V1_INTER_CBPC_VLC_BITS   6
#define V2_INTRA_CBPC_VLC_BITS   3
#define V2_MB_TYPE_VLC_BITS   7
#define MV_VLC_BITS   9
#define V2_MV_VLC_BITS   9
#define TEX_VLC_BITS   9
#define MB_NON_INTRA_VLC_BITS   9
#define MB_INTRA_VLC_BITS   9
#define II_BITRATE   128*1024
#define MBAC_BITRATE   50*1024
#define DEFAULT_INTER_INDEX   3
#define set_stat(var)
#define DC_MAX   119

Functions

static void msmpeg4_encode_block (MpegEncContext *s, DCTELEM *block, int n)
static int msmpeg4_decode_block (MpegEncContext *s, DCTELEM *block, int n, int coded, const uint8_t *scantable)
static int msmpeg4_decode_dc (MpegEncContext *s, int n, int *dir_ptr)
static int msmpeg4_decode_motion (MpegEncContext *s, int *mx_ptr, int *my_ptr)
static void msmpeg4v2_encode_motion (MpegEncContext *s, int val)
static void init_h263_dc_for_msmpeg4 (void)
static void msmpeg4_memsetw (short *tab, int val, int n)
static int msmpeg4v12_decode_mb (MpegEncContext *s, DCTELEM block[6][64])
static int msmpeg4v34_decode_mb (MpegEncContext *s, DCTELEM block[6][64])
static int wmv2_decode_mb (MpegEncContext *s, DCTELEM block[6][64])
static void common_init (MpegEncContext *s)
static int coded_block_pred (MpegEncContext *s, int n, uint8_t **coded_block_ptr)
static int msmpeg4v1_pred_dc (MpegEncContext *s, int n, int32_t **dc_val_ptr)
static int get_dc (uint8_t *src, int stride, int scale)
static int msmpeg4_pred_dc (MpegEncContext *s, int n, uint16_t **dc_val_ptr, int *dir_ptr)
static void msmpeg4_encode_dc (MpegEncContext *s, int level, int n, int *dir_ptr)
int ff_msmpeg4_decode_init (MpegEncContext *s)
int msmpeg4_decode_picture_header (MpegEncContext *s)
int msmpeg4_decode_ext_header (MpegEncContext *s, int buf_size)
static int msmpeg4v2_decode_motion (MpegEncContext *s, int pred, int f_code)

Variables

static uint32_t v2_dc_lum_table [512][2]
static uint32_t v2_dc_chroma_table [512][2]
uint8_t wmv3_dc_scale_table [32]
static VLC mb_non_intra_vlc [4]
VLC ff_msmp4_mb_i_vlc
VLC ff_msmp4_dc_luma_vlc [2]
VLC ff_msmp4_dc_chroma_vlc [2]
static VLC v2_dc_lum_vlc
static VLC v2_dc_chroma_vlc
static VLC cbpy_vlc
static VLC v2_intra_cbpc_vlc
static VLC v2_mb_type_vlc
static VLC v2_mv_vlc
static VLC v1_intra_cbpc_vlc
static VLC v1_inter_cbpc_vlc
static VLC inter_intra_vlc


Detailed Description

MSMPEG4 backend for ffmpeg encoder and decoder.

Definition in file msmpeg4.c.


Define Documentation

#define CBPY_VLC_BITS   6

Definition at line 42 of file msmpeg4.c.

#define DC_MAX   119

Definition at line 844 of file msmpeg4.c.

Referenced by msmpeg4_decode_dc(), and msmpeg4_encode_dc().

#define DC_VLC_BITS   9

Definition at line 41 of file msmpeg4.c.

#define DEFAULT_INTER_INDEX   3

Definition at line 57 of file msmpeg4.c.

Referenced by msmpeg4v34_decode_mb().

#define II_BITRATE   128*1024

Definition at line 54 of file msmpeg4.c.

Referenced by msmpeg4_decode_picture_header().

#define INTER_INTRA_VLC_BITS   3

Definition at line 43 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), msmpeg4v34_decode_mb(), and wmv2_decode_mb().

#define MB_INTRA_VLC_BITS   9

#define MB_NON_INTRA_VLC_BITS   9

Definition at line 51 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), msmpeg4v34_decode_mb(), and wmv2_decode_mb().

#define MBAC_BITRATE   50*1024

Definition at line 55 of file msmpeg4.c.

Referenced by msmpeg4_decode_picture_header().

#define MV_VLC_BITS   9

Definition at line 48 of file msmpeg4.c.

#define set_stat ( var   ) 

Definition at line 152 of file msmpeg4.c.

Referenced by msmpeg4_decode_block(), msmpeg4_encode_block(), and msmpeg4v34_decode_mb().

#define TEX_VLC_BITS   9

Definition at line 50 of file msmpeg4.c.

#define V1_INTER_CBPC_VLC_BITS   6

Definition at line 45 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define V1_INTRA_CBPC_VLC_BITS   6

Definition at line 44 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define V2_INTRA_CBPC_VLC_BITS   3

Definition at line 46 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define V2_MB_TYPE_VLC_BITS   7

Definition at line 47 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define V2_MV_VLC_BITS   9

Definition at line 49 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v2_decode_motion().


Function Documentation

static int coded_block_pred ( MpegEncContext s,
int  n,
uint8_t **  coded_block_ptr 
) [inline, static]

Definition at line 456 of file msmpeg4.c.

References a, b, MpegEncContext::b8_stride, MpegEncContext::block_index, c, MpegEncContext::coded_block, and pred().

Referenced by msmpeg4v34_decode_mb(), and wmv2_decode_mb().

Here is the call graph for this function:

static void common_init ( MpegEncContext s  )  [static]

int ff_msmpeg4_decode_init ( MpegEncContext s  ) 

static int get_dc ( uint8_t *  src,
int  stride,
int  scale 
) [static]

Definition at line 683 of file msmpeg4.c.

Referenced by msmpeg4_pred_dc().

static void init_h263_dc_for_msmpeg4 ( void   )  [static]

Definition at line 1056 of file msmpeg4.c.

References DCtab_chrom, DCtab_lum, v2_dc_chroma_table, and v2_dc_lum_table.

Referenced by common_init().

static int msmpeg4_decode_block ( MpegEncContext s,
DCTELEM block,
int  n,
int  coded,
const uint8_t *  scantable 
) [inline, static]

static int msmpeg4_decode_dc ( MpegEncContext s,
int  n,
int *  dir_ptr 
) [static]

int msmpeg4_decode_ext_header ( MpegEncContext s,
int  buf_size 
)

static int msmpeg4_decode_motion ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr 
) [static]

int msmpeg4_decode_picture_header ( MpegEncContext s  ) 

static void msmpeg4_encode_block ( MpegEncContext s,
DCTELEM block,
int  n 
) [inline, static]

static void msmpeg4_encode_dc ( MpegEncContext s,
int  level,
int  n,
int *  dir_ptr 
) [static]

static void msmpeg4_memsetw ( short *  tab,
int  val,
int  n 
) [inline, static]

Definition at line 1410 of file msmpeg4.c.

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

static int msmpeg4v12_decode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
) [static]

static int msmpeg4v1_pred_dc ( MpegEncContext s,
int  n,
int32_t **  dc_val_ptr 
) [inline, static]

Definition at line 668 of file msmpeg4.c.

References MpegEncContext::last_dc.

Referenced by msmpeg4_decode_dc(), and msmpeg4_encode_dc().

static int msmpeg4v2_decode_motion ( MpegEncContext s,
int  pred,
int  f_code 
) [static]

Definition at line 1451 of file msmpeg4.c.

References MpegEncContext::gb, get_bits(), get_bits1(), get_vlc2(), shift(), VLC::table, and V2_MV_VLC_BITS.

Referenced by msmpeg4v12_decode_mb().

Here is the call graph for this function:

static void msmpeg4v2_encode_motion ( MpegEncContext s,
int  val 
) [static]

Definition at line 1417 of file msmpeg4.c.

References bits, MpegEncContext::f_code, mvtab, MpegEncContext::pb, and put_bits().

Here is the call graph for this function:

static int msmpeg4v34_decode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
) [static]

static int wmv2_decode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
) [static]

Referenced by ff_msmpeg4_decode_init().


Variable Documentation

VLC cbpy_vlc [static]

Definition at line 1047 of file msmpeg4.c.

Definition at line 1044 of file msmpeg4.c.

Definition at line 1043 of file msmpeg4.c.

Definition at line 1042 of file msmpeg4.c.

Referenced by wmv2_decode_mb().

VLC inter_intra_vlc [static]

Definition at line 1053 of file msmpeg4.c.

Referenced by wmv2_decode_mb().

VLC mb_non_intra_vlc[4] [static]

Definition at line 1041 of file msmpeg4.c.

Referenced by wmv2_decode_mb().

Definition at line 1052 of file msmpeg4.c.

Definition at line 1051 of file msmpeg4.c.

uint32_t v2_dc_chroma_table[512][2] [static]

Definition at line 60 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), init_h263_dc_for_msmpeg4(), and msmpeg4_encode_dc().

Definition at line 1046 of file msmpeg4.c.

uint32_t v2_dc_lum_table[512][2] [static]

Definition at line 59 of file msmpeg4.c.

Referenced by ff_msmpeg4_decode_init(), init_h263_dc_for_msmpeg4(), and msmpeg4_encode_dc().

VLC v2_dc_lum_vlc [static]

Definition at line 1045 of file msmpeg4.c.

Definition at line 1048 of file msmpeg4.c.

VLC v2_mb_type_vlc [static]

Definition at line 1049 of file msmpeg4.c.

VLC v2_mv_vlc [static]

Definition at line 1050 of file msmpeg4.c.

uint8_t wmv3_dc_scale_table[32]

Definition at line 169 of file vc9data.h.

Referenced by common_init().


Generated on Mon Apr 28 14:05:35 2008 for Cinelerra by  doxygen 1.5.5