Defining restrict results - for some compilers - in changing other
uses of the restrict keyword also, e.g. __declspec(restrict) gets
changed to __declspec(__restrict) on MSVC. This causes compilation
failures. Therefore, using a private namespace macro instead is
more reliable and robust.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -3797,7 +3797,7 @@ cat > $TMPH <<EOF |
3797 | 3797 |
#define AVCONV_DATADIR "$(eval c_escape $datadir)" |
3798 | 3798 |
#define CC_TYPE "$cc_type" |
3799 | 3799 |
#define CC_VERSION $cc_version |
3800 |
-#define restrict $_restrict |
|
3800 |
+#define av_restrict $_restrict |
|
3801 | 3801 |
#define EXTERN_PREFIX "${extern_prefix}" |
3802 | 3802 |
#define EXTERN_ASM ${extern_prefix} |
3803 | 3803 |
#define SLIBSUF "$SLIBSUF" |
... | ... |
@@ -2517,7 +2517,7 @@ static void vector_fmac_scalar_c(float *dst, const float *src, float mul, |
2517 | 2517 |
dst[i] += src[i] * mul; |
2518 | 2518 |
} |
2519 | 2519 |
|
2520 |
-static void butterflies_float_c(float *restrict v1, float *restrict v2, |
|
2520 |
+static void butterflies_float_c(float *av_restrict v1, float *av_restrict v2, |
|
2521 | 2521 |
int len) |
2522 | 2522 |
{ |
2523 | 2523 |
int i; |
... | ... |
@@ -444,7 +444,7 @@ typedef struct DSPContext { |
444 | 444 |
* @param v2 second input vector, difference output, 16-byte aligned |
445 | 445 |
* @param len length of vectors, multiple of 4 |
446 | 446 |
*/ |
447 |
- void (*butterflies_float)(float *restrict v1, float *restrict v2, int len); |
|
447 |
+ void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len); |
|
448 | 448 |
|
449 | 449 |
/** |
450 | 450 |
* Calculate the sum and difference of two vectors of floats and interleave |
... | ... |
@@ -210,7 +210,7 @@ static int h263_decode_gob_header(MpegEncContext *s) |
210 | 210 |
* @param end pointer to the end of the buffer |
211 | 211 |
* @return pointer to the next resync_marker, or end if none was found |
212 | 212 |
*/ |
213 |
-const uint8_t *ff_h263_find_resync_marker(const uint8_t *restrict p, const uint8_t * restrict end) |
|
213 |
+const uint8_t *ff_h263_find_resync_marker(const uint8_t *av_restrict p, const uint8_t *av_restrict end) |
|
214 | 214 |
{ |
215 | 215 |
assert(p < end); |
216 | 216 |
|
... | ... |
@@ -140,9 +140,9 @@ const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { |
140 | 140 |
PIX_FMT_NONE |
141 | 141 |
}; |
142 | 142 |
|
143 |
-const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p, |
|
143 |
+const uint8_t *avpriv_mpv_find_start_code(const uint8_t *av_restrict p, |
|
144 | 144 |
const uint8_t *end, |
145 |
- uint32_t * restrict state) |
|
145 |
+ uint32_t *av_restrict state) |
|
146 | 146 |
{ |
147 | 147 |
int i; |
148 | 148 |
|
... | ... |
@@ -86,7 +86,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size); |
86 | 86 |
void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size); |
87 | 87 |
void ff_rtp_send_vp8(AVFormatContext *s1, const uint8_t *buff, int size); |
88 | 88 |
|
89 |
-const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *restrict start, |
|
90 |
- const uint8_t *restrict end); |
|
89 |
+const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start, |
|
90 |
+ const uint8_t *av_restrict end); |
|
91 | 91 |
|
92 | 92 |
#endif /* AVFORMAT_RTPENC_H */ |
... | ... |
@@ -23,8 +23,8 @@ |
23 | 23 |
#include "avformat.h" |
24 | 24 |
#include "rtpenc.h" |
25 | 25 |
|
26 |
-const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *restrict start, |
|
27 |
- const uint8_t *restrict end) |
|
26 |
+const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start, |
|
27 |
+ const uint8_t *av_restrict end) |
|
28 | 28 |
{ |
29 | 29 |
const uint8_t *p = end - 1; |
30 | 30 |
start += 1; /* Make sure we never return the original start. */ |