#include "internal.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "libavutil/avassert.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "mpeg12decdata.h"
#include "bytestream.h"
#include "vdpau_internal.h"
#include "xvmc_internal.h"
#include "thread.h"
Go to the source code of this file.
Definition in file mpeg12.c.
#define DECODE_SLICE_ERROR -1 |
#define DECODE_SLICE_OK 0 |
#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;\ init_2d_vlc_rl(&rl);\ }
Definition at line 598 of file mpeg12.c.
Referenced by ff_mpeg12_init_vlcs().
#define MB_BTYPE_VLC_BITS 6 |
#define MB_PAT_VLC_BITS 9 |
#define MB_PTYPE_VLC_BITS 6 |
#define MBINCR_VLC_BITS 9 |
Definition at line 50 of file mpeg12.c.
Referenced by ff_mpeg12_init_vlcs(), and mpeg_decode_slice().
#define MT_DMV 3 |
#define MT_FIELD 1 |
#define MT_FRAME 2 |
static int decode_chunks | ( | AVCodecContext * | avctx, | |
AVFrame * | picture, | |||
int * | data_size, | |||
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static void exchange_uv | ( | MpegEncContext * | s | ) | [static] |
void ff_mpeg12_common_init | ( | MpegEncContext * | s | ) |
Definition at line 642 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 670 of file mpeg12.c.
Referenced by decode_init(), mpeg_decode_init(), and tqi_decode_init().
void ff_mpeg1_clean_buffers | ( | MpegEncContext * | s | ) |
int ff_mpeg1_decode_block_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) |
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.
Definition at line 2183 of file mpeg12.c.
Referenced by mpeg_decode_frame(), and mpegvideo_parse().
static void flush | ( | AVCodecContext * | avctx | ) | [static] |
static int get_dmv | ( | MpegEncContext * | s | ) | [inline, static] |
static int get_qscale | ( | MpegEncContext * | s | ) | [inline, static] |
Definition at line 715 of file mpeg12.c.
Referenced by ff_rate_control_init(), ff_rate_estimate_qscale(), init_pass2(), mpeg_decode_mb(), and mpeg_decode_slice().
static int load_matrix | ( | MpegEncContext * | s, | |
uint16_t | matrix0[64], | |||
uint16_t | matrix1[64], | |||
int | intra | |||
) | [static] |
static int mpeg1_decode_block_inter | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg1_decode_block_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
Definition at line 86 of file mpeg12.c.
Referenced by ff_mpeg1_decode_block_intra(), and mpeg_decode_mb().
static int mpeg1_decode_picture | ( | AVCodecContext * | avctx, | |
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static int mpeg1_decode_sequence | ( | AVCodecContext * | avctx, | |
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static int mpeg1_fast_decode_block_inter | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg2_decode_block_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg2_decode_block_non_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg2_fast_decode_block_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg2_fast_decode_block_non_intra | ( | MpegEncContext * | s, | |
DCTELEM * | block, | |||
int | n | |||
) | [inline, static] |
static int mpeg_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
static int mpeg_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
static void mpeg_decode_gop | ( | AVCodecContext * | avctx, | |
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static av_cold int mpeg_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static int mpeg_decode_mb | ( | MpegEncContext * | s, | |
DCTELEM | block[12][64] | |||
) | [static] |
static int mpeg_decode_motion | ( | MpegEncContext * | s, | |
int | fcode, | |||
int | pred | |||
) | [static] |
static void mpeg_decode_picture_coding_extension | ( | Mpeg1Context * | s1 | ) | [static] |
static void mpeg_decode_picture_display_extension | ( | Mpeg1Context * | s1 | ) | [static] |
static int mpeg_decode_postinit | ( | AVCodecContext * | avctx | ) | [static] |
static void mpeg_decode_quant_matrix_extension | ( | MpegEncContext * | s | ) | [static] |
static void mpeg_decode_sequence_display_extension | ( | Mpeg1Context * | s1 | ) | [static] |
static void mpeg_decode_sequence_extension | ( | Mpeg1Context * | s1 | ) | [static] |
static int mpeg_decode_slice | ( | MpegEncContext * | s, | |
int | mb_y, | |||
const uint8_t ** | buf, | |||
int | buf_size | |||
) | [static] |
Decode a slice.
MpegEncContext.mb_y must be set to the MB row from the startcode.
Definition at line 1663 of file mpeg12.c.
Referenced by decode_chunks(), and slice_decode_thread().
static int mpeg_decode_update_thread_context | ( | AVCodecContext * | avctx, | |
const AVCodecContext * | avctx_from | |||
) | [static] |
static void mpeg_decode_user_data | ( | AVCodecContext * | avctx, | |
const uint8_t * | p, | |||
int | buf_size | |||
) | [static] |
static int mpeg_field_start | ( | MpegEncContext * | s, | |
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static enum PixelFormat mpeg_get_pixelformat | ( | AVCodecContext * | avctx | ) | [static] |
static void quant_matrix_rebuild | ( | uint16_t * | matrix, | |
const uint8_t * | old_perm, | |||
const uint8_t * | new_perm | |||
) | [static] |
static int slice_decode_thread | ( | AVCodecContext * | c, | |
void * | arg | |||
) | [static] |
static int slice_end | ( | AVCodecContext * | avctx, | |
AVFrame * | pict | |||
) | [static] |
Handle slice ends.
Definition at line 1927 of file mpeg12.c.
Referenced by decode_chunks(), and decode_frame().
static int uses_vdpau | ( | AVCodecContext * | avctx | ) | [inline, static] |
static int vcr2_init_sequence | ( | AVCodecContext * | avctx | ) | [static] |
uint8_t ff_mpeg12_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3] |
Definition at line 596 of file mpeg12.c.
Referenced by ff_mpeg12_init_vlcs(), and ff_mpeg1_encode_init().
Initial value:
{ .name = "mpeg1video", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG1VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, .decode = mpeg_decode_frame, .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .flush = flush, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context) }
Initial value:
{ .name = "mpeg2video", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, .decode = mpeg_decode_frame, .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .flush = flush, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles), }
Initial value:
{ .name = "mpegvideo", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, .decode = mpeg_decode_frame, .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .flush = flush, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), }
VLC mb_btype_vlc [static] |
VLC mb_pat_vlc [static] |
VLC mb_ptype_vlc [static] |
VLC mbincr_vlc [static] |
enum PixelFormat mpeg1_hwaccel_pixfmt_list_420[] [static] |
enum PixelFormat mpeg2_hwaccel_pixfmt_list_420[] [static] |
const AVProfile mpeg2_video_profiles[] [static] |
Initial value:
{ { FF_PROFILE_MPEG2_422, "4:2:2" }, { FF_PROFILE_MPEG2_HIGH, "High" }, { FF_PROFILE_MPEG2_SS, "Spatially Scalable" }, { FF_PROFILE_MPEG2_SNR_SCALABLE, "SNR Scalable" }, { FF_PROFILE_MPEG2_MAIN, "Main" }, { FF_PROFILE_MPEG2_SIMPLE, "Simple" }, { FF_PROFILE_RESERVED, "Reserved" }, { FF_PROFILE_RESERVED, "Reserved" }, { FF_PROFILE_UNKNOWN }, }