Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: nico-zs via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: nico-zs <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] avcodec/kbdwin, avutil/fixed_dsp: resolve compilation warnings (PR #22290)
Date: Thu, 26 Feb 2026 08:36:00 -0000
Message-ID: <177209496069.25.12639174957327334382@29965ddac10e> (raw)

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

                 reply	other threads:[~2026-02-26  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=177209496069.25.12639174957327334382@29965ddac10e \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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