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 <[email protected]>


>From 32486a55dc96e1e177ddc58f2f4971785f138554 Mon Sep 17 00:00:00 2001
From: zengshuang <[email protected]>
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 <[email protected]>
---
 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 -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to