FFmpeg
Macros | Functions | Variables
mpeg12.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/thread.h"
#include "mpegvideo.h"
#include "mpeg12codecs.h"
#include "mpeg12data.h"
#include "mpeg12dec.h"
#include "mpegutils.h"
#include "rl.h"

Go to the source code of this file.

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define MAX_INDEX   (64 - 1)
 

Functions

av_cold void ff_init_2d_vlc_rl (const uint16_t table_vlc[][2], RL_VLC_ELEM rl_vlc[], const int8_t table_run[], const uint8_t table_level[], int n, unsigned static_size, int flags)
 
void ff_mpeg1_clean_buffers (MpegEncContext *s)
 
static av_cold void mpeg12_init_vlcs (void)
 
av_cold void ff_mpeg12_init_vlcs (void)
 
int ff_mpeg1_decode_block_intra (GetBitContext *gb, const uint16_t *quant_matrix, const uint8_t *scantable, int last_dc[3], int16_t *block, int index, int qscale)
 

Variables

static const uint8_t table_mb_ptype [7][2]
 
static const uint8_t table_mb_btype [11][2]
 
static const int16_t ptype2mb_type [7]
 
static const int16_t btype2mb_type [11]
 
VLCElem ff_mv_vlc [266]
 
VLCElem ff_dc_lum_vlc [512]
 
VLCElem ff_dc_chroma_vlc [514]
 
VLCElem ff_mbincr_vlc [538]
 
VLCElem ff_mb_ptype_vlc [64]
 
VLCElem ff_mb_btype_vlc [64]
 
VLCElem ff_mb_pat_vlc [512]
 
RL_VLC_ELEM ff_mpeg1_rl_vlc [680]
 
RL_VLC_ELEM ff_mpeg2_rl_vlc [674]
 

Detailed Description

MPEG-1/2 decoder

Definition in file mpeg12.c.

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 28 of file mpeg12.c.

◆ MAX_INDEX

#define MAX_INDEX   (64 - 1)

Definition at line 194 of file mpeg12.c.

Function Documentation

◆ ff_init_2d_vlc_rl()

av_cold void ff_init_2d_vlc_rl ( const uint16_t  table_vlc[][2],
RL_VLC_ELEM  rl_vlc[],
const int8_t  table_run[],
const uint8_t  table_level[],
int  n,
unsigned  static_size,
int  flags 
)

Definition at line 89 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and speedhq_static_init().

◆ ff_mpeg1_clean_buffers()

void ff_mpeg1_clean_buffers ( MpegEncContext s)

Definition at line 128 of file mpeg12.c.

Referenced by encode_thread(), and mpeg_decode_slice().

◆ mpeg12_init_vlcs()

static av_cold void mpeg12_init_vlcs ( void  )
static

Definition at line 153 of file mpeg12.c.

Referenced by ff_mpeg12_init_vlcs().

◆ ff_mpeg12_init_vlcs()

av_cold void ff_mpeg12_init_vlcs ( void  )

Definition at line 188 of file mpeg12.c.

Referenced by decode_init(), ipu_decode_init(), mpeg_decode_init(), and tqi_decode_init().

◆ ff_mpeg1_decode_block_intra()

int ff_mpeg1_decode_block_intra ( GetBitContext gb,
const uint16_t *  quant_matrix,
const uint8_t *  scantable,
int  last_dc[3],
int16_t *  block,
int  index,
int  qscale 
)

Definition at line 196 of file mpeg12.c.

Referenced by ipu_decode_frame(), mpeg_decode_mb(), and tqi_decode_mb().

Variable Documentation

◆ table_mb_ptype

const uint8_t table_mb_ptype[7][2]
static
Initial value:
= {
{ 3, 5 },
{ 1, 2 },
{ 1, 3 },
{ 1, 1 },
{ 1, 6 },
{ 1, 5 },
{ 2, 5 },
}

Definition at line 41 of file mpeg12.c.

Referenced by mpeg12_init_vlcs().

◆ table_mb_btype

const uint8_t table_mb_btype[11][2]
static
Initial value:
= {
{ 3, 5 },
{ 2, 3 },
{ 3, 3 },
{ 2, 4 },
{ 3, 4 },
{ 2, 2 },
{ 3, 2 },
{ 1, 6 },
{ 2, 6 },
{ 3, 6 },
{ 2, 5 },
}

Definition at line 51 of file mpeg12.c.

Referenced by mpeg12_init_vlcs().

◆ ptype2mb_type

const int16_t ptype2mb_type[7]
static

◆ btype2mb_type

const int16_t btype2mb_type[11]
static

◆ ff_mv_vlc

VLCElem ff_mv_vlc[266]

Definition at line 140 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg_decode_motion().

◆ ff_dc_lum_vlc

VLCElem ff_dc_lum_vlc[512]

Definition at line 142 of file mpeg12.c.

Referenced by decode_dc(), and mpeg12_init_vlcs().

◆ ff_dc_chroma_vlc

VLCElem ff_dc_chroma_vlc[514]

Definition at line 143 of file mpeg12.c.

Referenced by decode_dc(), and mpeg12_init_vlcs().

◆ ff_mbincr_vlc

VLCElem ff_mbincr_vlc[538]

Definition at line 145 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg_decode_slice().

◆ ff_mb_ptype_vlc

VLCElem ff_mb_ptype_vlc[64]

Definition at line 146 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg_decode_mb().

◆ ff_mb_btype_vlc

VLCElem ff_mb_btype_vlc[64]

Definition at line 147 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg_decode_mb().

◆ ff_mb_pat_vlc

VLCElem ff_mb_pat_vlc[512]

Definition at line 148 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg_decode_mb().

◆ ff_mpeg1_rl_vlc

RL_VLC_ELEM ff_mpeg1_rl_vlc[680]

◆ ff_mpeg2_rl_vlc

RL_VLC_ELEM ff_mpeg2_rl_vlc[674]

Definition at line 151 of file mpeg12.c.

Referenced by mpeg12_init_vlcs(), and mpeg2_decode_block_intra().

MB_TYPE_16x16
#define MB_TYPE_16x16
Definition: mpegutils.h:42
MB_TYPE_CBP
#define MB_TYPE_CBP
Definition: mpegutils.h:48
MB_TYPE_ZERO_MV
#define MB_TYPE_ZERO_MV
Definition: mpeg12dec.h:28
MB_TYPE_QUANT
#define MB_TYPE_QUANT
Definition: mpegutils.h:49
MB_TYPE_BIDIR_MV
#define MB_TYPE_BIDIR_MV
Definition: mpegutils.h:52
MB_TYPE_BACKWARD_MV
#define MB_TYPE_BACKWARD_MV
Definition: mpegutils.h:51
MB_TYPE_FORWARD_MV
#define MB_TYPE_FORWARD_MV
Definition: mpegutils.h:50
MB_TYPE_INTRA
#define MB_TYPE_INTRA
Definition: mpegutils.h:65