Mercurial > libavcodec.hg
comparison avcodec.h @ 2979:bfabfdf9ce55 libavcodec
COSMETICS: tabs --> spaces, some prettyprinting
| author | diego |
|---|---|
| date | Thu, 22 Dec 2005 01:10:11 +0000 |
| parents | 1c22981c3498 |
| children | 9d7d2bb70fd6 |
comparison
equal
deleted
inserted
replaced
| 2978:403183bbb505 | 2979:bfabfdf9ce55 |
|---|---|
| 13 | 13 |
| 14 #include "avutil.h" | 14 #include "avutil.h" |
| 15 #include <sys/types.h> /* size_t */ | 15 #include <sys/types.h> /* size_t */ |
| 16 | 16 |
| 17 //FIXME the following 2 really dont belong in here | 17 //FIXME the following 2 really dont belong in here |
| 18 #define FFMPEG_VERSION_INT 0x000409 | 18 #define FFMPEG_VERSION_INT 0x000409 |
| 19 #define FFMPEG_VERSION "CVS" | 19 #define FFMPEG_VERSION "CVS" |
| 20 | 20 |
| 21 #define AV_STRINGIFY(s) AV_TOSTRING(s) | 21 #define AV_STRINGIFY(s) AV_TOSTRING(s) |
| 22 #define AV_TOSTRING(s) #s | 22 #define AV_TOSTRING(s) #s |
| 23 | 23 |
| 24 #define LIBAVCODEC_VERSION_INT ((51<<16)+(0<<8)+0) | 24 #define LIBAVCODEC_VERSION_INT ((51<<16)+(0<<8)+0) |
| 25 #define LIBAVCODEC_VERSION 51.0.0 | 25 #define LIBAVCODEC_VERSION 51.0.0 |
| 26 #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT | 26 #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT |
| 27 | 27 |
| 28 #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) | 28 #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) |
| 29 | 29 |
| 30 #define AV_NOPTS_VALUE int64_t_C(0x8000000000000000) | 30 #define AV_NOPTS_VALUE int64_t_C(0x8000000000000000) |
| 31 #define AV_TIME_BASE 1000000 | 31 #define AV_TIME_BASE 1000000 |
| 32 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} | 32 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} |
| 33 | 33 |
| 34 enum CodecID { | 34 enum CodecID { |
| 35 CODEC_ID_NONE, | 35 CODEC_ID_NONE, |
| 36 CODEC_ID_MPEG1VIDEO, | 36 CODEC_ID_MPEG1VIDEO, |
| 37 CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */ | 37 CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */ |
| 360 #define CODEC_FLAG2_STRICT_GOP 0x00000002 ///< strictly enforce GOP size | 360 #define CODEC_FLAG2_STRICT_GOP 0x00000002 ///< strictly enforce GOP size |
| 361 #define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< skip bitstream encoding | 361 #define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< skip bitstream encoding |
| 362 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< place global headers at every keyframe instead of in extradata | 362 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< place global headers at every keyframe instead of in extradata |
| 363 | 363 |
| 364 /* Unsupported options : | 364 /* Unsupported options : |
| 365 * Syntax Arithmetic coding (SAC) | 365 * Syntax Arithmetic coding (SAC) |
| 366 * Reference Picture Selection | 366 * Reference Picture Selection |
| 367 * Independant Segment Decoding */ | 367 * Independant Segment Decoding */ |
| 368 /* /Fx */ | 368 /* /Fx */ |
| 369 /* codec capabilities */ | 369 /* codec capabilities */ |
| 370 | 370 |
| 371 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback | 371 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback |
| 372 /** | 372 /** |
| 644 * - encoding: set by user\ | 644 * - encoding: set by user\ |
| 645 * - decoding: set by lavc\ | 645 * - decoding: set by lavc\ |
| 646 */\ | 646 */\ |
| 647 int8_t *ref_index[2]; | 647 int8_t *ref_index[2]; |
| 648 | 648 |
| 649 #define FF_QSCALE_TYPE_MPEG1 0 | 649 #define FF_QSCALE_TYPE_MPEG1 0 |
| 650 #define FF_QSCALE_TYPE_MPEG2 1 | 650 #define FF_QSCALE_TYPE_MPEG2 1 |
| 651 #define FF_QSCALE_TYPE_H264 2 | 651 #define FF_QSCALE_TYPE_H264 2 |
| 652 | 652 |
| 653 #define FF_BUFFER_TYPE_INTERNAL 1 | 653 #define FF_BUFFER_TYPE_INTERNAL 1 |
| 654 #define FF_BUFFER_TYPE_USER 2 ///< Direct rendering buffers (image is (de)allocated by user) | 654 #define FF_BUFFER_TYPE_USER 2 ///< Direct rendering buffers (image is (de)allocated by user) |
| 655 #define FF_BUFFER_TYPE_SHARED 4 ///< buffer from somewhere else, don't dealloc image (data/base), all other tables are not shared | 655 #define FF_BUFFER_TYPE_SHARED 4 ///< buffer from somewhere else, don't dealloc image (data/base), all other tables are not shared |
| 656 #define FF_BUFFER_TYPE_COPY 8 ///< just a (modified) copy of some other buffer, don't dealloc anything | 656 #define FF_BUFFER_TYPE_COPY 8 ///< just a (modified) copy of some other buffer, don't dealloc anything |
| 682 */ | 682 */ |
| 683 typedef struct AVCLASS AVClass; | 683 typedef struct AVCLASS AVClass; |
| 684 struct AVCLASS { | 684 struct AVCLASS { |
| 685 const char* class_name; | 685 const char* class_name; |
| 686 const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext | 686 const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext |
| 687 or AVFormatContext, which begin with an AVClass. | 687 or AVFormatContext, which begin with an AVClass. |
| 688 Needed because av_log is in libavcodec and has no visibility | 688 Needed because av_log is in libavcodec and has no visibility |
| 689 of AVIn/OutputFormat */ | 689 of AVIn/OutputFormat */ |
| 690 struct AVOption *option; | 690 struct AVOption *option; |
| 691 }; | 691 }; |
| 692 | 692 |
| 693 /** | 693 /** |
| 694 * main external api structure. | 694 * main external api structure. |
| 1250 * with FORCE flag you may instead enable given CPU features | 1250 * with FORCE flag you may instead enable given CPU features |
| 1251 * (Dangerous: usable in case of misdetection, improper usage however will | 1251 * (Dangerous: usable in case of misdetection, improper usage however will |
| 1252 * result into program crash) | 1252 * result into program crash) |
| 1253 */ | 1253 */ |
| 1254 unsigned dsp_mask; | 1254 unsigned dsp_mask; |
| 1255 #define FF_MM_FORCE 0x80000000 /* force usage of selected flags (OR) */ | 1255 #define FF_MM_FORCE 0x80000000 /* force usage of selected flags (OR) */ |
| 1256 /* lower 16 bits - CPU features */ | 1256 /* lower 16 bits - CPU features */ |
| 1257 #ifdef HAVE_MMX | 1257 #ifdef HAVE_MMX |
| 1258 #define FF_MM_MMX 0x0001 /* standard MMX */ | 1258 #define FF_MM_MMX 0x0001 /* standard MMX */ |
| 1259 #define FF_MM_3DNOW 0x0004 /* AMD 3DNOW */ | 1259 #define FF_MM_3DNOW 0x0004 /* AMD 3DNOW */ |
| 1260 #define FF_MM_MMXEXT 0x0002 /* SSE integer functions or AMD MMX ext */ | 1260 #define FF_MM_MMXEXT 0x0002 /* SSE integer functions or AMD MMX ext */ |
| 1261 #define FF_MM_SSE 0x0008 /* SSE functions */ | 1261 #define FF_MM_SSE 0x0008 /* SSE functions */ |
| 1262 #define FF_MM_SSE2 0x0010 /* PIV SSE2 functions */ | 1262 #define FF_MM_SSE2 0x0010 /* PIV SSE2 functions */ |
| 1263 #define FF_MM_3DNOWEXT 0x0020 /* AMD 3DNowExt */ | 1263 #define FF_MM_3DNOWEXT 0x0020 /* AMD 3DNowExt */ |
| 1264 #endif /* HAVE_MMX */ | 1264 #endif /* HAVE_MMX */ |
| 1265 #ifdef HAVE_IWMMXT | 1265 #ifdef HAVE_IWMMXT |
| 1266 #define FF_MM_IWMMXT 0x0100 /* XScale IWMMXT */ | 1266 #define FF_MM_IWMMXT 0x0100 /* XScale IWMMXT */ |
| 1267 #endif /* HAVE_IWMMXT */ | 1267 #endif /* HAVE_IWMMXT */ |
| 1268 | 1268 |
| 1269 /** | 1269 /** |
| 1270 * bits per sample/pixel from the demuxer (needed for huffyuv). | 1270 * bits per sample/pixel from the demuxer (needed for huffyuv). |
| 1271 * - encoding: set by lavc | 1271 * - encoding: set by lavc |
| 2221 int has_alpha, int *loss_ptr); | 2221 int has_alpha, int *loss_ptr); |
| 2222 | 2222 |
| 2223 #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */ | 2223 #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */ |
| 2224 #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */ | 2224 #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */ |
| 2225 int img_get_alpha_info(const AVPicture *src, | 2225 int img_get_alpha_info(const AVPicture *src, |
| 2226 int pix_fmt, int width, int height); | 2226 int pix_fmt, int width, int height); |
| 2227 | 2227 |
| 2228 /* convert among pixel formats */ | 2228 /* convert among pixel formats */ |
| 2229 int img_convert(AVPicture *dst, int dst_pix_fmt, | 2229 int img_convert(AVPicture *dst, int dst_pix_fmt, |
| 2230 const AVPicture *src, int pix_fmt, | 2230 const AVPicture *src, int pix_fmt, |
| 2231 int width, int height); | 2231 int width, int height); |
