Mercurial > libavcodec.hg
comparison dnxhdenc.c @ 8294:f92b595af7eb libavcodec
move structure definitions in their own header
author | bcoudurier |
---|---|
date | Thu, 11 Dec 2008 01:32:24 +0000 |
parents | 523c99682e03 |
children | d574d49316db |
comparison
equal
deleted
inserted
replaced
8293:523c99682e03 | 8294:f92b595af7eb |
---|---|
25 #define RC_VARIANCE 1 // use variance or ssd for fast rc | 25 #define RC_VARIANCE 1 // use variance or ssd for fast rc |
26 | 26 |
27 #include "avcodec.h" | 27 #include "avcodec.h" |
28 #include "dsputil.h" | 28 #include "dsputil.h" |
29 #include "mpegvideo.h" | 29 #include "mpegvideo.h" |
30 #include "dnxhddata.h" | 30 #include "dnxhdenc.h" |
31 | |
32 typedef struct { | |
33 uint16_t mb; | |
34 int value; | |
35 } RCCMPEntry; | |
36 | |
37 typedef struct { | |
38 int ssd; | |
39 int bits; | |
40 } RCEntry; | |
41 | 31 |
42 int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); | 32 int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); |
43 | |
44 typedef struct DNXHDEncContext { | |
45 MpegEncContext m; ///< Used for quantization dsp functions | |
46 | |
47 AVFrame frame; | |
48 int cid; | |
49 const CIDEntry *cid_table; | |
50 uint8_t *msip; ///< Macroblock Scan Indexes Payload | |
51 uint32_t *slice_size; | |
52 | |
53 struct DNXHDEncContext *thread[MAX_THREADS]; | |
54 | |
55 unsigned dct_y_offset; | |
56 unsigned dct_uv_offset; | |
57 int interlaced; | |
58 int cur_field; | |
59 | |
60 DECLARE_ALIGNED_16(DCTELEM, blocks[8][64]); | |
61 | |
62 int (*qmatrix_c) [64]; | |
63 int (*qmatrix_l) [64]; | |
64 uint16_t (*qmatrix_l16)[2][64]; | |
65 uint16_t (*qmatrix_c16)[2][64]; | |
66 | |
67 unsigned frame_bits; | |
68 uint8_t *src[3]; | |
69 | |
70 uint32_t *vlc_codes; | |
71 uint8_t *vlc_bits; | |
72 uint16_t *run_codes; | |
73 uint8_t *run_bits; | |
74 | |
75 /** Rate control */ | |
76 unsigned slice_bits; | |
77 unsigned qscale; | |
78 unsigned lambda; | |
79 | |
80 unsigned thread_size; | |
81 | |
82 uint16_t *mb_bits; | |
83 uint8_t *mb_qscale; | |
84 | |
85 RCCMPEntry *mb_cmp; | |
86 RCEntry (*mb_rc)[8160]; | |
87 } DNXHDEncContext; | |
88 | 33 |
89 #define LAMBDA_FRAC_BITS 10 | 34 #define LAMBDA_FRAC_BITS 10 |
90 | 35 |
91 static int dnxhd_init_vlc(DNXHDEncContext *ctx) | 36 static int dnxhd_init_vlc(DNXHDEncContext *ctx) |
92 { | 37 { |