Mercurial > libavcodec.hg
comparison avcodec.h @ 1200:b448d7c17215 libavcodec
new YUV formats for correct JPEG YUV support - added automatic pixel format conversion guessing (minimize loss and size)
author | bellard |
---|---|
date | Sun, 20 Apr 2003 16:15:43 +0000 |
parents | 2e06398e4647 |
children | 0f37976aa436 |
comparison
equal
deleted
inserted
replaced
1199:6b566c5d02e4 | 1200:b448d7c17215 |
---|---|
13 | 13 |
14 #include "common.h" | 14 #include "common.h" |
15 | 15 |
16 #define LIBAVCODEC_VERSION_INT 0x000406 | 16 #define LIBAVCODEC_VERSION_INT 0x000406 |
17 #define LIBAVCODEC_VERSION "0.4.6" | 17 #define LIBAVCODEC_VERSION "0.4.6" |
18 #define LIBAVCODEC_BUILD 4664 | 18 #define LIBAVCODEC_BUILD 4665 |
19 #define LIBAVCODEC_BUILD_STR "4664" | 19 #define LIBAVCODEC_BUILD_STR "4665" |
20 | 20 |
21 #define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" LIBAVCODEC_BUILD_STR | 21 #define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" LIBAVCODEC_BUILD_STR |
22 | 22 |
23 enum CodecID { | 23 enum CodecID { |
24 CODEC_ID_NONE, | 24 CODEC_ID_NONE, |
91 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1 | 91 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1 |
92 PIX_FMT_GRAY8, | 92 PIX_FMT_GRAY8, |
93 PIX_FMT_MONOWHITE, ///< 0 is white | 93 PIX_FMT_MONOWHITE, ///< 0 is white |
94 PIX_FMT_MONOBLACK, ///< 0 is black | 94 PIX_FMT_MONOBLACK, ///< 0 is black |
95 PIX_FMT_PAL8, ///< 8 bit with RGBA palette | 95 PIX_FMT_PAL8, ///< 8 bit with RGBA palette |
96 PIX_FMT_YUVJ420P, ///< YUV full scale (jpeg) | |
97 PIX_FMT_YUVJ422P, ///< YUV full scale (jpeg) | |
98 PIX_FMT_YUVJ444P, ///< YUV full scale (jpeg) | |
96 PIX_FMT_NB, | 99 PIX_FMT_NB, |
97 }; | 100 }; |
98 | 101 |
99 /* currently unused, may be used if 24/32 bits samples ever supported */ | 102 /* currently unused, may be used if 24/32 bits samples ever supported */ |
100 enum SampleFormat { | 103 enum SampleFormat { |
1259 int pix_fmt, int width, int height); | 1262 int pix_fmt, int width, int height); |
1260 int avpicture_get_size(int pix_fmt, int width, int height); | 1263 int avpicture_get_size(int pix_fmt, int width, int height); |
1261 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); | 1264 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); |
1262 const char *avcodec_get_pix_fmt_name(int pix_fmt); | 1265 const char *avcodec_get_pix_fmt_name(int pix_fmt); |
1263 | 1266 |
1267 #define FF_LOSS_RESOLUTION 0x0001 /* loss due to resolution change */ | |
1268 #define FF_LOSS_DEPTH 0x0002 /* loss due to color depth change */ | |
1269 #define FF_LOSS_COLORSPACE 0x0004 /* loss due to color space conversion */ | |
1270 #define FF_LOSS_ALPHA 0x0008 /* loss of alpha bits */ | |
1271 #define FF_LOSS_COLORQUANT 0x0010 /* loss due to color quantization */ | |
1272 #define FF_LOSS_CHROMA 0x0020 /* loss of chroma (e.g. rgb to gray conversion) */ | |
1273 | |
1274 int avcodec_get_pix_fmt_loss(int dst_pix_fmt, int src_pix_fmt, | |
1275 int has_alpha); | |
1276 int avcodec_find_best_pix_fmt(int pix_fmt_mask, int src_pix_fmt, | |
1277 int has_alpha, int *loss_ptr); | |
1278 | |
1264 /* convert among pixel formats */ | 1279 /* convert among pixel formats */ |
1265 int img_convert(AVPicture *dst, int dst_pix_fmt, | 1280 int img_convert(AVPicture *dst, int dst_pix_fmt, |
1266 AVPicture *src, int pix_fmt, | 1281 AVPicture *src, int pix_fmt, |
1267 int width, int height); | 1282 int width, int height); |
1268 | 1283 |