Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PR] avcodec/kbdwin, avutil/fixed_dsp: resolve compilation warnings (PR #22290)
@ 2026-02-26  8:36 nico-zs via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: nico-zs via ffmpeg-devel @ 2026-02-26  8:36 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: nico-zs

PR #22290 opened by nico-zs
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22290
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22290.patch

Fix implicit type conversion warnings in kbdwin and fixed_dsp by
using proper types for function parameters and return values.

Signed-off-by: zengshuang <zengshuang@xiaomi.com>


>From 32486a55dc96e1e177ddc58f2f4971785f138554 Mon Sep 17 00:00:00 2001
From: zengshuang <zengshuang@xiaomi.com>
Date: Thu, 26 Feb 2026 15:54:20 +0800
Subject: [PATCH] avcodec/kbdwin, avutil/fixed_dsp: resolve compilation
 warnings

Fix implicit type conversion warnings in kbdwin and fixed_dsp by
using proper types for function parameters and return values.

Signed-off-by: zengshuang <zengshuang@xiaomi.com>
---
 libavcodec/kbdwin.c   | 2 +-
 libavcodec/kbdwin.h   | 2 +-
 libavutil/fixed_dsp.c | 8 ++++----
 libavutil/fixed_dsp.h | 6 +++++-
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/libavcodec/kbdwin.c b/libavcodec/kbdwin.c
index cb73ceb160..9333426975 100644
--- a/libavcodec/kbdwin.c
+++ b/libavcodec/kbdwin.c
@@ -56,7 +56,7 @@ av_cold void ff_kbd_window_init(float *window, float alpha, int n)
     kbd_window_init(window, NULL, alpha, n);
 }
 
-av_cold void ff_kbd_window_init_fixed(int32_t *window, float alpha, int n)
+av_cold void ff_kbd_window_init_fixed(int *window, float alpha, int n)
 {
     kbd_window_init(NULL, window, alpha, n);
 }
diff --git a/libavcodec/kbdwin.h b/libavcodec/kbdwin.h
index 4185c4206f..f52e7fc572 100644
--- a/libavcodec/kbdwin.h
+++ b/libavcodec/kbdwin.h
@@ -33,6 +33,6 @@
  * @param   n       size of half window, max FF_KBD_WINDOW_MAX
  */
 void ff_kbd_window_init(float *window, float alpha, int n);
-void ff_kbd_window_init_fixed(int32_t *window, float alpha, int n);
+void ff_kbd_window_init_fixed(int *window, float alpha, int n);
 
 #endif /* AVCODEC_KBDWIN_H */
diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 74cefdb145..ee10ea2af6 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -92,11 +92,11 @@ static void vector_fmul_window_scaled_c(int16_t *dst, const int32_t *src0,
     }
 }
 
-static void vector_fmul_window_c(int32_t *dst, const int32_t *src0,
-                                       const int32_t *src1, const int32_t *win,
-                                       int len)
+static void vector_fmul_window_c(int *dst, const int *src0,
+                                 const int *src1, const int *win,
+                                 int len)
 {
-    int32_t s0, s1, wi, wj, i, j;
+    int s0, s1, wi, wj, i, j;
 
     dst += len;
     win += len;
diff --git a/libavutil/fixed_dsp.h b/libavutil/fixed_dsp.h
index 9b566af675..ddb8d92fcd 100644
--- a/libavutil/fixed_dsp.h
+++ b/libavutil/fixed_dsp.h
@@ -83,6 +83,10 @@ typedef struct AVFixedDSPContext {
      * Used primarily by MDCT-based audio codecs.
      * Source and destination vectors must overlap exactly or not at all.
      *
+     * NOTE: On some toolchains used in this project, int32_t may map to long int,
+     * while codec fixed-point paths use INTFLOAT == int. Keep this API aligned
+     * with actual implementation/storage types to avoid pointer-type mismatches.
+     *
      * @param dst  result vector
      *             constraints: 32-byte aligned
      * @param src0 first source vector
@@ -94,7 +98,7 @@ typedef struct AVFixedDSPContext {
      * @param len  length of vector
      *             constraints: multiple of 4
      */
-    void (*vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len);
+    void (*vector_fmul_window)(int *dst, const int *src0, const int *src1, const int *win, int len);
 
     /**
      * Fixed-point multiplication that calculates the entry wise product of two
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-26  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-26  8:36 [FFmpeg-devel] [PR] avcodec/kbdwin, avutil/fixed_dsp: resolve compilation warnings (PR #22290) nico-zs via ffmpeg-devel

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