• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavcodec/dnxhdenc.h

Go to the documentation of this file.
00001 /*
00002  * VC3/DNxHD encoder structure definitions and prototypes
00003  * Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
00004  *
00005  * VC-3 encoder funded by the British Broadcasting Corporation
00006  *
00007  * This file is part of Libav.
00008  *
00009  * Libav is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * Libav is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with Libav; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00022  */
00023 
00024 #ifndef AVCODEC_DNXHDENC_H
00025 #define AVCODEC_DNXHDENC_H
00026 
00027 #include <stdint.h>
00028 
00029 #include "mpegvideo.h"
00030 #include "dnxhddata.h"
00031 
00032 typedef struct {
00033     uint16_t mb;
00034     int value;
00035 } RCCMPEntry;
00036 
00037 typedef struct {
00038     int ssd;
00039     int bits;
00040 } RCEntry;
00041 
00042 typedef struct DNXHDEncContext {
00043     AVClass *class;
00044     MpegEncContext m; 
00045 
00046     AVFrame frame;
00047     int cid;
00048     const CIDEntry *cid_table;
00049     uint8_t *msip; 
00050     uint32_t *slice_size;
00051     uint32_t *slice_offs;
00052 
00053     struct DNXHDEncContext *thread[MAX_THREADS];
00054 
00055     // Because our samples are either 8 or 16 bits for 8-bit and 10-bit
00056     // encoding respectively, these refer either to bytes or to two-byte words.
00057     unsigned dct_y_offset;
00058     unsigned dct_uv_offset;
00059     unsigned block_width_l2;
00060 
00061     int interlaced;
00062     int cur_field;
00063 
00064     int nitris_compat;
00065     unsigned min_padding;
00066 
00067     DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64];
00068 
00069     int      (*qmatrix_c)     [64];
00070     int      (*qmatrix_l)     [64];
00071     uint16_t (*qmatrix_l16)[2][64];
00072     uint16_t (*qmatrix_c16)[2][64];
00073 
00074     unsigned frame_bits;
00075     uint8_t *src[3];
00076 
00077     uint32_t *vlc_codes;
00078     uint8_t  *vlc_bits;
00079     uint16_t *run_codes;
00080     uint8_t  *run_bits;
00081 
00083     unsigned slice_bits;
00084     unsigned qscale;
00085     unsigned lambda;
00086 
00087     unsigned thread_size;
00088 
00089     uint16_t *mb_bits;
00090     uint8_t  *mb_qscale;
00091 
00092     RCCMPEntry *mb_cmp;
00093     RCEntry   (*mb_rc)[8160];
00094 
00095     void (*get_pixels_8x4_sym)(DCTELEM */*align 16*/, const uint8_t *, int);
00096 } DNXHDEncContext;
00097 
00098 void ff_dnxhd_init_mmx(DNXHDEncContext *ctx);
00099 
00100 #endif /* AVCODEC_DNXHDENC_H */
Generated on Thu Jan 24 2013 17:08:51 for Libav by doxygen 1.7.1