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

Go to the source code of this file.
Data Structures | |
| struct | DVVideoContext |
| struct | dv_vlc_pair |
| struct | BlockInfo |
| struct | EncBlockInfo |
Defines | |
| #define | TEX_VLC_BITS 9 |
| #define | DV_VLC_MAP_RUN_SIZE 64 |
| #define | DV_VLC_MAP_LEV_SIZE 512 |
| #define | SC(x, y) ((s[x] - s[y]) ^ ((s[x] - s[y]) >> 7)) |
Functions | |
| static void | dv_build_unquantize_tables (DVVideoContext *s, uint8_t *perm) |
| static int | dvvideo_init (AVCodecContext *avctx) |
| static int | get_bits_left (GetBitContext *s) |
| static int | get_bits_size (GetBitContext *s) |
| static int | put_bits_left (PutBitContext *s) |
| static void | dv_decode_ac (GetBitContext *gb, BlockInfo *mb, DCTELEM *block) |
| static void | bit_copy (PutBitContext *pb, GetBitContext *gb) |
| static void | dv_decode_video_segment (DVVideoContext *s, uint8_t *buf_ptr1, const uint16_t *mb_pos_ptr) |
| static always_inline int | dv_rl2vlc (int run, int l, uint32_t *vlc) |
| static always_inline int | dv_rl2vlc_size (int run, int l) |
| static always_inline void | dv_encode_ac (EncBlockInfo *bi, PutBitContext *pb_pool, int pb_size) |
| static always_inline void | dv_set_class_number (DCTELEM *blk, EncBlockInfo *bi, const uint8_t *zigzag_scan, int bias) |
| static always_inline int | dv_guess_dct_mode (DCTELEM *blk) |
| static void | dv_guess_qnos (EncBlockInfo *blks, int *qnos) |
| static void | dv_encode_video_segment (DVVideoContext *s, uint8_t *dif, const uint16_t *mb_pos_ptr) |
| static int | dv_decode_mt (AVCodecContext *avctx, void *sl) |
| static int | dv_encode_mt (AVCodecContext *avctx, void *sl) |
| static int | dvvideo_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | dvvideo_encode_frame (AVCodecContext *c, uint8_t *buf, int buf_size, void *data) |
Variables | |
| static uint8_t ** | dv_anchor |
| static RL_VLC_ELEM * | dv_rl_vlc |
| static struct dv_vlc_pair | DV_VLC_MAP_LEV_SIZE |
| static const uint16_t | block_sizes [6] |
| static const int | vs_total_ac_bits = (100 * 4 + 68*2) * 5 |
| static const int | mb_area_start [5] = { 1, 6, 21, 43, 64 } |
| AVCodec | dvvideo_decoder |
Definition in file dv.c.
| #define DV_VLC_MAP_LEV_SIZE 512 |
| #define DV_VLC_MAP_RUN_SIZE 64 |
| #define TEX_VLC_BITS 9 |
Definition at line 50 of file dv.c.
Referenced by dv_decode_ac(), dvvideo_init(), h263_decode_block(), init_2d_vlc_rl(), mdec_decode_block_intra(), 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(), mpeg4_decode_block(), and msmpeg4_decode_block().
| static void bit_copy | ( | PutBitContext * | pb, | |
| GetBitContext * | gb | |||
| ) | [inline, static] |
Definition at line 348 of file dv.c.
References get_bits(), get_bits_left(), and put_bits().
Referenced by dv_decode_video_segment().

| static void dv_build_unquantize_tables | ( | DVVideoContext * | s, | |
| uint8_t * | perm | |||
| ) | [static] |
Definition at line 71 of file dv.c.
References dv_248_areas, dv_88_areas, DVVideoContext::dv_idct_shift, and dv_quant_shifts.
Referenced by dvvideo_init().
| static void dv_decode_ac | ( | GetBitContext * | gb, | |
| BlockInfo * | mb, | |||
| DCTELEM * | block | |||
| ) | [static] |
Definition at line 285 of file dv.c.
References CLOSE_READER, get_bits_size(), RL_VLC_ELEM::len, RL_VLC_ELEM::level, level, NEG_USR32, OPEN_READER, BlockInfo::partial_bit_buffer, BlockInfo::partial_bit_count, BlockInfo::pos, RL_VLC_ELEM::run, run, BlockInfo::scan_table, BlockInfo::shift_table, SHOW_UBITS, TEX_VLC_BITS, and UPDATE_CACHE.
Referenced by dv_decode_video_segment().

| static int dv_decode_mt | ( | AVCodecContext * | avctx, | |
| void * | sl | |||
| ) | [static] |
Definition at line 866 of file dv.c.
References DVVideoContext::buf, dv_decode_video_segment(), AVCodecContext::priv_data, s, DVVideoContext::sys, and DVprofile::video_place.
Referenced by dvvideo_decode_frame().

| static void dv_decode_video_segment | ( | DVVideoContext * | s, | |
| uint8_t * | buf_ptr1, | |||
| const uint16_t * | mb_pos_ptr | |||
| ) | [inline, static] |
Definition at line 361 of file dv.c.
References __align8, av_log(), AV_LOG_ERROR, bit_copy(), block_sizes, BlockInfo::dct_mode, dv_decode_ac(), DVVideoContext::dv_idct_shift, dv_quant_offset, DVVideoContext::dv_zigzag, flush_put_bits(), get_bits(), get_bits1(), get_bits_left(), get_sbits(), DVVideoContext::idct_put, idct_put(), init_get_bits(), init_put_bits(), line_size, NULL, BlockInfo::partial_bit_count, DVVideoContext::picture, DVprofile::pix_fmt, PIX_FMT_YUV411P, pixels, BlockInfo::pos, put_bits_count(), quant(), BlockInfo::scan_table, BlockInfo::shift_table, and DVVideoContext::sys.
Referenced by dv_decode_mt().

| static always_inline void dv_encode_ac | ( | EncBlockInfo * | bi, | |
| PutBitContext * | pb_pool, | |||
| int | pb_size | |||
| ) | [static] |
Definition at line 601 of file dv.c.
References EncBlockInfo::cur_ac, dv_rl2vlc(), EncBlockInfo::mb, EncBlockInfo::partial_bit_buffer, EncBlockInfo::partial_bit_count, put_bits(), and put_bits_left().
Referenced by dv_encode_video_segment().

| static int dv_encode_mt | ( | AVCodecContext * | avctx, | |
| void * | sl | |||
| ) | [static] |
Definition at line 875 of file dv.c.
References DVVideoContext::buf, dv_encode_video_segment(), AVCodecContext::priv_data, s, DVVideoContext::sys, and DVprofile::video_place.
Referenced by dvvideo_encode_frame().

| static void dv_encode_video_segment | ( | DVVideoContext * | s, | |
| uint8_t * | dif, | |||
| const uint16_t * | mb_pos_ptr | |||
| ) | [inline, static] |
Definition at line 749 of file dv.c.
References __align8, EncBlockInfo::area_q, b, EncBlockInfo::bit_size, block_sizes, EncBlockInfo::cno, EncBlockInfo::cur_ac, EncBlockInfo::dct_mode, dv_encode_ac(), dv_guess_dct_mode(), dv_guess_qnos(), dv_set_class_number(), DVVideoContext::fdct, ff_zigzag248_direct, ff_zigzag_direct, flush_put_bits(), DVVideoContext::get_pixels, init_put_bits(), EncBlockInfo::mb, EncBlockInfo::partial_bit_buffer, EncBlockInfo::partial_bit_count, DVVideoContext::picture, DVprofile::pix_fmt, PIX_FMT_YUV411P, put_bits(), DVVideoContext::sys, and vs_total_ac_bits.
Referenced by dv_encode_mt().

| static always_inline int dv_guess_dct_mode | ( | DCTELEM * | blk | ) | [static] |
| static void dv_guess_qnos | ( | EncBlockInfo * | blks, | |
| int * | qnos | |||
| ) | [inline, static] |
Definition at line 707 of file dv.c.
References a, EncBlockInfo::area_q, b, EncBlockInfo::bit_size, EncBlockInfo::cno, dv_quant_offset, dv_quant_shifts, dv_rl2vlc_size(), EncBlockInfo::mb, mb_area_start, EncBlockInfo::prev_run, and vs_total_ac_bits.
Referenced by dv_encode_video_segment().

| static always_inline int dv_rl2vlc | ( | int | run, | |
| int | l, | |||
| uint32_t * | vlc | |||
| ) | [static] |
| static always_inline int dv_rl2vlc_size | ( | int | run, | |
| int | l | |||
| ) | [static] |
| static always_inline void dv_set_class_number | ( | DCTELEM * | blk, | |
| EncBlockInfo * | bi, | |||
| const uint8_t * | zigzag_scan, | |||
| int | bias | |||
| ) | [static] |
Definition at line 647 of file dv.c.
References EncBlockInfo::bit_size, EncBlockInfo::cno, dv_rl2vlc_size(), EncBlockInfo::mb, mb_area_start, and EncBlockInfo::prev_run.
Referenced by dv_encode_video_segment().

| static int dvvideo_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 886 of file dv.c.
References av_log(), AV_LOG_ERROR, DVVideoContext::buf, DVprofile::difseg_size, dv_anchor, dv_decode_mt(), dv_frame_profile(), emms_c, AVCodecContext::execute, DVprofile::frame_size, AVCodecContext::get_buffer, DVprofile::height, AVCodecContext::height, NULL, DVVideoContext::picture, DVprofile::pix_fmt, AVCodecContext::pix_fmt, AVCodecContext::priv_data, AVCodecContext::release_buffer, s, DVVideoContext::sys, DVprofile::width, and AVCodecContext::width.

| static int dvvideo_encode_frame | ( | AVCodecContext * | c, | |
| uint8_t * | buf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 923 of file dv.c.
References DVVideoContext::buf, DVprofile::difseg_size, dv_anchor, dv_codec_profile(), dv_encode_mt(), emms_c, AVCodecContext::execute, DVprofile::frame_size, NULL, DVVideoContext::picture, DVprofile::pix_fmt, AVCodecContext::pix_fmt, AVCodecContext::priv_data, s, and DVVideoContext::sys.

| static int dvvideo_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 96 of file dv.c.
References av_free(), av_malloc(), av_mallocz(), AVCodecContext::coded_frame, dsputil_init(), dv_anchor, dv_build_unquantize_tables(), dv_codec_profile(), dv_vlc_bits, dv_vlc_len, dv_vlc_level, DV_VLC_MAP_LEV_SIZE, DV_VLC_MAP_RUN_SIZE, dv_vlc_run, DVVideoContext::dv_zigzag, ENOMEM, DSPContext::fdct, DVVideoContext::fdct, DSPContext::fdct248, ff_zigzag248_direct, ff_zigzag_direct, free_vlc(), DSPContext::get_pixels, DVVideoContext::get_pixels, DSPContext::idct_permutation, DSPContext::idct_put, DVVideoContext::idct_put, init_vlc(), RL_VLC_ELEM::len, RL_VLC_ELEM::level, level, memcpy, NB_DV_VLC, DVVideoContext::picture, DVprofile::pix_fmt, AVCodecContext::pix_fmt, AVCodecContext::priv_data, RL_VLC_ELEM::run, run, s, simple_idct248_put(), VLC::table, VLC::table_size, and TEX_VLC_BITS.

| static int get_bits_left | ( | GetBitContext * | s | ) | [inline, static] |
Definition at line 269 of file dv.c.
References get_bits_count(), and GetBitContext::size_in_bits.
Referenced by bit_copy(), and dv_decode_video_segment().

| static int get_bits_size | ( | GetBitContext * | s | ) | [inline, static] |
Definition at line 274 of file dv.c.
References GetBitContext::size_in_bits.
Referenced by dv_decode_ac().
| static int put_bits_left | ( | PutBitContext * | s | ) | [inline, static] |
Definition at line 279 of file dv.c.
References PutBitContext::buf, PutBitContext::buf_end, and put_bits_count().
Referenced by dv_encode_ac().

const uint16_t block_sizes[6] [static] |
Initial value:
{
112, 112, 112, 112, 80, 80
}
Definition at line 256 of file dv.c.
Referenced by dv_decode_video_segment(), and dv_encode_video_segment().
uint8_t** dv_anchor [static] |
Definition at line 61 of file dv.c.
Referenced by dvvideo_decode_frame(), dvvideo_encode_frame(), and dvvideo_init().
RL_VLC_ELEM* dv_rl_vlc [static] |
struct dv_vlc_pair DV_VLC_MAP_LEV_SIZE [static] |
Initial value:
{
"dvvideo",
CODEC_TYPE_VIDEO,
CODEC_ID_DVVIDEO,
sizeof(DVVideoContext),
dvvideo_init,
NULL,
NULL,
dvvideo_decode_frame,
CODEC_CAP_DR1,
NULL
}
Definition at line 960 of file dv.c.
Referenced by avcodec_register_all().
const int mb_area_start[5] = { 1, 6, 21, 43, 64 } [static] |
const int vs_total_ac_bits = (100 * 4 + 68*2) * 5 [static] |
1.5.5