#include "avcodec.h"#include "dsputil.h"#include "mpegvideo.h"#include "msmpeg4data.h"#include "wmv2.c"

Go to the source code of this file.
Definition in file msmpeg4.c.
| #define DC_MAX 119 |
Definition at line 844 of file msmpeg4.c.
Referenced by msmpeg4_decode_dc(), and msmpeg4_encode_dc().
| #define DEFAULT_INTER_INDEX 3 |
| #define II_BITRATE 128*1024 |
| #define INTER_INTRA_VLC_BITS 3 |
Definition at line 43 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), msmpeg4v34_decode_mb(), and wmv2_decode_mb().
| #define MB_INTRA_VLC_BITS 9 |
Definition at line 52 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), msmpeg4v34_decode_mb(), vc9_decode_i_mb(), and wmv2_decode_mb().
| #define MB_NON_INTRA_VLC_BITS 9 |
Definition at line 51 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), msmpeg4v34_decode_mb(), and wmv2_decode_mb().
| #define MBAC_BITRATE 50*1024 |
| #define set_stat | ( | var | ) |
Definition at line 152 of file msmpeg4.c.
Referenced by msmpeg4_decode_block(), msmpeg4_encode_block(), and msmpeg4v34_decode_mb().
| #define V1_INTER_CBPC_VLC_BITS 6 |
Definition at line 45 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().
| #define V1_INTRA_CBPC_VLC_BITS 6 |
Definition at line 44 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().
| #define V2_INTRA_CBPC_VLC_BITS 3 |
Definition at line 46 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().
| #define V2_MB_TYPE_VLC_BITS 7 |
Definition at line 47 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().
| #define V2_MV_VLC_BITS 9 |
Definition at line 49 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), and msmpeg4v2_decode_motion().
| static int coded_block_pred | ( | MpegEncContext * | s, | |
| int | n, | |||
| uint8_t ** | coded_block_ptr | |||
| ) | [inline, static] |
Definition at line 456 of file msmpeg4.c.
References a, b, MpegEncContext::b8_stride, MpegEncContext::block_index, c, MpegEncContext::coded_block, and pred().
Referenced by msmpeg4v34_decode_mb(), and wmv2_decode_mb().

| static void common_init | ( | MpegEncContext * | s | ) | [static] |
Definition at line 156 of file msmpeg4.c.
References MpegEncContext::c_dc_scale_table, MpegEncContext::dsp, ff_init_scantable(), ff_mpeg1_dc_scale_table, ff_mpeg4_c_dc_scale_table, ff_mpeg4_y_dc_scale_table, DSPContext::idct_permutation, init_h263_dc_for_msmpeg4(), MpegEncContext::inter_scantable, MpegEncContext::intra_h_scantable, MpegEncContext::intra_scantable, MpegEncContext::intra_v_scantable, MpegEncContext::msmpeg4_version, old_ff_c_dc_scale_table, old_ff_y_dc_scale_table, wmv1_c_dc_scale_table, wmv1_scantable, wmv1_y_dc_scale_table, wmv3_dc_scale_table, MpegEncContext::workaround_bugs, and MpegEncContext::y_dc_scale_table.

| int ff_msmpeg4_decode_init | ( | MpegEncContext * | s | ) |
Definition at line 1111 of file msmpeg4.c.
References cbpy_tab, CBPY_VLC_BITS, common_init(), DC_VLC_BITS, MpegEncContext::decode_mb, ff_msmp4_mb_i_table, ff_table0_dc_chroma, ff_table0_dc_lum, ff_table1_dc_chroma, ff_table1_dc_lum, init_rl(), init_vlc(), init_vlc_rl(), INTER_INTRA_VLC_BITS, inter_MCBPC_bits, inter_MCBPC_code, intra_MCBPC_bits, intra_MCBPC_code, MpegEncContext::mb_height, MB_INTRA_VLC_BITS, MB_NON_INTRA_VLC_BITS, MpegEncContext::msmpeg4_version, msmpeg4v12_decode_mb(), msmpeg4v34_decode_mb(), mv_tables, MV_VLC_BITS, mvtab, MVTable::n, rl_table, MpegEncContext::slice_height, table_inter_intra, MVTable::table_mv_bits, MVTable::table_mv_code, V1_INTER_CBPC_VLC_BITS, V1_INTRA_CBPC_VLC_BITS, v2_dc_chroma_table, v2_dc_lum_table, v2_intra_cbpc, V2_INTRA_CBPC_VLC_BITS, v2_mb_type, V2_MB_TYPE_VLC_BITS, V2_MV_VLC_BITS, MVTable::vlc, wmv2_decode_mb(), and wmv2_inter_table.
Referenced by ff_h263_decode_init().

| static int get_dc | ( | uint8_t * | src, | |
| int | stride, | |||
| int | scale | |||
| ) | [static] |
| static void init_h263_dc_for_msmpeg4 | ( | void | ) | [static] |
Definition at line 1056 of file msmpeg4.c.
References DCtab_chrom, DCtab_lum, v2_dc_chroma_table, and v2_dc_lum_table.
Referenced by common_init().
| static int msmpeg4_decode_block | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | coded, | |||
| const uint8_t * | scantable | |||
| ) | [inline, static] |
Definition at line 1662 of file msmpeg4.c.
References ABS, MpegEncContext::ac_pred, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block_last_index, MpegEncContext::c_dc_scale, CLOSE_READER, MpegEncContext::error_resilience, MpegEncContext::esc3_level_length, MpegEncContext::esc3_run_length, fprintf, MpegEncContext::gb, get_bits_count(), GET_CACHE, GET_RL_VLC, MpegEncContext::inter_intra_pred, MpegEncContext::inter_scantable, MpegEncContext::intra_h_scantable, MpegEncContext::intra_scantable, MpegEncContext::intra_v_scantable, LAST_SKIP_BITS, LAST_SKIP_CACHE, RLTable::max_level, MAX_LEVEL, MAX_RUN, RLTable::max_run, MpegEncContext::mb_intra, MpegEncContext::mb_x, MpegEncContext::mb_y, mpeg4_pred_ac(), msmpeg4_decode_dc(), MpegEncContext::msmpeg4_version, OPEN_READER, ScanTable::permutated, MpegEncContext::qscale, MpegEncContext::rl_chroma_table_index, rl_table, MpegEncContext::rl_table_index, RLTable::rl_vlc, set_stat, SHOW_SBITS, SHOW_UBITS, GetBitContext::size_in_bits, SKIP_BITS, SKIP_CACHE, SKIP_COUNTER, TEX_VLC_BITS, UPDATE_CACHE, and MpegEncContext::y_dc_scale.
Referenced by msmpeg4v12_decode_mb(), msmpeg4v34_decode_mb(), wmv2_decode_inter_block(), and wmv2_decode_mb().

| static int msmpeg4_decode_dc | ( | MpegEncContext * | s, | |
| int | n, | |||
| int * | dir_ptr | |||
| ) | [static] |
Definition at line 1912 of file msmpeg4.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::c_dc_scale, DC_MAX, MpegEncContext::dc_table_index, DC_VLC_BITS, MpegEncContext::gb, get_bits(), get_bits1(), get_vlc2(), msmpeg4_pred_dc(), MpegEncContext::msmpeg4_version, msmpeg4v1_pred_dc(), VLC::table, and MpegEncContext::y_dc_scale.
Referenced by msmpeg4_decode_block().

| int msmpeg4_decode_ext_header | ( | MpegEncContext * | s, | |
| int | buf_size | |||
| ) |
Definition at line 1378 of file msmpeg4.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::bit_rate, MpegEncContext::flipflop_rounding, MpegEncContext::gb, get_bits(), get_bits1(), get_bits_count(), and MpegEncContext::msmpeg4_version.
Referenced by ff_h263_decode_frame(), and msmpeg4_decode_picture_header().

| static int msmpeg4_decode_motion | ( | MpegEncContext * | s, | |
| int * | mx_ptr, | |||
| int * | my_ptr | |||
| ) | [static] |
Definition at line 1969 of file msmpeg4.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::gb, get_bits(), get_vlc2(), MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mv_table_index, mv_tables, MV_VLC_BITS, MVTable::n, VLC::table, MVTable::table_mvx, MVTable::table_mvy, and MVTable::vlc.
Referenced by msmpeg4v34_decode_mb(), and wmv2_decode_motion().

| int msmpeg4_decode_picture_header | ( | MpegEncContext * | s | ) |
Definition at line 1209 of file msmpeg4.c.
References av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::bit_rate, MpegEncContext::chroma_qscale, MpegEncContext::dc_table_index, AVCodecContext::debug, decode012(), MpegEncContext::esc3_level_length, MpegEncContext::esc3_run_length, FF_DEBUG_PICT_INFO, MpegEncContext::flipflop_rounding, frame_count, MpegEncContext::gb, get_bits(), get_bits1(), MpegEncContext::height, I_TYPE, II_BITRATE, MpegEncContext::inter_intra_pred, MpegEncContext::mb_height, MBAC_BITRATE, msmpeg4_decode_ext_header(), MpegEncContext::msmpeg4_version, MpegEncContext::mv_table_index, MpegEncContext::no_rounding, P_TYPE, MpegEncContext::per_mb_rl_table, MpegEncContext::pict_type, MpegEncContext::qscale, MpegEncContext::rl_chroma_table_index, MpegEncContext::rl_table_index, GetBitContext::size_in_bits, MpegEncContext::slice_height, MpegEncContext::use_skip_mb_code, and MpegEncContext::width.
Referenced by ff_h263_decode_frame().

| static void msmpeg4_encode_block | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n | |||
| ) | [inline, static] |
Definition at line 918 of file msmpeg4.c.
References MpegEncContext::ac_stats, MpegEncContext::block_last_index, MpegEncContext::esc3_level_length, MpegEncContext::esc3_run_length, get_rl_index(), MpegEncContext::inter_scantable, MpegEncContext::intra_scantable, RLTable::max_level, MAX_LEVEL, RLTable::max_run, MAX_RUN, MpegEncContext::mb_intra, msmpeg4_encode_dc(), MpegEncContext::msmpeg4_version, RLTable::n, MpegEncContext::pb, ScanTable::permutated, put_bits(), MpegEncContext::qscale, MpegEncContext::rl_chroma_table_index, rl_table, MpegEncContext::rl_table_index, set_stat, and RLTable::table_vlc.

| static void msmpeg4_encode_dc | ( | MpegEncContext * | s, | |
| int | level, | |||
| int | n, | |||
| int * | dir_ptr | |||
| ) | [static] |
Definition at line 846 of file msmpeg4.c.
References MpegEncContext::c_dc_scale, DC_MAX, MpegEncContext::dc_table_index, ff_table0_dc_chroma, ff_table0_dc_lum, ff_table1_dc_chroma, ff_table1_dc_lum, msmpeg4_pred_dc(), MpegEncContext::msmpeg4_version, msmpeg4v1_pred_dc(), MpegEncContext::pb, put_bits(), v2_dc_chroma_table, v2_dc_lum_table, and MpegEncContext::y_dc_scale.
Referenced by msmpeg4_encode_block().

| static void msmpeg4_memsetw | ( | short * | tab, | |
| int | val, | |||
| int | n | |||
| ) | [inline, static] |
| static int msmpeg4_pred_dc | ( | MpegEncContext * | s, | |
| int | n, | |||
| uint16_t ** | dc_val_ptr, | |||
| int * | dir_ptr | |||
| ) | [inline, static] |
Definition at line 697 of file msmpeg4.c.
References a, b, MpegEncContext::block_index, MpegEncContext::block_wrap, c, MpegEncContext::c_dc_scale, MpegEncContext::current_picture, MpegEncContext::dc_val, MpegEncContext::first_slice_line, get_dc(), MpegEncContext::h263_aic_dir, MpegEncContext::inter_intra_pred, inverse, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::msmpeg4_version, MpegEncContext::uvlinesize, and MpegEncContext::y_dc_scale.
Referenced by msmpeg4_decode_dc(), and msmpeg4_encode_dc().

| static int msmpeg4v12_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[6][64] | |||
| ) | [static] |
Definition at line 1482 of file msmpeg4.c.
References MpegEncContext::ac_pred, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block, MpegEncContext::block_last_index, CBPY_VLC_BITS, DSPContext::clear_blocks, MpegEncContext::dsp, MpegEncContext::gb, get_bits1(), get_vlc2(), h263_pred_motion(), MpegEncContext::mb_intra, MpegEncContext::mb_skipped, MpegEncContext::mb_x, MpegEncContext::mb_y, msmpeg4_decode_block(), MpegEncContext::msmpeg4_version, msmpeg4v2_decode_motion(), MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_FORWARD, MpegEncContext::mv_type, MV_TYPE_16X16, NULL, P_TYPE, MpegEncContext::pict_type, VLC::table, MpegEncContext::use_skip_mb_code, V1_INTER_CBPC_VLC_BITS, V1_INTRA_CBPC_VLC_BITS, V2_INTRA_CBPC_VLC_BITS, and V2_MB_TYPE_VLC_BITS.
Referenced by ff_msmpeg4_decode_init().

| static int msmpeg4v1_pred_dc | ( | MpegEncContext * | s, | |
| int | n, | |||
| int32_t ** | dc_val_ptr | |||
| ) | [inline, static] |
Definition at line 668 of file msmpeg4.c.
References MpegEncContext::last_dc.
Referenced by msmpeg4_decode_dc(), and msmpeg4_encode_dc().
| static int msmpeg4v2_decode_motion | ( | MpegEncContext * | s, | |
| int | pred, | |||
| int | f_code | |||
| ) | [static] |
Definition at line 1451 of file msmpeg4.c.
References MpegEncContext::gb, get_bits(), get_bits1(), get_vlc2(), shift(), VLC::table, and V2_MV_VLC_BITS.
Referenced by msmpeg4v12_decode_mb().

| static void msmpeg4v2_encode_motion | ( | MpegEncContext * | s, | |
| int | val | |||
| ) | [static] |
Definition at line 1417 of file msmpeg4.c.
References bits, MpegEncContext::f_code, mvtab, MpegEncContext::pb, and put_bits().

| static int msmpeg4v34_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[6][64] | |||
| ) | [static] |
Definition at line 1568 of file msmpeg4.c.
References MpegEncContext::ac_pred, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::block, MpegEncContext::block_last_index, DSPContext::clear_blocks, coded_block_pred(), MpegEncContext::current_picture, decode012(), DEFAULT_INTER_INDEX, MpegEncContext::dsp, MpegEncContext::gb, get_bits1(), get_vlc2(), MpegEncContext::h263_aic_dir, h263_pred_motion(), MpegEncContext::inter_intra_pred, INTER_INTRA_VLC_BITS, MpegEncContext::mb_intra, MB_INTRA_VLC_BITS, MB_NON_INTRA_VLC_BITS, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_INTRA, MB_TYPE_L0, MB_TYPE_SKIP, MpegEncContext::mb_x, MpegEncContext::mb_y, msmpeg4_decode_block(), msmpeg4_decode_motion(), MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_FORWARD, MpegEncContext::mv_type, MV_TYPE_16X16, NULL, P_TYPE, MpegEncContext::per_mb_rl_table, MpegEncContext::pict_type, MpegEncContext::rl_chroma_table_index, MpegEncContext::rl_table_index, set_stat, VLC::table, and MpegEncContext::use_skip_mb_code.
Referenced by ff_msmpeg4_decode_init().

| static int wmv2_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[6][64] | |||
| ) | [static] |
Referenced by ff_msmpeg4_decode_init().
VLC inter_intra_vlc [static] |
VLC mb_non_intra_vlc[4] [static] |
VLC v1_inter_cbpc_vlc [static] |
VLC v1_intra_cbpc_vlc [static] |
uint32_t v2_dc_chroma_table[512][2] [static] |
Definition at line 60 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), init_h263_dc_for_msmpeg4(), and msmpeg4_encode_dc().
VLC v2_dc_chroma_vlc [static] |
uint32_t v2_dc_lum_table[512][2] [static] |
Definition at line 59 of file msmpeg4.c.
Referenced by ff_msmpeg4_decode_init(), init_h263_dc_for_msmpeg4(), and msmpeg4_encode_dc().
VLC v2_dc_lum_vlc [static] |
VLC v2_intra_cbpc_vlc [static] |
VLC v2_mb_type_vlc [static] |
| uint8_t wmv3_dc_scale_table[32] |
1.5.5