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
31 #include "mpegvideo.h"
32 #include "dnxhddata.h"
34 typedef struct RCCMPEntry {
39 typedef struct RCEntry {
44 typedef struct DNXHDEncContext {
47 MpegEncContext m; ///< Used for quantization dsp functions
53 const CIDEntry *cid_table;
54 uint8_t *msip; ///< Macroblock Scan Indexes Payload
58 struct DNXHDEncContext *thread[MAX_THREADS];
60 // Because our samples are either 8 or 16 bits for 8-bit and 10-bit
61 // encoding respectively, these refer either to bytes or to two-byte words.
62 unsigned dct_y_offset;
63 unsigned dct_uv_offset;
64 unsigned block_width_l2;
77 DECLARE_ALIGNED(32, int16_t, blocks)[12][64];
78 DECLARE_ALIGNED(16, uint8_t, edge_buf_y)[512]; // has to hold 16x16 uint16 when depth=10
79 DECLARE_ALIGNED(16, uint8_t, edge_buf_uv)[2][512]; // has to hold 16x16 uint16_t when depth=10
81 int (*qmatrix_c) [64];
82 int (*qmatrix_l) [64];
83 uint16_t (*qmatrix_l16)[2][64];
84 uint16_t (*qmatrix_c16)[2][64];
89 uint32_t *orig_vlc_codes;
90 uint8_t *orig_vlc_bits;
105 RCCMPEntry *mb_cmp_tmp;
108 void (*get_pixels_8x4_sym)(int16_t *av_restrict /* align 16 */ block,
109 const uint8_t *pixels, ptrdiff_t line_size);
112 void ff_dnxhdenc_init_x86(DNXHDEncContext *ctx);
114 #endif /* AVCODEC_DNXHDENC_H */