annotate Plugins/Input/shorten/avcodec.h @ 1069:9a3b3fd54df2 trunk

[svn] - super minor fixes
author nhjm449
date Tue, 16 May 2006 21:00:38 -0700
parents 5da5c262b1ef
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
915
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1 #ifndef AVCODEC_H
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
2 #define AVCODEC_H
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
4 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
5 * @file avcodec.h
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
6 * external api header.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
7 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
9
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
10 #ifdef __cplusplus
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
11 extern "C" {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
12 #endif
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
13
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
14 #include "common.h"
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
15 #include <sys/types.h> /* size_t */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
16
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
17 #define FFMPEG_VERSION_INT 0x000408
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
18 #define FFMPEG_VERSION "0.4.8"
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
19 #define LIBAVCODEC_BUILD 4701
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
20
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
21 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
22 #define LIBAVCODEC_VERSION FFMPEG_VERSION
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
23
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
24 #define AV_STRINGIFY(s) AV_TOSTRING(s)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
25 #define AV_TOSTRING(s) #s
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
26 #define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" AV_STRINGIFY(LIBAVCODEC_BUILD)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
27
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
28 enum CodecID {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
29 CODEC_ID_NONE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
30 CODEC_ID_WMAV1,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
31 CODEC_ID_WMAV2,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
32
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
33 CODEC_ID_SHORTEN,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
34
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
35 /* various pcm "codecs" */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
36 CODEC_ID_PCM_S16LE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
37 CODEC_ID_PCM_S16BE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
38 CODEC_ID_PCM_U16LE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
39 CODEC_ID_PCM_U16BE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
40 CODEC_ID_PCM_S8,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
41 CODEC_ID_PCM_U8,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
42 CODEC_ID_PCM_MULAW,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
43 CODEC_ID_PCM_ALAW,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
44 };
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
45
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
46
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
47 enum CodecType {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
48 CODEC_TYPE_UNKNOWN = -1,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
49 CODEC_TYPE_AUDIO,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
50 CODEC_TYPE_DATA,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
51 };
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
52
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
53 enum PixelFormat {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
54 PIX_FMT_YUV420P, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
55 PIX_FMT_YUV422,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
56 PIX_FMT_RGB24, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
57 PIX_FMT_BGR24, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
58 PIX_FMT_YUV422P, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
59 PIX_FMT_YUV444P, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
60 PIX_FMT_RGBA32, ///< Packed pixel, 4 bytes per pixel, BGRABGRA..., stored in cpu endianness
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
61 PIX_FMT_YUV410P, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
62 PIX_FMT_YUV411P, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
63 PIX_FMT_RGB565, ///< always stored in cpu endianness
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
64 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
65 PIX_FMT_GRAY8,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
66 PIX_FMT_MONOWHITE, ///< 0 is white
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
67 PIX_FMT_MONOBLACK, ///< 0 is black
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
68 PIX_FMT_PAL8, ///< 8 bit with RGBA palette
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
69 PIX_FMT_YUVJ420P, ///< Planar YUV 4:2:0 full scale (jpeg)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
70 PIX_FMT_YUVJ422P, ///< Planar YUV 4:2:2 full scale (jpeg)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
71 PIX_FMT_YUVJ444P, ///< Planar YUV 4:4:4 full scale (jpeg)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
72 PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing(xvmc_render.h)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
73 PIX_FMT_XVMC_MPEG2_IDCT,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
74 PIX_FMT_NB,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
75 };
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
76
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
77 /* currently unused, may be used if 24/32 bits samples ever supported */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
78 enum SampleFormat {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
79 SAMPLE_FMT_S16 = 0, ///< signed 16 bits
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
80 };
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
81
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
82 /* in bytes */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
83 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
84
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
85 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
86 * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
87 * this is mainly needed because some optimized bitstream readers read
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
88 * 32 or 64 bit at once and could read over the end<br>
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
89 * Note, if the first 23 bits of the additional bytes are not 0 then damaged
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
90 * MPEG bitstreams could cause overread and segfault
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
91 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
92 #define FF_INPUT_BUFFER_PADDING_SIZE 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
93
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
94 /* motion estimation type, EPZS by default */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
95 enum Motion_Est_ID {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
96 ME_ZERO = 1,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
97 ME_FULL,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
98 ME_LOG,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
99 ME_PHODS,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
100 ME_EPZS,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
101 ME_X1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
102 };
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
103
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
104 typedef struct RcOverride{
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
105 int start_frame;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
106 int end_frame;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
107 int qscale; // if this is 0 then quality_factor will be used instead
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
108 float quality_factor;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
109 } RcOverride;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
110
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
111 /* only for ME compatiblity with old apps */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
112 extern int motion_estimation_method;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
113
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
114 #define FF_MAX_B_FRAMES 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
115
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
116 /* encoding support
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
117 these flags can be passed in AVCodecContext.flags before initing
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
118 Note: note not everything is supported yet
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
119 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
120
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
121 #define CODEC_FLAG_QSCALE 0x0002 ///< use fixed qscale
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
122 #define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed / Advanced prediction for H263
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
123 #define CODEC_FLAG_QPEL 0x0010 ///< use qpel MC
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
124 #define CODEC_FLAG_GMC 0x0020 ///< use GMC
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
125 #define CODEC_FLAG_MV0 0x0040 ///< always try a MB with MV=<0,0>
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
126 #define CODEC_FLAG_PART 0x0080 ///< use data partitioning
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
127 /* parent program gurantees that the input for b-frame containing streams is not written to
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
128 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
129 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
130 #define CODEC_FLAG_PASS1 0x0200 ///< use internal 2pass ratecontrol in first pass mode
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
131 #define CODEC_FLAG_PASS2 0x0400 ///< use internal 2pass ratecontrol in second pass mode
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
132 #define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< use external huffman table (for mjpeg)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
133 #define CODEC_FLAG_GRAY 0x2000 ///< only decode/encode grayscale
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
134 #define CODEC_FLAG_EMU_EDGE 0x4000///< dont draw edges
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
135 #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
136 #define CODEC_FLAG_TRUNCATED 0x00010000 /** input bitstream might be truncated at a random location instead
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
137 of only at frame boundaries */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
138 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< normalize adaptive quantization
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
139 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< use interlaced dct
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
140 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< force low delay
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
141 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< use alternate scan
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
142 #define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< use trellis quantization
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
143 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< place global headers in extradata instead of every keyframe
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
144 #define CODEC_FLAG_BITEXACT 0x00800000 ///< use only bitexact stuff (except (i)dct)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
145 /* Fx : Flag for h263+ extra options */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
146 #define CODEC_FLAG_H263P_AIC 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction (remove this)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
147 #define CODEC_FLAG_AC_PRED 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
148 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< Unlimited motion vector
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
149 #define CODEC_FLAG_CBP_RD 0x04000000 ///< use rate distortion optimization for cbp
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
150 #define CODEC_FLAG_QP_RD 0x08000000 ///< use rate distortion optimization for qp selectioon
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
151 #define CODEC_FLAG_H263P_AIV 0x00000008 ///< H263 Alternative inter vlc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
152 #define CODEC_FLAG_OBMC 0x00000001 ///< OBMC
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
153 #define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
154 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
155 #define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
156 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< will reserve space for SVCD scan offset user data
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
157 #define CODEC_FLAG_CLOSED_GOP 0x80000000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
158 /* Unsupported options :
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
159 * Syntax Arithmetic coding (SAC)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
160 * Reference Picture Selection
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
161 * Independant Segment Decoding */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
162 /* /Fx */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
163 /* codec capabilities */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
164
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
165 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
166 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
167 * Codec uses get_buffer() for allocating buffers.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
168 * direct rendering method 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
169 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
170 #define CODEC_CAP_DR1 0x0002
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
171 /* if 'parse_only' field is true, then avcodec_parse_frame() can be
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
172 used */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
173 #define CODEC_CAP_PARSE_ONLY 0x0004
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
174 #define CODEC_CAP_TRUNCATED 0x0008
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
175
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
176 //the following defines might change, so dont expect compatibility if u use them
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
177 #define MB_TYPE_INTRA4x4 0x0001
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
178 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
179 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME h264 specific
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
180 #define MB_TYPE_16x16 0x0008
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
181 #define MB_TYPE_16x8 0x0010
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
182 #define MB_TYPE_8x16 0x0020
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
183 #define MB_TYPE_8x8 0x0040
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
184 #define MB_TYPE_INTERLACED 0x0080
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
185 #define MB_TYPE_DIRECT2 0x0100 //FIXME
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
186 #define MB_TYPE_ACPRED 0x0200
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
187 #define MB_TYPE_GMC 0x0400
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
188 #define MB_TYPE_SKIP 0x0800
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
189 #define MB_TYPE_P0L0 0x1000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
190 #define MB_TYPE_P1L0 0x2000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
191 #define MB_TYPE_P0L1 0x4000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
192 #define MB_TYPE_P1L1 0x8000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
193 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
194 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
195 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
196 #define MB_TYPE_QUANT 0x00010000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
197 #define MB_TYPE_CBP 0x00020000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
198 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
199
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
200 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
201 * Pan Scan area.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
202 * this specifies the area which should be displayed. Note there may be multiple such areas for one frame
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
203 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
204 typedef struct AVPanScan{
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
205 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
206 * id.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
207 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
208 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
209 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
210 int id;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
211
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
212 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
213 * width and height in 1/16 pel
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
214 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
215 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
216 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
217 int width;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
218 int height;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
219
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
220 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
221 * position of the top left corner in 1/16 pel for up to 3 fields/frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
222 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
223 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
224 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
225 int16_t position[3][2];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
226 }AVPanScan;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
227
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
228 #define FF_COMMON_FRAME \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
229 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
230 * pointer to the picture planes.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
231 * this might be different from the first allocated byte\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
232 * - encoding: \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
233 * - decoding: \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
234 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
235 uint8_t *data[4];\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
236 int linesize[4];\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
237 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
238 * pointer to the first allocated byte of the picture. can be used in get_buffer/release_buffer\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
239 * this isnt used by lavc unless the default get/release_buffer() is used\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
240 * - encoding: \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
241 * - decoding: \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
242 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
243 uint8_t *base[4];\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
244 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
245 * 1 -> keyframe, 0-> not\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
246 * - encoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
247 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
248 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
249 int key_frame;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
250 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
251 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
252 * picture type of the frame, see ?_TYPE below.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
253 * - encoding: set by lavc for coded_picture (and set by user for input)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
254 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
255 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
256 int pict_type;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
257 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
258 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
259 * presentation timestamp in micro seconds (time when frame should be shown to user)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
260 * if 0 then the frame_rate will be used as reference\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
261 * - encoding: MUST be set by user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
262 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
263 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
264 int64_t pts;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
265 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
266 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
267 * picture number in bitstream order.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
268 * - encoding: set by\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
269 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
270 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
271 int coded_picture_number;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
272 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
273 * picture number in display order.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
274 * - encoding: set by\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
275 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
276 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
277 int display_picture_number;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
278 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
279 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
280 * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
281 * - encoding: set by lavc for coded_picture (and set by user for input)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
282 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
283 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
284 int quality; \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
285 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
286 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
287 * buffer age (1->was last buffer and dint change, 2->..., ...).\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
288 * set to INT_MAX if the buffer has not been used yet \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
289 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
290 * - decoding: MUST be set by get_buffer()\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
291 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
292 int age;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
293 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
294 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
295 * is this picture used as reference\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
296 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
297 * - decoding: set by lavc (before get_buffer() call))\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
298 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
299 int reference;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
300 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
301 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
302 * QP table\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
303 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
304 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
305 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
306 int8_t *qscale_table;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
307 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
308 * QP store stride\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
309 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
310 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
311 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
312 int qstride;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
313 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
314 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
315 * mbskip_table[mb]>=1 if MB didnt change\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
316 * stride= mb_width = (width+15)>>4\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
317 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
318 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
319 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
320 uint8_t *mbskip_table;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
321 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
322 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
323 * Motion vector table\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
324 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
325 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
326 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
327 int16_t (*motion_val[2])[2];\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
328 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
329 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
330 * Macroblock type table\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
331 * mb_type_base + mb_width + 2\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
332 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
333 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
334 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
335 uint32_t *mb_type;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
336 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
337 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
338 * Macroblock size: (0->16x16, 1->8x8, 2-> 4x4, 3-> 2x2)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
339 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
340 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
341 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
342 uint8_t motion_subsample_log2;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
343 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
344 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
345 * for some private data of the user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
346 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
347 * - decoding: set by user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
348 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
349 void *opaque;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
350 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
351 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
352 * error\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
353 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
354 * - decoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
355 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
356 uint64_t error[4];\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
357 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
358 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
359 * type of the buffer (to keep track of who has to dealloc data[*])\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
360 * - encoding: set by the one who allocs it\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
361 * - decoding: set by the one who allocs it\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
362 * Note: user allocated (direct rendering) & internal buffers can not coexist currently\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
363 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
364 int type;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
365 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
366 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
367 * when decoding, this signal how much the picture must be delayed.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
368 * extra_delay = repeat_pict / (2*fps)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
369 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
370 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
371 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
372 int repeat_pict;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
373 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
374 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
375 * \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
376 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
377 int qscale_type;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
378 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
379 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
380 * The content of the picture is interlaced.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
381 * - encoding: set by user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
382 * - decoding: set by lavc (default 0)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
383 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
384 int interlaced_frame;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
385 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
386 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
387 * if the content is interlaced, is top field displayed first.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
388 * - encoding: set by user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
389 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
390 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
391 int top_field_first;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
392 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
393 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
394 * Pan scan.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
395 * - encoding: set by user\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
396 * - decoding: set by lavc\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
397 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
398 AVPanScan *pan_scan;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
399 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
400 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
401 * tell user application that palette has changed from previous frame.\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
402 * - encoding: ??? (no palette-enabled encoder yet)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
403 * - decoding: set by lavc (default 0)\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
404 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
405 int palette_has_changed;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
406 \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
407 /**\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
408 * Codec suggestion on buffer type if != 0\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
409 * - encoding: unused\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
410 * - decoding: set by lavc (before get_buffer() call))\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
411 */\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
412 int buffer_hints;\
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
413
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
414 #define FF_QSCALE_TYPE_MPEG1 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
415 #define FF_QSCALE_TYPE_MPEG2 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
416
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
417 #define FF_BUFFER_TYPE_INTERNAL 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
418 #define FF_BUFFER_TYPE_USER 2 ///< Direct rendering buffers (image is (de)allocated by user)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
419 #define FF_BUFFER_TYPE_SHARED 4 ///< buffer from somewher else, dont dealloc image (data/base)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
420 #define FF_BUFFER_TYPE_COPY 8 ///< just a (modified) copy of some other buffer, dont dealloc anything
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
421
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
422
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
423 #define FF_I_TYPE 1 // Intra
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
424 #define FF_P_TYPE 2 // Predicted
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
425 #define FF_B_TYPE 3 // Bi-dir predicted
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
426 #define FF_S_TYPE 4 // S(GMC)-VOP MPEG4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
427 #define FF_SI_TYPE 5
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
428 #define FF_SP_TYPE 6
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
429
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
430 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
431 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
432 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
433 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
434
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
435 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
436 * Audio Video Frame.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
437 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
438 typedef struct AVFrame {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
439 FF_COMMON_FRAME
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
440 } AVFrame;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
441
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
442 #define DEFAULT_FRAME_RATE_BASE 1001000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
443
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
444 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
445 * main external api structure.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
446 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
447 typedef struct AVCodecContext {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
448 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
449 * the average bitrate.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
450 * - encoding: set by user. unused for constant quantizer encoding
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
451 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
452 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
453 int bit_rate;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
454
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
455 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
456 * number of bits the bitstream is allowed to diverge from the reference.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
457 * the reference can be CBR (for CBR pass1) or VBR (for pass2)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
458 * - encoding: set by user. unused for constant quantizer encoding
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
459 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
460 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
461 int bit_rate_tolerance;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
462
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
463 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
464 * CODEC_FLAG_*.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
465 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
466 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
467 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
468 int flags;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
469
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
470 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
471 * some codecs needs additionnal format info. It is stored here
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
472 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
473 * - decoding: set by lavc. (FIXME is this ok?)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
474 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
475 int sub_id;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
476
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
477 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
478 * motion estimation algorithm used for video coding.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
479 * - encoding: MUST be set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
480 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
481 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
482 int me_method;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
483
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
484 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
485 * some codecs need / can use extra-data like huffman tables.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
486 * mjpeg: huffman tables
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
487 * rv10: additional flags
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
488 * mpeg4: global headers (they can be in the bitstream or here)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
489 * - encoding: set/allocated/freed by lavc.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
490 * - decoding: set/allocated/freed by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
491 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
492 void *extradata;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
493 int extradata_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
494
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
495 /* video only */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
496 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
497 * frames per sec multiplied by frame_rate_base.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
498 * for variable fps this is the precission, so if the timestamps
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
499 * can be specified in msec precssion then this is 1000*frame_rate_base
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
500 * - encoding: MUST be set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
501 * - decoding: set by lavc. 0 or the frame_rate if available
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
502 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
503 int frame_rate;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
504
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
505 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
506 * width / height.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
507 * - encoding: MUST be set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
508 * - decoding: set by user if known, codec should override / dynamically change if needed
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
509 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
510 int width, height;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
511
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
512 #define FF_ASPECT_SQUARE 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
513 #define FF_ASPECT_4_3_625 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
514 #define FF_ASPECT_4_3_525 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
515 #define FF_ASPECT_16_9_625 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
516 #define FF_ASPECT_16_9_525 5
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
517 #define FF_ASPECT_EXTENDED 15
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
518
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
519 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
520 * the number of pictures in a group of pitures, or 0 for intra_only.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
521 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
522 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
523 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
524 int gop_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
525
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
526 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
527 * pixel format, see PIX_FMT_xxx.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
528 * - encoding: FIXME: used by ffmpeg to decide whether an pix_fmt
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
529 * conversion is in order. This only works for
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
530 * codecs with one supported pix_fmt, we should
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
531 * do something for a generic case as well.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
532 * - decoding: set by lavc.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
533 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
534 enum PixelFormat pix_fmt;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
535
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
536 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
537 * Frame rate emulation. If not zero lower layer (i.e. format handler)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
538 * has to read frames at native frame rate.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
539 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
540 * - decoding: unused.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
541 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
542 int rate_emu;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
543
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
544 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
545 * if non NULL, 'draw_horiz_band' is called by the libavcodec
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
546 * decoder to draw an horizontal band. It improve cache usage. Not
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
547 * all codecs can do that. You must check the codec capabilities
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
548 * before
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
549 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
550 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
551 * @param height the height of the slice
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
552 * @param y the y position of the slice
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
553 * @param type 1->top field, 2->bottom field, 3->frame
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
554 * @param offset offset into the AVFrame.data from which the slice should be read
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
555 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
556 void (*draw_horiz_band)(struct AVCodecContext *s,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
557 const AVFrame *src, int offset[4],
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
558 int y, int type, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
559
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
560 /* audio only */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
561 int sample_rate; ///< samples per sec
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
562 int channels;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
563 int sample_fmt; ///< sample format, currenly unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
564
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
565 /* the following data should not be initialized */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
566 int frame_size; ///< in samples, initialized when calling 'init'
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
567 int frame_number; ///< audio or video frame number
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
568 int real_pict_num; ///< returns the real picture number of previous encoded frame
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
569
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
570 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
571 * number of frames the decoded output will be delayed relative to
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
572 * the encoded input.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
573 * - encoding: set by lavc.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
574 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
575 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
576 int delay;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
577
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
578 /* - encoding parameters */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
579 float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
580 float qblur; ///< amount of qscale smoothing over time (0.0-1.0)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
581
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
582 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
583 * minimum quantizer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
584 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
585 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
586 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
587 int qmin;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
588
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
589 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
590 * maximum quantizer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
591 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
592 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
593 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
594 int qmax;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
595
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
596 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
597 * maximum quantizer difference etween frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
598 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
599 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
600 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
601 int max_qdiff;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
602
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
603 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
604 * maximum number of b frames between non b frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
605 * note: the output will be delayed by max_b_frames+1 relative to the input
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
606 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
607 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
608 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
609 int max_b_frames;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
610
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
611 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
612 * qscale factor between ip and b frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
613 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
614 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
615 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
616 float b_quant_factor;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
617
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
618 /** obsolete FIXME remove */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
619 int rc_strategy;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
620 int b_frame_strategy;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
621
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
622 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
623 * hurry up amount.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
624 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
625 * - decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
626 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
627 int hurry_up;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
628
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
629 struct AVCodec *codec;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
630
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
631 void *priv_data;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
632
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
633 /* unused, FIXME remove*/
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
634 int rtp_mode;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
635
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
636 int rtp_payload_size; /* The size of the RTP payload, the coder will */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
637 /* do it's best to deliver a chunk with size */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
638 /* below rtp_payload_size, the chunk will start */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
639 /* with a start code on some codecs like H.263 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
640 /* This doesn't take account of any particular */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
641 /* headers inside the transmited RTP payload */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
642
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
643
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
644 /* The RTP callcack: This function is called */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
645 /* every time the encoder as a packet to send */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
646 /* Depends on the encoder if the data starts */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
647 /* with a Start Code (it should) H.263 does */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
648 void (*rtp_callback)(void *data, int size, int packet_number);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
649
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
650 /* statistics, used for 2-pass encoding */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
651 int mv_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
652 int header_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
653 int i_tex_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
654 int p_tex_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
655 int i_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
656 int p_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
657 int skip_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
658 int misc_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
659
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
660 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
661 * number of bits used for the previously encoded frame.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
662 * - encoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
663 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
664 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
665 int frame_bits;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
666
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
667 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
668 * private data of the user, can be used to carry app specific stuff.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
669 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
670 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
671 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
672 void *opaque;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
673
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
674 char codec_name[32];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
675 enum CodecType codec_type; /* see CODEC_TYPE_xxx */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
676 enum CodecID codec_id; /* see CODEC_ID_xxx */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
677
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
678 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
679 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
680 * this is used to workaround some encoder bugs
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
681 * - encoding: set by user, if not then the default based on codec_id will be used
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
682 * - decoding: set by user, will be converted to upper case by lavc during init
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
683 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
684 unsigned int codec_tag;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
685
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
686 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
687 * workaround bugs in encoders which sometimes cannot be detected automatically.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
688 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
689 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
690 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
691 int workaround_bugs;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
692 #define FF_BUG_AUTODETECT 1 ///< autodetection
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
693 #define FF_BUG_OLD_MSMPEG4 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
694 #define FF_BUG_XVID_ILACE 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
695 #define FF_BUG_UMP4 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
696 #define FF_BUG_NO_PADDING 16
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
697 #define FF_BUG_AC_VLC 0 ///< will be removed, libavcodec can now handle these non compliant files by default
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
698 #define FF_BUG_QPEL_CHROMA 64
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
699 #define FF_BUG_STD_QPEL 128
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
700 #define FF_BUG_QPEL_CHROMA2 256
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
701 #define FF_BUG_DIRECT_BLOCKSIZE 512
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
702 #define FF_BUG_EDGE 1024
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
703 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100%
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
704
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
705 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
706 * luma single coeff elimination threshold.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
707 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
708 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
709 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
710 int luma_elim_threshold;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
711
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
712 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
713 * chroma single coeff elimination threshold.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
714 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
715 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
716 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
717 int chroma_elim_threshold;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
718
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
719 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
720 * strictly follow the std (MPEG4, ...).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
721 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
722 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
723 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
724 int strict_std_compliance;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
725
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
726 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
727 * qscale offset between ip and b frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
728 * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
729 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
730 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
731 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
732 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
733 float b_quant_offset;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
734
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
735 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
736 * error resilience higher values will detect more errors but may missdetect
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
737 * some more or less valid parts as errors.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
738 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
739 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
740 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
741 int error_resilience;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
742 #define FF_ER_CAREFULL 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
743 #define FF_ER_COMPLIANT 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
744 #define FF_ER_AGGRESSIVE 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
745 #define FF_ER_VERY_AGGRESSIVE 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
746
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
747 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
748 * called at the beginning of each frame to get a buffer for it.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
749 * if pic.reference is set then the frame will be read later by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
750 * width and height should be rounded up to the next multiple of 16
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
751 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
752 * - decoding: set by lavc, user can override
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
753 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
754 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
755
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
756 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
757 * called to release buffers which where allocated with get_buffer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
758 * a released buffer can be reused in get_buffer()
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
759 * pic.data[*] must be set to NULL
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
760 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
761 * - decoding: set by lavc, user can override
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
762 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
763 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
764
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
765 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
766 * is 1 if the decoded stream contains b frames, 0 otherwise.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
767 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
768 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
769 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
770 int has_b_frames;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
771
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
772 int block_align; ///< used by some WAV based audio codecs
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
773
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
774 int parse_only; /* - decoding only: if true, only parsing is done
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
775 (function avcodec_parse_frame()). The frame
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
776 data is returned. Only MPEG codecs support this now. */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
777
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
778 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
779 * 0-> h263 quant 1-> mpeg quant.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
780 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
781 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
782 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
783 int mpeg_quant;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
784
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
785 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
786 * pass1 encoding statistics output buffer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
787 * - encoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
788 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
789 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
790 char *stats_out;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
791
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
792 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
793 * pass2 encoding statistics input buffer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
794 * concatenated stuff from stats_out of pass1 should be placed here
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
795 * - encoding: allocated/set/freed by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
796 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
797 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
798 char *stats_in;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
799
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
800 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
801 * ratecontrol qmin qmax limiting method.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
802 * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
803 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
804 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
805 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
806 float rc_qsquish;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
807
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
808 float rc_qmod_amp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
809 int rc_qmod_freq;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
810
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
811 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
812 * ratecontrol override, see RcOverride.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
813 * - encoding: allocated/set/freed by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
814 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
815 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
816 RcOverride *rc_override;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
817 int rc_override_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
818
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
819 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
820 * rate control equation.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
821 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
822 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
823 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
824 char *rc_eq;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
825
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
826 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
827 * maximum bitrate.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
828 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
829 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
830 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
831 int rc_max_rate;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
832
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
833 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
834 * minimum bitrate.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
835 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
836 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
837 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
838 int rc_min_rate;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
839
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
840 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
841 * decoder bitstream buffer size.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
842 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
843 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
844 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
845 int rc_buffer_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
846 float rc_buffer_aggressivity;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
847
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
848 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
849 * qscale factor between p and i frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
850 * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
851 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
852 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
853 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
854 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
855 float i_quant_factor;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
856
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
857 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
858 * qscale offset between p and i frames.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
859 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
860 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
861 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
862 float i_quant_offset;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
863
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
864 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
865 * initial complexity for pass1 ratecontrol.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
866 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
867 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
868 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
869 float rc_initial_cplx;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
870
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
871 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
872 * dct algorithm, see FF_DCT_* below.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
873 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
874 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
875 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
876 int dct_algo;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
877 #define FF_DCT_AUTO 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
878 #define FF_DCT_FASTINT 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
879 #define FF_DCT_INT 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
880 #define FF_DCT_MMX 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
881 #define FF_DCT_MLIB 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
882 #define FF_DCT_ALTIVEC 5
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
883 #define FF_DCT_FAAN 6
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
884
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
885 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
886 * luminance masking (0-> disabled).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
887 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
888 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
889 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
890 float lumi_masking;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
891
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
892 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
893 * temporary complexity masking (0-> disabled).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
894 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
895 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
896 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
897 float temporal_cplx_masking;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
898
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
899 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
900 * spatial complexity masking (0-> disabled).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
901 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
902 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
903 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
904 float spatial_cplx_masking;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
905
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
906 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
907 * p block masking (0-> disabled).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
908 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
909 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
910 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
911 float p_masking;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
912
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
913 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
914 * darkness masking (0-> disabled).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
915 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
916 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
917 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
918 float dark_masking;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
919
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
920
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
921 /* for binary compatibility */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
922 int unused;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
923
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
924 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
925 * idct algorithm, see FF_IDCT_* below.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
926 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
927 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
928 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
929 int idct_algo;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
930 #define FF_IDCT_AUTO 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
931 #define FF_IDCT_INT 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
932 #define FF_IDCT_SIMPLE 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
933 #define FF_IDCT_SIMPLEMMX 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
934 #define FF_IDCT_LIBMPEG2MMX 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
935 #define FF_IDCT_PS2 5
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
936 #define FF_IDCT_MLIB 6
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
937 #define FF_IDCT_ARM 7
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
938 #define FF_IDCT_ALTIVEC 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
939 #define FF_IDCT_SH4 9
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
940 #define FF_IDCT_SIMPLEARM 10
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
941
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
942 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
943 * slice count.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
944 * - encoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
945 * - decoding: set by user (or 0)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
946 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
947 int slice_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
948 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
949 * slice offsets in the frame in bytes.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
950 * - encoding: set/allocated by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
951 * - decoding: set/allocated by user (or NULL)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
952 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
953 int *slice_offset;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
954
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
955 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
956 * error concealment flags.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
957 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
958 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
959 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
960 int error_concealment;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
961 #define FF_EC_GUESS_MVS 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
962 #define FF_EC_DEBLOCK 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
963
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
964 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
965 * dsp_mask could be add used to disable unwanted CPU features
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
966 * CPU features (i.e. MMX, SSE. ...)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
967 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
968 * with FORCE flag you may instead enable given CPU features
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
969 * (Dangerous: usable in case of misdetection, improper usage however will
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
970 * result into program crash)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
971 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
972 unsigned dsp_mask;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
973 #define FF_MM_FORCE 0x80000000 /* force usage of selected flags (OR) */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
974 /* lower 16 bits - CPU features */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
975 #ifdef HAVE_MMX
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
976 #define FF_MM_MMX 0x0001 /* standard MMX */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
977 #define FF_MM_3DNOW 0x0004 /* AMD 3DNOW */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
978 #define FF_MM_MMXEXT 0x0002 /* SSE integer functions or AMD MMX ext */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
979 #define FF_MM_SSE 0x0008 /* SSE functions */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
980 #define FF_MM_SSE2 0x0010 /* PIV SSE2 functions */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
981 #endif /* HAVE_MMX */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
982
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
983 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
984 * bits per sample/pixel from the demuxer (needed for huffyuv).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
985 * - encoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
986 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
987 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
988 int bits_per_sample;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
989
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
990 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
991 * prediction method (needed for huffyuv).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
992 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
993 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
994 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
995 int prediction_method;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
996 #define FF_PRED_LEFT 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
997 #define FF_PRED_PLANE 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
998 #define FF_PRED_MEDIAN 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
999
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1000 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1001 * sample aspect ratio (0 if unknown).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1002 * numerator and denominator must be relative prime and smaller then 256 for some video standards
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1003 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1004 * - decoding: set by lavc.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1005 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1006 //AVRational sample_aspect_ratio;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1007
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1008 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1009 * the picture in the bitstream.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1010 * - encoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1011 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1012 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1013 AVFrame *coded_frame;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1014
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1015 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1016 * debug.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1017 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1018 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1019 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1020 int debug;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1021 #define FF_DEBUG_PICT_INFO 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1022 #define FF_DEBUG_RC 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1023 #define FF_DEBUG_BITSTREAM 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1024 #define FF_DEBUG_MB_TYPE 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1025 #define FF_DEBUG_QP 16
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1026 #define FF_DEBUG_MV 32
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1027 //#define FF_DEBUG_VIS_MV 0x00000040
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1028 #define FF_DEBUG_SKIP 0x00000080
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1029 #define FF_DEBUG_STARTCODE 0x00000100
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1030 #define FF_DEBUG_PTS 0x00000200
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1031 #define FF_DEBUG_ER 0x00000400
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1032 #define FF_DEBUG_MMCO 0x00000800
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1033 #define FF_DEBUG_BUGS 0x00001000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1034 #define FF_DEBUG_VIS_QP 0x00002000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1035 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1036
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1037 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1038 * debug.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1039 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1040 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1041 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1042 int debug_mv;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1043 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1044 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1045 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1046
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1047 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1048 * error.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1049 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1050 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1051 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1052 uint64_t error[4];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1053
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1054 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1055 * minimum MB quantizer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1056 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1057 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1058 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1059 int mb_qmin;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1060
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1061 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1062 * maximum MB quantizer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1063 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1064 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1065 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1066 int mb_qmax;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1067
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1068 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1069 * motion estimation compare function.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1070 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1071 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1072 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1073 int me_cmp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1074 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1075 * subpixel motion estimation compare function.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1076 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1077 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1078 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1079 int me_sub_cmp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1080 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1081 * macroblock compare function (not supported yet).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1082 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1083 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1084 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1085 int mb_cmp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1086 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1087 * interlaced dct compare function
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1088 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1089 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1090 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1091 int ildct_cmp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1092 #define FF_CMP_SAD 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1093 #define FF_CMP_SSE 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1094 #define FF_CMP_SATD 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1095 #define FF_CMP_DCT 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1096 #define FF_CMP_PSNR 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1097 #define FF_CMP_BIT 5
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1098 #define FF_CMP_RD 6
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1099 #define FF_CMP_ZERO 7
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1100 #define FF_CMP_VSAD 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1101 #define FF_CMP_VSSE 9
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1102 #define FF_CMP_CHROMA 256
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1103
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1104 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1105 * ME diamond size & shape.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1106 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1107 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1108 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1109 int dia_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1110
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1111 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1112 * amount of previous MV predictors (2a+1 x 2a+1 square).
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1113 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1114 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1115 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1116 int last_predictor_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1117
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1118 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1119 * pre pass for motion estimation.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1120 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1121 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1122 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1123 int pre_me;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1124
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1125 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1126 * motion estimation pre pass compare function.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1127 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1128 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1129 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1130 int me_pre_cmp;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1131
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1132 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1133 * ME pre pass diamond size & shape.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1134 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1135 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1136 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1137 int pre_dia_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1138
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1139 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1140 * subpel ME quality.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1141 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1142 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1143 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1144 int me_subpel_quality;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1145
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1146 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1147 * callback to negotiate the pixelFormat.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1148 * @param fmt is the list of formats which are supported by the codec,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1149 * its terminated by -1 as 0 is a valid format, the formats are ordered by quality
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1150 * the first is allways the native one
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1151 * @return the choosen format
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1152 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1153 * - decoding: set by user, if not set then the native format will always be choosen
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1154 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1155 enum PixelFormat (*get_format)(struct AVCodecContext *s, enum PixelFormat * fmt);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1156
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1157 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1158 * DTG active format information (additionnal aspect ratio
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1159 * information only used in DVB MPEG2 transport streams). 0 if
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1160 * not set.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1161 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1162 * - encoding: unused.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1163 * - decoding: set by decoder
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1164 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1165 int dtg_active_format;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1166 #define FF_DTG_AFD_SAME 8
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1167 #define FF_DTG_AFD_4_3 9
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1168 #define FF_DTG_AFD_16_9 10
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1169 #define FF_DTG_AFD_14_9 11
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1170 #define FF_DTG_AFD_4_3_SP_14_9 13
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1171 #define FF_DTG_AFD_16_9_SP_14_9 14
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1172 #define FF_DTG_AFD_SP_4_3 15
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1173
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1174 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1175 * Maximum motion estimation search range in subpel units.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1176 * if 0 then no limit
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1177 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1178 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1179 * - decoding: unused.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1180 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1181 int me_range;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1182
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1183 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1184 * frame_rate_base.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1185 * for variable fps this is 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1186 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1187 * - decoding: set by lavc.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1188 * @todo move this after frame_rate
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1189 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1190
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1191 int frame_rate_base;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1192 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1193 * intra quantizer bias.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1194 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1195 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1196 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1197 int intra_quant_bias;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1198 #define FF_DEFAULT_QUANT_BIAS 999999
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1199
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1200 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1201 * inter quantizer bias.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1202 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1203 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1204 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1205 int inter_quant_bias;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1206
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1207 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1208 * color table ID.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1209 * - encoding: unused.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1210 * - decoding: which clrtable should be used for 8bit RGB images
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1211 * table have to be stored somewhere FIXME
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1212 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1213 int color_table_id;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1214
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1215 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1216 * internal_buffer count.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1217 * Dont touch, used by lavc default_get_buffer()
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1218 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1219 int internal_buffer_count;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1220
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1221 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1222 * internal_buffers.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1223 * Dont touch, used by lavc default_get_buffer()
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1224 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1225 void *internal_buffer;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1226
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1227 #define FF_LAMBDA_SHIFT 7
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1228 #define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1229 #define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1230 #define FF_LAMBDA_MAX (256*128-1)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1231
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1232 #define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1233 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1234 * global quality for codecs which cannot change it per frame.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1235 * this should be proportional to MPEG1/2/4 qscale.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1236 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1237 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1238 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1239 int global_quality;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1240
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1241 #define FF_CODER_TYPE_VLC 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1242 #define FF_CODER_TYPE_AC 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1243 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1244 * coder type
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1245 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1246 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1247 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1248 int coder_type;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1249
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1250 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1251 * context model
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1252 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1253 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1254 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1255 int context_model;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1256
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1257 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1258 * slice flags
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1259 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1260 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1261 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1262 int slice_flags;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1263 #define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of display
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1264 #define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1265 #define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1266
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1267 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1268 * XVideo Motion Acceleration
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1269 * - encoding: forbidden
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1270 * - decoding: set by decoder
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1271 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1272 int xvmc_acceleration;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1273
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1274 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1275 * macroblock decision mode
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1276 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1277 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1278 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1279 int mb_decision;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1280 #define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1281 #define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1282 #define FF_MB_DECISION_RD 2 ///< rate distoration
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1283
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1284 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1285 * custom intra quantization matrix
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1286 * - encoding: set by user, can be NULL
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1287 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1288 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1289 uint16_t *intra_matrix;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1290
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1291 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1292 * custom inter quantization matrix
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1293 * - encoding: set by user, can be NULL
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1294 * - decoding: set by lavc
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1295 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1296 uint16_t *inter_matrix;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1297
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1298 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1299 * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1300 * this is used to workaround some encoder bugs
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1301 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1302 * - decoding: set by user, will be converted to upper case by lavc during init
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1303 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1304 unsigned int stream_codec_tag;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1305
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1306 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1307 * scene change detection threshold.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1308 * 0 is default, larger means fewer detected scene changes
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1309 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1310 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1311 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1312 int scenechange_threshold;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1313
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1314 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1315 * minimum lagrange multipler
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1316 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1317 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1318 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1319 int lmin;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1320
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1321 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1322 * maximum lagrange multipler
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1323 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1324 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1325 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1326 int lmax;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1327
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1328 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1329 * Palette control structure
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1330 * - encoding: ??? (no palette-enabled encoder yet)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1331 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1332 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1333 struct AVPaletteControl *palctrl;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1334
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1335 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1336 * noise reduction strength
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1337 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1338 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1339 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1340 int noise_reduction;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1341
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1342 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1343 * called at the beginning of a frame to get cr buffer for it.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1344 * buffer type (size, hints) must be the same. lavc won't check it.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1345 * lavc will pass previous buffer in pic, function should return
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1346 * same buffer or new buffer with old frame "painted" into it.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1347 * if pic.data[0] == NULL must behave like get_buffer().
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1348 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1349 * - decoding: set by lavc, user can override
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1350 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1351 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1352
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1353 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1354 * number of bits which should be loaded into the rc buffer before decoding starts
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1355 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1356 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1357 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1358 int rc_initial_buffer_occupancy;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1359
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1360 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1361 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1362 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1363 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1364 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1365 int inter_threshold;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1366
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1367 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1368 * CODEC_FLAG2_*.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1369 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1370 * - decoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1371 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1372 int flags2;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1373
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1374 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1375 * simulates errors in the bitstream to test error concealment.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1376 * - encoding: set by user.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1377 * - decoding: unused.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1378 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1379 int error_rate;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1380
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1381 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1382 * MP3 antialias algorithm, see FF_AA_* below.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1383 * - encoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1384 * - decoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1385 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1386 int antialias_algo;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1387 #define FF_AA_AUTO 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1388 #define FF_AA_FASTINT 1 //not implemented yet
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1389 #define FF_AA_INT 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1390 #define FF_AA_FLOAT 3
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1391 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1392 * Quantizer noise shaping.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1393 * - encoding: set by user
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1394 * - decoding: unused
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1395 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1396 int quantizer_noise_shaping;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1397 } AVCodecContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1398
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1399 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1400 * Parse option(s) and sets fields in passed structure
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1401 * @param strct structure where the parsed results will be written
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1402 * @param list list with AVOptions
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1403 * @param opts string with options for parsing
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1404 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1405 int avoption_parse(void* strct, const AVOption* list, const char* opts);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1406
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1407
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1408 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1409 * AVCodec.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1410 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1411 typedef struct AVCodec {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1412 const char *name;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1413 enum CodecType type;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1414 int id;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1415 int priv_data_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1416 int (*init)(AVCodecContext *);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1417 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1418 int (*close)(AVCodecContext *);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1419 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1420 uint8_t *buf, int buf_size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1421 int capabilities;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1422 const AVOption *options;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1423 struct AVCodec *next;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1424 void (*flush)(AVCodecContext *);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1425 } AVCodec;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1426
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1427 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1428 * four components are given, that's all.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1429 * the last component is alpha
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1430 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1431 typedef struct AVPicture {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1432 uint8_t *data[4];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1433 int linesize[4]; ///< number of bytes per line
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1434 } AVPicture;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1435
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1436 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1437 * AVPaletteControl
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1438 * This structure defines a method for communicating palette changes
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1439 * between and demuxer and a decoder.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1440 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1441 #define AVPALETTE_SIZE 1024
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1442 #define AVPALETTE_COUNT 256
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1443 typedef struct AVPaletteControl {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1444
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1445 /* demuxer sets this to 1 to indicate the palette has changed;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1446 * decoder resets to 0 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1447 int palette_changed;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1448
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1449 /* 4-byte ARGB palette entries, stored in native byte order; note that
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1450 * the individual palette components should be on a 8-bit scale; if
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1451 * the palette data comes from a IBM VGA native format, the component
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1452 * data is probably 6 bits in size and needs to be scaled */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1453 unsigned int palette[AVPALETTE_COUNT];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1454
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1455 } AVPaletteControl;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1456
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1457 extern AVCodec shorten_decoder;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1458
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1459 /* pcm codecs */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1460 #define PCM_CODEC(id, name) \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1461 extern AVCodec name ## _decoder; \
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1462 extern AVCodec name ## _encoder
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1463
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1464 PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1465 PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1466 PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1467 PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1468 PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1469 PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1470 PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1471 PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1472
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1473 /* adpcm codecs */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1474
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1475 PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1476 PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1477 PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1478 PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1479 PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1480 PCM_CODEC(CODEC_ID_ADPCM_SMJPEG, adpcm_ima_smjpeg);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1481 PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1482 PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1483 PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1484 PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1485 PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_ea);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1486
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1487 #undef PCM_CODEC
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1488
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1489
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1490
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1491 /* resample.c */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1492
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1493 struct ReSampleContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1494
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1495 typedef struct ReSampleContext ReSampleContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1496
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1497 ReSampleContext *audio_resample_init(int output_channels, int input_channels,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1498 int output_rate, int input_rate);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1499 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1500 void audio_resample_close(ReSampleContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1501
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1502 /* YUV420 format is assumed ! */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1503
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1504 struct ImgReSampleContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1505
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1506 typedef struct ImgReSampleContext ImgReSampleContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1507
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1508 ImgReSampleContext *img_resample_init(int output_width, int output_height,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1509 int input_width, int input_height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1510
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1511 ImgReSampleContext *img_resample_full_init(int owidth, int oheight,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1512 int iwidth, int iheight,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1513 int topBand, int bottomBand,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1514 int leftBand, int rightBand);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1515
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1516 void img_resample(ImgReSampleContext *s,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1517 AVPicture *output, const AVPicture *input);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1518
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1519 void img_resample_close(ImgReSampleContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1520
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1521 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1522 * Allocate memory for a picture. Call avpicture_free to free it.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1523 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1524 * @param picture the picture to be filled in.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1525 * @param pix_fmt the format of the picture.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1526 * @param width the width of the picture.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1527 * @param height the height of the picture.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1528 * @return 0 if successful, -1 if not.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1529 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1530 int avpicture_alloc(AVPicture *picture, int pix_fmt, int width, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1531
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1532 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1533 const char *avcodec_get_pix_fmt_name(int pix_fmt);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1534 enum PixelFormat avcodec_get_pix_fmt(const char* name);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1535
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1536 #define FF_LOSS_RESOLUTION 0x0001 /* loss due to resolution change */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1537 #define FF_LOSS_DEPTH 0x0002 /* loss due to color depth change */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1538 #define FF_LOSS_COLORSPACE 0x0004 /* loss due to color space conversion */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1539 #define FF_LOSS_ALPHA 0x0008 /* loss of alpha bits */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1540 #define FF_LOSS_COLORQUANT 0x0010 /* loss due to color quantization */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1541 #define FF_LOSS_CHROMA 0x0020 /* loss of chroma (e.g. rgb to gray conversion) */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1542
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1543 int avcodec_get_pix_fmt_loss(int dst_pix_fmt, int src_pix_fmt,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1544 int has_alpha);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1545 int avcodec_find_best_pix_fmt(int pix_fmt_mask, int src_pix_fmt,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1546 int has_alpha, int *loss_ptr);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1547
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1548 #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1549 #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1550 int img_get_alpha_info(const AVPicture *src,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1551 int pix_fmt, int width, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1552
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1553 /* convert among pixel formats */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1554 int img_convert(AVPicture *dst, int dst_pix_fmt,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1555 const AVPicture *src, int pix_fmt,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1556 int width, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1557
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1558 /* deinterlace a picture */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1559 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1560 int pix_fmt, int width, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1561
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1562 /* external high level API */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1563
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1564 extern AVCodec *first_avcodec;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1565
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1566 /* returns LIBAVCODEC_VERSION_INT constant */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1567 unsigned avcodec_version(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1568 /* returns LIBAVCODEC_BUILD constant */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1569 unsigned avcodec_build(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1570 void avcodec_init(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1571
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1572 void register_avcodec(AVCodec *format);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1573 AVCodec *avcodec_find_encoder(enum CodecID id);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1574 AVCodec *avcodec_find_encoder_by_name(const char *name);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1575 AVCodec *avcodec_find_decoder(enum CodecID id);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1576 AVCodec *avcodec_find_decoder_by_name(const char *name);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1577 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1578
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1579 void avcodec_get_context_defaults(AVCodecContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1580 AVCodecContext *avcodec_alloc_context(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1581 AVFrame *avcodec_alloc_frame(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1582
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1583 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1584 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1585 void avcodec_default_free_buffers(AVCodecContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1586
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1587 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1588 * opens / inits the AVCodecContext.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1589 * not thread save!
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1590 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1591 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1592
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1593 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1594 int *frame_size_ptr,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1595 uint8_t *buf, int buf_size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1596 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1597 int *data_size_ptr,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1598 uint8_t *buf, int buf_size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1599 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1600 const short *samples);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1601
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1602 int avcodec_close(AVCodecContext *avctx);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1603
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1604 void avcodec_register_all(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1605
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1606 void avcodec_flush_buffers(AVCodecContext *avctx);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1607
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1608 /* misc usefull functions */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1609
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1610 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1611 * returns a single letter to describe the picture type
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1612 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1613 char av_get_pict_type_char(int pict_type);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1614
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1615 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1616 * reduce a fraction.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1617 * this is usefull for framerate calculations
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1618 * @param max the maximum allowed for dst_nom & dst_den
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1619 * @return 1 if exact, 0 otherwise
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1620 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1621 int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1622
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1623 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1624 * rescale a 64bit integer.
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1625 * a simple a*b/c isnt possible as it can overflow
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1626 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1627 int64_t av_rescale(int64_t a, int b, int c);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1628
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1629
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1630 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1631 * Interface for 0.5.0 version
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1632 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1633 * do not even think about it's usage for this moment
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1634 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1635
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1636 typedef struct {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1637 /// compressed size used from given memory buffer
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1638 int size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1639 /// I/P/B frame type
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1640 int frame_type;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1641 } avc_enc_result_t;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1642
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1643 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1644 * Commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1645 * order can't be changed - once it was defined
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1646 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1647 typedef enum {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1648 // general commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1649 AVC_OPEN_BY_NAME = 0xACA000,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1650 AVC_OPEN_BY_CODEC_ID,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1651 AVC_OPEN_BY_FOURCC,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1652 AVC_CLOSE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1653
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1654 AVC_FLUSH,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1655 // pin - struct { uint8_t* src, uint_t src_size }
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1656 // pout - struct { AVPicture* img, consumed_bytes,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1657 AVC_DECODE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1658 // pin - struct { AVPicture* img, uint8_t* dest, uint_t dest_size }
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1659 // pout - uint_t used_from_dest_size
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1660 AVC_ENCODE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1661
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1662 // query/get video commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1663 AVC_GET_VERSION = 0xACB000,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1664 AVC_GET_WIDTH,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1665 AVC_GET_HEIGHT,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1666 AVC_GET_DELAY,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1667 AVC_GET_QUANT_TABLE,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1668 // ...
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1669
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1670 // query/get audio commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1671 AVC_GET_FRAME_SIZE = 0xABC000,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1672
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1673 // maybe define some simple structure which
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1674 // might be passed to the user - but they can't
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1675 // contain any codec specific parts and these
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1676 // calls are usualy necessary only few times
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1677
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1678 // set video commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1679 AVC_SET_WIDTH = 0xACD000,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1680 AVC_SET_HEIGHT,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1681
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1682 // set video encoding commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1683 AVC_SET_FRAME_RATE = 0xACD800,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1684 AVC_SET_QUALITY,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1685 AVC_SET_HURRY_UP,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1686
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1687 // set audio commands
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1688 AVC_SET_SAMPLE_RATE = 0xACE000,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1689 AVC_SET_CHANNELS,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1690
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1691 } avc_cmd_t;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1692
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1693 /**
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1694 * \param handle allocated private structure by libavcodec
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1695 * for initialization pass NULL - will be returned pout
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1696 * user is supposed to know nothing about its structure
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1697 * \param cmd type of operation to be performed
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1698 * \param pint input parameter
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1699 * \param pout output parameter
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1700 *
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1701 * \returns command status - eventually for query command it might return
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1702 * integer resulting value
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1703 */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1704 int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1705
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1706 /* frame parsing */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1707 typedef struct AVCodecParserContext {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1708 void *priv_data;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1709 struct AVCodecParser *parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1710 int64_t frame_offset; /* offset of the current frame */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1711 int64_t cur_offset; /* current offset
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1712 (incremented by each av_parser_parse()) */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1713 int64_t last_frame_offset; /* offset of the last frame */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1714 /* video info */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1715 int pict_type; /* XXX: put it back in AVCodecContext */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1716 int repeat_pict; /* XXX: put it back in AVCodecContext */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1717 int64_t pts; /* pts of the current frame */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1718 int64_t dts; /* dts of the current frame */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1719
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1720 /* private data */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1721 int64_t last_pts;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1722 int64_t last_dts;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1723
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1724 #define AV_PARSER_PTS_NB 4
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1725 int cur_frame_start_index;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1726 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1727 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1728 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1729 } AVCodecParserContext;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1730
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1731 typedef struct AVCodecParser {
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1732 int codec_ids[3]; /* several codec IDs are permitted */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1733 int priv_data_size;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1734 int (*parser_init)(AVCodecParserContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1735 int (*parser_parse)(AVCodecParserContext *s,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1736 AVCodecContext *avctx,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1737 uint8_t **poutbuf, int *poutbuf_size,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1738 const uint8_t *buf, int buf_size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1739 void (*parser_close)(AVCodecParserContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1740 struct AVCodecParser *next;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1741 } AVCodecParser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1742
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1743 extern AVCodecParser *av_first_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1744
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1745 void av_register_codec_parser(AVCodecParser *parser);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1746 AVCodecParserContext *av_parser_init(int codec_id);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1747 int av_parser_parse(AVCodecParserContext *s,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1748 AVCodecContext *avctx,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1749 uint8_t **poutbuf, int *poutbuf_size,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1750 const uint8_t *buf, int buf_size,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1751 int64_t pts, int64_t dts);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1752 void av_parser_close(AVCodecParserContext *s);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1753
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1754 extern AVCodecParser mpegvideo_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1755 extern AVCodecParser mpeg4video_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1756 extern AVCodecParser h263_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1757 extern AVCodecParser h264_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1758 extern AVCodecParser mpegaudio_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1759 extern AVCodecParser ac3_parser;
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1760
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1761 /*char *av_strdup(const char *s);*/
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1762 void __av_freep(void **ptr);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1763 #define av_freep(p) __av_freep((void **)(p))
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1764 void *av_fast_realloc(void *ptr, int *size, unsigned int min_size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1765 /* for static data only */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1766 /* call av_free_static to release all staticaly allocated tables */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1767 void av_free_static(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1768 void *__av_mallocz_static(void** location, unsigned int size);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1769 #define av_mallocz_static(p, s) __av_mallocz_static((void **)(p), s)
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1770
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1771 /* add by bero : in adx.c */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1772 int is_adx(const unsigned char *buf,size_t bufsize);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1773
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1774 void img_copy(AVPicture *dst, const AVPicture *src,
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1775 int pix_fmt, int width, int height);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1776
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1777 /* av_log API */
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1778
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1779 #include <stdarg.h>
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1780
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1781 #define AV_LOG_ERROR 0
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1782 #define AV_LOG_INFO 1
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1783 #define AV_LOG_DEBUG 2
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1784
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1785 extern void av_log(AVCodecContext*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1786 extern void av_vlog(AVCodecContext*, int level, const char *fmt, va_list);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1787 extern int av_log_get_level(void);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1788 extern void av_log_set_level(int);
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1789 extern void av_log_set_callback(void (*)(AVCodecContext*, int, const char*, va_list));
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1790
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1791 #undef AV_LOG_TRAP_PRINTF
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1792 #ifdef AV_LOG_TRAP_PRINTF
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1793 #define printf DO NOT USE
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1794 #define fprintf DO NOT USE
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1795 #undef stderr
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1796 #define stderr DO NOT USE
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1797 #endif
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1798
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1799 #ifdef __cplusplus
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1800 }
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1801 #endif
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1802
5da5c262b1ef [svn] - input proposed shorten input plugin for hacking
nenolod
parents:
diff changeset
1803 #endif /* AVCODEC_H */