---
As noted by wm4 the full scale formats have been deprecated for ages but
the entries of the enum have not (which this patch takes care of).

Also I'm a bit puzzled that pixel formats are in lavu while color space and
color range are in lavc. Would it be better to move them all to lavu?

Another point, (again AFAIU) pixel format/range/space seem to be more a frame
property, instead of a context one (kinda like interlacing). Would it make sense
to move everything there? The API I would envision would be an entry in AVFrame
and an AVFrameSideData for the color range and spaces.

Opinions on this?
Vittorio

 libavutil/pixfmt.h  | 4 ++++
 libavutil/version.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 0d6e0a3..641608b 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -74,9 +74,11 @@ enum AVPixelFormat {
     AV_PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is 
black, in each byte pixels are ordered from the msb to the lsb
     AV_PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is 
white, in each byte pixels are ordered from the msb to the lsb
     AV_PIX_FMT_PAL8,      ///< 8 bit with PIX_FMT_RGB32 palette
+#if FF_API_FULLSCALE_PIXFMT
     AV_PIX_FMT_YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), 
deprecated in favor of PIX_FMT_YUV420P and setting color_range
     AV_PIX_FMT_YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), 
deprecated in favor of PIX_FMT_YUV422P and setting color_range
     AV_PIX_FMT_YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), 
deprecated in favor of PIX_FMT_YUV444P and setting color_range
+#endif
 #if FF_API_XVMC
     AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet 
passing
     AV_PIX_FMT_XVMC_MPEG2_IDCT,
@@ -100,7 +102,9 @@ enum AVPixelFormat {
     AV_PIX_FMT_GRAY16BE,  ///<        Y        , 16bpp, big-endian
     AV_PIX_FMT_GRAY16LE,  ///<        Y        , 16bpp, little-endian
     AV_PIX_FMT_YUV440P,   ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y 
samples)
+#if FF_API_FULLSCALE_PIXFMT
     AV_PIX_FMT_YUVJ440P,  ///< planar YUV 4:4:0 full scale (JPEG), deprecated 
in favor of PIX_FMT_YUV440P and setting color_range
+#endif
     AV_PIX_FMT_YUVA420P,  ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 
2x2 Y & A samples)
 #if FF_API_VDPAU
     AV_PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains 
a vdpau_render_state struct which contains the bitstream of the slices as well 
as various fields extracted from headers
diff --git a/libavutil/version.h b/libavutil/version.h
index cd0981c..d2d6ca1 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -111,6 +111,9 @@
 #ifndef FF_API_OPT_TYPE_METADATA
 #define FF_API_OPT_TYPE_METADATA        (LIBAVUTIL_VERSION_MAJOR < 54)
 #endif
+#ifndef FF_API_FULLSCALE_PIXFMT
+#define FF_API_FULLSCALE_PIXFMT         (LIBAVUTIL_VERSION_MAJOR < 54)
+#endif 
 
 /**
  * @}
-- 
1.8.3.4 (Apple Git-47)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to