ac3enc: log a warning message if the channel layout is not specified at
[FFMpeg-mirror/lagarith.git] / libavcodec / dnxhdenc.h
blob6f9f647ef02675b0242c72541a72375e26426e74
1 /*
2 * VC3/DNxHD encoder structure definitions and prototypes
3 * Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
5 * VC-3 encoder funded by the British Broadcasting Corporation
7 * This file is part of FFmpeg.
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef AVCODEC_DNXHDENC_H
25 #define AVCODEC_DNXHDENC_H
27 #include <stdint.h>
28 #include "libavcodec/mpegvideo.h"
29 #include "libavcodec/dnxhddata.h"
31 typedef struct {
32 uint16_t mb;
33 int value;
34 } RCCMPEntry;
36 typedef struct {
37 int ssd;
38 int bits;
39 } RCEntry;
41 typedef struct DNXHDEncContext {
42 MpegEncContext m; ///< Used for quantization dsp functions
44 AVFrame frame;
45 int cid;
46 const CIDEntry *cid_table;
47 uint8_t *msip; ///< Macroblock Scan Indexes Payload
48 uint32_t *slice_size;
50 struct DNXHDEncContext *thread[MAX_THREADS];
52 unsigned dct_y_offset;
53 unsigned dct_uv_offset;
54 int interlaced;
55 int cur_field;
57 DECLARE_ALIGNED_16(DCTELEM, blocks[8][64]);
59 int (*qmatrix_c) [64];
60 int (*qmatrix_l) [64];
61 uint16_t (*qmatrix_l16)[2][64];
62 uint16_t (*qmatrix_c16)[2][64];
64 unsigned frame_bits;
65 uint8_t *src[3];
67 uint32_t *vlc_codes;
68 uint8_t *vlc_bits;
69 uint16_t *run_codes;
70 uint8_t *run_bits;
72 /** Rate control */
73 unsigned slice_bits;
74 unsigned qscale;
75 unsigned lambda;
77 unsigned thread_size;
79 uint16_t *mb_bits;
80 uint8_t *mb_qscale;
82 RCCMPEntry *mb_cmp;
83 RCEntry (*mb_rc)[8160];
85 void (*get_pixels_8x4_sym)(DCTELEM */*align 16*/, const uint8_t *, int);
86 } DNXHDEncContext;
88 void ff_dnxhd_init_mmx(DNXHDEncContext *ctx);
90 #endif /* AVCODEC_DNXHDENC_H */