X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Favcodec.h;h=9d38b591c913a7f5f1d8b45501c34d51ab9360dc;hb=b7baebb754f548ccd106ebcacd09ffa289382fd4;hp=6b824d5281b4f86e180079c869089070a09a9d92;hpb=1ce298dac51cb948a7170ed28e8290530cf150f4;p=ffmpeg diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 6b824d5281b..9d38b591c91 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -530,6 +530,7 @@ enum AVCodecID { AV_CODEC_ID_VPLAYER = MKBETAG('V','P','l','r'), AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'), AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska + AV_CODEC_ID_HDMV_TEXT_SUBTITLE = MKBETAG('B','D','T','X'), /* other specific kind of codecs (generally used for attachments) */ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. @@ -812,7 +813,7 @@ typedef struct RcOverride{ /** * timecode is in drop frame format. DEPRECATED!!!! */ -#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 +#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13) /** * Input bitstream might be truncated at a packet boundaries @@ -827,15 +828,15 @@ typedef struct RcOverride{ /** * Show all frames before the first keyframe */ -#define AV_CODEC_FLAG2_SHOW_ALL 0x00400000 +#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22) /** * Export motion vectors through frame side data */ -#define AV_CODEC_FLAG2_EXPORT_MVS 0x10000000 +#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28) /** * Do not skip samples and export skip information as frame side data */ -#define AV_CODEC_FLAG2_SKIP_MANUAL 0x20000000 +#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29) /* Unsupported options : * Syntax Arithmetic coding (SAC) @@ -1019,14 +1020,14 @@ typedef struct RcOverride{ /* /Fx */ /* codec capabilities */ -#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< Decoder can use draw_horiz_band callback. +#define CODEC_CAP_DRAW_HORIZ_BAND AV_CODEC_CAP_DRAW_HORIZ_BAND ///< Decoder can use draw_horiz_band callback. /** * Codec uses get_buffer() for allocating buffers and supports custom allocators. * If not set, it might not use get_buffer() at all or use operations that * assume the buffer was allocated by avcodec_default_get_buffer. */ -#define CODEC_CAP_DR1 0x0002 -#define CODEC_CAP_TRUNCATED 0x0008 +#define CODEC_CAP_DR1 AV_CODEC_CAP_DR1 +#define CODEC_CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED #if FF_API_XVMC /* Codec can export data for HW decoding. This flag indicates that * the codec would call get_format() with list that might contain HW accelerated @@ -1060,17 +1061,17 @@ typedef struct RcOverride{ * each output packet. If this flag is not set, the pts and duration will * be determined by libavcodec from the input frame. */ -#define CODEC_CAP_DELAY 0x0020 +#define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY /** * Codec can be fed a final frame with a smaller size. * This can be used to prevent truncation of the last audio samples. */ -#define CODEC_CAP_SMALL_LAST_FRAME 0x0040 +#define CODEC_CAP_SMALL_LAST_FRAME AV_CODEC_CAP_SMALL_LAST_FRAME #if FF_API_CAP_VDPAU /** * Codec can export data for HW decoding (VDPAU). */ -#define CODEC_CAP_HWACCEL_VDPAU 0x0080 +#define CODEC_CAP_HWACCEL_VDPAU AV_CODEC_CAP_HWACCEL_VDPAU #endif /** * Codec can output multiple frames per AVPacket @@ -1083,16 +1084,16 @@ typedef struct RcOverride{ * prohibiting stream copy in many cases thus it should only be considered * as a last resort. */ -#define CODEC_CAP_SUBFRAMES 0x0100 +#define CODEC_CAP_SUBFRAMES AV_CODEC_CAP_SUBFRAMES /** * Codec is experimental and is thus avoided in favor of non experimental * encoders */ -#define CODEC_CAP_EXPERIMENTAL 0x0200 +#define CODEC_CAP_EXPERIMENTAL AV_CODEC_CAP_EXPERIMENTAL /** * Codec should fill in channel configuration and samplerate instead of container */ -#define CODEC_CAP_CHANNEL_CONF 0x0400 +#define CODEC_CAP_CHANNEL_CONF AV_CODEC_CAP_CHANNEL_CONF #if FF_API_NEG_LINESIZES /** * @deprecated no codecs use this capability @@ -1102,31 +1103,31 @@ typedef struct RcOverride{ /** * Codec supports frame-level multithreading. */ -#define CODEC_CAP_FRAME_THREADS 0x1000 +#define CODEC_CAP_FRAME_THREADS AV_CODEC_CAP_FRAME_THREADS /** * Codec supports slice-based (or partition-based) multithreading. */ -#define CODEC_CAP_SLICE_THREADS 0x2000 +#define CODEC_CAP_SLICE_THREADS AV_CODEC_CAP_SLICE_THREADS /** * Codec supports changed parameters at any point. */ -#define CODEC_CAP_PARAM_CHANGE 0x4000 +#define CODEC_CAP_PARAM_CHANGE AV_CODEC_CAP_PARAM_CHANGE /** * Codec supports avctx->thread_count == 0 (auto). */ -#define CODEC_CAP_AUTO_THREADS 0x8000 +#define CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_AUTO_THREADS /** * Audio encoder supports receiving a different number of samples in each call. */ -#define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000 +#define CODEC_CAP_VARIABLE_FRAME_SIZE AV_CODEC_CAP_VARIABLE_FRAME_SIZE /** * Codec is intra only. */ -#define CODEC_CAP_INTRA_ONLY 0x40000000 +#define CODEC_CAP_INTRA_ONLY AV_CODEC_CAP_INTRA_ONLY /** * Codec is lossless. */ -#define CODEC_CAP_LOSSLESS 0x80000000 +#define CODEC_CAP_LOSSLESS AV_CODEC_CAP_LOSSLESS /** * HWAccel is experimental and is thus avoided in favor of non experimental @@ -2947,9 +2948,7 @@ typedef struct AVCodecContext { int dct_algo; #define FF_DCT_AUTO 0 #define FF_DCT_FASTINT 1 -#if FF_API_UNUSED_MEMBERS #define FF_DCT_INT 2 -#endif /* FF_API_UNUSED_MEMBERS */ #define FF_DCT_MMX 3 #define FF_DCT_ALTIVEC 5 #define FF_DCT_FAAN 6 @@ -3495,9 +3494,7 @@ typedef struct AVCodec { const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 -#if FF_API_LOWRES uint8_t max_lowres; ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres() -#endif const AVClass *priv_class; ///< AVClass for the private context const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} @@ -3715,6 +3712,9 @@ typedef struct AVHWAccel { * Hardware acceleration should be used for decoding even if the codec level * used is unknown or higher than the maximum supported level reported by the * hardware driver. + * + * It's generally a good idea to pass this flag unless you have a specific + * reason not to, as hardware tends to under-report supported levels. */ #define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)