FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
dv.c File Reference

DV codec. More...

#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "put_bits.h"
#include "simple_idct.h"
#include "dvdata.h"
#include "dv_tablegen.h"

Go to the source code of this file.

Data Structures

struct  EncBlockInfo
 

Functions

static void dv_calc_mb_coordinates (const DVprofile *d, int chan, int seq, int slot, uint16_t *tbl)
 
int ff_dv_init_dynamic_tables (const DVprofile *d)
 
av_cold int ff_dvvideo_init (AVCodecContext *avctx)
 
static av_cold int dvvideo_init_encoder (AVCodecContext *avctx)
 
static av_always_inline int dv_rl2vlc (int run, int l, int sign, uint32_t *vlc)
 
static av_always_inline int dv_rl2vlc_size (int run, int l)
 
static av_always_inline
PutBitContext
dv_encode_ac (EncBlockInfo *bi, PutBitContext *pb_pool, PutBitContext *pb_end)
 
static av_always_inline int dv_guess_dct_mode (DVVideoContext *s, uint8_t *data, int linesize)
 
static av_always_inline int dv_init_enc_block (EncBlockInfo *bi, uint8_t *data, int linesize, DVVideoContext *s, int bias)
 
static void dv_guess_qnos (EncBlockInfo *blks, int *qnos)
 
static int dv_encode_video_segment (AVCodecContext *avctx, void *arg)
 
static int dv_write_pack (enum dv_pack_type pack_id, DVVideoContext *c, uint8_t *buf)
 

Variables

RL_VLC_ELEM ff_dv_rl_vlc [1184]
 
static const uint8_t dv100_qstep [16]
 
static const uint8_t dv_quant_areas [4] = { 6, 21, 43, 64 }
 
static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5
 
static const int mb_area_start [5] = { 1, 6, 21, 43, 64 }
 
static const int dv_weight_bits = 18
 
static const int dv_weight_88 [64]
 
static const int dv_weight_248 [64]
 

Detailed Description

DV codec.

Definition in file dv.c.

Function Documentation

static void dv_calc_mb_coordinates ( const DVprofile d,
int  chan,
int  seq,
int  slot,
uint16_t *  tbl 
)
inlinestatic

Definition at line 54 of file dv.c.

Referenced by ff_dv_init_dynamic_tables().

int ff_dv_init_dynamic_tables ( const DVprofile d)

Definition at line 178 of file dv.c.

Referenced by dvvideo_decode_frame().

av_cold int ff_dvvideo_init ( AVCodecContext avctx)

Definition at line 239 of file dv.c.

Referenced by dvvideo_init_encoder().

static av_cold int dvvideo_init_encoder ( AVCodecContext avctx)
static

Definition at line 331 of file dv.c.

static av_always_inline int dv_rl2vlc ( int  run,
int  l,
int  sign,
uint32_t *  vlc 
)
static

Definition at line 397 of file dv.c.

Referenced by dv_encode_ac().

static av_always_inline int dv_rl2vlc_size ( int  run,
int  l 
)
static

Definition at line 403 of file dv.c.

Referenced by dv_guess_qnos(), and dv_init_enc_block().

static av_always_inline PutBitContext* dv_encode_ac ( EncBlockInfo bi,
PutBitContext pb_pool,
PutBitContext pb_end 
)
static

Definition at line 423 of file dv.c.

Referenced by dv_encode_video_segment().

static av_always_inline int dv_guess_dct_mode ( DVVideoContext s,
uint8_t data,
int  linesize 
)
static

Definition at line 466 of file dv.c.

Referenced by dv_init_enc_block().

static av_always_inline int dv_init_enc_block ( EncBlockInfo bi,
uint8_t data,
int  linesize,
DVVideoContext s,
int  bias 
)
static

Definition at line 501 of file dv.c.

Referenced by dv_encode_video_segment().

static void dv_guess_qnos ( EncBlockInfo blks,
int *  qnos 
)
inlinestatic

Definition at line 595 of file dv.c.

Referenced by dv_encode_video_segment().

static int dv_encode_video_segment ( AVCodecContext avctx,
void arg 
)
static

Definition at line 664 of file dv.c.

static int dv_write_pack ( enum dv_pack_type  pack_id,
DVVideoContext c,
uint8_t buf 
)
inlinestatic

Definition at line 795 of file dv.c.

Variable Documentation

RL_VLC_ELEM ff_dv_rl_vlc[1184]

Definition at line 52 of file dv.c.

Referenced by dv_decode_ac().

const uint8_t dv100_qstep[16]
static
Initial value:
= {
1,
1,
2, 3, 4, 5, 6, 7, 8, 16, 18, 20, 22, 24, 28, 52
}

Definition at line 170 of file dv.c.

Referenced by ff_dv_init_dynamic_tables().

const uint8_t dv_quant_areas[4] = { 6, 21, 43, 64 }
static

Definition at line 176 of file dv.c.

Referenced by ff_dv_init_dynamic_tables().

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

Definition at line 351 of file dv.c.

Referenced by dv_encode_video_segment(), and dv_guess_qnos().

const int mb_area_start[5] = { 1, 6, 21, 43, 64 }
static

Definition at line 352 of file dv.c.

Referenced by dv_guess_qnos(), and dv_init_enc_block().

const int dv_weight_bits = 18
static

Definition at line 479 of file dv.c.

const int dv_weight_88[64]
static
Initial value:
= {
131072, 257107, 257107, 242189, 252167, 242189, 235923, 237536,
237536, 235923, 229376, 231390, 223754, 231390, 229376, 222935,
224969, 217965, 217965, 224969, 222935, 200636, 218652, 211916,
212325, 211916, 218652, 200636, 188995, 196781, 205965, 206433,
206433, 205965, 196781, 188995, 185364, 185364, 200636, 200704,
200636, 185364, 185364, 174609, 180568, 195068, 195068, 180568,
174609, 170091, 175557, 189591, 175557, 170091, 165371, 170627,
170627, 165371, 160727, 153560, 160727, 144651, 144651, 136258,
}

Definition at line 480 of file dv.c.

Referenced by dv_init_enc_block().

const int dv_weight_248[64]
static
Initial value:
= {
131072, 242189, 257107, 237536, 229376, 200636, 242189, 223754,
224969, 196781, 262144, 242189, 229376, 200636, 257107, 237536,
211916, 185364, 235923, 217965, 229376, 211916, 206433, 180568,
242189, 223754, 224969, 196781, 211916, 185364, 235923, 217965,
200704, 175557, 222935, 205965, 200636, 185364, 195068, 170627,
229376, 211916, 206433, 180568, 200704, 175557, 222935, 205965,
175557, 153560, 188995, 174609, 165371, 144651, 200636, 185364,
195068, 170627, 175557, 153560, 188995, 174609, 165371, 144651,
}

Definition at line 490 of file dv.c.