diff mbox series

[FFmpeg-devel,PATCHv3,2/3] lavc/vorbisdsp: use ptrdiff_t rather than intptr_t

Message ID 20220919161044.19545-2-remi@remlab.net
State Accepted
Commit b52034270a82ffc4aa584945c8a18aa8e58e741b
Headers show
Series [FFmpeg-devel,PATCHv3,1/3] lavc/vorbisdec: use ptrdiff_t to iterate over intptr_t | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont Sept. 19, 2022, 4:10 p.m. UTC
From: Rémi Denis-Courmont <remi@remlab.net>

... for a difference between pointers.
---
 libavcodec/aarch64/vorbisdsp_init.c | 2 +-
 libavcodec/arm/vorbisdsp_init_arm.c | 2 +-
 libavcodec/ppc/vorbisdsp_altivec.c  | 2 +-
 libavcodec/vorbis.h                 | 2 +-
 libavcodec/vorbisdec.c              | 2 +-
 libavcodec/vorbisdsp.h              | 4 ++--
 libavcodec/x86/vorbisdsp_init.c     | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/aarch64/vorbisdsp_init.c b/libavcodec/aarch64/vorbisdsp_init.c
index c796f95e61..969343934b 100644
--- a/libavcodec/aarch64/vorbisdsp_init.c
+++ b/libavcodec/aarch64/vorbisdsp_init.c
@@ -22,7 +22,7 @@ 
 #include "libavcodec/vorbisdsp.h"
 
 void ff_vorbis_inverse_coupling_neon(float *mag, float *ang,
-                                     intptr_t blocksize);
+                                     ptrdiff_t blocksize);
 
 av_cold void ff_vorbisdsp_init_aarch64(VorbisDSPContext *c)
 {
diff --git a/libavcodec/arm/vorbisdsp_init_arm.c b/libavcodec/arm/vorbisdsp_init_arm.c
index f4b3d80ef6..acda34f468 100644
--- a/libavcodec/arm/vorbisdsp_init_arm.c
+++ b/libavcodec/arm/vorbisdsp_init_arm.c
@@ -25,7 +25,7 @@ 
 #include "libavcodec/vorbisdsp.h"
 
 void ff_vorbis_inverse_coupling_neon(float *mag, float *ang,
-                                     intptr_t blocksize);
+                                     ptrdiff_t blocksize);
 
 av_cold void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
 {
diff --git a/libavcodec/ppc/vorbisdsp_altivec.c b/libavcodec/ppc/vorbisdsp_altivec.c
index c298d8cae3..8f301705e9 100644
--- a/libavcodec/ppc/vorbisdsp_altivec.c
+++ b/libavcodec/ppc/vorbisdsp_altivec.c
@@ -29,7 +29,7 @@ 
 
 #if HAVE_ALTIVEC
 static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
-                                            intptr_t blocksize)
+                                            ptrdiff_t blocksize)
 {
     vector float m, a;
     vector bool int t0, t1;
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index f80187feee..270855da04 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -45,7 +45,7 @@  int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num);
 void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
                                   uint16_t *y_list, int *flag,
                                   int multiplier, float * out, int samples);
-void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize);
+void ff_vorbis_inverse_coupling(float *mag, float *ang, ptrdiff_t blocksize);
 
 #define ilog(i) av_log2(2*(i))
 
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index bfc4be6fc6..10d187b82a 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1579,7 +1579,7 @@  static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr,
     }
 }
 
-void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize)
+void ff_vorbis_inverse_coupling(float *mag, float *ang, ptrdiff_t blocksize)
 {
     for (ptrdiff_t i = 0; i < blocksize; i++) {
         if (mag[i] > 0.0) {
diff --git a/libavcodec/vorbisdsp.h b/libavcodec/vorbisdsp.h
index 7abec4e4b7..1775a92cf2 100644
--- a/libavcodec/vorbisdsp.h
+++ b/libavcodec/vorbisdsp.h
@@ -19,12 +19,12 @@ 
 #ifndef AVCODEC_VORBISDSP_H
 #define AVCODEC_VORBISDSP_H
 
-#include <stdint.h>
+#include <stddef.h>
 
 typedef struct VorbisDSPContext {
     /* assume len is a multiple of 4, and arrays are 16-byte aligned */
     void (*vorbis_inverse_coupling)(float *mag, float *ang,
-                                    intptr_t blocksize);
+                                    ptrdiff_t blocksize);
 } VorbisDSPContext;
 
 void ff_vorbisdsp_init(VorbisDSPContext *dsp);
diff --git a/libavcodec/x86/vorbisdsp_init.c b/libavcodec/x86/vorbisdsp_init.c
index da9f9e685e..08a3bb2965 100644
--- a/libavcodec/x86/vorbisdsp_init.c
+++ b/libavcodec/x86/vorbisdsp_init.c
@@ -25,7 +25,7 @@ 
 #include "libavcodec/vorbisdsp.h"
 
 void ff_vorbis_inverse_coupling_sse(float *mag, float *ang,
-                                    intptr_t blocksize);
+                                    ptrdiff_t blocksize);
 
 av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp)
 {