FFmpeg
Data Structures | Macros | Enumerations | Functions
vc1.h File Reference
#include "avcodec.h"
#include "h264chroma.h"
#include "mpegvideo.h"
#include "intrax8.h"
#include "vc1_common.h"
#include "vc1dsp.h"

Go to the source code of this file.

Data Structures

struct  VC1Context
 The VC1 Context. More...
 

Macros

#define AC_VLC_BITS   9
 

Enumerations

enum  QuantMode { QUANT_FRAME_IMPLICIT, QUANT_FRAME_EXPLICIT, QUANT_NON_UNIFORM, QUANT_UNIFORM }
 Sequence quantizer mode. More...
 
enum  DQProfile { DQPROFILE_FOUR_EDGES, DQPROFILE_DOUBLE_EDGES, DQPROFILE_SINGLE_EDGE, DQPROFILE_ALL_MBS }
 Where quant can be changed. More...
 
Where quant can be changed
enum  DQSingleEdge { DQSINGLE_BEDGE_LEFT, DQSINGLE_BEDGE_TOP, DQSINGLE_BEDGE_RIGHT, DQSINGLE_BEDGE_BOTTOM }
 
enum  DQDoubleEdge { DQDOUBLE_BEDGE_TOPLEFT, DQDOUBLE_BEDGE_TOPRIGHT, DQDOUBLE_BEDGE_BOTTOMRIGHT, DQDOUBLE_BEDGE_BOTTOMLEFT }
 Which pair of edges is quantized with ALTPQUANT. More...
 
enum  MVModes {
  MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV,
  MV_PMODE_INTENSITY_COMP
}
 MV modes for P-frames. More...
 
enum  MBModesIntfr {
  MV_PMODE_INTFR_1MV, MV_PMODE_INTFR_2MV_FIELD, MV_PMODE_INTFR_2MV, MV_PMODE_INTFR_4MV_FIELD,
  MV_PMODE_INTFR_4MV, MV_PMODE_INTFR_INTRA
}
 MBMODE for interlaced frame P-picture. More...
 
MV types for B-frames
enum  BMVTypes { BMV_TYPE_BACKWARD, BMV_TYPE_FORWARD, BMV_TYPE_INTERPOLATED, BMV_TYPE_DIRECT }
 
Block types for P/B-frames
enum  TransformTypes {
  TT_8X8, TT_8X4_BOTTOM, TT_8X4_TOP, TT_8X4,
  TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X8, TT_4X4
}
 
enum  CodingSet {
  CS_HIGH_MOT_INTRA = 0, CS_HIGH_MOT_INTER, CS_LOW_MOT_INTRA, CS_LOW_MOT_INTER,
  CS_MID_RATE_INTRA, CS_MID_RATE_INTER, CS_HIGH_RATE_INTRA, CS_HIGH_RATE_INTER
}
 
Overlap conditions for Advanced Profile
enum  COTypes { CONDOVER_NONE = 0, CONDOVER_ALL, CONDOVER_SELECT }
 
enum  FrameCodingMode { PROGRESSIVE = 0, ILACE_FRAME, ILACE_FIELD }
 FCM Frame Coding Mode. More...
 
enum  Imode {
  IMODE_RAW, IMODE_NORM2, IMODE_DIFF2, IMODE_NORM6,
  IMODE_DIFF6, IMODE_ROWSKIP, IMODE_COLSKIP
}
 Imode types. More...
 

Functions

int ff_vc1_decode_sequence_header (AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
 Decode Simple/Main Profiles sequence header. More...
 
int ff_vc1_decode_entry_point (AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
 
int ff_vc1_parse_frame_header (VC1Context *v, GetBitContext *gb)
 
int ff_vc1_parse_frame_header_adv (VC1Context *v, GetBitContext *gb)
 
int ff_vc1_init_common (VC1Context *v)
 Init VC-1 specific tables and VC1Context members. More...
 
int ff_vc1_decode_init_alloc_tables (VC1Context *v)
 
void ff_vc1_init_transposed_scantables (VC1Context *v)
 
int ff_vc1_decode_end (AVCodecContext *avctx)
 Close a VC1/WMV3 decoder. More...
 
void ff_vc1_decode_blocks (VC1Context *v)
 
void ff_vc1_i_overlap_filter (VC1Context *v)
 
void ff_vc1_p_overlap_filter (VC1Context *v)
 
void ff_vc1_i_loop_filter (VC1Context *v)
 
void ff_vc1_p_loop_filter (VC1Context *v)
 
void ff_vc1_p_intfr_loop_filter (VC1Context *v)
 
void ff_vc1_b_intfi_loop_filter (VC1Context *v)
 
void ff_vc1_mc_1mv (VC1Context *v, int dir)
 Do motion compensation over 1 macroblock Mostly adapted hpel_motion and qpel_motion from mpegvideo.c. More...
 
void ff_vc1_mc_4mv_luma (VC1Context *v, int n, int dir, int avg)
 Do motion compensation for 4-MV macroblock - luminance block. More...
 
void ff_vc1_mc_4mv_chroma (VC1Context *v, int dir)
 Do motion compensation for 4-MV macroblock - both chroma blocks. More...
 
void ff_vc1_mc_4mv_chroma4 (VC1Context *v, int dir, int dir2, int avg)
 Do motion compensation for 4-MV interlaced frame chroma macroblock (both U and V) More...
 
void ff_vc1_interp_mc (VC1Context *v)
 Motion compensation for direct or interpolated blocks in B-frames. More...
 

Macro Definition Documentation

◆ AC_VLC_BITS

#define AC_VLC_BITS   9

Definition at line 33 of file vc1.h.

Enumeration Type Documentation

◆ QuantMode

enum QuantMode

Sequence quantizer mode.

Enumerator
QUANT_FRAME_IMPLICIT 

Implicitly specified at frame level.

QUANT_FRAME_EXPLICIT 

Explicitly specified at frame level.

QUANT_NON_UNIFORM 

Non-uniform quant used for all frames.

QUANT_UNIFORM 

Uniform quant used for all frames.

Definition at line 37 of file vc1.h.

◆ DQProfile

enum DQProfile

Where quant can be changed.

Enumerator
DQPROFILE_FOUR_EDGES 
DQPROFILE_DOUBLE_EDGES 
DQPROFILE_SINGLE_EDGE 
DQPROFILE_ALL_MBS 

Definition at line 47 of file vc1.h.

◆ DQSingleEdge

Enumerator
DQSINGLE_BEDGE_LEFT 
DQSINGLE_BEDGE_TOP 
DQSINGLE_BEDGE_RIGHT 
DQSINGLE_BEDGE_BOTTOM 

Definition at line 58 of file vc1.h.

◆ DQDoubleEdge

Which pair of edges is quantized with ALTPQUANT.

Enumerator
DQDOUBLE_BEDGE_TOPLEFT 
DQDOUBLE_BEDGE_TOPRIGHT 
DQDOUBLE_BEDGE_BOTTOMRIGHT 
DQDOUBLE_BEDGE_BOTTOMLEFT 

Definition at line 68 of file vc1.h.

◆ MVModes

enum MVModes

MV modes for P-frames.

Enumerator
MV_PMODE_1MV_HPEL_BILIN 
MV_PMODE_1MV 
MV_PMODE_1MV_HPEL 
MV_PMODE_MIXED_MV 
MV_PMODE_INTENSITY_COMP 

Definition at line 78 of file vc1.h.

◆ MBModesIntfr

MBMODE for interlaced frame P-picture.

Enumerator
MV_PMODE_INTFR_1MV 
MV_PMODE_INTFR_2MV_FIELD 
MV_PMODE_INTFR_2MV 
MV_PMODE_INTFR_4MV_FIELD 
MV_PMODE_INTFR_4MV 
MV_PMODE_INTFR_INTRA 

Definition at line 89 of file vc1.h.

◆ BMVTypes

enum BMVTypes
Enumerator
BMV_TYPE_BACKWARD 
BMV_TYPE_FORWARD 
BMV_TYPE_INTERPOLATED 
BMV_TYPE_DIRECT 

Definition at line 101 of file vc1.h.

◆ TransformTypes

Enumerator
TT_8X8 
TT_8X4_BOTTOM 
TT_8X4_TOP 
TT_8X4 
TT_4X8_RIGHT 
TT_4X8_LEFT 
TT_4X8 
TT_4X4 

Definition at line 111 of file vc1.h.

◆ CodingSet

enum CodingSet
Enumerator
CS_HIGH_MOT_INTRA 
CS_HIGH_MOT_INTER 
CS_LOW_MOT_INTRA 
CS_LOW_MOT_INTER 
CS_MID_RATE_INTRA 
CS_MID_RATE_INTER 
CS_HIGH_RATE_INTRA 
CS_HIGH_RATE_INTER 

Definition at line 123 of file vc1.h.

◆ COTypes

enum COTypes
Enumerator
CONDOVER_NONE 
CONDOVER_ALL 
CONDOVER_SELECT 

Definition at line 136 of file vc1.h.

◆ FrameCodingMode

FCM Frame Coding Mode.

Note
some content might be marked interlaced but have fcm set to 0 as well (e.g. HD-DVD)
Enumerator
PROGRESSIVE 

in the bitstream is reported as 00b

ILACE_FRAME 

in the bitstream is reported as 10b

ILACE_FIELD 

in the bitstream is reported as 11b

Definition at line 148 of file vc1.h.

◆ Imode

enum Imode

Imode types.

Enumerator
IMODE_RAW 
IMODE_NORM2 
IMODE_DIFF2 
IMODE_NORM6 
IMODE_DIFF6 
IMODE_ROWSKIP 
IMODE_COLSKIP 

Definition at line 158 of file vc1.h.

Function Documentation

◆ ff_vc1_decode_sequence_header()

int ff_vc1_decode_sequence_header ( AVCodecContext avctx,
VC1Context v,
GetBitContext gb 
)

Decode Simple/Main Profiles sequence header.

See also
Figure 7-8, p16-17
Parameters
avctxCodec context
gbGetBit context initialized from Codec context extra_data
Returns
Status

Definition at line 276 of file vc1.c.

Referenced by vc1_decode_init(), and vc1_extract_header().

◆ ff_vc1_decode_entry_point()

int ff_vc1_decode_entry_point ( AVCodecContext avctx,
VC1Context v,
GetBitContext gb 
)

Definition at line 508 of file vc1.c.

Referenced by vc1_decode_frame(), vc1_decode_init(), and vc1_extract_header().

◆ ff_vc1_parse_frame_header()

int ff_vc1_parse_frame_header ( VC1Context v,
GetBitContext gb 
)

Definition at line 626 of file vc1.c.

Referenced by decode_wmv9(), vc1_decode_frame(), and vc1_extract_header().

◆ ff_vc1_parse_frame_header_adv()

int ff_vc1_parse_frame_header_adv ( VC1Context v,
GetBitContext gb 
)

Definition at line 850 of file vc1.c.

Referenced by vc1_decode_frame(), and vc1_extract_header().

◆ ff_vc1_init_common()

int ff_vc1_init_common ( VC1Context v)

Init VC-1 specific tables and VC1Context members.

Parameters
vThe VC1Context to initialize
Returns
Status

Definition at line 1589 of file vc1.c.

Referenced by vc1_decode_init(), vc1_parse_init(), and wmv9_init().

◆ ff_vc1_decode_init_alloc_tables()

int ff_vc1_decode_init_alloc_tables ( VC1Context v)

Definition at line 324 of file vc1dec.c.

Referenced by vc1_decode_frame(), vc1_decode_init(), and wmv9_init().

◆ ff_vc1_init_transposed_scantables()

void ff_vc1_init_transposed_scantables ( VC1Context v)

Definition at line 403 of file vc1dec.c.

Referenced by vc1_decode_init(), and wmv9_init().

◆ ff_vc1_decode_end()

int ff_vc1_decode_end ( AVCodecContext avctx)

Close a VC1/WMV3 decoder.

Warning
Initial try at using MpegEncContext stuff

Definition at line 599 of file vc1dec.c.

Referenced by ff_vc1_decode_init_alloc_tables(), mss2_decode_end(), vc1_decode_frame(), and vc1_decode_init().

◆ ff_vc1_decode_blocks()

void ff_vc1_decode_blocks ( VC1Context v)

Definition at line 3005 of file vc1_block.c.

Referenced by decode_wmv9(), and vc1_decode_frame().

◆ ff_vc1_i_overlap_filter()

void ff_vc1_i_overlap_filter ( VC1Context v)

Definition at line 105 of file vc1_loopfilter.c.

Referenced by vc1_decode_i_blocks(), and vc1_decode_i_blocks_adv().

◆ ff_vc1_p_overlap_filter()

void ff_vc1_p_overlap_filter ( VC1Context v)

Definition at line 161 of file vc1_loopfilter.c.

Referenced by vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), and vc1_decode_p_mb_intfr().

◆ ff_vc1_i_loop_filter()

void ff_vc1_i_loop_filter ( VC1Context v)

◆ ff_vc1_p_loop_filter()

void ff_vc1_p_loop_filter ( VC1Context v)

Definition at line 470 of file vc1_loopfilter.c.

Referenced by vc1_decode_p_blocks().

◆ ff_vc1_p_intfr_loop_filter()

void ff_vc1_p_intfr_loop_filter ( VC1Context v)

Definition at line 909 of file vc1_loopfilter.c.

Referenced by vc1_decode_b_blocks(), and vc1_decode_p_blocks().

◆ ff_vc1_b_intfi_loop_filter()

void ff_vc1_b_intfi_loop_filter ( VC1Context v)

Definition at line 1172 of file vc1_loopfilter.c.

Referenced by vc1_decode_b_blocks().

◆ ff_vc1_mc_1mv()

void ff_vc1_mc_1mv ( VC1Context v,
int  dir 
)

Do motion compensation over 1 macroblock Mostly adapted hpel_motion and qpel_motion from mpegvideo.c.

Definition at line 172 of file vc1_mc.c.

Referenced by vc1_b_mc(), vc1_decode_b_mb_intfr(), vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), and vc1_decode_p_mb_intfr().

◆ ff_vc1_mc_4mv_luma()

void ff_vc1_mc_4mv_luma ( VC1Context v,
int  n,
int  dir,
int  avg 
)

Do motion compensation for 4-MV macroblock - luminance block.

Definition at line 452 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfi(), vc1_decode_b_mb_intfr(), vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), and vc1_decode_p_mb_intfr().

◆ ff_vc1_mc_4mv_chroma()

void ff_vc1_mc_4mv_chroma ( VC1Context v,
int  dir 
)

Do motion compensation for 4-MV macroblock - both chroma blocks.

Definition at line 634 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfi(), vc1_decode_p_mb(), and vc1_decode_p_mb_intfi().

◆ ff_vc1_mc_4mv_chroma4()

void ff_vc1_mc_4mv_chroma4 ( VC1Context v,
int  dir,
int  dir2,
int  avg 
)

Do motion compensation for 4-MV interlaced frame chroma macroblock (both U and V)

Definition at line 839 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfr(), and vc1_decode_p_mb_intfr().

◆ ff_vc1_interp_mc()

void ff_vc1_interp_mc ( VC1Context v)

Motion compensation for direct or interpolated blocks in B-frames.

Definition at line 1004 of file vc1_mc.c.

Referenced by vc1_b_mc(), and vc1_decode_b_mb_intfr().