annotate Plugins/Input/wma/libffwma/avcodec.h @ 137:b8d4c1faa6d7 trunk

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