summaryrefslogtreecommitdiff
path: root/libavutil/frame.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-01 13:06:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-01 13:18:32 +0200
commit6e8e9f1e517ee52fe439f3e8ca762f09d235f21e (patch)
treeffd2f6414002eb7ba196046b78667b5b30676585 /libavutil/frame.h
parentec1ed6450620f01197920f1083b285e5c8355377 (diff)
parent8c02adc62d71dfbb079a04753d8c16152c49de88 (diff)
Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'
* commit '8c02adc62d71dfbb079a04753d8c16152c49de88': lavu: add all color-related enums to AVFrame Conflicts: libavcodec/avcodec.h libavutil/frame.c libavutil/frame.h libavutil/version.h The version check is changed so they are available with the current ABI FFmpeg libs should have no problems with added fields, nor should any application using the libs, and we regularly added fields in the past. We also moved 2 of these fields to AVFrame already previously without issues. See: a80e622924c89df69fb1c225ba432fe12fe6648e Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/frame.h')
-rw-r--r--libavutil/frame.h69
1 files changed, 27 insertions, 42 deletions
diff --git a/libavutil/frame.h b/libavutil/frame.h
index dd85174ba8..c23e5af8d5 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -33,32 +33,10 @@
#include "dict.h"
#include "rational.h"
#include "samplefmt.h"
+#include "pixfmt.h"
#include "version.h"
-enum AVColorSpace{
- AVCOL_SPC_RGB = 0,
- AVCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
- AVCOL_SPC_UNSPECIFIED = 2,
- AVCOL_SPC_FCC = 4,
- AVCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
- AVCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
- AVCOL_SPC_SMPTE240M = 7,
- AVCOL_SPC_YCOCG = 8, ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
- AVCOL_SPC_BT2020_NCL = 9, ///< ITU-R BT2020 non-constant luminance system
- AVCOL_SPC_BT2020_CL = 10, ///< ITU-R BT2020 constant luminance system
- AVCOL_SPC_NB , ///< Not part of ABI
-};
-#define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG
-
-enum AVColorRange{
- AVCOL_RANGE_UNSPECIFIED = 0,
- AVCOL_RANGE_MPEG = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges
- AVCOL_RANGE_JPEG = 2, ///< the normal 2^n-1 "JPEG" YUV ranges
- AVCOL_RANGE_NB , ///< Not part of ABI
-};
-
-
/**
* @defgroup lavu_frame AVFrame
* @ingroup lavu_data
@@ -453,6 +431,32 @@ typedef struct AVFrame {
*/
int flags;
+#if FF_API_AVFRAME_COLORSPACE
+ /**
+ * MPEG vs JPEG YUV range.
+ * It must be accessed using av_frame_get_color_range() and
+ * av_frame_set_color_range().
+ * - encoding: Set by user
+ * - decoding: Set by libavcodec
+ */
+ enum AVColorRange color_range;
+
+ enum AVColorPrimaries color_primaries;
+
+ enum AVColorTransferCharacteristic color_trc;
+
+ /**
+ * YUV colorspace type.
+ * It must be accessed using av_frame_get_colorspace() and
+ * av_frame_set_colorspace().
+ * - encoding: Set by user
+ * - decoding: Set by libavcodec
+ */
+ enum AVColorSpace colorspace;
+
+ enum AVChromaLocation chroma_location;
+#endif
+
/**
* frame timestamp estimated using various heuristics, in stream time base
* Code outside libavcodec should access this field using:
@@ -523,25 +527,6 @@ typedef struct AVFrame {
int pkt_size;
/**
- * YUV colorspace type.
- * It must be accessed using av_frame_get_colorspace() and
- * av_frame_set_colorspace().
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorSpace colorspace;
-
- /**
- * MPEG vs JPEG YUV range.
- * It must be accessed using av_frame_get_color_range() and
- * av_frame_set_color_range().
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorRange color_range;
-
-
- /**
* Not to be accessed directly from outside libavutil
*/
AVBufferRef *qp_table_buf;