mpeg12.c File Reference

MPEG-1/2 decoder. More...

#include "libavutil/avassert.h"
#include "libavutil/timecode.h"
#include "internal.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "error_resilience.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "mpeg12decdata.h"
#include "bytestream.h"
#include "vdpau_internal.h"
#include "xvmc_internal.h"
#include "thread.h"
Include dependency graph for mpeg12.c:

Go to the source code of this file.

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define INIT_2D_VLC_RL(rl, static_size)
 

Functions

static void init_2d_vlc_rl (RLTable *rl)
 
void ff_mpeg12_common_init (MpegEncContext *s)
 
void ff_mpeg1_clean_buffers (MpegEncContext *s)
 
av_cold void ff_mpeg12_init_vlcs (void)
 
int ff_mpeg1_find_frame_end (ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s)
 Find the end of the current frame in the bitstream. More...
 

Variables

uint8_t ff_mpeg12_static_rl_table_store [2][2][2 *MAX_RUN+MAX_LEVEL+3]
 
VLC ff_mv_vlc
 
VLC ff_dc_lum_vlc
 
VLC ff_dc_chroma_vlc
 
VLC ff_mbincr_vlc
 
VLC ff_mb_ptype_vlc
 
VLC ff_mb_btype_vlc
 
VLC ff_mb_pat_vlc
 

Detailed Description

MPEG-1/2 decoder.

Definition in file mpeg12.c.

Macro Definition Documentation

#define INIT_2D_VLC_RL (   rl,
  static_size 
)
Value:
{\
static RL_VLC_ELEM rl_vlc_table[static_size];\
INIT_VLC_STATIC(&rl.vlc, TEX_VLC_BITS, rl.n + 2,\
&rl.table_vlc[0][1], 4, 2,\
&rl.table_vlc[0][0], 4, 2, static_size);\
\
rl.rl_vlc[0] = rl_vlc_table;\
}
#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size)
Definition: get_bits.h:445
#define TEX_VLC_BITS
Definition: dvdata.h:96
static void init_2d_vlc_rl(RLTable *rl)
Definition: mpeg12.c:61

Definition at line 50 of file mpeg12.c.

Referenced by ff_mpeg12_init_vlcs().

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 28 of file mpeg12.c.

Function Documentation

void ff_mpeg12_common_init ( MpegEncContext s)

Definition at line 94 of file mpeg12.c.

Referenced by ff_mpeg1_encode_init(), and mpeg_decode_init().

av_cold void ff_mpeg12_init_vlcs ( void  )

Definition at line 124 of file mpeg12.c.

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

void ff_mpeg1_clean_buffers ( MpegEncContext s)

Definition at line 102 of file mpeg12.c.

Referenced by decode_dc(), encode_thread(), and mpeg_decode_slice().

int ff_mpeg1_find_frame_end ( ParseContext pc,
const uint8_t buf,
int  buf_size,
AVCodecParserContext s 
)

Find the end of the current frame in the bitstream.

Returns
the position of the first byte of the next frame, or -1

Definition at line 165 of file mpeg12.c.

Referenced by decode_dc(), mpeg_decode_frame(), and mpegvideo_parse().

static void init_2d_vlc_rl ( RLTable rl)
static

Definition at line 61 of file mpeg12.c.

Variable Documentation

VLC ff_dc_chroma_vlc

Definition at line 117 of file mpeg12.c.

VLC ff_dc_lum_vlc

Definition at line 116 of file mpeg12.c.

VLC ff_mb_btype_vlc

Definition at line 121 of file mpeg12.c.

Referenced by mpeg_decode_mb().

VLC ff_mb_pat_vlc

Definition at line 122 of file mpeg12.c.

Referenced by mpeg_decode_mb().

VLC ff_mb_ptype_vlc

Definition at line 120 of file mpeg12.c.

Referenced by mpeg_decode_mb().

VLC ff_mbincr_vlc

Definition at line 119 of file mpeg12.c.

Referenced by mpeg_decode_slice().

uint8_t ff_mpeg12_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3]

Definition at line 48 of file mpeg12.c.

Referenced by ff_mpeg12_init_vlcs(), and ff_mpeg1_encode_init().

VLC ff_mv_vlc

Definition at line 114 of file mpeg12.c.

Referenced by mpeg_decode_motion().