mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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
This commit is contained in:
parent
14fafc74a3
commit
62bdb117ac
2 changed files with 8 additions and 0 deletions
|
@ -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])
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue