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

Go to the source code of this file.
Data Structures | |
| struct | ASV1Context |
Defines | |
| #define | VLC_BITS 6 |
| #define | ASV2_LEVEL_VLC_BITS 10 |
Functions | |
| static void | init_vlcs (ASV1Context *a) |
| static int | asv2_get_bits (GetBitContext *gb, int n) |
| static void | asv2_put_bits (PutBitContext *pb, int n, int v) |
| static int | asv1_get_level (GetBitContext *gb) |
| static int | asv2_get_level (GetBitContext *gb) |
| static void | asv1_put_level (PutBitContext *pb, int level) |
| static void | asv2_put_level (PutBitContext *pb, int level) |
| static int | asv1_decode_block (ASV1Context *a, DCTELEM block[64]) |
| static int | asv2_decode_block (ASV1Context *a, DCTELEM block[64]) |
| static void | asv1_encode_block (ASV1Context *a, DCTELEM block[64]) |
| static void | asv2_encode_block (ASV1Context *a, DCTELEM block[64]) |
| static int | decode_mb (ASV1Context *a, DCTELEM block[6][64]) |
| static int | encode_mb (ASV1Context *a, DCTELEM block[6][64]) |
| static void | idct_put (ASV1Context *a, int mb_x, int mb_y) |
| static void | dct_get (ASV1Context *a, int mb_x, int mb_y) |
| static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | encode_frame (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) |
| static void | common_init (AVCodecContext *avctx) |
| static int | decode_init (AVCodecContext *avctx) |
| static int | encode_init (AVCodecContext *avctx) |
| static int | decode_end (AVCodecContext *avctx) |
Variables | |
| static const uint8_t | scantab [64] |
| static const uint8_t | ccp_tab [17][2] |
| static const uint8_t | level_tab [7][2] |
| static const uint8_t | dc_ccp_tab [8][2] |
| static const uint8_t | ac_ccp_tab [16][2] |
| static const uint8_t | asv2_level_tab [63][2] |
| static VLC | ccp_vlc |
| static VLC | level_vlc |
| static VLC | dc_ccp_vlc |
| static VLC | ac_ccp_vlc |
| static VLC | asv2_level_vlc |
| AVCodec | asv1_decoder |
| AVCodec | asv2_decoder |
Definition in file asv1.c.
| #define ASV2_LEVEL_VLC_BITS 10 |
| #define VLC_BITS 6 |
Definition at line 32 of file asv1.c.
Referenced by asv1_decode_block(), asv1_get_level(), asv2_decode_block(), decode_422_bitstream(), decode_bgr_bitstream(), decode_gray_bitstream(), init_vlcs(), read_huffman_tables(), and read_old_huffman_tables().
| static int asv1_decode_block | ( | ASV1Context * | a, | |
| DCTELEM | block[64] | |||
| ) | [inline, static] |
Definition at line 180 of file asv1.c.
References asv1_get_level(), av_log(), AV_LOG_ERROR, ASV1Context::avctx, ASV1Context::gb, get_bits(), get_vlc2(), ASV1Context::intra_matrix, ScanTable::permutated, ASV1Context::scantable, VLC::table, and VLC_BITS.
Referenced by decode_mb().

| static void asv1_encode_block | ( | ASV1Context * | a, | |
| DCTELEM | block[64] | |||
| ) | [inline, static] |
Definition at line 233 of file asv1.c.
References asv1_put_level(), ccp_tab, ASV1Context::pb, put_bits(), ASV1Context::q_intra_matrix, and scantab.
Referenced by encode_mb().

| static int asv1_get_level | ( | GetBitContext * | gb | ) | [inline, static] |
Definition at line 146 of file asv1.c.
References get_sbits(), get_vlc2(), VLC::table, and VLC_BITS.
Referenced by asv1_decode_block().

| static void asv1_put_level | ( | PutBitContext * | pb, | |
| int | level | |||
| ) | [inline, static] |
Definition at line 160 of file asv1.c.
References level_tab, and put_bits().
Referenced by asv1_encode_block().

| static int asv2_decode_block | ( | ASV1Context * | a, | |
| DCTELEM | block[64] | |||
| ) | [inline, static] |
Definition at line 205 of file asv1.c.
References asv2_get_bits(), asv2_get_level(), ASV1Context::gb, get_vlc2(), ASV1Context::intra_matrix, ScanTable::permutated, ASV1Context::scantable, VLC::table, and VLC_BITS.
Referenced by decode_mb().

| static void asv2_encode_block | ( | ASV1Context * | a, | |
| DCTELEM | block[64] | |||
| ) | [inline, static] |
Definition at line 266 of file asv1.c.
References ac_ccp_tab, asv2_put_bits(), asv2_put_level(), dc_ccp_tab, ASV1Context::pb, put_bits(), ASV1Context::q_intra_matrix, and scantab.
Referenced by encode_mb().

| static int asv2_get_bits | ( | GetBitContext * | gb, | |
| int | n | |||
| ) | [inline, static] |
Definition at line 138 of file asv1.c.
References ff_reverse, and get_bits().
Referenced by asv2_decode_block(), and asv2_get_level().

| static int asv2_get_level | ( | GetBitContext * | gb | ) | [inline, static] |
Definition at line 153 of file asv1.c.
References asv2_get_bits(), ASV2_LEVEL_VLC_BITS, get_vlc2(), and VLC::table.
Referenced by asv2_decode_block().

| static void asv2_put_bits | ( | PutBitContext * | pb, | |
| int | n, | |||
| int | v | |||
| ) | [inline, static] |
Definition at line 142 of file asv1.c.
References ff_reverse, and put_bits().
Referenced by asv2_encode_block(), and asv2_put_level().

| static void asv2_put_level | ( | PutBitContext * | pb, | |
| int | level | |||
| ) | [inline, static] |
Definition at line 170 of file asv1.c.
References asv2_level_tab, asv2_put_bits(), and put_bits().
Referenced by asv2_encode_block().

| static void common_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 518 of file asv1.c.
References a, ASV1Context::avctx, AVCodecContext::coded_frame, ASV1Context::dsp, dsputil_init(), AVCodecContext::height, ASV1Context::mb_height, ASV1Context::mb_height2, ASV1Context::mb_width, ASV1Context::mb_width2, ASV1Context::picture, AVCodecContext::priv_data, and AVCodecContext::width.

| static void dct_get | ( | ASV1Context * | a, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) | [inline, static] |
Definition at line 360 of file asv1.c.
References ASV1Context::avctx, ASV1Context::block, CODEC_FLAG_GRAY, ASV1Context::dsp, DSPContext::fdct, AVCodecContext::flags, DSPContext::get_pixels, and ASV1Context::picture.
Referenced by encode_frame().
| static int decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 590 of file asv1.c.
References a, av_freep(), ASV1Context::bitstream_buffer, ASV1Context::bitstream_buffer_size, ASV1Context::picture, 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 384 of file asv1.c.
References a, av_fast_realloc(), av_log(), AV_LOG_ERROR, ASV1Context::bitstream_buffer, ASV1Context::bitstream_buffer_size, ASV1Context::block, DSPContext::bswap_buf, AVCodecContext::codec_id, CODEC_ID_ASV1, decode_mb(), ASV1Context::dsp, emms_c, FF_INPUT_BUFFER_PADDING_SIZE, ff_reverse, ASV1Context::gb, get_bits1(), get_bits_count(), AVCodecContext::get_buffer, I_TYPE, idct_put(), init_get_bits(), ASV1Context::mb_height, ASV1Context::mb_height2, ASV1Context::mb_width, ASV1Context::mb_width2, ASV1Context::picture, picture, AVCodecContext::priv_data, AVCodecContext::release_buffer, and s.

| static int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 532 of file asv1.c.
References a, av_log(), AV_LOG_ERROR, av_malloc(), AVCodecContext::codec_id, CODEC_ID_ASV1, common_init(), ASV1Context::dsp, AVCodecContext::extradata, ff_init_scantable(), ff_mpeg1_default_intra_matrix, DSPContext::idct_permutation, init_vlcs(), ASV1Context::intra_matrix, ASV1Context::inv_qscale, ASV1Context::mb_height, ASV1Context::mb_width, ASV1Context::picture, AVCodecContext::pix_fmt, PIX_FMT_YUV420P, AVCodecContext::priv_data, scantab, and ASV1Context::scantable.

| static int decode_mb | ( | ASV1Context * | a, | |
| DCTELEM | block[6][64] | |||
| ) | [inline, static] |
Definition at line 304 of file asv1.c.
References asv1_decode_block(), asv2_decode_block(), ASV1Context::avctx, DSPContext::clear_blocks, AVCodecContext::codec_id, CODEC_ID_ASV1, and ASV1Context::dsp.
Referenced by decode_frame(), decode_slice(), ff_er_frame_end(), and guess_mv().

| static int encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | buf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 464 of file asv1.c.
References a, align_put_bits(), ASV1Context::block, DSPContext::bswap_buf, AVCodecContext::codec_id, CODEC_ID_ASV1, dct_get(), ASV1Context::dsp, emms_c, encode_mb(), ff_reverse, I_TYPE, init_put_bits(), ASV1Context::mb_height, ASV1Context::mb_height2, ASV1Context::mb_width, ASV1Context::mb_width2, ASV1Context::pb, ASV1Context::picture, AVCodecContext::priv_data, put_bits(), and put_bits_count().
Referenced by MPA_encode_frame().

| static int encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 566 of file asv1.c.
References a, av_mallocz(), AVCodecContext::codec_id, CODEC_ID_ASV1, common_init(), AVCodecContext::extradata, AVCodecContext::extradata_size, ff_mpeg1_default_intra_matrix, FF_QUALITY_SCALE, AVCodecContext::global_quality, ASV1Context::inv_qscale, le2me_32, AVCodecContext::priv_data, and ASV1Context::q_intra_matrix.
Referenced by hdr_to_frps().

| static int encode_mb | ( | ASV1Context * | a, | |
| DCTELEM | block[6][64] | |||
| ) | [inline, static] |
Definition at line 323 of file asv1.c.
References asv1_encode_block(), asv2_encode_block(), av_log(), AV_LOG_ERROR, ASV1Context::avctx, PutBitContext::buf, PutBitContext::buf_end, AVCodecContext::codec_id, CODEC_ID_ASV1, ASV1Context::pb, and put_bits_count().
Referenced by encode_frame().

| static void idct_put | ( | ASV1Context * | a, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) | [inline, static] |
Definition at line 341 of file asv1.c.
References ASV1Context::avctx, ASV1Context::block, CODEC_FLAG_GRAY, ASV1Context::dsp, AVCodecContext::flags, DSPContext::idct_put, and ASV1Context::picture.
| static void init_vlcs | ( | ASV1Context * | a | ) | [static] |
Definition at line 113 of file asv1.c.
References ac_ccp_tab, asv2_level_tab, ASV2_LEVEL_VLC_BITS, ccp_tab, dc_ccp_tab, init_vlc(), level_tab, and VLC_BITS.

const uint8_t ac_ccp_tab[16][2] [static] |
Initial value:
{
{0x00,2}, {0x3B,6}, {0x0A,4}, {0x3A,6},
{0x02,3}, {0x39,6}, {0x3C,6}, {0x38,6},
{0x03,3}, {0x3D,6}, {0x08,4}, {0x1F,5},
{0x09,4}, {0x0B,4}, {0x0D,4}, {0x0C,4},
}
Definition at line 83 of file asv1.c.
Referenced by asv2_encode_block(), and init_vlcs().
VLC ac_ccp_vlc [static] |
Initial value:
{
"asv1",
CODEC_TYPE_VIDEO,
CODEC_ID_ASV1,
sizeof(ASV1Context),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1,
}
Definition at line 600 of file asv1.c.
Referenced by avcodec_register_all().
Initial value:
{
"asv2",
CODEC_TYPE_VIDEO,
CODEC_ID_ASV2,
sizeof(ASV1Context),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1,
}
Definition at line 612 of file asv1.c.
Referenced by avcodec_register_all().
const uint8_t asv2_level_tab[63][2] [static] |
Initial value:
{
{0x3F,10},{0x2F,10},{0x37,10},{0x27,10},{0x3B,10},{0x2B,10},{0x33,10},{0x23,10},
{0x3D,10},{0x2D,10},{0x35,10},{0x25,10},{0x39,10},{0x29,10},{0x31,10},{0x21,10},
{0x1F, 8},{0x17, 8},{0x1B, 8},{0x13, 8},{0x1D, 8},{0x15, 8},{0x19, 8},{0x11, 8},
{0x0F, 6},{0x0B, 6},{0x0D, 6},{0x09, 6},
{0x07, 4},{0x05, 4},
{0x03, 2},
{0x00, 5},
{0x02, 2},
{0x04, 4},{0x06, 4},
{0x08, 6},{0x0C, 6},{0x0A, 6},{0x0E, 6},
{0x10, 8},{0x18, 8},{0x14, 8},{0x1C, 8},{0x12, 8},{0x1A, 8},{0x16, 8},{0x1E, 8},
{0x20,10},{0x30,10},{0x28,10},{0x38,10},{0x24,10},{0x34,10},{0x2C,10},{0x3C,10},
{0x22,10},{0x32,10},{0x2A,10},{0x3A,10},{0x26,10},{0x36,10},{0x2E,10},{0x3E,10},
}
Definition at line 90 of file asv1.c.
Referenced by asv2_put_level(), and init_vlcs().
VLC asv2_level_vlc [static] |
const uint8_t ccp_tab[17][2] [static] |
Initial value:
{
{0x2,2}, {0x7,5}, {0xB,5}, {0x3,5},
{0xD,5}, {0x5,5}, {0x9,5}, {0x1,5},
{0xE,5}, {0x6,5}, {0xA,5}, {0x2,5},
{0xC,5}, {0x4,5}, {0x8,5}, {0x3,2},
{0xF,5},
}
Definition at line 66 of file asv1.c.
Referenced by asv1_encode_block(), and init_vlcs().
const uint8_t dc_ccp_tab[8][2] [static] |
Initial value:
{
{0x1,2}, {0xD,4}, {0xF,4}, {0xC,4},
{0x5,3}, {0xE,4}, {0x4,3}, {0x0,2},
}
Definition at line 78 of file asv1.c.
Referenced by asv2_encode_block(), and init_vlcs().
VLC dc_ccp_vlc [static] |
const uint8_t level_tab[7][2] [static] |
Initial value:
{
{3,4}, {3,3}, {3,2}, {0,3}, {2,2}, {2,3}, {2,4}
}
Definition at line 74 of file asv1.c.
Referenced by asv1_put_level(), and init_vlcs().
const uint8_t scantab[64] [static] |
Initial value:
{
0x00,0x08,0x01,0x09,0x10,0x18,0x11,0x19,
0x02,0x0A,0x03,0x0B,0x12,0x1A,0x13,0x1B,
0x04,0x0C,0x05,0x0D,0x20,0x28,0x21,0x29,
0x06,0x0E,0x07,0x0F,0x14,0x1C,0x15,0x1D,
0x22,0x2A,0x23,0x2B,0x30,0x38,0x31,0x39,
0x16,0x1E,0x17,0x1F,0x24,0x2C,0x25,0x2D,
0x32,0x3A,0x33,0x3B,0x26,0x2E,0x27,0x2F,
0x34,0x3C,0x35,0x3D,0x36,0x3E,0x37,0x3F,
}
Definition at line 54 of file asv1.c.
Referenced by asv1_encode_block(), asv2_encode_block(), and decode_init().
1.5.5