aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-04-20 16:15:43 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-04-20 16:15:43 +0000
commitfab219971e9d532bb9aac0134331b760bc90cb69 (patch)
treed20f282f54a7cf66e5454c95197474ed77656f80 /libavcodec
parentcff5e386bfaff6499df761875da8727bf5ed250c (diff)
downloadffmpeg-fab219971e9d532bb9aac0134331b760bc90cb69.tar.gz
new YUV formats for correct JPEG YUV support - added automatic pixel format conversion guessing (minimize loss and size)
Originally committed as revision 1798 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b43858f12e..ac9f554466 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -15,8 +15,8 @@ extern "C" {
#define LIBAVCODEC_VERSION_INT 0x000406
#define LIBAVCODEC_VERSION "0.4.6"
-#define LIBAVCODEC_BUILD 4664
-#define LIBAVCODEC_BUILD_STR "4664"
+#define LIBAVCODEC_BUILD 4665
+#define LIBAVCODEC_BUILD_STR "4665"
#define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" LIBAVCODEC_BUILD_STR
@@ -93,6 +93,9 @@ enum PixelFormat {
PIX_FMT_MONOWHITE, ///< 0 is white
PIX_FMT_MONOBLACK, ///< 0 is black
PIX_FMT_PAL8, ///< 8 bit with RGBA palette
+ PIX_FMT_YUVJ420P, ///< YUV full scale (jpeg)
+ PIX_FMT_YUVJ422P, ///< YUV full scale (jpeg)
+ PIX_FMT_YUVJ444P, ///< YUV full scale (jpeg)
PIX_FMT_NB,
};
@@ -1261,6 +1264,18 @@ int avpicture_get_size(int pix_fmt, int width, int height);
void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift);
const char *avcodec_get_pix_fmt_name(int pix_fmt);
+#define FF_LOSS_RESOLUTION 0x0001 /* loss due to resolution change */
+#define FF_LOSS_DEPTH 0x0002 /* loss due to color depth change */
+#define FF_LOSS_COLORSPACE 0x0004 /* loss due to color space conversion */
+#define FF_LOSS_ALPHA 0x0008 /* loss of alpha bits */
+#define FF_LOSS_COLORQUANT 0x0010 /* loss due to color quantization */
+#define FF_LOSS_CHROMA 0x0020 /* loss of chroma (e.g. rgb to gray conversion) */
+
+int avcodec_get_pix_fmt_loss(int dst_pix_fmt, int src_pix_fmt,
+ int has_alpha);
+int avcodec_find_best_pix_fmt(int pix_fmt_mask, int src_pix_fmt,
+ int has_alpha, int *loss_ptr);
+
/* convert among pixel formats */
int img_convert(AVPicture *dst, int dst_pix_fmt,
AVPicture *src, int pix_fmt,