comparison avcodec.h @ 7824:635ed2559262 libavcodec

Remove stuff under #if LIBAVCODEC_VERSION_INT.
author michael
date Mon, 08 Sep 2008 15:03:17 +0000
parents 4525dcd81357
children 8d5e06d2eed8
comparison
equal deleted inserted replaced
7823:4525dcd81357 7824:635ed2559262
261 261
262 /* audio codecs */ 262 /* audio codecs */
263 CODEC_ID_MP2= 0x15000, 263 CODEC_ID_MP2= 0x15000,
264 CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 264 CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
265 CODEC_ID_AAC, 265 CODEC_ID_AAC,
266 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
267 CODEC_ID_MPEG4AAC,
268 #endif
269 CODEC_ID_AC3, 266 CODEC_ID_AC3,
270 CODEC_ID_DTS, 267 CODEC_ID_DTS,
271 CODEC_ID_VORBIS, 268 CODEC_ID_VORBIS,
272 CODEC_ID_DVAUDIO, 269 CODEC_ID_DVAUDIO,
273 CODEC_ID_WMAV1, 270 CODEC_ID_WMAV1,
323 320
324 CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS 321 CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
325 * stream (only used by libavformat) */ 322 * stream (only used by libavformat) */
326 }; 323 };
327 324
328 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
329 /* CODEC_ID_MP3LAME is obsolete */
330 #define CODEC_ID_MP3LAME CODEC_ID_MP3
331 #define CODEC_ID_MPEG4AAC CODEC_ID_AAC
332 #endif
333
334 enum CodecType { 325 enum CodecType {
335 CODEC_TYPE_UNKNOWN = -1, 326 CODEC_TYPE_UNKNOWN = -1,
336 CODEC_TYPE_VIDEO, 327 CODEC_TYPE_VIDEO,
337 CODEC_TYPE_AUDIO, 328 CODEC_TYPE_AUDIO,
338 CODEC_TYPE_DATA, 329 CODEC_TYPE_DATA,
436 location instead of only at frame boundaries. */ 427 location instead of only at frame boundaries. */
437 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< Normalize adaptive quantization. 428 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< Normalize adaptive quantization.
438 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT. 429 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT.
439 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay. 430 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay.
440 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan. 431 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan.
441 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
442 #define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< Use trellis quantization.
443 #endif
444 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe. 432 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe.
445 #define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT). 433 #define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT).
446 /* Fx : Flag for h263+ extra options */ 434 /* Fx : Flag for h263+ extra options */
447 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
448 #define CODEC_FLAG_H263P_AIC 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction (remove this)
449 #endif
450 #define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction 435 #define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction
451 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector 436 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector
452 #define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp. 437 #define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp.
453 #define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon. 438 #define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon.
454 #define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC 439 #define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC
1029 1014
1030 struct AVCodec *codec; 1015 struct AVCodec *codec;
1031 1016
1032 void *priv_data; 1017 void *priv_data;
1033 1018
1034 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1035 /* unused, FIXME remove*/
1036 int rtp_mode;
1037 #endif
1038
1039 int rtp_payload_size; /* The size of the RTP payload: the coder will */ 1019 int rtp_payload_size; /* The size of the RTP payload: the coder will */
1040 /* do its best to deliver a chunk with size */ 1020 /* do its best to deliver a chunk with size */
1041 /* below rtp_payload_size, the chunk will start */ 1021 /* below rtp_payload_size, the chunk will start */
1042 /* with a start code on some codecs like H.263. */ 1022 /* with a start code on some codecs like H.263. */
1043 /* This doesn't take account of any particular */ 1023 /* This doesn't take account of any particular */
1345 * darkness masking (0-> disabled) 1325 * darkness masking (0-> disabled)
1346 * - encoding: Set by user. 1326 * - encoding: Set by user.
1347 * - decoding: unused 1327 * - decoding: unused
1348 */ 1328 */
1349 float dark_masking; 1329 float dark_masking;
1350
1351
1352 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1353 /* for binary compatibility */
1354 int unused;
1355 #endif
1356 1330
1357 /** 1331 /**
1358 * IDCT algorithm, see FF_IDCT_* below. 1332 * IDCT algorithm, see FF_IDCT_* below.
1359 * - encoding: Set by user. 1333 * - encoding: Set by user.
1360 * - decoding: Set by user. 1334 * - decoding: Set by user.
1428 /** 1402 /**
1429 * bits per sample/pixel from the demuxer (needed for huffyuv). 1403 * bits per sample/pixel from the demuxer (needed for huffyuv).
1430 * - encoding: Set by libavcodec. 1404 * - encoding: Set by libavcodec.
1431 * - decoding: Set by user. 1405 * - decoding: Set by user.
1432 */ 1406 */
1433 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1434 int bits_per_sample;
1435 #else
1436 int bits_per_coded_sample; 1407 int bits_per_coded_sample;
1437 #endif
1438 1408
1439 /** 1409 /**
1440 * prediction method (needed for huffyuv) 1410 * prediction method (needed for huffyuv)
1441 * - encoding: Set by user. 1411 * - encoding: Set by user.
1442 * - decoding: unused 1412 * - decoding: unused
2371 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff); 2341 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
2372 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx); 2342 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
2373 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance); 2343 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
2374 void av_resample_close(struct AVResampleContext *c); 2344 void av_resample_close(struct AVResampleContext *c);
2375 2345
2376 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
2377 /* YUV420 format is assumed ! */
2378
2379 /**
2380 * @deprecated Use the software scaler (swscale) instead.
2381 */
2382 typedef struct ImgReSampleContext ImgReSampleContext attribute_deprecated;
2383
2384 /**
2385 * @deprecated Use the software scaler (swscale) instead.
2386 */
2387 attribute_deprecated ImgReSampleContext *img_resample_init(int output_width, int output_height,
2388 int input_width, int input_height);
2389
2390 /**
2391 * @deprecated Use the software scaler (swscale) instead.
2392 */
2393 attribute_deprecated ImgReSampleContext *img_resample_full_init(int owidth, int oheight,
2394 int iwidth, int iheight,
2395 int topBand, int bottomBand,
2396 int leftBand, int rightBand,
2397 int padtop, int padbottom,
2398 int padleft, int padright);
2399
2400 /**
2401 * @deprecated Use the software scaler (swscale) instead.
2402 */
2403 attribute_deprecated void img_resample(struct ImgReSampleContext *s,
2404 AVPicture *output, const AVPicture *input);
2405
2406 /**
2407 * @deprecated Use the software scaler (swscale) instead.
2408 */
2409 attribute_deprecated void img_resample_close(struct ImgReSampleContext *s);
2410
2411 #endif
2412
2413 /** 2346 /**
2414 * Allocate memory for a picture. Call avpicture_free to free it. 2347 * Allocate memory for a picture. Call avpicture_free to free it.
2415 * 2348 *
2416 * @param picture the picture to be filled in 2349 * @param picture the picture to be filled in
2417 * @param pix_fmt the format of the picture 2350 * @param pix_fmt the format of the picture
2538 * @return ored mask of FF_ALPHA_xxx constants 2471 * @return ored mask of FF_ALPHA_xxx constants
2539 */ 2472 */
2540 int img_get_alpha_info(const AVPicture *src, 2473 int img_get_alpha_info(const AVPicture *src,
2541 int pix_fmt, int width, int height); 2474 int pix_fmt, int width, int height);
2542 2475
2543 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
2544 /**
2545 * convert among pixel formats
2546 * @deprecated Use the software scaler (swscale) instead.
2547 */
2548 attribute_deprecated int img_convert(AVPicture *dst, int dst_pix_fmt,
2549 const AVPicture *src, int pix_fmt,
2550 int width, int height);
2551 #endif
2552
2553 /* deinterlace a picture */ 2476 /* deinterlace a picture */
2554 /* deinterlace - if not supported return -1 */ 2477 /* deinterlace - if not supported return -1 */
2555 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, 2478 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
2556 int pix_fmt, int width, int height); 2479 int pix_fmt, int width, int height);
2557 2480
2558 /* external high level API */ 2481 /* external high level API */
2559 2482
2560 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
2561 extern AVCodec *first_avcodec;
2562 #endif
2563 AVCodec *av_codec_next(AVCodec *c); 2483 AVCodec *av_codec_next(AVCodec *c);
2564 2484
2565 /** 2485 /**
2566 * Returns the LIBAVCODEC_VERSION_INT constant. 2486 * Returns the LIBAVCODEC_VERSION_INT constant.
2567 */ 2487 */
2568 unsigned avcodec_version(void); 2488 unsigned avcodec_version(void);
2569
2570 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
2571 /* returns LIBAVCODEC_BUILD constant */
2572 attribute_deprecated unsigned avcodec_build(void);
2573 #endif
2574 2489
2575 /** 2490 /**
2576 * Initializes libavcodec. 2491 * Initializes libavcodec.
2577 * 2492 *
2578 * @warning This function \e must be called before any other libavcodec 2493 * @warning This function \e must be called before any other libavcodec
2921 void (*parser_close)(AVCodecParserContext *s); 2836 void (*parser_close)(AVCodecParserContext *s);
2922 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); 2837 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
2923 struct AVCodecParser *next; 2838 struct AVCodecParser *next;
2924 } AVCodecParser; 2839 } AVCodecParser;
2925 2840
2926 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
2927 extern AVCodecParser *av_first_parser;
2928 #endif
2929 AVCodecParser *av_parser_next(AVCodecParser *c); 2841 AVCodecParser *av_parser_next(AVCodecParser *c);
2930 2842
2931 void av_register_codec_parser(AVCodecParser *parser); 2843 void av_register_codec_parser(AVCodecParser *parser);
2932 AVCodecParserContext *av_parser_init(int codec_id); 2844 AVCodecParserContext *av_parser_init(int codec_id);
2933 int av_parser_parse(AVCodecParserContext *s, 2845 int av_parser_parse(AVCodecParserContext *s,
2996 /** 2908 /**
2997 * Pad image. 2909 * Pad image.
2998 */ 2910 */
2999 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, 2911 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt,
3000 int padtop, int padbottom, int padleft, int padright, int *color); 2912 int padtop, int padbottom, int padleft, int padright, int *color);
3001
3002 #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
3003 /**
3004 * @deprecated Use the software scaler (swscale) instead.
3005 */
3006 attribute_deprecated void img_copy(AVPicture *dst, const AVPicture *src,
3007 int pix_fmt, int width, int height);
3008
3009 /**
3010 * @deprecated Use the software scaler (swscale) instead.
3011 */
3012 attribute_deprecated int img_crop(AVPicture *dst, const AVPicture *src,
3013 int pix_fmt, int top_band, int left_band);
3014
3015 /**
3016 * @deprecated Use the software scaler (swscale) instead.
3017 */
3018 attribute_deprecated int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt,
3019 int padtop, int padbottom, int padleft, int padright, int *color);
3020 #endif
3021 2913
3022 extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v); 2914 extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
3023 2915
3024 /** 2916 /**
3025 * Parses \p str and put in \p width_ptr and \p height_ptr the detected values. 2917 * Parses \p str and put in \p width_ptr and \p height_ptr the detected values.