#include "avcodec.h"#include "dsputil.h"#include "mpegvideo.h"#include "mpeg12data.h"#include "mdec.c"

Go to the source code of this file.
Definition in file mpeg12.c.
| #define MB_BTYPE_VLC_BITS 6 |
| #define MB_PAT_VLC_BITS 9 |
| #define MB_PTYPE_VLC_BITS 6 |
| #define MBINCR_VLC_BITS 9 |
| #define MT_DMV 3 |
| #define MT_FIELD 1 |
| #define MT_FRAME 2 |
| #define SLICE_MAX_START_CODE 0x000001af |
Definition at line 43 of file mpeg12.c.
Referenced by ff_mpeg1_find_frame_end(), mpeg_decode_frame(), and mpegvideo_extract_headers().
| #define SLICE_MIN_START_CODE 0x00000101 |
Definition at line 42 of file mpeg12.c.
Referenced by ff_mpeg1_find_frame_end(), mpeg_decode_frame(), mpegvideo_extract_headers(), and slice_decode_thread().
| static void common_init | ( | MpegEncContext * | s | ) | [static] |
Definition at line 377 of file mpeg12.c.
References MpegEncContext::c_dc_scale_table, MpegEncContext::intra_dc_precision, mpeg2_dc_scale_table, and MpegEncContext::y_dc_scale_table.
| static int decode_dc | ( | GetBitContext * | gb, | |
| int | component | |||
| ) | [inline, static] |
Definition at line 1480 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, DC_VLC_BITS, get_vlc2(), get_xbits(), NULL, and VLC::table.
Referenced by mdec_decode_block_intra(), mpeg1_decode_block_intra(), mpeg2_decode_block_intra(), and mpeg2_fast_decode_block_intra().

| static void exchange_uv | ( | MpegEncContext * | s | ) | [static] |
Definition at line 2455 of file mpeg12.c.
References MpegEncContext::pblocks.
Referenced by mpeg_decode_mb(), and vcr2_init_sequence().
| void ff_mpeg1_clean_buffers | ( | MpegEncContext * | s | ) |
Definition at line 385 of file mpeg12.c.
References MpegEncContext::intra_dc_precision, MpegEncContext::last_dc, and MpegEncContext::last_mv.
Referenced by mpeg_decode_slice().
| int ff_mpeg1_find_frame_end | ( | ParseContext * | pc, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) |
finds the end of the current frame in the bitstream.
Definition at line 2996 of file mpeg12.c.
References END_NOT_FOUND, ParseContext::frame_start_found, SLICE_MAX_START_CODE, SLICE_MIN_START_CODE, and ParseContext::state.
Referenced by mpeg_decode_frame(), and mpegvideo_parse().
| static int find_start_code | ( | const uint8_t ** | pbuf_ptr, | |
| const uint8_t * | buf_end | |||
| ) | [static] |
Definition at line 2177 of file mpeg12.c.
Referenced by mpeg_decode_frame(), mpegvideo_extract_headers(), and slice_decode_thread().
| static int get_dmv | ( | MpegEncContext * | s | ) | [inline, static] |
Definition at line 1026 of file mpeg12.c.
References MpegEncContext::gb, and get_bits1().
Referenced by mpeg_decode_mb().

| static int get_qscale | ( | MpegEncContext * | s | ) | [inline, static] |
Definition at line 1034 of file mpeg12.c.
References MpegEncContext::gb, get_bits(), non_linear_qscale, and MpegEncContext::q_scale_type.
Referenced by ff_rate_control_init(), ff_rate_estimate_qscale(), init_pass2(), mpeg_decode_mb(), and mpeg_decode_slice().

| static void init_2d_vlc_rl | ( | RLTable * | rl, | |
| int | use_static | |||
| ) | [static] |
Definition at line 108 of file mpeg12.c.
References av_malloc(), av_mallocz_static(), init_vlc(), RL_VLC_ELEM::len, RL_VLC_ELEM::level, level, MAX_LEVEL, RLTable::n, RLTable::rl_vlc, RL_VLC_ELEM::run, run, VLC::table, RLTable::table_level, RLTable::table_run, VLC::table_size, RLTable::table_vlc, TEX_VLC_BITS, and RLTable::vlc.
Referenced by init_vlcs().

| static void init_vlcs | ( | void | ) | [static] |
Definition at line 989 of file mpeg12.c.
References DC_VLC_BITS, init_2d_vlc_rl(), init_rl(), init_vlc(), MB_BTYPE_VLC_BITS, MB_PAT_VLC_BITS, MB_PTYPE_VLC_BITS, mbAddrIncrTable, MBINCR_VLC_BITS, mbMotionVectorTable, mbPatTable, MV_VLC_BITS, rl_mpeg1, rl_mpeg2, table_mb_btype, table_mb_ptype, vlc_dc_chroma_bits, vlc_dc_chroma_code, vlc_dc_lum_bits, and vlc_dc_lum_code.

| static int mpeg1_decode_block_inter | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1574 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, CLOSE_READER, MpegEncContext::gb, GET_CACHE, GET_RL_VLC, MpegEncContext::inter_matrix, MpegEncContext::intra_scantable, LAST_SKIP_BITS, MpegEncContext::mb_x, MpegEncContext::mb_y, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().

| static int mpeg1_decode_block_intra | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1501 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, CLOSE_READER, decode_dc(), MpegEncContext::gb, GET_RL_VLC, MpegEncContext::intra_matrix, MpegEncContext::intra_scantable, MpegEncContext::last_dc, LAST_SKIP_BITS, MpegEncContext::mb_x, MpegEncContext::mb_y, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().

| static int mpeg1_decode_picture | ( | AVCodecContext * | avctx, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 2202 of file mpeg12.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, B_TYPE, MpegEncContext::c_dc_scale, MpegEncContext::current_picture, AVCodecContext::debug, AVCodecContext::error_resilience, FF_DEBUG_PICT_INFO, FF_ER_COMPLIANT, MpegEncContext::first_slice, MpegEncContext::full_pel, MpegEncContext::gb, get_bits(), get_bits1(), I_TYPE, init_get_bits(), mpeg_decode_postinit(), Mpeg1Context::mpeg_enc_ctx, MpegEncContext::mpeg_f_code, P_TYPE, MpegEncContext::pict_type, AVCodecContext::priv_data, s1, and MpegEncContext::y_dc_scale.
Referenced by mpeg_decode_frame().

| static int mpeg1_decode_sequence | ( | AVCodecContext * | avctx, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 2773 of file mpeg12.c.
References MpegEncContext::aspect_ratio_info, av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::bit_rate, MpegEncContext::chroma_format, MpegEncContext::chroma_inter_matrix, MpegEncContext::chroma_intra_matrix, CODEC_FLAG_LOW_DELAY, AVCodecContext::codec_id, MpegEncContext::codec_id, CODEC_ID_MPEG1VIDEO, AVCodecContext::debug, MpegEncContext::dsp, FF_DEBUG_PICT_INFO, ff_mpeg1_default_intra_matrix, ff_mpeg1_default_non_intra_matrix, ff_zigzag_direct, MpegEncContext::flags, FMT_MPEG1, MpegEncContext::frame_pred_frame_dct, MpegEncContext::frame_rate_index, MpegEncContext::gb, get_bits(), get_bits1(), MpegEncContext::height, height, DSPContext::idct_permutation, init_get_bits(), MpegEncContext::inter_matrix, MpegEncContext::intra_matrix, MpegEncContext::low_delay, Mpeg1Context::mpeg_enc_ctx, MpegEncContext::out_format, PICT_FRAME, MpegEncContext::picture_structure, AVCodecContext::priv_data, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, AVCodecContext::rc_buffer_size, s1, show_bits(), skip_bits(), AVCodecContext::sub_id, MpegEncContext::swap_uv, MpegEncContext::width, and width.
Referenced by mpeg_decode_frame().

| static int mpeg1_fast_decode_block_inter | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1652 of file mpeg12.c.
References MpegEncContext::block_last_index, CLOSE_READER, MpegEncContext::gb, GET_CACHE, GET_RL_VLC, MpegEncContext::intra_scantable, LAST_SKIP_BITS, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().
| static int mpeg2_decode_block_intra | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1869 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, MpegEncContext::chroma_intra_matrix, CLOSE_READER, decode_dc(), MpegEncContext::gb, GET_RL_VLC, MpegEncContext::intra_dc_precision, MpegEncContext::intra_matrix, MpegEncContext::intra_scantable, MpegEncContext::intra_vlc_format, MpegEncContext::last_dc, LAST_SKIP_BITS, MpegEncContext::mb_x, MpegEncContext::mb_y, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, rl_mpeg2, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().

| static int mpeg2_decode_block_non_intra | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1724 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, MpegEncContext::chroma_inter_matrix, CLOSE_READER, MpegEncContext::gb, GET_CACHE, GET_RL_VLC, MpegEncContext::inter_matrix, MpegEncContext::intra_scantable, LAST_SKIP_BITS, MpegEncContext::mb_x, MpegEncContext::mb_y, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().

| static int mpeg2_fast_decode_block_intra | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1949 of file mpeg12.c.
References MpegEncContext::block_last_index, MpegEncContext::chroma_intra_matrix, CLOSE_READER, decode_dc(), MpegEncContext::gb, GET_RL_VLC, MpegEncContext::intra_dc_precision, MpegEncContext::intra_matrix, MpegEncContext::intra_scantable, MpegEncContext::intra_vlc_format, MpegEncContext::last_dc, LAST_SKIP_BITS, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, rl_mpeg2, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().

| static int mpeg2_fast_decode_block_non_intra | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 1805 of file mpeg12.c.
References MpegEncContext::block_last_index, CLOSE_READER, MpegEncContext::gb, GET_CACHE, GET_RL_VLC, MpegEncContext::intra_scantable, LAST_SKIP_BITS, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, rl_mpeg1, RLTable::rl_vlc, SHOW_SBITS, SHOW_UBITS, SKIP_BITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by mpeg_decode_mb().
| static int mpeg_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 3201 of file mpeg12.c.
References Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, MPV_common_end(), and AVCodecContext::priv_data.

| static void mpeg_decode_extension | ( | AVCodecContext * | avctx, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 2426 of file mpeg12.c.
References MpegEncContext::gb, get_bits(), init_get_bits(), mpeg_decode_picture_coding_extension(), mpeg_decode_picture_display_extension(), mpeg_decode_quant_matrix_extension(), mpeg_decode_sequence_display_extension(), mpeg_decode_sequence_extension(), Mpeg1Context::mpeg_enc_ctx, AVCodecContext::priv_data, and s1.
Referenced by mpeg_decode_frame().

| static int mpeg_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 3035 of file mpeg12.c.
References AC_END, AC_ERROR, av_log(), AV_LOG_DEBUG, AVDISCARD_ALL, AVDISCARD_DEFAULT, AVDISCARD_NONKEY, AVDISCARD_NONREF, B_TYPE, CODEC_FLAG_TRUNCATED, MpegEncContext::codec_id, CODEC_ID_MPEG2VIDEO, AVCodecContext::codec_tag, DC_END, DC_ERROR, AVCodecContext::debug, emms_c, MpegEncContext::end_mb_y, MpegEncContext::error_count, AVCodecContext::execute, EXT_START_CODE, ff_combine_frame(), FF_DEBUG_STARTCODE, ff_er_add_slice(), ff_mpeg1_find_frame_end(), ff_update_duplicate_context(), find_start_code(), MpegEncContext::first_field, MpegEncContext::first_slice, AVCodecContext::flags, MpegEncContext::flags, MpegEncContext::gb, GOP_START_CODE, AVCodecContext::hurry_up, I_TYPE, init_get_bits(), ParseContext::last_index, MpegEncContext::last_picture_ptr, MpegEncContext::low_delay, MpegEncContext::mb_height, MpegEncContext::mb_x, MpegEncContext::mb_y, mpeg1_decode_picture(), mpeg1_decode_sequence(), mpeg_decode_extension(), mpeg_decode_gop(), mpeg_decode_slice(), mpeg_decode_user_data(), Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, mpeg_field_start(), MV_END, MV_ERROR, MpegEncContext::next_picture_ptr, NULL, P_TYPE, MpegEncContext::parse_context, MpegEncContext::pict_type, picture, PICTURE_START_CODE, AVCodecContext::priv_data, Mpeg1Context::repeat_field, MpegEncContext::resync_mb_x, MpegEncContext::resync_mb_y, s2, SEQ_START_CODE, AVCodecContext::skip_bottom, AVCodecContext::skip_frame, Mpeg1Context::slice_count, slice_decode_thread(), slice_end(), SLICE_MAX_START_CODE, SLICE_MIN_START_CODE, MpegEncContext::start_mb_y, MpegEncContext::thread_context, AVCodecContext::thread_count, USER_START_CODE, and vcr2_init_sequence().

| static void mpeg_decode_gop | ( | AVCodecContext * | avctx, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 2962 of file mpeg12.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, AVCodecContext::debug, FF_DEBUG_PICT_INFO, MpegEncContext::gb, get_bits(), get_bits1(), init_get_bits(), Mpeg1Context::mpeg_enc_ctx, AVCodecContext::priv_data, s1, and skip_bits1().
Referenced by mpeg_decode_frame().

| static int mpeg_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 2031 of file mpeg12.c.
References MpegEncContext::avctx, AVCodecContext::codec, MpegEncContext::codec_id, common_init(), MpegEncContext::dsp, AVCodecContext::flags, MpegEncContext::flags, AVCodecContext::flags2, MpegEncContext::flags2, AVCodec::id, DSPContext::idct_permutation, init_vlcs(), Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, MPV_decode_defaults(), MpegEncContext::picture_number, AVCodecContext::priv_data, Mpeg1Context::repeat_field, and s2.

| static int mpeg_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[12][64] | |||
| ) | [static] |
Definition at line 1050 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, B_TYPE, MpegEncContext::block, MpegEncContext::block_last_index, btype2mb_type, MpegEncContext::chroma_format, MpegEncContext::chroma_y_shift, DSPContext::clear_blocks, CODEC_FLAG2_FAST, MpegEncContext::codec_id, CODEC_ID_MPEG2VIDEO, MpegEncContext::concealment_motion_vectors, MpegEncContext::current_picture, MpegEncContext::dsp, exchange_uv(), MpegEncContext::field_select, MpegEncContext::flags2, MpegEncContext::frame_pred_frame_dct, MpegEncContext::full_pel, MpegEncContext::gb, get_bits(), get_bits1(), get_dmv(), get_qscale(), get_vlc2(), HAS_CBP, I_TYPE, MpegEncContext::interlaced_dct, IS_INTRA, IS_QUANT, MpegEncContext::last_mv, MB_BTYPE_VLC_BITS, MpegEncContext::mb_intra, MB_PAT_VLC_BITS, MB_PTYPE_VLC_BITS, MpegEncContext::mb_skip_run, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_16x8, MB_TYPE_CBP, MB_TYPE_INTERLACED, MB_TYPE_INTRA, MB_TYPE_L0, MB_TYPE_L0L1, MB_TYPE_QUANT, MB_TYPE_SKIP, MB_TYPE_ZERO_MV, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, mpeg1_decode_block_inter(), mpeg1_decode_block_intra(), mpeg1_fast_decode_block_inter(), mpeg2_decode_block_intra(), mpeg2_decode_block_non_intra(), mpeg2_fast_decode_block_intra(), mpeg2_fast_decode_block_non_intra(), mpeg_decode_motion(), MpegEncContext::mpeg_f_code, MT_DMV, MT_FIELD, MT_FRAME, MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_FORWARD, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_16X8, MV_TYPE_DMV, MV_TYPE_FIELD, P_TYPE, MpegEncContext::pblocks, PICT_FRAME, PICT_TOP_FIELD, MpegEncContext::pict_type, MpegEncContext::picture_structure, ptype2mb_type, MpegEncContext::qscale, skip_bits1(), MpegEncContext::swap_uv, VLC::table, MpegEncContext::top_field_first, USES_LIST, and AVCodecContext::xvmc_acceleration.
Referenced by mpeg_decode_slice().

| static int mpeg_decode_motion | ( | MpegEncContext * | s, | |
| int | fcode, | |||
| int | pred | |||
| ) | [static] |
Definition at line 1450 of file mpeg12.c.
References MpegEncContext::gb, get_bits(), get_bits1(), get_vlc2(), INT_BIT, MV_VLC_BITS, shift(), and VLC::table.
Referenced by mpeg_decode_mb().

| static void mpeg_decode_picture_coding_extension | ( | MpegEncContext * | s | ) | [static] |
Definition at line 2380 of file mpeg12.c.
References MpegEncContext::alternate_scan, MpegEncContext::chroma_420_type, MpegEncContext::concealment_motion_vectors, MpegEncContext::dsp, ff_alternate_vertical_scan, ff_init_scantable(), ff_zigzag_direct, MpegEncContext::first_field, MpegEncContext::frame_pred_frame_dct, MpegEncContext::full_pel, MpegEncContext::gb, get_bits(), get_bits1(), DSPContext::idct_permutation, MpegEncContext::inter_scantable, MpegEncContext::intra_dc_precision, MpegEncContext::intra_scantable, MpegEncContext::intra_vlc_format, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mbskip_table, MpegEncContext::mpeg_f_code, PICT_FRAME, MpegEncContext::picture_structure, MpegEncContext::progressive_frame, MpegEncContext::q_scale_type, MpegEncContext::repeat_first_field, and MpegEncContext::top_field_first.
Referenced by mpeg_decode_extension().

| static void mpeg_decode_picture_display_extension | ( | Mpeg1Context * | s1 | ) | [static] |
Definition at line 2308 of file mpeg12.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, AVCodecContext::debug, FF_DEBUG_PICT_INFO, MpegEncContext::gb, get_sbits(), Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::pan_scan, PICT_FRAME, MpegEncContext::picture_structure, AVPanScan::position, MpegEncContext::progressive_sequence, MpegEncContext::repeat_first_field, skip_bits(), and MpegEncContext::top_field_first.
Referenced by mpeg_decode_extension().

| static int mpeg_decode_postinit | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 2072 of file mpeg12.c.
References MpegEncContext::aspect_ratio_info, av_d2q(), av_div_q(), av_reduce(), avcodec_set_dimensions(), MpegEncContext::avctx, MpegEncContext::bit_rate, AVCodecContext::bit_rate, ParseContext::buffer, AVCodecContext::coded_height, AVCodecContext::coded_width, AVRational::den, Mpeg1Context::frame_rate_ext, MpegEncContext::frame_rate_index, frame_rate_tab, AVCodecContext::has_b_frames, AVPanScan::height, MpegEncContext::height, MpegEncContext::low_delay, mpeg1_aspect, mpeg2_aspect, Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, MPV_common_end(), AVRational::num, Mpeg1Context::pan_scan, MpegEncContext::parse_context, AVCodecContext::priv_data, s1, AVCodecContext::sample_aspect_ratio, Mpeg1Context::save_aspect_info, AVCodecContext::sub_id, AVCodecContext::time_base, AVPanScan::width, and MpegEncContext::width.
Referenced by mpeg1_decode_picture().

| static void mpeg_decode_quant_matrix_extension | ( | MpegEncContext * | s | ) | [static] |
Definition at line 2342 of file mpeg12.c.
References MpegEncContext::chroma_inter_matrix, MpegEncContext::chroma_intra_matrix, MpegEncContext::dsp, ff_zigzag_direct, MpegEncContext::gb, get_bits(), get_bits1(), DSPContext::idct_permutation, MpegEncContext::inter_matrix, and MpegEncContext::intra_matrix.
Referenced by mpeg_decode_extension().

| static void mpeg_decode_sequence_display_extension | ( | Mpeg1Context * | s1 | ) | [static] |
Definition at line 2284 of file mpeg12.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, AVCodecContext::debug, FF_DEBUG_PICT_INFO, MpegEncContext::gb, get_bits(), get_bits1(), AVPanScan::height, Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::pan_scan, skip_bits(), and AVPanScan::width.
Referenced by mpeg_decode_extension().

| static void mpeg_decode_sequence_extension | ( | Mpeg1Context * | s1 | ) | [static] |
Definition at line 2248 of file mpeg12.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, MpegEncContext::bit_rate, MpegEncContext::chroma_format, CODEC_FLAG_LOW_DELAY, AVCodecContext::codec_id, MpegEncContext::codec_id, CODEC_ID_MPEG2VIDEO, AVCodecContext::debug, AVRational::den, FF_DEBUG_PICT_INFO, MpegEncContext::flags, Mpeg1Context::frame_rate_ext, MpegEncContext::gb, get_bits(), get_bits1(), MpegEncContext::height, AVCodecContext::level, MpegEncContext::low_delay, Mpeg1Context::mpeg_enc_ctx, AVRational::num, AVCodecContext::profile, MpegEncContext::progressive_sequence, AVCodecContext::rc_buffer_size, skip_bits(), skip_bits1(), AVCodecContext::sub_id, and MpegEncContext::width.
Referenced by mpeg_decode_extension().

| static int mpeg_decode_slice | ( | Mpeg1Context * | s1, | |
| int | mb_y, | |||
| const uint8_t ** | buf, | |||
| int | buf_size | |||
| ) | [static] |
decodes a slice. MpegEncContext.mb_y must be set to the MB row from the startcode
Definition at line 2519 of file mpeg12.c.
References MpegEncContext::alternate_scan, av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::b8_stride, B_TYPE, MpegEncContext::block, MpegEncContext::chroma_420_type, MpegEncContext::chroma_qscale, MpegEncContext::chroma_x_shift, MpegEncContext::concealment_motion_vectors, MpegEncContext::current_picture, AVCodecContext::debug, MpegEncContext::dest, MpegEncContext::encoding, AVCodecContext::error_resilience, FF_DEBUG_PICT_INFO, ff_draw_horiz_band(), FF_ER_AGGRESSIVE, ff_init_block_index(), ff_mpeg1_clean_buffers(), MpegEncContext::field_select, MpegEncContext::first_field, MpegEncContext::frame_pred_frame_dct, MpegEncContext::gb, get_bits1(), get_bits_count(), get_qscale(), get_vlc2(), I_TYPE, init_get_bits(), MpegEncContext::interlaced_dct, MpegEncContext::intra_dc_precision, MpegEncContext::intra_vlc_format, AVCodecContext::lowres, lowres, MpegEncContext::mb_height, MpegEncContext::mb_intra, MpegEncContext::mb_skip_run, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MBINCR_VLC_BITS, mpeg_decode_mb(), Mpeg1Context::mpeg_enc_ctx, MpegEncContext::mpeg_f_code, MPV_decode_mb(), MpegEncContext::mv, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_FIELD, P_TYPE, PICT_FRAME, MpegEncContext::pict_type, MpegEncContext::picture_structure, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, MpegEncContext::q_scale_type, MpegEncContext::qscale, MpegEncContext::repeat_first_field, MpegEncContext::resync_mb_x, MpegEncContext::resync_mb_y, show_bits(), GetBitContext::size_in_bits, skip_bits(), VLC::table, MpegEncContext::top_field_first, and AVCodecContext::xvmc_acceleration.
Referenced by mpeg_decode_frame(), and slice_decode_thread().

| static void mpeg_decode_user_data | ( | AVCodecContext * | avctx, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 2933 of file mpeg12.c.
References AVCodecContext::dtg_active_format.
Referenced by mpeg_decode_frame().
| static int mpeg_field_start | ( | MpegEncContext * | s | ) | [static] |
Definition at line 2461 of file mpeg12.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, ff_er_frame_start(), MpegEncContext::first_field, MPV_frame_start(), Mpeg1Context::pan_scan, PICT_BOTTOM_FIELD, PICT_FRAME, MpegEncContext::picture_structure, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, MpegEncContext::repeat_first_field, s1, MpegEncContext::top_field_first, and AVCodecContext::xvmc_acceleration.
Referenced by mpeg_decode_frame().

| 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] |
Definition at line 2695 of file mpeg12.c.
References AC_END, AC_ERROR, buf, GetBitContext::buffer, DC_END, DC_ERROR, emms_c, MpegEncContext::end_mb_y, MpegEncContext::error_count, ff_er_add_slice(), find_start_code(), MpegEncContext::gb, MpegEncContext::mb_width, mpeg_decode_slice(), MV_END, MV_ERROR, SLICE_MIN_START_CODE, and MpegEncContext::start_mb_y.
Referenced by mpeg_decode_frame().

| static int slice_end | ( | AVCodecContext * | avctx, | |
| AVFrame * | pict | |||
| ) | [static] |
handles slice ends.
Definition at line 2732 of file mpeg12.c.
References MpegEncContext::avctx, B_TYPE, MpegEncContext::current_picture_ptr, ff_er_frame_end(), ff_print_debug_info(), FF_QSCALE_TYPE_MPEG2, MpegEncContext::first_field, MpegEncContext::last_picture_ptr, MpegEncContext::low_delay, Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, MPV_frame_end(), NULL, MpegEncContext::pict_type, MpegEncContext::picture_number, AVCodecContext::priv_data, s1, and AVCodecContext::xvmc_acceleration.
Referenced by mpeg_decode_frame().

| static int vcr2_init_sequence | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 2879 of file mpeg12.c.
References MpegEncContext::avctx, MpegEncContext::chroma_format, MpegEncContext::chroma_inter_matrix, MpegEncContext::chroma_intra_matrix, AVCodecContext::codec_id, MpegEncContext::codec_id, CODEC_ID_MPEG2VIDEO, AVCodecContext::coded_height, AVCodecContext::coded_width, MpegEncContext::dsp, exchange_uv(), FF_IDCT_AUTO, FF_IDCT_SIMPLE, ff_mpeg1_default_intra_matrix, ff_mpeg1_default_non_intra_matrix, FMT_MPEG1, MpegEncContext::frame_pred_frame_dct, AVCodecContext::get_format, AVCodecContext::has_b_frames, MpegEncContext::height, AVCodecContext::idct_algo, DSPContext::idct_permutation, MpegEncContext::inter_matrix, MpegEncContext::intra_matrix, MpegEncContext::low_delay, Mpeg1Context::mpeg_enc_ctx, Mpeg1Context::mpeg_enc_ctx_allocated, MPV_common_end(), MPV_common_init(), MpegEncContext::out_format, PICT_FRAME, MpegEncContext::picture_structure, AVCodecContext::pix_fmt, PIX_FMT_XVMC_MPEG2_IDCT, pixfmt_xvmc_mpg2_420, pixfmt_yuv_420, AVCodecContext::priv_data, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, s1, AVCodecContext::sub_id, MpegEncContext::swap_uv, MpegEncContext::width, and AVCodecContext::xvmc_acceleration.
Referenced by mpeg_decode_frame().

VLC dc_chroma_vlc [static] |
VLC dc_lum_vlc [static] |
VLC mb_btype_vlc [static] |
VLC mb_pat_vlc [static] |
VLC mb_ptype_vlc [static] |
VLC mbincr_vlc [static] |
Initial value:
{
"mpeg1video",
CODEC_TYPE_VIDEO,
CODEC_ID_MPEG1VIDEO,
sizeof(Mpeg1Context),
mpeg_decode_init,
NULL,
mpeg_decode_end,
mpeg_decode_frame,
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
.flush= ff_mpeg_flush,
}
Definition at line 3210 of file mpeg12.c.
Referenced by avcodec_register_all().
Initial value:
{
"mpeg2video",
CODEC_TYPE_VIDEO,
CODEC_ID_MPEG2VIDEO,
sizeof(Mpeg1Context),
mpeg_decode_init,
NULL,
mpeg_decode_end,
mpeg_decode_frame,
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
.flush= ff_mpeg_flush,
}
Definition at line 3223 of file mpeg12.c.
Referenced by avcodec_register_all().
Initial value:
{
"mpegvideo",
CODEC_TYPE_VIDEO,
CODEC_ID_MPEG2VIDEO,
sizeof(Mpeg1Context),
mpeg_decode_init,
NULL,
mpeg_decode_end,
mpeg_decode_frame,
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
.flush= ff_mpeg_flush,
}
Definition at line 3237 of file mpeg12.c.
Referenced by avcodec_register_all().
| enum PixelFormat pixfmt_xvmc_mpg2_420[] |
| enum PixelFormat pixfmt_yuv_420[] = {PIX_FMT_YUV420P,-1} |
| enum PixelFormat pixfmt_yuv_422[] = {PIX_FMT_YUV422P,-1} |
| enum PixelFormat pixfmt_yuv_444[] = {PIX_FMT_YUV444P,-1} |
1.5.5