Commit 1a1570bb authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey

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
parent 6e1bf7fa
...@@ -214,7 +214,9 @@ video_chroma_up_v2_##name (GstVideoChromaResample *resample, \ ...@@ -214,7 +214,9 @@ video_chroma_up_v2_##name (GstVideoChromaResample *resample, \
resample->h_resample (resample, l1, width); \ resample->h_resample (resample, l1, width); \
} \ } \
if (l0 != l1) { \ 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 /* 2x vertical upsampling interlaced without cositing
...@@ -291,8 +293,9 @@ video_chroma_down_h2_##name (GstVideoChromaResample *resample, \ ...@@ -291,8 +293,9 @@ video_chroma_down_h2_##name (GstVideoChromaResample *resample, \
gpointer pixels, gint width) \ gpointer pixels, gint width) \
{ \ { \
type *p = pixels; \ 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) \ #define MAKE_DOWNSAMPLE_H2(name,type) \
...@@ -328,8 +331,10 @@ video_chroma_down_v2_##name (GstVideoChromaResample *resample, \ ...@@ -328,8 +331,10 @@ video_chroma_down_v2_##name (GstVideoChromaResample *resample, \
type *l0 = lines[0]; \ type *l0 = lines[0]; \
type *l1 = lines[1]; \ type *l1 = lines[1]; \
\ \
if (l0 != l1) \ if (l0 != l1) { \
video_orc_chroma_down_v2_##name (l0, l0, l1, width); \ type *d0 = l0; \
video_orc_chroma_down_v2_##name (d0, l0, l1, width); \
} \
\ \
if (resample->h_resample) \ if (resample->h_resample) \
resample->h_resample (resample, l0, width); \ resample->h_resample (resample, l0, width); \
...@@ -520,8 +525,9 @@ video_chroma_down_v4_##name (GstVideoChromaResample *resample, \ ...@@ -520,8 +525,9 @@ video_chroma_down_v4_##name (GstVideoChromaResample *resample, \
type *l1 = lines[1]; \ type *l1 = lines[1]; \
type *l2 = lines[2]; \ type *l2 = lines[2]; \
type *l3 = lines[3]; \ type *l3 = lines[3]; \
\ type *d = l0; \
video_orc_chroma_down_v4_##name(l0, l0, l1, l2, l3, width); \ \
video_orc_chroma_down_v4_##name(d, l0, l1, l2, l3, width); \
\ \
if (resample->h_resample) \ if (resample->h_resample) \
resample->h_resample (resample, l0, width); \ resample->h_resample (resample, l0, width); \
......
...@@ -1192,7 +1192,8 @@ _custom_video_orc_matrix8 (guint8 * ORC_RESTRICT d1, ...@@ -1192,7 +1192,8 @@ _custom_video_orc_matrix8 (guint8 * ORC_RESTRICT d1,
static void static void
video_converter_matrix8 (MatrixData * data, gpointer pixels) 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); data->orc_p3, data->orc_p4, data->width);
} }
...@@ -1221,7 +1222,9 @@ video_converter_matrix8_table (MatrixData * data, gpointer pixels) ...@@ -1221,7 +1222,9 @@ video_converter_matrix8_table (MatrixData * data, gpointer pixels)
static void static void
video_converter_matrix8_AYUV_ARGB (MatrixData * data, gpointer pixels) 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[0][0], data->im[0][2],
data->im[2][1], data->im[1][1], data->im[1][2], data->width, 1); data->im[2][1], data->im[1][1], data->im[1][2], data->width, 1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment