hvirtual/quicktime/ffmpeg/libavcodec/dv.c File Reference

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

Include dependency graph for dv.c:

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_ELEMdv_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


Detailed Description

DV codec.

Definition in file dv.c.


Define Documentation

#define DV_VLC_MAP_LEV_SIZE   512

Definition at line 57 of file dv.c.

Referenced by dvvideo_init().

#define DV_VLC_MAP_RUN_SIZE   64

Definition at line 56 of file dv.c.

Referenced by dvvideo_init().

#define SC ( x,
 )     ((s[x] - s[y]) ^ ((s[x] - s[y]) >> 7))

Definition at line 682 of file dv.c.

Referenced by dv_guess_dct_mode().

#define TEX_VLC_BITS   9


Function Documentation

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().

Here is the call graph for this function:

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]

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().

Here is the call graph for this function:

static void dv_decode_video_segment ( DVVideoContext s,
uint8_t *  buf_ptr1,
const uint16_t *  mb_pos_ptr 
) [inline, static]

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

static void dv_encode_video_segment ( DVVideoContext s,
uint8_t *  dif,
const uint16_t *  mb_pos_ptr 
) [inline, static]

static always_inline int dv_guess_dct_mode ( DCTELEM blk  )  [static]

Definition at line 683 of file dv.c.

References s, and SC.

Referenced by dv_encode_video_segment().

static void dv_guess_qnos ( EncBlockInfo blks,
int *  qnos 
) [inline, static]

static always_inline int dv_rl2vlc ( int  run,
int  l,
uint32_t *  vlc 
) [static]

Definition at line 577 of file dv.c.

Referenced by dv_encode_ac().

static always_inline int dv_rl2vlc_size ( int  run,
int  l 
) [static]

Definition at line 583 of file dv.c.

Referenced by dv_guess_qnos(), and dv_set_class_number().

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().

Here is the call graph for this function:

static int dvvideo_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

static int dvvideo_encode_frame ( AVCodecContext c,
uint8_t *  buf,
int  buf_size,
void *  data 
) [static]

static int dvvideo_init ( AVCodecContext avctx  )  [static]

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Variable Documentation

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().

Definition at line 64 of file dv.c.

Initial value:

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]

Definition at line 262 of file dv.c.

Referenced by dv_guess_qnos(), and dv_set_class_number().

const int vs_total_ac_bits = (100 * 4 + 68*2) * 5 [static]

Definition at line 260 of file dv.c.

Referenced by dv_encode_video_segment(), and dv_guess_qnos().


Generated on Mon Apr 28 14:03:49 2008 for Cinelerra by  doxygen 1.5.5