X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fframe.h;h=c23e5af8d5d2f35e143c4ead6ca7b8249bbc887c;hb=40285d265906ea6c1d99cfeba64a5a6c1c9d4bd5;hp=ccc86d72c53f1e210fd454f9ff89be1af6b11218;hpb=93318983c3e565b3079362ec69cf3362febc5004;p=ffmpeg diff --git a/libavutil/frame.h b/libavutil/frame.h index ccc86d72c53..c23e5af8d5d 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 @@ -96,6 +74,14 @@ enum AVFrameSideDataType { * ReplayGain information in the form of the AVReplayGain struct. */ AV_FRAME_DATA_REPLAYGAIN, + /** + * This side data contains a 3x3 transformation matrix describing an affine + * transformation that needs to be applied to the frame for correct + * presentation. + * + * See libavutil/display.h for a detailed description of the data. + */ + AV_FRAME_DATA_DISPLAYMATRIX, }; typedef struct AVFrameSideData { @@ -445,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: @@ -514,25 +526,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 */