#include "avcodec.h"#include "dsputil.h"#include "mpegvideo.h"

Go to the source code of this file.
Data Structures | |
| struct | CFrameBuffer |
| struct | FourXContext |
Defines | |
| #define | BLOCK_TYPE_VLC_BITS 5 |
| #define | ACDC_VLC_BITS 9 |
| #define | CFRAME_BUFFER_COUNT 100 |
| #define | FIX_1_082392200 70936 |
| #define | FIX_1_414213562 92682 |
| #define | FIX_1_847759065 121095 |
| #define | FIX_2_613125930 171254 |
| #define | MULTIPLY(var, const) (((var)*(const)) >> 16) |
Functions | |
| static void | idct (DCTELEM block[64]) |
| static void | init_vlcs (FourXContext *f) |
| static void | init_mv (FourXContext *f) |
| static void | mcdc (uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, int dc) |
| static void | decode_p_block (FourXContext *f, uint16_t *dst, uint16_t *src, int log2w, int log2h, int stride) |
| static int | get32 (void *p) |
| static int | decode_p_frame (FourXContext *f, uint8_t *buf, int length) |
| static int | decode_i_block (FourXContext *f, DCTELEM *block) |
| static void | idct_put (FourXContext *f, int x, int y) |
| static int | decode_i_mb (FourXContext *f) |
| static uint8_t * | read_huffman_tables (FourXContext *f, uint8_t *const buf) |
| static int | decode_i_frame (FourXContext *f, uint8_t *buf, int length) |
| static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static void | common_init (AVCodecContext *avctx) |
| static int | decode_init (AVCodecContext *avctx) |
| static int | decode_end (AVCodecContext *avctx) |
Variables | |
| static const uint8_t | block_type_tab [4][8][2] |
| static const uint8_t | size2index [4][4] |
| static const int8_t | mv [256][2] |
| static const uint8_t | dequant_table [64] |
| static VLC | block_type_vlc [4] |
| AVCodec | fourxm_decoder |
Definition in file 4xm.c.
| #define ACDC_VLC_BITS 9 |
Definition at line 33 of file 4xm.c.
Referenced by decode_i_block(), decode_i_frame(), and read_huffman_tables().
| #define BLOCK_TYPE_VLC_BITS 5 |
| #define CFRAME_BUFFER_COUNT 100 |
| #define FIX_1_082392200 70936 |
| #define FIX_1_414213562 92682 |
| #define FIX_1_847759065 121095 |
Definition at line 133 of file 4xm.c.
Referenced by ff_fdct248_islow(), ff_jpeg_fdct_islow(), idct(), j_rev_dct(), j_rev_dct4(), row_fdct(), and RTjpeg_idct().
| #define FIX_2_613125930 171254 |
| #define MULTIPLY | ( | var, | |||
| const | ) | (((var)*(const)) >> 16) |
Definition at line 136 of file 4xm.c.
Referenced by fdct_ifast(), fdct_ifast248(), ff_fdct248_islow(), ff_jpeg_fdct_islow(), idct(), j_rev_dct(), j_rev_dct4(), quicktime_rev_dct(), row_fdct(), and RTjpeg_idct().
| static void common_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 707 of file 4xm.c.
References FourXContext::avctx, FourXContext::dsp, dsputil_init(), and AVCodecContext::priv_data.
Referenced by decode_init(), encode_init(), ff_msmpeg4_decode_init(), and mpeg_decode_init().

| static int decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 727 of file 4xm.c.
References CFrameBuffer::allocated_size, av_freep(), FourXContext::bitstream_buffer, FourXContext::bitstream_buffer_size, CFRAME_BUFFER_COUNT, FourXContext::cfrm, CFrameBuffer::data, free_vlc(), FourXContext::pre_vlc, and AVCodecContext::priv_data.

| static int decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 599 of file 4xm.c.
References CFrameBuffer::allocated_size, av_fast_realloc(), av_log(), AV_LOG_ERROR, FourXContext::avctx, CFRAME_BUFFER_COUNT, FourXContext::cfrm, CODEC_FLAG_EMU_EDGE, AVCodecContext::coded_frame, FourXContext::current_picture, CFrameBuffer::data, decode_i_frame(), decode_p_frame(), emms_c, FF_INPUT_BUFFER_PADDING_SIZE, AVCodecContext::flags, AVCodecContext::frame_number, get32(), AVCodecContext::get_buffer, I_TYPE, CFrameBuffer::id, FourXContext::last_picture, memcpy, P_TYPE, picture, AVCodecContext::priv_data, AVCodecContext::release_buffer, and CFrameBuffer::size.
Referenced by flac_decode_frame().

| static int decode_i_block | ( | FourXContext * | f, | |
| DCTELEM * | block | |||
| ) | [static] |
decode block and dequantize. Note this is allmost identical to mjpeg
Definition at line 371 of file 4xm.c.
References ACDC_VLC_BITS, av_log(), AV_LOG_ERROR, FourXContext::avctx, dequant_table, ff_zigzag_direct, FourXContext::gb, get_vlc2(), get_xbits(), FourXContext::last_dc, level, FourXContext::pre_gb, FourXContext::pre_vlc, and VLC::table.
Referenced by decode_i_mb().

| static int decode_i_frame | ( | FourXContext * | f, | |
| uint8_t * | buf, | |||
| int | length | |||
| ) | [static] |
Definition at line 553 of file 4xm.c.
References __attribute__(), ACDC_VLC_BITS, av_fast_realloc(), av_log(), AV_LOG_ERROR, FourXContext::avctx, FourXContext::bitstream_buffer, FourXContext::bitstream_buffer_size, DSPContext::bswap_buf, FourXContext::current_picture, decode_i_mb(), FourXContext::dsp, FF_INPUT_BUFFER_PADDING_SIZE, FourXContext::gb, get32(), get_vlc2(), AVCodecContext::height, height, idct_put(), init_get_bits(), FourXContext::last_dc, FourXContext::pre_gb, FourXContext::pre_vlc, read_huffman_tables(), stride, VLC::table, AVCodecContext::width, and width.
Referenced by decode_frame().

| static int decode_i_mb | ( | FourXContext * | f | ) | [static] |
Definition at line 459 of file 4xm.c.
References FourXContext::block, DSPContext::clear_blocks, decode_i_block(), and FourXContext::dsp.
Referenced by decode_i_frame().

| static int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 715 of file 4xm.c.
References common_init(), init_vlcs(), AVCodecContext::pix_fmt, PIX_FMT_RGB565, and AVCodecContext::priv_data.
Referenced by decode_init_mp3on4().

| static void decode_p_block | ( | FourXContext * | f, | |
| uint16_t * | dst, | |||
| uint16_t * | src, | |||
| int | log2w, | |||
| int | log2h, | |||
| int | stride | |||
| ) | [static] |
Definition at line 281 of file 4xm.c.
References BLOCK_TYPE_VLC_BITS, FourXContext::bytestream, FourXContext::gb, get_vlc2(), le2me_16, mcdc(), FourXContext::mv, size2index, VLC::table, and FourXContext::wordstream.
Referenced by decode_p_frame().

| static int decode_p_frame | ( | FourXContext * | f, | |
| uint8_t * | buf, | |||
| int | length | |||
| ) | [static] |
Definition at line 319 of file 4xm.c.
References av_fast_realloc(), av_log(), AV_LOG_ERROR, FourXContext::avctx, FourXContext::bitstream_buffer, FourXContext::bitstream_buffer_size, DSPContext::bswap_buf, FourXContext::bytestream, FourXContext::current_picture, decode_p_block(), FourXContext::dsp, FF_INPUT_BUFFER_PADDING_SIZE, FourXContext::gb, get32(), get_bits_count(), AVCodecContext::height, height, init_get_bits(), init_mv(), FourXContext::last_picture, src, stride, AVCodecContext::width, width, and FourXContext::wordstream.
Referenced by decode_frame().

| static int get32 | ( | void * | p | ) | [static] |
Definition at line 315 of file 4xm.c.
References le2me_32.
Referenced by decode_frame(), decode_i_frame(), and decode_p_frame().
| static void idct | ( | DCTELEM | block[64] | ) | [static] |
Definition at line 138 of file 4xm.c.
References FIX_1_082392200, FIX_1_414213562, FIX_1_847759065, FIX_2_613125930, and MULTIPLY.
| static void idct_put | ( | FourXContext * | f, | |
| int | x, | |||
| int | y | |||
| ) | [inline, static] |
Definition at line 415 of file 4xm.c.
References FourXContext::avctx, FourXContext::block, cb, CODEC_FLAG_GRAY, FourXContext::current_picture, AVCodecContext::flags, idct, and stride.
Referenced by decode_frame(), decode_i_frame(), dsputil_init_sh4(), and dv_decode_video_segment().
| static void init_mv | ( | FourXContext * | f | ) | [static] |
Definition at line 232 of file 4xm.c.
References FourXContext::current_picture, mv, and FourXContext::mv.
Referenced by decode_p_frame().
| static void init_vlcs | ( | FourXContext * | f | ) | [static] |
Definition at line 222 of file 4xm.c.
References block_type_tab, BLOCK_TYPE_VLC_BITS, and init_vlc().
Referenced by decode_init(), and mpeg_decode_init().

| static void mcdc | ( | uint16_t * | dst, | |
| uint16_t * | src, | |||
| int | log2w, | |||
| int | h, | |||
| int | stride, | |||
| int | scale, | |||
| int | dc | |||
| ) | [inline, static] |
| static uint8_t* read_huffman_tables | ( | FourXContext * | f, | |
| uint8_t *const | buf | |||
| ) | [static] |
Definition at line 472 of file 4xm.c.
References ACDC_VLC_BITS, av_log(), AV_LOG_ERROR, FourXContext::avctx, bits, init_vlc(), and FourXContext::pre_vlc.
Referenced by decode_frame(), decode_i_frame(), and decode_init().

const uint8_t block_type_tab[4][8][2] [static] |
Initial value:
{
{
{ 0,1}, { 2,2}, { 6,3}, {14,4}, {30,5}, {31,5}, { 0,0}
},{
{ 0,1}, { 0,0}, { 2,2}, { 6,3}, {14,4}, {15,4}, { 0,0}
},{
{ 0,1}, { 2,2}, { 0,0}, { 6,3}, {14,4}, {15,4}, { 0,0}
},{
{ 0,1}, { 0,0}, { 0,0}, { 2,2}, { 6,3}, {14,4}, {15,4}
}
}
Definition at line 37 of file 4xm.c.
Referenced by init_vlcs().
VLC block_type_vlc[4] [static] |
const uint8_t dequant_table[64] [static] |
Initial value:
{
16, 15, 13, 19, 24, 31, 28, 17,
17, 23, 25, 31, 36, 63, 45, 21,
18, 24, 27, 37, 52, 59, 49, 20,
16, 28, 34, 40, 60, 80, 51, 20,
18, 31, 48, 66, 68, 86, 56, 21,
19, 38, 56, 59, 64, 64, 48, 20,
27, 48, 55, 55, 56, 51, 35, 15,
20, 35, 34, 32, 31, 22, 15, 8,
}
Definition at line 92 of file 4xm.c.
Referenced by decode_i_block().
Initial value:
{
"4xm",
CODEC_TYPE_VIDEO,
CODEC_ID_4XM,
sizeof(FourXContext),
decode_init,
NULL,
decode_end,
decode_frame,
}
Definition at line 742 of file 4xm.c.
Referenced by avcodec_register_all().
const int8_t mv[256][2] [static] |
Definition at line 56 of file 4xm.c.
Referenced by ff_print_debug_info(), init_mv(), pred_direct_motion(), svq1_motion_inter_4v_block(), svq1_motion_inter_block(), and svq3_mc_dir().
const uint8_t size2index[4][4] [static] |
Initial value:
{
{-1, 3, 1, 1},
{ 3, 0, 0, 0},
{ 2, 0, 0, 0},
{ 2, 0, 0, 0},
}
Definition at line 49 of file 4xm.c.
Referenced by decode_p_block().
1.5.5