Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/dct: Make declarations and definitions match
@ 2025-03-30 11:00 Andreas Rheinhardt
  2025-04-01 12:26 ` Andreas Rheinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-03-30 11:00 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

Patch attached.

- Andreas

[-- Attachment #2: 0001-avcodec-dct-Make-declarations-and-definitions-match.patch --]
[-- Type: text/x-patch, Size: 2390 bytes --]

From 8a513c26c03983c7fcfd36a59a01c120e6abe0d1 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sun, 30 Mar 2025 12:49:07 +0200
Subject: [PATCH] avcodec/dct: Make declarations and definitions match

GCC considers declarations using a parameter of pointer
type (or equivalently a parameter using an array of unspecified
dimensions) to be inconsistent with a declaration using
a known-length array type and emits a -Warray-parameter warning
for several ff_j_rev_dct* functions for this.

This patch makes the declarations match the actual definitions
to suppress these (IMO nonsensical) warnings.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/dct.h     | 12 ++++++------
 libavcodec/jrevdct.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavcodec/dct.h b/libavcodec/dct.h
index 17c881a695..17135207bd 100644
--- a/libavcodec/dct.h
+++ b/libavcodec/dct.h
@@ -27,11 +27,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
-void ff_j_rev_dct(int16_t *data);
-void ff_j_rev_dct4(int16_t *data);
-void ff_j_rev_dct2(int16_t *data);
-void ff_j_rev_dct1(int16_t *data);
-void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
-void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
+void ff_j_rev_dct(int16_t data[64]);
+void ff_j_rev_dct4(int16_t data[64]);
+void ff_j_rev_dct2(int16_t data[64]);
+void ff_j_rev_dct1(int16_t data[64]);
+void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]);
+void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]);
 
 #endif /* AVCODEC_DCT_H */
diff --git a/libavcodec/jrevdct.c b/libavcodec/jrevdct.c
index 7f1863515f..531deee3a9 100644
--- a/libavcodec/jrevdct.c
+++ b/libavcodec/jrevdct.c
@@ -1159,13 +1159,13 @@ void ff_j_rev_dct1(DCTBLOCK data){
 #undef FIX
 #undef CONST_BITS
 
-void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
+void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
 {
     ff_j_rev_dct(block);
     ff_put_pixels_clamped_c(block, dest, line_size);
 }
 
-void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
+void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
 {
     ff_j_rev_dct(block);
     ff_add_pixels_clamped_c(block, dest, line_size);
-- 
2.45.2


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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

* Re: [FFmpeg-devel] [PATCH] avcodec/dct: Make declarations and definitions match
  2025-03-30 11:00 [FFmpeg-devel] [PATCH] avcodec/dct: Make declarations and definitions match Andreas Rheinhardt
@ 2025-04-01 12:26 ` Andreas Rheinhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-04-01 12:26 UTC (permalink / raw)
  To: ffmpeg-devel

Andreas Rheinhardt:
> Patch attached.
> 
> - Andreas
> Will apply tomorrow unless there are objections.

- Andreas

_______________________________________________
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:[~2025-04-01 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-30 11:00 [FFmpeg-devel] [PATCH] avcodec/dct: Make declarations and definitions match Andreas Rheinhardt
2025-04-01 12:26 ` Andreas Rheinhardt

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