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
This commit is contained in:
Edward Hervey 2018-05-04 10:35:36 +02:00 committed by Edward Hervey
parent ed49373e87
commit 35039ea2b4
2 changed files with 17 additions and 8 deletions

View file

@ -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); \

View file

@ -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);
}