History

configure: Remove av_restrict

All versions of MSVC that support C11 (namely >= v19.27) also support the restrict keyword, therefore av_restrict is no longer necessary since 75697836b1db3e0f0a3b7061be6be28d00c675a0.

Andreas Rheinhardt committed 2 years ago

Commit c00cd001 parent 53a51e741 files · +130 −167Browse files

Unified · Split

41 files
  1. configure +0 −16
  2. libavcodec/aacpsdsp_template.c +5 −5
  3. libavcodec/binkdsp.c +1 −2
  4. libavcodec/binkdsp.h +1 −3
  5. libavcodec/dnxhdenc.c +2 −2
  6. libavcodec/dnxhdenc.h +1 −3
  7. libavcodec/dvdec.c +1 −1
  8. libavcodec/elbg.c +3 −3
  9. libavcodec/h264qpel_template.c +41 −41
  10. libavcodec/idctdsp.c +7 −7
  11. libavcodec/idctdsp.h +5 −7
  12. libavcodec/loongarch/idctdsp_lasx.c +3 −3
  13. libavcodec/loongarch/idctdsp_loongarch.h +3 −3
  14. libavcodec/mips/idctdsp_mips.h +6 −6
  15. libavcodec/mips/idctdsp_mmi.c +3 −3
  16. libavcodec/mips/idctdsp_msa.c +3 −3
  17. libavcodec/mips/me_cmp_mips.h +1 −1
  18. libavcodec/mips/pixblockdsp_mips.h +3 −3
  19. libavcodec/mips/pixblockdsp_mmi.c +2 −2
  20. libavcodec/mips/pixblockdsp_msa.c +3 −3
  21. libavcodec/mpegaudiodec_template.c +1 −1
  22. libavcodec/opus_pvq.c +1 −1
  23. libavcodec/pixblockdsp.c +3 −3
  24. libavcodec/pixblockdsp.h +4 −6
  25. libavcodec/utils.c +2 −2
  26. libavfilter/af_firequalizer.c +7 −7
  27. libavformat/rtpenc.h +2 −2
  28. libavformat/rtpenc_h261.c +2 −2
  29. libavformat/rtpenc_h263.c +2 −2
  30. libavutil/arm/float_dsp_init_vfp.c +1 −1
  31. libavutil/fixed_dsp.c +1 −1
  32. libavutil/fixed_dsp.h +1 −2
  33. libavutil/float_dsp.c +1 −1
  34. libavutil/float_dsp.h +1 −3
  35. libavutil/mips/float_dsp_mips.c +1 −1
  36. libavutil/x86/fixed_dsp_init.c +1 −3
  37. libavutil/x86/float_dsp_init.c +1 −4
  38. tests/checkasm/fixed_dsp.c +1 −1
  39. tests/checkasm/float_dsp.c +1 −3
  40. tests/checkasm/pixblockdsp.c +1 −1
  41. tests/checkasm/vorbisdsp.c +1 −3
configure+0−16
@@ -6033,10 +6033,6 @@ extern_prefix=${sym%%ff_extern*} · 6032 unmodified lines
6033 6033
6034! disabled inline_asm && check_inline_asm inline_asm '"" ::'6034! disabled inline_asm && check_inline_asm inline_asm '"" ::'
6035 6035
6036for restrict_keyword in restrict __restrict__ __restrict ""; do
6037 test_code cc "" "char * $restrict_keyword p" && break
6038done
6039
6040check_cc pragma_deprecated "" '_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")'6036check_cc pragma_deprecated "" '_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")'
6041 6037
6042# The global variable ensures the bits appear unchanged in the object file.6038# The global variable ensures the bits appear unchanged in the object file.
@@ -7543,17 +7539,6 @@ elif enabled_any msvc icl; then · 1500 unmodified lines
7543 fi7539 fi
7544 # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.7540 # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
7545 check_cpp_condition log2 crtversion.h "_VC_CRT_MAJOR_VERSION >= 12"7541 check_cpp_condition log2 crtversion.h "_VC_CRT_MAJOR_VERSION >= 12"
7546 # The CRT headers contain __declspec(restrict) in a few places, but if redefining
7547 # restrict, this might break. MSVC 2010 and 2012 fail with __declspec(__restrict)
7548 # (as it ends up if the restrict redefine is done before including stdlib.h), while
7549 # MSVC 2013 and newer can handle it fine.
7550 # If this declspec fails, force including stdlib.h before the restrict redefinition
7551 # happens in config.h.
7552 if [ $restrict_keyword != restrict ]; then
7553 test_cc <<EOF || add_cflags -FIstdlib.h
7554__declspec($restrict_keyword) void *foo(int);
7555EOF
7556 fi
7557 # the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code7542 # the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
7558 # Issue has been fixed in MSVC v19.00.24218.7543 # Issue has been fixed in MSVC v19.00.24218.
7559 test_cpp_condition windows.h "_MSC_FULL_VER >= 190024218" ||7544 test_cpp_condition windows.h "_MSC_FULL_VER >= 190024218" ||
@@ -8091,7 +8076,6 @@ cat > $TMPH <<EOF · 531 unmodified lines
8091#define AVCONV_DATADIR "$(eval c_escape $datadir)"8076#define AVCONV_DATADIR "$(eval c_escape $datadir)"
8092#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"8077#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
8093#define OS_NAME $target_os8078#define OS_NAME $target_os
8094#define av_restrict $restrict_keyword
8095#define EXTERN_PREFIX "${extern_prefix}"8079#define EXTERN_PREFIX "${extern_prefix}"
8096#define EXTERN_ASM ${extern_prefix}8080#define EXTERN_ASM ${extern_prefix}
8097#define BUILDSUF "$build_suffix"8081#define BUILDSUF "$build_suffix"
libavcodec/aacpsdsp_template.c+5−5
@@ -26,14 +26,14 @@ · 25 unmodified lines
26#include "libavutil/attributes.h"26#include "libavutil/attributes.h"
27#include "aacpsdsp.h"27#include "aacpsdsp.h"
28 28
29static void ps_add_squares_c(INTFLOAT *av_restrict dst,29static void ps_add_squares_c(INTFLOAT *restrict dst,
30 const INTFLOAT (*src)[2], int n)30 const INTFLOAT (*src)[2], int n)
31{31{
32 for (int i = 0; i < n; i++)32 for (int i = 0; i < n; i++)
33 dst[i] += (UINTFLOAT)AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]);33 dst[i] += (UINTFLOAT)AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]);
34}34}
35 35
36static void ps_mul_pair_single_c(INTFLOAT (*av_restrict dst)[2],36static void ps_mul_pair_single_c(INTFLOAT (*restrict dst)[2],
37 INTFLOAT (*src0)[2], INTFLOAT *src1,37 INTFLOAT (*src0)[2], INTFLOAT *src1,
38 int n)38 int n)
39{39{
@@ -43,7 +43,7 @@ static void ps_mul_pair_single_c(INTFLOAT (*av_restrict dst)[2], · 3 unmodified lines
43 }43 }
44}44}
45 45
46static void ps_hybrid_analysis_c(INTFLOAT (*av_restrict out)[2],46static void ps_hybrid_analysis_c(INTFLOAT (*restrict out)[2],
47 INTFLOAT (*in)[2],47 INTFLOAT (*in)[2],
48 const INTFLOAT (*filter)[8][2],48 const INTFLOAT (*filter)[8][2],
49 ptrdiff_t stride, int n)49 ptrdiff_t stride, int n)
@@ -77,7 +77,7 @@ static void ps_hybrid_analysis_c(INTFLOAT (*av_restrict out)[2], · 27 unmodified lines
77 }77 }
78}78}
79 79
80static void ps_hybrid_analysis_ileave_c(INTFLOAT (*av_restrict out)[32][2],80static void ps_hybrid_analysis_ileave_c(INTFLOAT (*restrict out)[32][2],
81 INTFLOAT L[2][38][64],81 INTFLOAT L[2][38][64],
82 int i, int len)82 int i, int len)
83{83{
@@ -90,7 +90,7 @@ static void ps_hybrid_analysis_ileave_c(INTFLOAT (*av_restrict out)[32][2], · 6 unmodified lines
90}90}
91 91
92static void ps_hybrid_synthesis_deint_c(INTFLOAT out[2][38][64],92static void ps_hybrid_synthesis_deint_c(INTFLOAT out[2][38][64],
93 INTFLOAT (*av_restrict in)[32][2],93 INTFLOAT (*restrict in)[32][2],
94 int i, int len)94 int i, int len)
95{95{
96 for (; i < 64; i++) {96 for (; i < 64; i++) {
libavcodec/binkdsp.c+1−2
@@ -24,7 +24,6 @@ · 23 unmodified lines
24 * Bink DSP routines24 * Bink DSP routines
25 */25 */
26 26
27#include "config.h"
28#include "libavutil/attributes.h"27#include "libavutil/attributes.h"
29#include "binkdsp.h"28#include "binkdsp.h"
30 29
@@ -131,7 +130,7 @@ static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align · 100 unmodified lines
131 }130 }
132}131}
133 132
134static void add_pixels8_c(uint8_t *av_restrict pixels, int16_t *block,133static void add_pixels8_c(uint8_t *restrict pixels, int16_t *block,
135 int line_size)134 int line_size)
136{135{
137 int i;136 int i;
libavcodec/binkdsp.h+1−3
@@ -29,13 +29,11 @@ · 28 unmodified lines
29 29
30#include <stdint.h>30#include <stdint.h>
31 31
32#include "config.h"
33
34typedef struct BinkDSPContext {32typedef struct BinkDSPContext {
35 void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);33 void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
36 void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);34 void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
37 void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize);35 void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize);
38 void (*add_pixels8)(uint8_t *av_restrict pixels, int16_t *block, int line_size);36 void (*add_pixels8)(uint8_t *restrict pixels, int16_t *block, int line_size);
39} BinkDSPContext;37} BinkDSPContext;
40 38
41void ff_binkdsp_init(BinkDSPContext *c);39void ff_binkdsp_init(BinkDSPContext *c);
libavcodec/dnxhdenc.c+2−2
@@ -78,7 +78,7 @@ static const AVClass dnxhd_class = { · 77 unmodified lines
78 .version = LIBAVUTIL_VERSION_INT,78 .version = LIBAVUTIL_VERSION_INT,
79};79};
80 80
81static void dnxhd_8bit_get_pixels_8x4_sym(int16_t *av_restrict block,81static void dnxhd_8bit_get_pixels_8x4_sym(int16_t *restrict block,
82 const uint8_t *pixels,82 const uint8_t *pixels,
83 ptrdiff_t line_size)83 ptrdiff_t line_size)
84{84{
@@ -102,7 +102,7 @@ static void dnxhd_8bit_get_pixels_8x4_sym(int16_t *av_restrict block, · 17 unmodified lines
102}102}
103 103
104static av_always_inline104static av_always_inline
105void dnxhd_10bit_get_pixels_8x4_sym(int16_t *av_restrict block,105void dnxhd_10bit_get_pixels_8x4_sym(int16_t *restrict block,
106 const uint8_t *pixels,106 const uint8_t *pixels,
107 ptrdiff_t line_size)107 ptrdiff_t line_size)
108{108{
libavcodec/dnxhdenc.h+1−3
@@ -26,8 +26,6 @@ · 25 unmodified lines
26 26
27#include <stdint.h>27#include <stdint.h>
28 28
29#include "config.h"
30
31#include "libavutil/mem_internal.h"29#include "libavutil/mem_internal.h"
32 30
33#include "mpegvideo.h"31#include "mpegvideo.h"
@@ -107,7 +105,7 @@ typedef struct DNXHDEncContext { · 73 unmodified lines
107 RCCMPEntry *mb_cmp_tmp;105 RCCMPEntry *mb_cmp_tmp;
108 RCEntry *mb_rc;106 RCEntry *mb_rc;
109 107
110 void (*get_pixels_8x4_sym)(int16_t *av_restrict /* align 16 */ block,108 void (*get_pixels_8x4_sym)(int16_t *restrict /* align 16 */ block,
111 const uint8_t *pixels, ptrdiff_t line_size);109 const uint8_t *pixels, ptrdiff_t line_size);
112} DNXHDEncContext;110} DNXHDEncContext;
113 111
libavcodec/dvdec.c+1−1
@@ -346,7 +346,7 @@ static inline void bit_copy(PutBitContext *pb, GetBitContext *gb) · 345 unmodified lines
346 put_bits(pb, bits_left, get_bits(gb, bits_left));346 put_bits(pb, bits_left, get_bits(gb, bits_left));
347}347}
348 348
349static av_always_inline void put_block_8x4(int16_t *block, uint8_t *av_restrict p, int stride)349static av_always_inline void put_block_8x4(int16_t *block, uint8_t *restrict p, int stride)
350{350{
351 int i, j;351 int i, j;
352 352
libavcodec/elbg.c+3−3
@@ -361,7 +361,7 @@ static void do_shiftings(ELBGContext *elbg) · 360 unmodified lines
361 }361 }
362}362}
363 363
364static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints,364static void do_elbg(ELBGContext *restrict elbg, int *points, int numpoints,
365 int max_steps)365 int max_steps)
366{366{
367 int *const size_part = elbg->size_part;367 int *const size_part = elbg->size_part;
@@ -435,7 +435,7 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, · 67 unmodified lines
435 * If not, it calls do_elbg for a (smaller) random sample of the points in435 * If not, it calls do_elbg for a (smaller) random sample of the points in
436 * points.436 * points.
437 */437 */
438static void init_elbg(ELBGContext *av_restrict elbg, int *points, int *temp_points,438static void init_elbg(ELBGContext *restrict elbg, int *points, int *temp_points,
439 int numpoints, int max_steps)439 int numpoints, int max_steps)
440{440{
441 int dim = elbg->dim;441 int dim = elbg->dim;
@@ -463,7 +463,7 @@ int avpriv_elbg_do(ELBGContext **elbgp, int *points, int dim, int numpoints, · 21 unmodified lines
463 int *codebook, int num_cb, int max_steps,463 int *codebook, int num_cb, int max_steps,
464 int *closest_cb, AVLFG *rand_state, uintptr_t flags)464 int *closest_cb, AVLFG *rand_state, uintptr_t flags)
465{465{
466 ELBGContext *const av_restrict elbg = *elbgp ? *elbgp : av_mallocz(sizeof(*elbg));466 ELBGContext *const restrict elbg = *elbgp ? *elbgp : av_mallocz(sizeof(*elbg));
467 467
468 if (!elbg)468 if (!elbg)
469 return AVERROR(ENOMEM);469 return AVERROR(ENOMEM);
libavcodec/h264qpel_template.c+41−41
@@ -26,7 +26,7 @@ · 25 unmodified lines
26#include "hpel_template.c"26#include "hpel_template.c"
27#include "pel_template.c"27#include "pel_template.c"
28 28
29static inline void FUNC(copy_block2)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride, int h)29static inline void FUNC(copy_block2)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride, int h)
30{30{
31 int i;31 int i;
32 for(i=0; i<h; i++)32 for(i=0; i<h; i++)
@@ -37,7 +37,7 @@ static inline void FUNC(copy_block2)(uint8_t *dst, const uint8_t *av_restrict sr · 4 unmodified lines
37 }37 }
38}38}
39 39
40static inline void FUNC(copy_block4)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride, int h)40static inline void FUNC(copy_block4)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride, int h)
41{41{
42 int i;42 int i;
43 for(i=0; i<h; i++)43 for(i=0; i<h; i++)
@@ -48,7 +48,7 @@ static inline void FUNC(copy_block4)(uint8_t *dst, const uint8_t *av_restrict sr · 4 unmodified lines
48 }48 }
49}49}
50 50
51static inline void FUNC(copy_block8)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride, int h)51static inline void FUNC(copy_block8)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride, int h)
52{52{
53 int i;53 int i;
54 for(i=0; i<h; i++)54 for(i=0; i<h; i++)
@@ -60,7 +60,7 @@ static inline void FUNC(copy_block8)(uint8_t *dst, const uint8_t *av_restrict sr · 5 unmodified lines
60 }60 }
61}61}
62 62
63static inline void FUNC(copy_block16)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride, int h)63static inline void FUNC(copy_block16)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride, int h)
64{64{
65 int i;65 int i;
66 for(i=0; i<h; i++)66 for(i=0; i<h; i++)
@@ -75,13 +75,13 @@ static inline void FUNC(copy_block16)(uint8_t *dst, const uint8_t *av_restrict s · 8 unmodified lines
75}75}
76 76
77#define H264_LOWPASS(OPNAME, OP, OP2) \77#define H264_LOWPASS(OPNAME, OP, OP2) \
78static av_unused void FUNC(OPNAME ## h264_qpel2_h_lowpass)(uint8_t *p_dst, const uint8_t *av_restrict p_src, int dstStride, int srcStride)\78static av_unused void FUNC(OPNAME ## h264_qpel2_h_lowpass)(uint8_t *p_dst, const uint8_t *restrict p_src, int dstStride, int srcStride)\
79{\79{\
80 const int h=2;\80 const int h=2;\
81 INIT_CLIP\81 INIT_CLIP\
82 int i;\82 int i;\
83 pixel *dst = (pixel*)p_dst;\83 pixel *dst = (pixel*)p_dst;\
84 const pixel *av_restrict src = (const pixel*)p_src;\84 const pixel *restrict src = (const pixel*)p_src;\
85 dstStride >>= sizeof(pixel)-1;\85 dstStride >>= sizeof(pixel)-1;\
86 srcStride >>= sizeof(pixel)-1;\86 srcStride >>= sizeof(pixel)-1;\
87 for(i=0; i<h; i++)\87 for(i=0; i<h; i++)\
@@ -93,13 +93,13 @@ static av_unused void FUNC(OPNAME ## h264_qpel2_h_lowpass)(uint8_t *p_dst, const · 5 unmodified lines
93 }\93 }\
94}\94}\
95\95\
96static av_unused void FUNC(OPNAME ## h264_qpel2_v_lowpass)(uint8_t *_dst, const uint8_t *av_restrict _src, int dstStride, int srcStride)\96static av_unused void FUNC(OPNAME ## h264_qpel2_v_lowpass)(uint8_t *_dst, const uint8_t *restrict _src, int dstStride, int srcStride)\
97{\97{\
98 const int w=2;\98 const int w=2;\
99 INIT_CLIP\99 INIT_CLIP\
100 int i;\100 int i;\
101 pixel *dst = (pixel*)_dst;\101 pixel *dst = (pixel*)_dst;\
102 const pixel *av_restrict src = (const pixel*)_src;\102 const pixel *restrict src = (const pixel*)_src;\
103 dstStride >>= sizeof(pixel)-1;\103 dstStride >>= sizeof(pixel)-1;\
104 srcStride >>= sizeof(pixel)-1;\104 srcStride >>= sizeof(pixel)-1;\
105 for(i=0; i<w; i++)\105 for(i=0; i<w; i++)\
@@ -118,7 +118,7 @@ static av_unused void FUNC(OPNAME ## h264_qpel2_v_lowpass)(uint8_t *_dst, const · 12 unmodified lines
118 }\118 }\
119}\119}\
120\120\
121static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *av_restrict _src, int dstStride, int tmpStride, int srcStride)\121static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *restrict _src, int dstStride, int tmpStride, int srcStride)\
122{\122{\
123 const int h=2;\123 const int h=2;\
124 const int w=2;\124 const int w=2;\
@@ -126,7 +126,7 @@ static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *_dst, pixel · 1 unmodified line
126 INIT_CLIP\126 INIT_CLIP\
127 int i;\127 int i;\
128 pixel *dst = (pixel*)_dst;\128 pixel *dst = (pixel*)_dst;\
129 const pixel *av_restrict src = (const pixel*)_src;\129 const pixel *restrict src = (const pixel*)_src;\
130 dstStride >>= sizeof(pixel)-1;\130 dstStride >>= sizeof(pixel)-1;\
131 srcStride >>= sizeof(pixel)-1;\131 srcStride >>= sizeof(pixel)-1;\
132 src -= 2*srcStride;\132 src -= 2*srcStride;\
@@ -153,13 +153,13 @@ static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *_dst, pixel · 20 unmodified lines
153 tmp++;\153 tmp++;\
154 }\154 }\
155}\155}\
156static void FUNC(OPNAME ## h264_qpel4_h_lowpass)(uint8_t *_dst, const uint8_t *av_restrict _src, int dstStride, int srcStride)\156static void FUNC(OPNAME ## h264_qpel4_h_lowpass)(uint8_t *_dst, const uint8_t *restrict _src, int dstStride, int srcStride)\
157{\157{\
158 const int h=4;\158 const int h=4;\
159 INIT_CLIP\159 INIT_CLIP\
160 int i;\160 int i;\
161 pixel *dst = (pixel*)_dst;\161 pixel *dst = (pixel*)_dst;\
162 const pixel *av_restrict src = (const pixel*)_src;\162 const pixel *restrict src = (const pixel*)_src;\
163 dstStride >>= sizeof(pixel)-1;\163 dstStride >>= sizeof(pixel)-1;\
164 srcStride >>= sizeof(pixel)-1;\164 srcStride >>= sizeof(pixel)-1;\
165 for(i=0; i<h; i++)\165 for(i=0; i<h; i++)\
@@ -173,13 +173,13 @@ static void FUNC(OPNAME ## h264_qpel4_h_lowpass)(uint8_t *_dst, const uint8_t *a · 7 unmodified lines
173 }\173 }\
174}\174}\
175\175\
176static void FUNC(OPNAME ## h264_qpel4_v_lowpass)(uint8_t *_dst, const uint8_t *av_restrict _src, int dstStride, int srcStride)\176static void FUNC(OPNAME ## h264_qpel4_v_lowpass)(uint8_t *_dst, const uint8_t *restrict _src, int dstStride, int srcStride)\
177{\177{\
178 const int w=4;\178 const int w=4;\
179 INIT_CLIP\179 INIT_CLIP\
180 int i;\180 int i;\
181 pixel *dst = (pixel*)_dst;\181 pixel *dst = (pixel*)_dst;\
182 const pixel *av_restrict src = (const pixel*)_src;\182 const pixel *restrict src = (const pixel*)_src;\
183 dstStride >>= sizeof(pixel)-1;\183 dstStride >>= sizeof(pixel)-1;\
184 srcStride >>= sizeof(pixel)-1;\184 srcStride >>= sizeof(pixel)-1;\
185 for(i=0; i<w; i++)\185 for(i=0; i<w; i++)\
@@ -202,7 +202,7 @@ static void FUNC(OPNAME ## h264_qpel4_v_lowpass)(uint8_t *_dst, const uint8_t *a · 16 unmodified lines
202 }\202 }\
203}\203}\
204\204\
205static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *av_restrict _src, int dstStride, int tmpStride, int srcStride)\205static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *restrict _src, int dstStride, int tmpStride, int srcStride)\
206{\206{\
207 const int h=4;\207 const int h=4;\
208 const int w=4;\208 const int w=4;\
@@ -210,7 +210,7 @@ static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, · 1 unmodified line
210 INIT_CLIP\210 INIT_CLIP\
211 int i;\211 int i;\
212 pixel *dst = (pixel*)_dst;\212 pixel *dst = (pixel*)_dst;\
213 const pixel *av_restrict src = (const pixel*)_src;\213 const pixel *restrict src = (const pixel*)_src;\
214 dstStride >>= sizeof(pixel)-1;\214 dstStride >>= sizeof(pixel)-1;\
215 srcStride >>= sizeof(pixel)-1;\215 srcStride >>= sizeof(pixel)-1;\
216 src -= 2*srcStride;\216 src -= 2*srcStride;\
@@ -244,13 +244,13 @@ static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, · 27 unmodified lines
244 }\244 }\
245}\245}\
246\246\
247static void FUNC(OPNAME ## h264_qpel8_h_lowpass)(uint8_t *_dst, const uint8_t *av_restrict _src, int dstStride, int srcStride)\247static void FUNC(OPNAME ## h264_qpel8_h_lowpass)(uint8_t *_dst, const uint8_t *restrict _src, int dstStride, int srcStride)\
248{\248{\
249 const int h=8;\249 const int h=8;\
250 INIT_CLIP\250 INIT_CLIP\
251 int i;\251 int i;\
252 pixel *dst = (pixel*)_dst;\252 pixel *dst = (pixel*)_dst;\
253 const pixel *av_restrict src = (const pixel*)_src;\253 const pixel *restrict src = (const pixel*)_src;\
254 dstStride >>= sizeof(pixel)-1;\254 dstStride >>= sizeof(pixel)-1;\
255 srcStride >>= sizeof(pixel)-1;\255 srcStride >>= sizeof(pixel)-1;\
256 for(i=0; i<h; i++)\256 for(i=0; i<h; i++)\
@@ -268,13 +268,13 @@ static void FUNC(OPNAME ## h264_qpel8_h_lowpass)(uint8_t *_dst, const uint8_t *a · 11 unmodified lines
268 }\268 }\
269}\269}\
270\270\
271static void FUNC(OPNAME ## h264_qpel8_v_lowpass)(uint8_t *_dst, const uint8_t *av_restrict _src, int dstStride, int srcStride)\271static void FUNC(OPNAME ## h264_qpel8_v_lowpass)(uint8_t *_dst, const uint8_t *restrict _src, int dstStride, int srcStride)\
272{\272{\
273 const int w=8;\273 const int w=8;\
274 INIT_CLIP\274 INIT_CLIP\
275 int i;\275 int i;\
276 pixel *dst = (pixel*)_dst;\276 pixel *dst = (pixel*)_dst;\
277 const pixel *av_restrict src = (const pixel*)_src;\277 const pixel *restrict src = (const pixel*)_src;\
278 dstStride >>= sizeof(pixel)-1;\278 dstStride >>= sizeof(pixel)-1;\
279 srcStride >>= sizeof(pixel)-1;\279 srcStride >>= sizeof(pixel)-1;\
280 for(i=0; i<w; i++)\280 for(i=0; i<w; i++)\
@@ -305,7 +305,7 @@ static void FUNC(OPNAME ## h264_qpel8_v_lowpass)(uint8_t *_dst, const uint8_t *a · 24 unmodified lines
305 }\305 }\
306}\306}\
307\307\
308static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *av_restrict _src, int dstStride, int tmpStride, int srcStride)\308static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, const uint8_t *restrict _src, int dstStride, int tmpStride, int srcStride)\
309{\309{\
310 const int h=8;\310 const int h=8;\
311 const int w=8;\311 const int w=8;\
@@ -313,7 +313,7 @@ static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, · 1 unmodified line
313 INIT_CLIP\313 INIT_CLIP\
314 int i;\314 int i;\
315 pixel *dst = (pixel*)_dst;\315 pixel *dst = (pixel*)_dst;\
316 const pixel *av_restrict src = (const pixel*)_src;\316 const pixel *restrict src = (const pixel*)_src;\
317 dstStride >>= sizeof(pixel)-1;\317 dstStride >>= sizeof(pixel)-1;\
318 srcStride >>= sizeof(pixel)-1;\318 srcStride >>= sizeof(pixel)-1;\
319 src -= 2*srcStride;\319 src -= 2*srcStride;\
@@ -359,7 +359,7 @@ static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *_dst, pixeltmp *tmp, · 39 unmodified lines
359 }\359 }\
360}\360}\
361\361\
362static void FUNC(OPNAME ## h264_qpel16_v_lowpass)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride)\362static void FUNC(OPNAME ## h264_qpel16_v_lowpass)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride)\
363{\363{\
364 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst , src , dstStride, srcStride);\364 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst , src , dstStride, srcStride);\
365 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\365 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\
@@ -369,7 +369,7 @@ static void FUNC(OPNAME ## h264_qpel16_v_lowpass)(uint8_t *dst, const uint8_t *a · 3 unmodified lines
369 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\369 FUNC(OPNAME ## h264_qpel8_v_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\
370}\370}\
371\371\
372static void FUNC(OPNAME ## h264_qpel16_h_lowpass)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride)\372static void FUNC(OPNAME ## h264_qpel16_h_lowpass)(uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride)\
373{\373{\
374 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst , src , dstStride, srcStride);\374 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst , src , dstStride, srcStride);\
375 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\375 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\
@@ -379,7 +379,7 @@ static void FUNC(OPNAME ## h264_qpel16_h_lowpass)(uint8_t *dst, const uint8_t *a · 3 unmodified lines
379 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\379 FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\
380}\380}\
381\381\
382static void FUNC(OPNAME ## h264_qpel16_hv_lowpass)(uint8_t *dst, pixeltmp *tmp, const uint8_t *av_restrict src, int dstStride, int tmpStride, int srcStride){\382static void FUNC(OPNAME ## h264_qpel16_hv_lowpass)(uint8_t *dst, pixeltmp *tmp, const uint8_t *restrict src, int dstStride, int tmpStride, int srcStride){\
383 FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst , tmp , src , dstStride, tmpStride, srcStride);\383 FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst , tmp , src , dstStride, tmpStride, srcStride);\
384 FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst+8*sizeof(pixel), tmp+8, src+8*sizeof(pixel), dstStride, tmpStride, srcStride);\384 FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst+8*sizeof(pixel), tmp+8, src+8*sizeof(pixel), dstStride, tmpStride, srcStride);\
385 src += 8*srcStride;\385 src += 8*srcStride;\
@@ -389,31 +389,31 @@ static void FUNC(OPNAME ## h264_qpel16_hv_lowpass)(uint8_t *dst, pixeltmp *tmp, · 3 unmodified lines
389}\389}\
390 390
391#define H264_MC(OPNAME, SIZE) \391#define H264_MC(OPNAME, SIZE) \
392static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc00)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\392static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc00)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
393{\393{\
394 FUNCC(OPNAME ## pixels ## SIZE)(dst, src, stride, SIZE);\394 FUNCC(OPNAME ## pixels ## SIZE)(dst, src, stride, SIZE);\
395}\395}\
396\396\
397static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc10)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\397static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc10)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
398{\398{\
399 uint8_t half[SIZE*SIZE*sizeof(pixel)];\399 uint8_t half[SIZE*SIZE*sizeof(pixel)];\
400 FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(half, src, SIZE*sizeof(pixel), stride);\400 FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(half, src, SIZE*sizeof(pixel), stride);\
401 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, src, half, stride, stride, SIZE*sizeof(pixel), SIZE);\401 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, src, half, stride, stride, SIZE*sizeof(pixel), SIZE);\
402}\402}\
403\403\
404static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc20)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\404static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc20)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
405{\405{\
406 FUNC(OPNAME ## h264_qpel ## SIZE ## _h_lowpass)(dst, src, stride, stride);\406 FUNC(OPNAME ## h264_qpel ## SIZE ## _h_lowpass)(dst, src, stride, stride);\
407}\407}\
408\408\
409static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc30)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\409static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc30)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
410{\410{\
411 uint8_t half[SIZE*SIZE*sizeof(pixel)];\411 uint8_t half[SIZE*SIZE*sizeof(pixel)];\
412 FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(half, src, SIZE*sizeof(pixel), stride);\412 FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(half, src, SIZE*sizeof(pixel), stride);\
413 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, src+sizeof(pixel), half, stride, stride, SIZE*sizeof(pixel), SIZE);\413 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, src+sizeof(pixel), half, stride, stride, SIZE*sizeof(pixel), SIZE);\
414}\414}\
415\415\
416static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc01)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\416static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc01)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
417{\417{\
418 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\418 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
419 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\419 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -423,7 +423,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc01)(uint8_t *dst, const uint · 3 unmodified lines
423 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, full_mid, half, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\423 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, full_mid, half, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
424}\424}\
425\425\
426static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc02)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\426static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc02)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
427{\427{\
428 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\428 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
429 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\429 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -431,7 +431,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc02)(uint8_t *dst, const uint · 1 unmodified line
431 FUNC(OPNAME ## h264_qpel ## SIZE ## _v_lowpass)(dst, full_mid, stride, SIZE*sizeof(pixel));\431 FUNC(OPNAME ## h264_qpel ## SIZE ## _v_lowpass)(dst, full_mid, stride, SIZE*sizeof(pixel));\
432}\432}\
433\433\
434static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc03)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\434static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc03)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
435{\435{\
436 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\436 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
437 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\437 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -441,7 +441,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc03)(uint8_t *dst, const uint · 3 unmodified lines
441 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, full_mid+SIZE*sizeof(pixel), half, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\441 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, full_mid+SIZE*sizeof(pixel), half, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
442}\442}\
443\443\
444static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc11)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\444static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc11)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
445{\445{\
446 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\446 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
447 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\447 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -453,7 +453,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc11)(uint8_t *dst, const uint · 5 unmodified lines
453 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\453 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
454}\454}\
455\455\
456static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc31)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\456static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc31)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
457{\457{\
458 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\458 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
459 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\459 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -465,7 +465,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc31)(uint8_t *dst, const uint · 5 unmodified lines
465 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\465 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
466}\466}\
467\467\
468static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc13)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\468static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc13)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
469{\469{\
470 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\470 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
471 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\471 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -477,7 +477,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc13)(uint8_t *dst, const uint · 5 unmodified lines
477 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\477 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
478}\478}\
479\479\
480static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc33)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\480static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc33)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
481{\481{\
482 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\482 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
483 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\483 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -489,13 +489,13 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc33)(uint8_t *dst, const uint · 5 unmodified lines
489 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\489 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
490}\490}\
491\491\
492static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc22)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\492static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc22)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
493{\493{\
494 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\494 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\
495 FUNC(OPNAME ## h264_qpel ## SIZE ## _hv_lowpass)(dst, tmp, src, stride, SIZE*sizeof(pixel), stride);\495 FUNC(OPNAME ## h264_qpel ## SIZE ## _hv_lowpass)(dst, tmp, src, stride, SIZE*sizeof(pixel), stride);\
496}\496}\
497\497\
498static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc21)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\498static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc21)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
499{\499{\
500 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\500 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\
501 uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\501 uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\
@@ -505,7 +505,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc21)(uint8_t *dst, const uint · 3 unmodified lines
505 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\505 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
506}\506}\
507\507\
508static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc23)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\508static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc23)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
509{\509{\
510 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\510 pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\
511 uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\511 uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\
@@ -515,7 +515,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc23)(uint8_t *dst, const uint · 3 unmodified lines
515 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\515 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfH, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
516}\516}\
517\517\
518static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc12)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\518static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc12)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
519{\519{\
520 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\520 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
521 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\521 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
@@ -528,7 +528,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc12)(uint8_t *dst, const uint · 6 unmodified lines
528 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfV, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\528 FUNC(OPNAME ## pixels ## SIZE ## _l2)(dst, halfV, halfHV, stride, SIZE*sizeof(pixel), SIZE*sizeof(pixel), SIZE);\
529}\529}\
530\530\
531static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc32)(uint8_t *dst, const uint8_t *av_restrict src, ptrdiff_t stride)\531static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc32)(uint8_t *dst, const uint8_t *restrict src, ptrdiff_t stride)\
532{\532{\
533 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\533 uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\
534 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\534 uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\
libavcodec/idctdsp.c+7−7
@@ -70,7 +70,7 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, · 69 unmodified lines
70 }70 }
71}71}
72 72
73void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,73void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
74 ptrdiff_t line_size)74 ptrdiff_t line_size)
75{75{
76 int i;76 int i;
@@ -91,7 +91,7 @@ void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, · 14 unmodified lines
91 }91 }
92}92}
93 93
94static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels,94static void put_pixels_clamped4_c(const int16_t *block, uint8_t *restrict pixels,
95 int line_size)95 int line_size)
96{96{
97 int i;97 int i;
@@ -108,7 +108,7 @@ static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pix · 10 unmodified lines
108 }108 }
109}109}
110 110
111static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels,111static void put_pixels_clamped2_c(const int16_t *block, uint8_t *restrict pixels,
112 int line_size)112 int line_size)
113{113{
114 int i;114 int i;
@@ -124,7 +124,7 @@ static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pix · 9 unmodified lines
124}124}
125 125
126static void put_signed_pixels_clamped_c(const int16_t *block,126static void put_signed_pixels_clamped_c(const int16_t *block,
127 uint8_t *av_restrict pixels,127 uint8_t *restrict pixels,
128 ptrdiff_t line_size)128 ptrdiff_t line_size)
129{129{
130 int i, j;130 int i, j;
@@ -144,7 +144,7 @@ static void put_signed_pixels_clamped_c(const int16_t *block, · 13 unmodified lines
144 }144 }
145}145}
146 146
147void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,147void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
148 ptrdiff_t line_size)148 ptrdiff_t line_size)
149{149{
150 int i;150 int i;
@@ -164,7 +164,7 @@ void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, · 13 unmodified lines
164 }164 }
165}165}
166 166
167static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels,167static void add_pixels_clamped4_c(const int16_t *block, uint8_t *restrict pixels,
168 int line_size)168 int line_size)
169{169{
170 int i;170 int i;
@@ -180,7 +180,7 @@ static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pix · 9 unmodified lines
180 }180 }
181}181}
182 182
183static void add_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels,183static void add_pixels_clamped2_c(const int16_t *block, uint8_t *restrict pixels,
184 int line_size)184 int line_size)
185{185{
186 int i;186 int i;
libavcodec/idctdsp.h+5−7
@@ -22,8 +22,6 @@ · 21 unmodified lines
22#include <stddef.h>22#include <stddef.h>
23#include <stdint.h>23#include <stdint.h>
24 24
25#include "config.h"
26
27struct AVCodecContext;25struct AVCodecContext;
28 26
29enum idct_permutation_type {27enum idct_permutation_type {
@@ -45,13 +43,13 @@ int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, · 15 unmodified lines
45typedef struct IDCTDSPContext {43typedef struct IDCTDSPContext {
46 /* pixel ops : interface with DCT */44 /* pixel ops : interface with DCT */
47 void (*put_pixels_clamped)(const int16_t *block /* align 16 */,45 void (*put_pixels_clamped)(const int16_t *block /* align 16 */,
48 uint8_t *av_restrict pixels /* align 8 */,46 uint8_t *restrict pixels /* align 8 */,
49 ptrdiff_t line_size);47 ptrdiff_t line_size);
50 void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */,48 void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */,
51 uint8_t *av_restrict pixels /* align 8 */,49 uint8_t *restrict pixels /* align 8 */,
52 ptrdiff_t line_size);50 ptrdiff_t line_size);
53 void (*add_pixels_clamped)(const int16_t *block /* align 16 */,51 void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
54 uint8_t *av_restrict pixels /* align 8 */,52 uint8_t *restrict pixels /* align 8 */,
55 ptrdiff_t line_size);53 ptrdiff_t line_size);
56 54
57 void (*idct)(int16_t *block /* align 16 */);55 void (*idct)(int16_t *block /* align 16 */);
@@ -91,9 +89,9 @@ typedef struct IDCTDSPContext { · 33 unmodified lines
91 int mpeg4_studio_profile;89 int mpeg4_studio_profile;
92} IDCTDSPContext;90} IDCTDSPContext;
93 91
94void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,92void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
95 ptrdiff_t line_size);93 ptrdiff_t line_size);
96void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,94void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
97 ptrdiff_t line_size);95 ptrdiff_t line_size);
98 96
99void ff_idctdsp_init(IDCTDSPContext *c, struct AVCodecContext *avctx);97void ff_idctdsp_init(IDCTDSPContext *c, struct AVCodecContext *avctx);
libavcodec/loongarch/idctdsp_lasx.c+3−3
@@ -23,7 +23,7 @@ · 22 unmodified lines
23#include "libavutil/loongarch/loongson_intrinsics.h"23#include "libavutil/loongarch/loongson_intrinsics.h"
24 24
25void ff_put_pixels_clamped_lasx(const int16_t *block,25void ff_put_pixels_clamped_lasx(const int16_t *block,
26 uint8_t *av_restrict pixels,26 uint8_t *restrict pixels,
27 ptrdiff_t stride)27 ptrdiff_t stride)
28{28{
29 __m256i b0, b1, b2, b3;29 __m256i b0, b1, b2, b3;
@@ -48,7 +48,7 @@ void ff_put_pixels_clamped_lasx(const int16_t *block, · 18 unmodified lines
48}48}
49 49
50void ff_put_signed_pixels_clamped_lasx(const int16_t *block,50void ff_put_signed_pixels_clamped_lasx(const int16_t *block,
51 uint8_t *av_restrict pixels,51 uint8_t *restrict pixels,
52 ptrdiff_t stride)52 ptrdiff_t stride)
53{53{
54 __m256i b0, b1, b2, b3;54 __m256i b0, b1, b2, b3;
@@ -77,7 +77,7 @@ void ff_put_signed_pixels_clamped_lasx(const int16_t *block, · 22 unmodified lines
77}77}
78 78
79void ff_add_pixels_clamped_lasx(const int16_t *block,79void ff_add_pixels_clamped_lasx(const int16_t *block,
80 uint8_t *av_restrict pixels,80 uint8_t *restrict pixels,
81 ptrdiff_t stride)81 ptrdiff_t stride)
82{82{
83 __m256i b0, b1, b2, b3;83 __m256i b0, b1, b2, b3;
libavcodec/loongarch/idctdsp_loongarch.h+3−3
@@ -29,13 +29,13 @@ void ff_simple_idct_lasx(int16_t *block); · 28 unmodified lines
29void ff_simple_idct_put_lasx(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);29void ff_simple_idct_put_lasx(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);
30void ff_simple_idct_add_lasx(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);30void ff_simple_idct_add_lasx(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);
31void ff_put_pixels_clamped_lasx(const int16_t *block,31void ff_put_pixels_clamped_lasx(const int16_t *block,
32 uint8_t *av_restrict pixels,32 uint8_t *restrict pixels,
33 ptrdiff_t line_size);33 ptrdiff_t line_size);
34void ff_put_signed_pixels_clamped_lasx(const int16_t *block,34void ff_put_signed_pixels_clamped_lasx(const int16_t *block,
35 uint8_t *av_restrict pixels,35 uint8_t *restrict pixels,
36 ptrdiff_t line_size);36 ptrdiff_t line_size);
37void ff_add_pixels_clamped_lasx(const int16_t *block,37void ff_add_pixels_clamped_lasx(const int16_t *block,
38 uint8_t *av_restrict pixels,38 uint8_t *restrict pixels,
39 ptrdiff_t line_size);39 ptrdiff_t line_size);
40 40
41#endif /* AVCODEC_LOONGARCH_IDCTDSP_LOONGARCH_H */41#endif /* AVCODEC_LOONGARCH_IDCTDSP_LOONGARCH_H */
libavcodec/mips/idctdsp_mips.h+6−6
@@ -25,13 +25,13 @@ · 24 unmodified lines
25#include "../mpegvideo.h"25#include "../mpegvideo.h"
26 26
27void ff_put_pixels_clamped_msa(const int16_t *block,27void ff_put_pixels_clamped_msa(const int16_t *block,
28 uint8_t *av_restrict pixels,28 uint8_t *restrict pixels,
29 ptrdiff_t line_size);29 ptrdiff_t line_size);
30void ff_put_signed_pixels_clamped_msa(const int16_t *block,30void ff_put_signed_pixels_clamped_msa(const int16_t *block,
31 uint8_t *av_restrict pixels,31 uint8_t *restrict pixels,
32 ptrdiff_t line_size);32 ptrdiff_t line_size);
33void ff_add_pixels_clamped_msa(const int16_t *block,33void ff_add_pixels_clamped_msa(const int16_t *block,
34 uint8_t *av_restrict pixels,34 uint8_t *restrict pixels,
35 ptrdiff_t line_size);35 ptrdiff_t line_size);
36void ff_j_rev_dct_msa(int16_t *data);36void ff_j_rev_dct_msa(int16_t *data);
37void ff_jref_idct_put_msa(uint8_t *dest, ptrdiff_t stride, int16_t *block);37void ff_jref_idct_put_msa(uint8_t *dest, ptrdiff_t stride, int16_t *block);
@@ -41,11 +41,11 @@ void ff_simple_idct_put_msa(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block) · 3 unmodified lines
41void ff_simple_idct_add_msa(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);41void ff_simple_idct_add_msa(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block);
42 42
43void ff_put_pixels_clamped_mmi(const int16_t *block,43void ff_put_pixels_clamped_mmi(const int16_t *block,
44 uint8_t *av_restrict pixels, ptrdiff_t line_size);44 uint8_t *restrict pixels, ptrdiff_t line_size);
45void ff_put_signed_pixels_clamped_mmi(const int16_t *block,45void ff_put_signed_pixels_clamped_mmi(const int16_t *block,
46 uint8_t *av_restrict pixels, ptrdiff_t line_size);46 uint8_t *restrict pixels, ptrdiff_t line_size);
47void ff_add_pixels_clamped_mmi(const int16_t *block,47void ff_add_pixels_clamped_mmi(const int16_t *block,
48 uint8_t *av_restrict pixels, ptrdiff_t line_size);48 uint8_t *restrict pixels, ptrdiff_t line_size);
49void ff_simple_idct_8_mmi(int16_t *block);49void ff_simple_idct_8_mmi(int16_t *block);
50void ff_simple_idct_put_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);50void ff_simple_idct_put_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
51void ff_simple_idct_add_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);51void ff_simple_idct_add_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
libavcodec/mips/idctdsp_mmi.c+3−3
@@ -26,7 +26,7 @@ · 25 unmodified lines
26#include "libavutil/mips/mmiutils.h"26#include "libavutil/mips/mmiutils.h"
27 27
28void ff_put_pixels_clamped_mmi(const int16_t *block,28void ff_put_pixels_clamped_mmi(const int16_t *block,
29 uint8_t *av_restrict pixels, ptrdiff_t line_size)29 uint8_t *restrict pixels, ptrdiff_t line_size)
30{30{
31 double ftmp[8];31 double ftmp[8];
32 32
@@ -83,7 +83,7 @@ void ff_put_pixels_clamped_mmi(const int16_t *block, · 50 unmodified lines
83}83}
84 84
85void ff_put_signed_pixels_clamped_mmi(const int16_t *block,85void ff_put_signed_pixels_clamped_mmi(const int16_t *block,
86 uint8_t *av_restrict pixels, ptrdiff_t line_size)86 uint8_t *restrict pixels, ptrdiff_t line_size)
87{87{
88 double ftmp[5];88 double ftmp[5];
89 89
@@ -148,7 +148,7 @@ void ff_put_signed_pixels_clamped_mmi(const int16_t *block, · 58 unmodified lines
148}148}
149 149
150void ff_add_pixels_clamped_mmi(const int16_t *block,150void ff_add_pixels_clamped_mmi(const int16_t *block,
151 uint8_t *av_restrict pixels, ptrdiff_t line_size)151 uint8_t *restrict pixels, ptrdiff_t line_size)
152{152{
153 double ftmp[9];153 double ftmp[9];
154 uint64_t tmp[1];154 uint64_t tmp[1];
libavcodec/mips/idctdsp_msa.c+3−3
@@ -125,21 +125,21 @@ static void add_pixels_clamped_msa(const int16_t *block, uint8_t *pixels, · 124 unmodified lines
125}125}
126 126
127void ff_put_pixels_clamped_msa(const int16_t *block,127void ff_put_pixels_clamped_msa(const int16_t *block,
128 uint8_t *av_restrict pixels,128 uint8_t *restrict pixels,
129 ptrdiff_t line_size)129 ptrdiff_t line_size)
130{130{
131 put_pixels_clamped_msa(block, pixels, line_size);131 put_pixels_clamped_msa(block, pixels, line_size);
132}132}
133 133
134void ff_put_signed_pixels_clamped_msa(const int16_t *block,134void ff_put_signed_pixels_clamped_msa(const int16_t *block,
135 uint8_t *av_restrict pixels,135 uint8_t *restrict pixels,
136 ptrdiff_t line_size)136 ptrdiff_t line_size)
137{137{
138 put_signed_pixels_clamped_msa(block, pixels, line_size);138 put_signed_pixels_clamped_msa(block, pixels, line_size);
139}139}
140 140
141void ff_add_pixels_clamped_msa(const int16_t *block,141void ff_add_pixels_clamped_msa(const int16_t *block,
142 uint8_t *av_restrict pixels,142 uint8_t *restrict pixels,
143 ptrdiff_t line_size)143 ptrdiff_t line_size)
144{144{
145 add_pixels_clamped_msa(block, pixels, line_size);145 add_pixels_clamped_msa(block, pixels, line_size);
libavcodec/mips/me_cmp_mips.h+1−1
@@ -54,7 +54,7 @@ int ff_sse8_msa(MpegEncContext *v, const uint8_t *pu8Src, const uint8_t *pu8Ref, · 53 unmodified lines
54 ptrdiff_t stride, int i32Height);54 ptrdiff_t stride, int i32Height);
55int ff_sse4_msa(MpegEncContext *v, const uint8_t *pu8Src, const uint8_t *pu8Ref,55int ff_sse4_msa(MpegEncContext *v, const uint8_t *pu8Src, const uint8_t *pu8Ref,
56 ptrdiff_t stride, int i32Height);56 ptrdiff_t stride, int i32Height);
57void ff_add_pixels8_msa(const uint8_t *av_restrict pixels, int16_t *block,57void ff_add_pixels8_msa(const uint8_t *restrict pixels, int16_t *block,
58 ptrdiff_t stride);58 ptrdiff_t stride);
59 59
60#endif // #ifndef AVCODEC_MIPS_ME_CMP_MIPS_H60#endif // #ifndef AVCODEC_MIPS_ME_CMP_MIPS_H
libavcodec/mips/pixblockdsp_mips.h+3−3
@@ -24,16 +24,16 @@ · 23 unmodified lines
24 24
25#include "../mpegvideo.h"25#include "../mpegvideo.h"
26 26
27void ff_diff_pixels_msa(int16_t *av_restrict block, const uint8_t *src1,27void ff_diff_pixels_msa(int16_t *restrict block, const uint8_t *src1,
28 const uint8_t *src2, ptrdiff_t stride);28 const uint8_t *src2, ptrdiff_t stride);
29void ff_get_pixels_16_msa(int16_t *restrict dst, const uint8_t *src,29void ff_get_pixels_16_msa(int16_t *restrict dst, const uint8_t *src,
30 ptrdiff_t stride);30 ptrdiff_t stride);
31void ff_get_pixels_8_msa(int16_t *restrict dst, const uint8_t *src,31void ff_get_pixels_8_msa(int16_t *restrict dst, const uint8_t *src,
32 ptrdiff_t stride);32 ptrdiff_t stride);
33 33
34void ff_get_pixels_8_mmi(int16_t *av_restrict block, const uint8_t *pixels,34void ff_get_pixels_8_mmi(int16_t *restrict block, const uint8_t *pixels,
35 ptrdiff_t stride);35 ptrdiff_t stride);
36void ff_diff_pixels_mmi(int16_t *av_restrict block, const uint8_t *src1,36void ff_diff_pixels_mmi(int16_t *restrict block, const uint8_t *src1,
37 const uint8_t *src2, ptrdiff_t stride);37 const uint8_t *src2, ptrdiff_t stride);
38 38
39#endif // #ifndef AVCODEC_MIPS_PIXBLOCKDSP_MIPS_H39#endif // #ifndef AVCODEC_MIPS_PIXBLOCKDSP_MIPS_H
libavcodec/mips/pixblockdsp_mmi.c+2−2
@@ -25,7 +25,7 @@ · 24 unmodified lines
25#include "libavutil/mips/asmdefs.h"25#include "libavutil/mips/asmdefs.h"
26#include "libavutil/mips/mmiutils.h"26#include "libavutil/mips/mmiutils.h"
27 27
28void ff_get_pixels_8_mmi(int16_t *av_restrict block, const uint8_t *pixels,28void ff_get_pixels_8_mmi(int16_t *restrict block, const uint8_t *pixels,
29 ptrdiff_t stride)29 ptrdiff_t stride)
30{30{
31 double ftmp[7];31 double ftmp[7];
@@ -94,7 +94,7 @@ void ff_get_pixels_8_mmi(int16_t *av_restrict block, const uint8_t *pixels, · 62 unmodified lines
94 );94 );
95}95}
96 96
97void ff_diff_pixels_mmi(int16_t *av_restrict block, const uint8_t *src1,97void ff_diff_pixels_mmi(int16_t *restrict block, const uint8_t *src1,
98 const uint8_t *src2, ptrdiff_t stride)98 const uint8_t *src2, ptrdiff_t stride)
99{99{
100 double ftmp[5];100 double ftmp[5];
libavcodec/mips/pixblockdsp_msa.c+3−3
@@ -124,19 +124,19 @@ static void copy_width16_msa(const uint8_t *src, int32_t src_stride, · 123 unmodified lines
124 }124 }
125}125}
126 126
127void ff_get_pixels_16_msa(int16_t *av_restrict dest, const uint8_t *src,127void ff_get_pixels_16_msa(int16_t *restrict dest, const uint8_t *src,
128 ptrdiff_t stride)128 ptrdiff_t stride)
129{129{
130 copy_width16_msa(src, stride, (uint8_t *) dest, 16, 8);130 copy_width16_msa(src, stride, (uint8_t *) dest, 16, 8);
131}131}
132 132
133void ff_get_pixels_8_msa(int16_t *av_restrict dest, const uint8_t *src,133void ff_get_pixels_8_msa(int16_t *restrict dest, const uint8_t *src,
134 ptrdiff_t stride)134 ptrdiff_t stride)
135{135{
136 copy_8bit_to_16bit_width8_msa(src, stride, dest, 8, 8);136 copy_8bit_to_16bit_width8_msa(src, stride, dest, 8, 8);
137}137}
138 138
139void ff_diff_pixels_msa(int16_t *av_restrict block, const uint8_t *src1,139void ff_diff_pixels_msa(int16_t *restrict block, const uint8_t *src1,
140 const uint8_t *src2, ptrdiff_t stride)140 const uint8_t *src2, ptrdiff_t stride)
141{141{
142 diff_pixels_msa(block, src1, src2, stride);142 diff_pixels_msa(block, src1, src2, stride);
libavcodec/mpegaudiodec_template.c+1−1
@@ -92,7 +92,7 @@ typedef struct MPADecodeContext { · 91 unmodified lines
92 int err_recognition;92 int err_recognition;
93 AVCodecContext* avctx;93 AVCodecContext* avctx;
94 MPADSPContext mpadsp;94 MPADSPContext mpadsp;
95 void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len);95 void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
96 AVFrame *frame;96 AVFrame *frame;
97 uint32_t crc;97 uint32_t crc;
98} MPADecodeContext;98} MPADecodeContext;
libavcodec/opus_pvq.c+1−1
@@ -80,7 +80,7 @@ static inline int celt_pulses2bits(const uint8_t *cache, int pulses) · 79 unmodified lines
80 return (pulses == 0) ? 0 : cache[pulses] + 1;80 return (pulses == 0) ? 0 : cache[pulses] + 1;
81}81}
82 82
83static inline void celt_normalize_residual(const int * av_restrict iy, float * av_restrict X,83static inline void celt_normalize_residual(const int * restrict iy, float * restrict X,
84 int N, float g)84 int N, float g)
85{85{
86 int i;86 int i;
libavcodec/pixblockdsp.c+3−3
@@ -24,7 +24,7 @@ · 23 unmodified lines
24#include "avcodec.h"24#include "avcodec.h"
25#include "pixblockdsp.h"25#include "pixblockdsp.h"
26 26
27static void get_pixels_16_c(int16_t *av_restrict block, const uint8_t *pixels,27static void get_pixels_16_c(int16_t *restrict block, const uint8_t *pixels,
28 ptrdiff_t stride)28 ptrdiff_t stride)
29{29{
30 AV_COPY128U(block + 0 * 8, pixels + 0 * stride);30 AV_COPY128U(block + 0 * 8, pixels + 0 * stride);
@@ -37,7 +37,7 @@ static void get_pixels_16_c(int16_t *av_restrict block, const uint8_t *pixels, · 6 unmodified lines
37 AV_COPY128U(block + 7 * 8, pixels + 7 * stride);37 AV_COPY128U(block + 7 * 8, pixels + 7 * stride);
38}38}
39 39
40static void get_pixels_8_c(int16_t *av_restrict block, const uint8_t *pixels,40static void get_pixels_8_c(int16_t *restrict block, const uint8_t *pixels,
41 ptrdiff_t stride)41 ptrdiff_t stride)
42{42{
43 int i;43 int i;
@@ -57,7 +57,7 @@ static void get_pixels_8_c(int16_t *av_restrict block, const uint8_t *pixels, · 13 unmodified lines
57 }57 }
58}58}
59 59
60static void diff_pixels_c(int16_t *av_restrict block, const uint8_t *s1,60static void diff_pixels_c(int16_t *restrict block, const uint8_t *s1,
61 const uint8_t *s2, ptrdiff_t stride)61 const uint8_t *s2, ptrdiff_t stride)
62{62{
63 int i;63 int i;
libavcodec/pixblockdsp.h+4−6
@@ -21,22 +21,20 @@ · 20 unmodified lines
21 21
22#include <stdint.h>22#include <stdint.h>
23 23
24#include "config.h"
25
26#include "avcodec.h"24#include "avcodec.h"
27 25
28typedef struct PixblockDSPContext {26typedef struct PixblockDSPContext {
29 void (*get_pixels)(int16_t *av_restrict block /* align 16 */,27 void (*get_pixels)(int16_t *restrict block /* align 16 */,
30 const uint8_t *pixels /* align 8 */,28 const uint8_t *pixels /* align 8 */,
31 ptrdiff_t stride);29 ptrdiff_t stride);
32 void (*get_pixels_unaligned)(int16_t *av_restrict block /* align 16 */,30 void (*get_pixels_unaligned)(int16_t *restrict block /* align 16 */,
33 const uint8_t *pixels,31 const uint8_t *pixels,
34 ptrdiff_t stride);32 ptrdiff_t stride);
35 void (*diff_pixels)(int16_t *av_restrict block /* align 16 */,33 void (*diff_pixels)(int16_t *restrict block /* align 16 */,
36 const uint8_t *s1 /* align 8 */,34 const uint8_t *s1 /* align 8 */,
37 const uint8_t *s2 /* align 8 */,35 const uint8_t *s2 /* align 8 */,
38 ptrdiff_t stride);36 ptrdiff_t stride);
39 void (*diff_pixels_unaligned)(int16_t *av_restrict block /* align 16 */,37 void (*diff_pixels_unaligned)(int16_t *restrict block /* align 16 */,
40 const uint8_t *s1,38 const uint8_t *s1,
41 const uint8_t *s2,39 const uint8_t *s2,
42 ptrdiff_t stride);40 ptrdiff_t stride);
libavcodec/utils.c+2−2
@@ -939,9 +939,9 @@ void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, in · 938 unmodified lines
939 939
940#endif940#endif
941 941
942const uint8_t *avpriv_find_start_code(const uint8_t *av_restrict p,942const uint8_t *avpriv_find_start_code(const uint8_t *restrict p,
943 const uint8_t *end,943 const uint8_t *end,
944 uint32_t *av_restrict state)944 uint32_t *restrict state)
945{945{
946 int i;946 int i;
947 947
libavfilter/af_firequalizer.c+7−7
@@ -196,8 +196,8 @@ static av_cold void uninit(AVFilterContext *ctx) · 195 unmodified lines
196 av_freep(&s->gain_entry_cmd);196 av_freep(&s->gain_entry_cmd);
197}197}
198 198
199static void fast_convolute(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, float *av_restrict conv_buf,199static void fast_convolute(FIREqualizerContext *restrict s, const float *restrict kernel_buf, float *restrict conv_buf,
200 OverlapIndex *av_restrict idx, float *av_restrict data, int nsamples)200 OverlapIndex *restrict idx, float *restrict data, int nsamples)
201{201{
202 if (nsamples <= s->nsamples_max) {202 if (nsamples <= s->nsamples_max) {
203 float *buf = conv_buf + idx->buf_idx * s->rdft_len;203 float *buf = conv_buf + idx->buf_idx * s->rdft_len;
@@ -233,9 +233,9 @@ static void fast_convolute(FIREqualizerContext *av_restrict s, const float *av_r · 29 unmodified lines
233 }233 }
234}234}
235 235
236static void fast_convolute_nonlinear(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf,236static void fast_convolute_nonlinear(FIREqualizerContext *restrict s, const float *restrict kernel_buf,
237 float *av_restrict conv_buf, OverlapIndex *av_restrict idx,237 float *restrict conv_buf, OverlapIndex *restrict idx,
238 float *av_restrict data, int nsamples)238 float *restrict data, int nsamples)
239{239{
240 if (nsamples <= s->nsamples_max) {240 if (nsamples <= s->nsamples_max) {
241 float *buf = conv_buf + idx->buf_idx * s->rdft_len;241 float *buf = conv_buf + idx->buf_idx * s->rdft_len;
@@ -272,8 +272,8 @@ static void fast_convolute_nonlinear(FIREqualizerContext *av_restrict s, const f · 30 unmodified lines
272 }272 }
273}273}
274 274
275static void fast_convolute2(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, AVComplexFloat *av_restrict conv_buf,275static void fast_convolute2(FIREqualizerContext *restrict s, const float *restrict kernel_buf, AVComplexFloat *restrict conv_buf,
276 OverlapIndex *av_restrict idx, float *av_restrict data0, float *av_restrict data1, int nsamples)276 OverlapIndex *restrict idx, float *restrict data0, float *restrict data1, int nsamples)
277{277{
278 if (nsamples <= s->nsamples_max) {278 if (nsamples <= s->nsamples_max) {
279 AVComplexFloat *buf = conv_buf + idx->buf_idx * s->rdft_len;279 AVComplexFloat *buf = conv_buf + idx->buf_idx * s->rdft_len;
libavformat/rtpenc.h+2−2
@@ -97,7 +97,7 @@ void ff_rtp_send_vp9(AVFormatContext *s1, const uint8_t *buff, int size); · 96 unmodified lines
97void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buff, int size);97void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buff, int size);
98void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size, int interlaced, int field);98void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size, int interlaced, int field);
99 99
100const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start,100const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *restrict start,
101 const uint8_t *av_restrict end);101 const uint8_t *restrict end);
102 102
103#endif /* AVFORMAT_RTPENC_H */103#endif /* AVFORMAT_RTPENC_H */
libavformat/rtpenc_h261.c+2−2
@@ -24,8 +24,8 @@ · 23 unmodified lines
24 24
25#define RTP_H261_HEADER_SIZE 425#define RTP_H261_HEADER_SIZE 4
26 26
27static const uint8_t *find_resync_marker_reverse(const uint8_t *av_restrict start,27static const uint8_t *find_resync_marker_reverse(const uint8_t *restrict start,
28 const uint8_t *av_restrict end)28 const uint8_t *restrict end)
29{29{
30 const uint8_t *p = end - 1;30 const uint8_t *p = end - 1;
31 start += 1; /* Make sure we never return the original start. */31 start += 1; /* Make sure we never return the original start. */
libavformat/rtpenc_h263.c+2−2
@@ -23,8 +23,8 @@ · 22 unmodified lines
23#include "avformat.h"23#include "avformat.h"
24#include "rtpenc.h"24#include "rtpenc.h"
25 25
26const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start,26const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *restrict start,
27 const uint8_t *av_restrict end)27 const uint8_t *restrict end)
28{28{
29 const uint8_t *p = end - 1;29 const uint8_t *p = end - 1;
30 start += 1; /* Make sure we never return the original start. */30 start += 1; /* Make sure we never return the original start. */
libavutil/arm/float_dsp_init_vfp.c+1−1
@@ -32,7 +32,7 @@ void ff_vector_fmul_window_vfp(float *dst, const float *src0, · 31 unmodified lines
32void ff_vector_fmul_reverse_vfp(float *dst, const float *src0,32void ff_vector_fmul_reverse_vfp(float *dst, const float *src0,
33 const float *src1, int len);33 const float *src1, int len);
34 34
35void ff_butterflies_float_vfp(float *av_restrict v1, float *av_restrict v2, int len);35void ff_butterflies_float_vfp(float *restrict v1, float *restrict v2, int len);
36 36
37av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags)37av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags)
38{38{
libavutil/fixed_dsp.c+1−1
@@ -135,7 +135,7 @@ static int scalarproduct_fixed_c(const int *v1, const int *v2, int len) · 134 unmodified lines
135 return (int)(p >> 31);135 return (int)(p >> 31);
136}136}
137 137
138static void butterflies_fixed_c(int *av_restrict v1s, int *av_restrict v2, int len)138static void butterflies_fixed_c(int *restrict v1s, int *restrict v2, int len)
139{139{
140 int i;140 int i;
141 unsigned int *v1 = v1s;141 unsigned int *v1 = v1s;
libavutil/fixed_dsp.h+1−2
@@ -49,7 +49,6 @@ · 48 unmodified lines
49#define AVUTIL_FIXED_DSP_H49#define AVUTIL_FIXED_DSP_H
50 50
51#include <stdint.h>51#include <stdint.h>
52#include "config.h"
53#include "attributes.h"52#include "attributes.h"
54#include "libavcodec/mathops.h"53#include "libavcodec/mathops.h"
55 54
@@ -150,7 +149,7 @@ typedef struct AVFixedDSPContext { · 94 unmodified lines
150 * @param v2 second input vector, difference output, 16-byte aligned149 * @param v2 second input vector, difference output, 16-byte aligned
151 * @param len length of vectors, multiple of 4150 * @param len length of vectors, multiple of 4
152 */151 */
153 void (*butterflies_fixed)(int *av_restrict v1, int *av_restrict v2, int len);152 void (*butterflies_fixed)(int *restrict v1, int *restrict v2, int len);
154} AVFixedDSPContext;153} AVFixedDSPContext;
155 154
156/**155/**
libavutil/float_dsp.c+1−1
@@ -109,7 +109,7 @@ static void vector_fmul_reverse_c(float *dst, const float *src0, · 108 unmodified lines
109 dst[i] = src0[i] * src1[-i];109 dst[i] = src0[i] * src1[-i];
110}110}
111 111
112static void butterflies_float_c(float *av_restrict v1, float *av_restrict v2,112static void butterflies_float_c(float *restrict v1, float *restrict v2,
113 int len)113 int len)
114{114{
115 int i;115 int i;
libavutil/float_dsp.h+1−3
@@ -19,8 +19,6 @@ · 18 unmodified lines
19#ifndef AVUTIL_FLOAT_DSP_H19#ifndef AVUTIL_FLOAT_DSP_H
20#define AVUTIL_FLOAT_DSP_H20#define AVUTIL_FLOAT_DSP_H
21 21
22#include "config.h"
23
24typedef struct AVFloatDSPContext {22typedef struct AVFloatDSPContext {
25 /**23 /**
26 * Calculate the entry wise product of two vectors of floats and store the result in24 * Calculate the entry wise product of two vectors of floats and store the result in
@@ -161,7 +159,7 @@ typedef struct AVFloatDSPContext { · 134 unmodified lines
161 * @param v2 second input vector, difference output, 16-byte aligned159 * @param v2 second input vector, difference output, 16-byte aligned
162 * @param len length of vectors, multiple of 4160 * @param len length of vectors, multiple of 4
163 */161 */
164 void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len);162 void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
165 163
166 /**164 /**
167 * Calculate the scalar product of two vectors of floats.165 * Calculate the scalar product of two vectors of floats.
libavutil/mips/float_dsp_mips.c+1−1
@@ -224,7 +224,7 @@ static void vector_fmul_window_mips(float *dst, const float *src0, · 223 unmodified lines
224 );224 );
225}225}
226 226
227static void butterflies_float_mips(float *av_restrict v1, float *av_restrict v2,227static void butterflies_float_mips(float *restrict v1, float *restrict v2,
228 int len)228 int len)
229{229{
230 float temp0, temp1, temp2, temp3, temp4;230 float temp0, temp1, temp2, temp3, temp4;
libavutil/x86/fixed_dsp_init.c+1−3
@@ -16,14 +16,12 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#include "config.h"
20
21#include "libavutil/attributes.h"19#include "libavutil/attributes.h"
22#include "libavutil/cpu.h"20#include "libavutil/cpu.h"
23#include "libavutil/fixed_dsp.h"21#include "libavutil/fixed_dsp.h"
24#include "cpu.h"22#include "cpu.h"
25 23
26void ff_butterflies_fixed_sse2(int *av_restrict src0, int *av_restrict src1, int len);24void ff_butterflies_fixed_sse2(int *restrict src0, int *restrict src1, int len);
27 25
28av_cold void ff_fixed_dsp_init_x86(AVFixedDSPContext *fdsp)26av_cold void ff_fixed_dsp_init_x86(AVFixedDSPContext *fdsp)
29{27{
libavutil/x86/float_dsp_init.c+1−4
@@ -16,13 +16,10 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#include "config.h"
20
21#include "libavutil/attributes.h"19#include "libavutil/attributes.h"
22#include "libavutil/cpu.h"20#include "libavutil/cpu.h"
23#include "libavutil/float_dsp.h"21#include "libavutil/float_dsp.h"
24#include "cpu.h"22#include "cpu.h"
25#include "asm.h"
26 23
27void ff_vector_fmul_sse(float *dst, const float *src0, const float *src1,24void ff_vector_fmul_sse(float *dst, const float *src0, const float *src1,
28 int len);25 int len);
@@ -76,7 +73,7 @@ void ff_vector_fmul_reverse_avx2(float *dst, const float *src0, · 47 unmodified lines
76float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order);73float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order);
77float ff_scalarproduct_float_fma3(const float *v1, const float *v2, int order);74float ff_scalarproduct_float_fma3(const float *v1, const float *v2, int order);
78 75
79void ff_butterflies_float_sse(float *av_restrict src0, float *av_restrict src1, int len);76void ff_butterflies_float_sse(float *restrict src0, float *restrict src1, int len);
80 77
81av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)78av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
82{79{
tests/checkasm/fixed_dsp.c+1−1
@@ -100,7 +100,7 @@ static void check_butterflies(const int *src0, const int *src1) · 99 unmodified lines
100 LOCAL_ALIGNED_16(int, new0, [BUF_SIZE]);100 LOCAL_ALIGNED_16(int, new0, [BUF_SIZE]);
101 LOCAL_ALIGNED_16(int, new1, [BUF_SIZE]);101 LOCAL_ALIGNED_16(int, new1, [BUF_SIZE]);
102 102
103 declare_func(void, int *av_restrict src0, int *av_restrict src1, int len);103 declare_func(void, int *restrict src0, int *restrict src1, int len);
104 104
105 memcpy(ref0, src0, BUF_SIZE * sizeof(*src0));105 memcpy(ref0, src0, BUF_SIZE * sizeof(*src0));
106 memcpy(ref1, src1, BUF_SIZE * sizeof(*src1));106 memcpy(ref1, src1, BUF_SIZE * sizeof(*src1));
tests/checkasm/float_dsp.c+1−3
@@ -16,8 +16,6 @@ · 15 unmodified lines
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */17 */
18 18
19#include "config.h"
20
21#include <float.h>19#include <float.h>
22#include <stdint.h>20#include <stdint.h>
23 21
@@ -236,7 +234,7 @@ static void test_butterflies_float(const float *src0, const float *src1) · 212 unmodified lines
236 LOCAL_ALIGNED_16(float, odst1, [LEN]);234 LOCAL_ALIGNED_16(float, odst1, [LEN]);
237 int i;235 int i;
238 236
239 declare_func(void, float *av_restrict src0, float *av_restrict src1,237 declare_func(void, float *restrict src0, float *restrict src1,
240 int len);238 int len);
241 239
242 memcpy(cdst, src0, LEN * sizeof(*src0));240 memcpy(cdst, src0, LEN * sizeof(*src0));
tests/checkasm/pixblockdsp.c+1−1
@@ -65,7 +65,7 @@ · 64 unmodified lines
65#define check_diff_pixels(type, aligned) \65#define check_diff_pixels(type, aligned) \
66 do { \66 do { \
67 int i; \67 int i; \
68 declare_func(void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride); \68 declare_func(void, int16_t *restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride); \
69 \69 \
70 for (i = 0; i < BUF_UNITS; i++) { \70 for (i = 0; i < BUF_UNITS; i++) { \
71 int src_offset = i * 64 * sizeof(type) + (aligned ? 8 : 1) * i; \71 int src_offset = i * 64 * sizeof(type) + (aligned ? 8 : 1) * i; \
tests/checkasm/vorbisdsp.c+1−3
@@ -16,8 +16,6 @@ · 15 unmodified lines
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */17 */
18 18
19#include "config.h"
20
21#include <float.h>19#include <float.h>
22 20
23#include "libavutil/mem_internal.h"21#include "libavutil/mem_internal.h"
@@ -48,7 +46,7 @@ static void test_inverse_coupling(void) · 24 unmodified lines
48 LOCAL_ALIGNED_16(float, cdst1, [LEN]);46 LOCAL_ALIGNED_16(float, cdst1, [LEN]);
49 LOCAL_ALIGNED_16(float, odst1, [LEN]);47 LOCAL_ALIGNED_16(float, odst1, [LEN]);
50 48
51 declare_func(void, float *av_restrict mag, float *av_restrict ang,49 declare_func(void, float *restrict mag, float *restrict ang,
52 ptrdiff_t blocksize);50 ptrdiff_t blocksize);
53 51
54 randomize_buffer(src0);52 randomize_buffer(src0);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t