Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* Re: [FFmpeg-devel] [PATCH] fixed_dsp: add missing av_restrict qualifiers
@ 2022-10-04  8:56 Anton Khirnov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Khirnov @ 2022-10-04  8:56 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Johannes Kauffmann

Quoting Johannes Kauffmann (2022-09-25 00:41:18)
> The butterflies_fixed function pointer declaration specifies av_restrict
> for the first two pointer arguments. So the corresponding function
> definitions should honor this declaration.
> 
> MSVC emits warning C4113 for this.
> ---
>  libavutil/fixed_dsp.c          | 2 +-
>  libavutil/x86/fixed_dsp_init.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Makes sense, will push.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [FFmpeg-devel] [PATCH] fixed_dsp: add missing av_restrict qualifiers
@ 2022-09-24 22:41 Johannes Kauffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Kauffmann @ 2022-09-24 22:41 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Johannes Kauffmann

The butterflies_fixed function pointer declaration specifies av_restrict
for the first two pointer arguments. So the corresponding function
definitions should honor this declaration.

MSVC emits warning C4113 for this.
---
 libavutil/fixed_dsp.c          | 2 +-
 libavutil/x86/fixed_dsp_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 154f3bc2d3..30eaa94bb7 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -135,7 +135,7 @@ static int scalarproduct_fixed_c(const int *v1, const int *v2, int len)
     return (int)(p >> 31);
 }
 
-static void butterflies_fixed_c(int *v1s, int *v2, int len)
+static void butterflies_fixed_c(int *av_restrict v1s, int *av_restrict v2, int len)
 {
     int i;
     unsigned int *v1 = v1s;
diff --git a/libavutil/x86/fixed_dsp_init.c b/libavutil/x86/fixed_dsp_init.c
index 303a2eb922..d3f4b2e325 100644
--- a/libavutil/x86/fixed_dsp_init.c
+++ b/libavutil/x86/fixed_dsp_init.c
@@ -23,7 +23,7 @@
 #include "libavutil/fixed_dsp.h"
 #include "cpu.h"
 
-void ff_butterflies_fixed_sse2(int *src0, int *src1, int len);
+void ff_butterflies_fixed_sse2(int *av_restrict src0, int *av_restrict src1, int len);
 
 av_cold void ff_fixed_dsp_init_x86(AVFixedDSPContext *fdsp)
 {
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-04  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  8:56 [FFmpeg-devel] [PATCH] fixed_dsp: add missing av_restrict qualifiers Anton Khirnov
  -- strict thread matches above, loose matches on Subject: below --
2022-09-24 22:41 Johannes Kauffmann

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git