diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-21 22:43:46 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-21 22:43:46 +0000 |
commit | d89f692f0ea078867be00397b2f8229510400325 (patch) | |
tree | 43b0dbd08ce0c0194494fe65eb585240d9a04702 /libavcodec/avcodec.h | |
parent | a61ec8e7ae1f74716142d72c07740f90c33ff67b (diff) | |
download | ffmpeg-d89f692f0ea078867be00397b2f8229510400325.tar.gz |
Extend the behavior of avcodec_get_pix_fmt(), if it cannot find a
pixel format for the provided name, make it look for the native endian
variant of the name.
Originally committed as revision 18130 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a19ecec7f2..cdc88b41b0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -31,7 +31,7 @@ #define LIBAVCODEC_VERSION_MAJOR 52 #define LIBAVCODEC_VERSION_MINOR 22 -#define LIBAVCODEC_VERSION_MICRO 1 +#define LIBAVCODEC_VERSION_MICRO 2 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ @@ -2708,6 +2708,18 @@ int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height); void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift); const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt); void avcodec_set_dimensions(AVCodecContext *s, int width, int height); + +/** + * Returns the pixel format corresponding to the name \p name. + * + * If there is no pixel format with name \p name, then looks for a + * pixel format with the name corresponding to the native endian + * format of \p name. + * For example in a little-endian system, first looks for "gray16", + * then for "gray16le". + * + * Finally if no pixel format has been found, returns \c PIX_FMT_NONE. + */ enum PixelFormat avcodec_get_pix_fmt(const char* name); unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat p); |