Mercurial > libavcodec.hg
comparison avcodec.h @ 9222:e314914641bc libavcodec
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.
author | stefano |
---|---|
date | Sat, 21 Mar 2009 22:43:46 +0000 |
parents | a15ec86bf752 |
children | 98f102ead3c6 |
comparison
equal
deleted
inserted
replaced
9221:a15ec86bf752 | 9222:e314914641bc |
---|---|
29 #include <errno.h> | 29 #include <errno.h> |
30 #include "libavutil/avutil.h" | 30 #include "libavutil/avutil.h" |
31 | 31 |
32 #define LIBAVCODEC_VERSION_MAJOR 52 | 32 #define LIBAVCODEC_VERSION_MAJOR 52 |
33 #define LIBAVCODEC_VERSION_MINOR 22 | 33 #define LIBAVCODEC_VERSION_MINOR 22 |
34 #define LIBAVCODEC_VERSION_MICRO 1 | 34 #define LIBAVCODEC_VERSION_MICRO 2 |
35 | 35 |
36 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 36 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
37 LIBAVCODEC_VERSION_MINOR, \ | 37 LIBAVCODEC_VERSION_MINOR, \ |
38 LIBAVCODEC_VERSION_MICRO) | 38 LIBAVCODEC_VERSION_MICRO) |
39 #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \ | 39 #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \ |
2706 */ | 2706 */ |
2707 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height); | 2707 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height); |
2708 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift); | 2708 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift); |
2709 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt); | 2709 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt); |
2710 void avcodec_set_dimensions(AVCodecContext *s, int width, int height); | 2710 void avcodec_set_dimensions(AVCodecContext *s, int width, int height); |
2711 | |
2712 /** | |
2713 * Returns the pixel format corresponding to the name \p name. | |
2714 * | |
2715 * If there is no pixel format with name \p name, then looks for a | |
2716 * pixel format with the name corresponding to the native endian | |
2717 * format of \p name. | |
2718 * For example in a little-endian system, first looks for "gray16", | |
2719 * then for "gray16le". | |
2720 * | |
2721 * Finally if no pixel format has been found, returns \c PIX_FMT_NONE. | |
2722 */ | |
2711 enum PixelFormat avcodec_get_pix_fmt(const char* name); | 2723 enum PixelFormat avcodec_get_pix_fmt(const char* name); |
2712 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat p); | 2724 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat p); |
2713 | 2725 |
2714 #define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ | 2726 #define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ |
2715 #define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ | 2727 #define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ |