libavcodec/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"
Include dependency graph for libavcodec/dv.c:

Go to the source code of this file.

Data Structures

struct  EncBlockInfo
 

Typedefs

typedef struct EncBlockInfo 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 int put_bits_left (PutBitContext *s)
 
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 PutBitContextdv_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 libavcodec/dv.c.

Typedef Documentation

typedef struct EncBlockInfo EncBlockInfo

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 libavcodec/dv.c.

Referenced by ff_dv_init_dynamic_tables().

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

Definition at line 428 of file libavcodec/dv.c.

Referenced by dv_encode_video_segment().

static int dv_encode_video_segment ( AVCodecContext avctx,
void arg 
)
static

Definition at line 669 of file libavcodec/dv.c.

Referenced by dv_write_pack().

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

Definition at line 471 of file libavcodec/dv.c.

Referenced by dv_init_enc_block().

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

Definition at line 600 of file libavcodec/dv.c.

Referenced by dv_encode_video_segment().

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

Definition at line 506 of file libavcodec/dv.c.

Referenced by dv_encode_video_segment().

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

Definition at line 402 of file libavcodec/dv.c.

Referenced by dv_encode_ac(), and put_bits_left().

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

Definition at line 408 of file libavcodec/dv.c.

Referenced by dv_guess_qnos(), dv_init_enc_block(), and put_bits_left().

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

Definition at line 800 of file libavcodec/dv.c.

static av_cold int dvvideo_init_encoder ( AVCodecContext avctx)
static

Definition at line 331 of file libavcodec/dv.c.

Referenced by dv_write_pack().

int ff_dv_init_dynamic_tables ( const DVprofile d)

Definition at line 178 of file libavcodec/dv.c.

Referenced by dv_write_pack(), and dvvideo_decode_frame().

av_cold int ff_dvvideo_init ( AVCodecContext avctx)

Definition at line 239 of file libavcodec/dv.c.

Referenced by dvvideo_init_encoder().

static int put_bits_left ( PutBitContext s)
inlinestatic

Definition at line 354 of file libavcodec/dv.c.

Referenced by dv_encode_ac().

Variable Documentation

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 libavcodec/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 libavcodec/dv.c.

Referenced by ff_dv_init_dynamic_tables().

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 495 of file libavcodec/dv.c.

Referenced by dv_init_enc_block().

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 485 of file libavcodec/dv.c.

Referenced by dv_init_enc_block().

const int dv_weight_bits = 18
static

Definition at line 484 of file libavcodec/dv.c.

Referenced by dv_init_enc_block().

RL_VLC_ELEM ff_dv_rl_vlc[1184]

Definition at line 52 of file libavcodec/dv.c.

Referenced by dv_decode_ac().

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

Definition at line 352 of file libavcodec/dv.c.

Referenced by dv_guess_qnos(), and dv_init_enc_block().

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

Definition at line 351 of file libavcodec/dv.c.

Referenced by dv_encode_video_segment(), and dv_guess_qnos().