From: Jan Schmidt Date: Sun, 3 May 2015 16:18:22 +0000 (+1000) Subject: video: check colorimetry and chroma_site equality in gst_video_info_is_equal() X-Git-Tag: 1.19.3~511^2~3654 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62bdb117acb0c7600e1b825278196ee1de24a755;p=platform%2Fupstream%2Fgstreamer.git video: check colorimetry and chroma_site equality in gst_video_info_is_equal() Add VideoInfo accessors for colorimetry and chroma_site and use them when checking the equality of two GstVideoInfo --- diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 4338aec..03e1476 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -370,6 +370,11 @@ gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other) return FALSE; if (GST_VIDEO_INFO_FPS_D (info) != GST_VIDEO_INFO_FPS_D (other)) return FALSE; + if (!gst_video_colorimetry_is_equal (&GST_VIDEO_INFO_COLORIMETRY (info), + &GST_VIDEO_INFO_COLORIMETRY (other))) + return FALSE; + if (GST_VIDEO_INFO_CHROMA_SITE (info) != GST_VIDEO_INFO_CHROMA_SITE (other)) + return FALSE; for (i = 0; i < info->finfo->n_planes; i++) { if (info->stride[i] != other->stride[i]) diff --git a/gst-libs/gst/video/video-info.h b/gst-libs/gst/video/video-info.h index 8b1210d..20c653b 100644 --- a/gst-libs/gst/video/video-info.h +++ b/gst-libs/gst/video/video-info.h @@ -144,6 +144,9 @@ struct _GstVideoInfo { #define GST_VIDEO_INFO_FPS_N(i) ((i)->fps_n) #define GST_VIDEO_INFO_FPS_D(i) ((i)->fps_d) +#define GST_VIDEO_INFO_COLORIMETRY(i) ((i)->colorimetry) +#define GST_VIDEO_INFO_CHROMA_SITE(i) ((i)->chroma_site) + /* dealing with GstVideoInfo flags */ #define GST_VIDEO_INFO_FLAG_IS_SET(i,flag) ((GST_VIDEO_INFO_FLAGS(i) & (flag)) == (flag)) #define GST_VIDEO_INFO_FLAG_SET(i,flag) (GST_VIDEO_INFO_FLAGS(i) |= (flag))