summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-05-04 10:35:36 +0200
committerEdward Hervey <bilboed@bilboed.com>2018-05-05 11:22:15 +0200
commit35039ea2b44b0e3e46eae01920e1e853f5d2c442 (patch)
treeab42e42afe068d898ebb985eb08f94fe4c06f7ec
parented49373e87db17f67c1d9032132cca17efe16fee (diff)
video: Silence "restrict" issues with ORC code
The problem is that even though the functions we are calling are in-place transformation, orc automatically puts the restrict keyword on all arguments. To silence that warning just create yet-another variable containing the same value. https://bugzilla.gnome.org/show_bug.cgi?id=795765
-rw-r--r--gst-libs/gst/video/video-chroma.c18
-rw-r--r--gst-libs/gst/video/video-converter.c7
2 files changed, 17 insertions, 8 deletions
diff --git a/gst-libs/gst/video/video-chroma.c b/gst-libs/gst/video/video-chroma.c
index b994658a9..f761b4435 100644
--- a/gst-libs/gst/video/video-chroma.c
+++ b/gst-libs/gst/video/video-chroma.c
@@ -214,7 +214,9 @@ video_chroma_up_v2_##name (GstVideoChromaResample *resample, \
resample->h_resample (resample, l1, width); \
} \
if (l0 != l1) { \
- video_orc_chroma_up_v2_##name (l0, l1, l0, l1, width); \
+ type *d0 = l0; \
+ type *d1 = l1; \
+ video_orc_chroma_up_v2_##name (d0, d1, l0, l1, width); \
} \
}
/* 2x vertical upsampling interlaced without cositing
@@ -291,8 +293,9 @@ video_chroma_down_h2_##name (GstVideoChromaResample *resample, \
gpointer pixels, gint width) \
{ \
type *p = pixels; \
+ type *d = p; \
\
- video_orc_chroma_down_h2_##name (p, p, width / 2); \
+ video_orc_chroma_down_h2_##name (d, p, width / 2); \
}
#define MAKE_DOWNSAMPLE_H2(name,type) \
@@ -328,8 +331,10 @@ video_chroma_down_v2_##name (GstVideoChromaResample *resample, \
type *l0 = lines[0]; \
type *l1 = lines[1]; \
\
- if (l0 != l1) \
- video_orc_chroma_down_v2_##name (l0, l0, l1, width); \
+ if (l0 != l1) { \
+ type *d0 = l0; \
+ video_orc_chroma_down_v2_##name (d0, l0, l1, width); \
+ } \
\
if (resample->h_resample) \
resample->h_resample (resample, l0, width); \
@@ -520,8 +525,9 @@ video_chroma_down_v4_##name (GstVideoChromaResample *resample, \
type *l1 = lines[1]; \
type *l2 = lines[2]; \
type *l3 = lines[3]; \
- \
- video_orc_chroma_down_v4_##name(l0, l0, l1, l2, l3, width); \
+ type *d = l0; \
+ \
+ video_orc_chroma_down_v4_##name(d, l0, l1, l2, l3, width); \
\
if (resample->h_resample) \
resample->h_resample (resample, l0, width); \
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index 31e866a79..e2cb3d51d 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -1192,7 +1192,8 @@ _custom_video_orc_matrix8 (guint8 * ORC_RESTRICT d1,
static void
video_converter_matrix8 (MatrixData * data, gpointer pixels)
{
- video_orc_matrix8 (pixels, pixels, data->orc_p1, data->orc_p2,
+ gpointer d = pixels;
+ video_orc_matrix8 (d, pixels, data->orc_p1, data->orc_p2,
data->orc_p3, data->orc_p4, data->width);
}
@@ -1221,7 +1222,9 @@ video_converter_matrix8_table (MatrixData * data, gpointer pixels)
static void
video_converter_matrix8_AYUV_ARGB (MatrixData * data, gpointer pixels)
{
- video_orc_convert_AYUV_ARGB (pixels, 0, pixels, 0,
+ gpointer d = pixels;
+
+ video_orc_convert_AYUV_ARGB (d, 0, pixels, 0,
data->im[0][0], data->im[0][2],
data->im[2][1], data->im[1][1], data->im[1][2], data->width, 1);
}