annotate dnxhdenc.h @ 11320:01d5e38a0d35 libavcodec

Make function get_channel_name() static: It is only used in audioconvert.c.
author cehoyos
date Sun, 28 Feb 2010 18:50:56 +0000
parents 34a65026fa06
children 98970e51365a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8294
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
1 /*
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
2 * VC3/DNxHD encoder structure definitions and prototypes
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
3 * Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
4 *
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
5 * VC-3 encoder funded by the British Broadcasting Corporation
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
6 *
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
7 * This file is part of FFmpeg.
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
8 *
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
13 *
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
17 * Lesser General Public License for more details.
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
18 *
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
22 */
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
23
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
24 #ifndef AVCODEC_DNXHDENC_H
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
25 #define AVCODEC_DNXHDENC_H
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
26
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
27 #include <stdint.h>
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
28 #include "libavcodec/mpegvideo.h"
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
29 #include "libavcodec/dnxhddata.h"
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
30
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
31 typedef struct {
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
32 uint16_t mb;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
33 int value;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
34 } RCCMPEntry;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
35
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
36 typedef struct {
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
37 int ssd;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
38 int bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
39 } RCEntry;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
40
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
41 typedef struct DNXHDEncContext {
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
42 MpegEncContext m; ///< Used for quantization dsp functions
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
43
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
44 AVFrame frame;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
45 int cid;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
46 const CIDEntry *cid_table;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
47 uint8_t *msip; ///< Macroblock Scan Indexes Payload
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
48 uint32_t *slice_size;
10387
19a4f1ecd8fe Move dnxhdenc to execute2 multithreading API.
reimar
parents: 8303
diff changeset
49 uint32_t *slice_offs;
8294
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
50
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
51 struct DNXHDEncContext *thread[MAX_THREADS];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
52
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
53 unsigned dct_y_offset;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
54 unsigned dct_uv_offset;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
55 int interlaced;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
56 int cur_field;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
57
10961
34a65026fa06 Move array specifiers outside DECLARE_ALIGNED() invocations
mru
parents: 10387
diff changeset
58 DECLARE_ALIGNED_16(DCTELEM, blocks)[8][64];
8294
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
59
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
60 int (*qmatrix_c) [64];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
61 int (*qmatrix_l) [64];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
62 uint16_t (*qmatrix_l16)[2][64];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
63 uint16_t (*qmatrix_c16)[2][64];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
64
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
65 unsigned frame_bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
66 uint8_t *src[3];
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
67
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
68 uint32_t *vlc_codes;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
69 uint8_t *vlc_bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
70 uint16_t *run_codes;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
71 uint8_t *run_bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
72
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
73 /** Rate control */
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
74 unsigned slice_bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
75 unsigned qscale;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
76 unsigned lambda;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
77
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
78 unsigned thread_size;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
79
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
80 uint16_t *mb_bits;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
81 uint8_t *mb_qscale;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
82
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
83 RCCMPEntry *mb_cmp;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
84 RCEntry (*mb_rc)[8160];
8303
bf6a78c6697b dnxhd get_pixels_8x4_sym sse2
bcoudurier
parents: 8294
diff changeset
85
bf6a78c6697b dnxhd get_pixels_8x4_sym sse2
bcoudurier
parents: 8294
diff changeset
86 void (*get_pixels_8x4_sym)(DCTELEM */*align 16*/, const uint8_t *, int);
8294
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
87 } DNXHDEncContext;
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
88
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
89 void ff_dnxhd_init_mmx(DNXHDEncContext *ctx);
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
90
f92b595af7eb move structure definitions in their own header
bcoudurier
parents:
diff changeset
91 #endif /* AVCODEC_DNXHDENC_H */