[FFmpeg-devel] [PATCH 5/5] lavc/aacpsdsp: use ptrdiff_t for stride in hybrid_analysis
Clément Bœsch
u at pkh.me
Thu Jun 22 13:30:58 EEST 2017
From: Clément Bœsch <cboesch at gopro.com>
---
libavcodec/aacpsdsp.h | 4 +++-
libavcodec/aacpsdsp_template.c | 2 +-
libavcodec/aarch64/aacpsdsp_init_aarch64.c | 2 +-
libavcodec/aarch64/aacpsdsp_neon.S | 1 -
libavcodec/arm/aacpsdsp_init_arm.c | 2 +-
libavcodec/x86/aacpsdsp.asm | 4 ++--
libavcodec/x86/aacpsdsp_init.c | 6 ++++--
tests/checkasm/aacpsdsp.c | 2 +-
8 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/libavcodec/aacpsdsp.h b/libavcodec/aacpsdsp.h
index 3714a08052..917ac5303f 100644
--- a/libavcodec/aacpsdsp.h
+++ b/libavcodec/aacpsdsp.h
@@ -21,6 +21,8 @@
#ifndef AVCODEC_AACPSDSP_H
#define AVCODEC_AACPSDSP_H
+#include <stddef.h>
+
#include "aac_defines.h"
#define PS_QMF_TIME_SLOTS 32
@@ -33,7 +35,7 @@ typedef struct PSDSPContext {
int n);
void (*hybrid_analysis)(INTFLOAT (*out)[2], INTFLOAT (*in)[2],
const INTFLOAT (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
void (*hybrid_analysis_ileave)(INTFLOAT (*out)[32][2], INTFLOAT L[2][38][64],
int i, int len);
void (*hybrid_synthesis_deint)(INTFLOAT out[2][38][64], INTFLOAT (*in)[32][2],
diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_template.c
index e639afa449..9e1a95c1a1 100644
--- a/libavcodec/aacpsdsp_template.c
+++ b/libavcodec/aacpsdsp_template.c
@@ -45,7 +45,7 @@ static void ps_mul_pair_single_c(INTFLOAT (*dst)[2], INTFLOAT (*src0)[2], INTFLO
static void ps_hybrid_analysis_c(INTFLOAT (*out)[2], INTFLOAT (*in)[2],
const INTFLOAT (*filter)[8][2],
- int stride, int n)
+ ptrdiff_t stride, int n)
{
int i, j;
diff --git a/libavcodec/aarch64/aacpsdsp_init_aarch64.c b/libavcodec/aarch64/aacpsdsp_init_aarch64.c
index c15094c45c..5e7e19bba4 100644
--- a/libavcodec/aarch64/aacpsdsp_init_aarch64.c
+++ b/libavcodec/aarch64/aacpsdsp_init_aarch64.c
@@ -26,7 +26,7 @@ void ff_ps_mul_pair_single_neon(float (*dst)[2], float (*src0)[2],
float *src1, int n);
void ff_ps_hybrid_analysis_neon(float (*out)[2], float (*in)[2],
const float (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
void ff_ps_stereo_interpolate_neon(float (*l)[2], float (*r)[2],
float h[2][4], float h_step[2][4],
int len);
diff --git a/libavcodec/aarch64/aacpsdsp_neon.S b/libavcodec/aarch64/aacpsdsp_neon.S
index 6662971199..ff4e6e244a 100644
--- a/libavcodec/aarch64/aacpsdsp_neon.S
+++ b/libavcodec/aarch64/aacpsdsp_neon.S
@@ -101,7 +101,6 @@ function ff_ps_stereo_interpolate_ipdopd_neon, export=1
endfunc
function ff_ps_hybrid_analysis_neon, export=1
- sxtw x3, w3
lsl x3, x3, #3
ld2 {v0.4S,v1.4S}, [x1], #32
ld2 {v2.2S,v3.2S}, [x1], #16
diff --git a/libavcodec/arm/aacpsdsp_init_arm.c b/libavcodec/arm/aacpsdsp_init_arm.c
index e04787caae..6eb979ed1d 100644
--- a/libavcodec/arm/aacpsdsp_init_arm.c
+++ b/libavcodec/arm/aacpsdsp_init_arm.c
@@ -29,7 +29,7 @@ void ff_ps_mul_pair_single_neon(float (*dst)[2], float (*src0)[2],
float *src1, int n);
void ff_ps_hybrid_analysis_neon(float (*out)[2], float (*in)[2],
const float (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
void ff_ps_hybrid_analysis_ileave_neon(float (*out)[32][2], float L[2][38][64],
int i, int len);
void ff_ps_hybrid_synthesis_deint_neon(float out[2][38][64], float (*in)[32][2],
diff --git a/libavcodec/x86/aacpsdsp.asm b/libavcodec/x86/aacpsdsp.asm
index a7327d39ce..4acd087c85 100644
--- a/libavcodec/x86/aacpsdsp.asm
+++ b/libavcodec/x86/aacpsdsp.asm
@@ -398,7 +398,7 @@ HYBRID_SYNTHESIS_DEINT
;*******************************************************************
;void ff_ps_hybrid_analysis_<opt>(float (*out)[2], float (*in)[2],
; const float (*filter)[8][2],
-; int stride, int n);
+; ptrdiff_t stride, int n);
;*******************************************************************
%macro PS_HYBRID_ANALYSIS_LOOP 3
movu %1, [inq+mmsize*%3]
@@ -438,7 +438,7 @@ cglobal ps_hybrid_analysis, 5, 5, 8, out, in, filter, stride, n
%else
%define MOVH movlps
%endif
- shl strided, 3
+ shl strideq, 3
shl nd, 6
add filterq, nq
neg nq
diff --git a/libavcodec/x86/aacpsdsp_init.c b/libavcodec/x86/aacpsdsp_init.c
index 056e23e59e..21f00efa24 100644
--- a/libavcodec/x86/aacpsdsp_init.c
+++ b/libavcodec/x86/aacpsdsp_init.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
+
#include "config.h"
#include "libavutil/x86/cpu.h"
@@ -30,10 +32,10 @@ void ff_ps_mul_pair_single_sse (float (*dst)[2], float (*src0)[2],
float *src1, int n);
void ff_ps_hybrid_analysis_sse (float (*out)[2], float (*in)[2],
const float (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
void ff_ps_hybrid_analysis_sse3(float (*out)[2], float (*in)[2],
const float (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
void ff_ps_stereo_interpolate_sse3(float (*l)[2], float (*r)[2],
float h[2][4], float h_step[2][4],
int len);
diff --git a/tests/checkasm/aacpsdsp.c b/tests/checkasm/aacpsdsp.c
index 077da7cbd1..a147e10160 100644
--- a/tests/checkasm/aacpsdsp.c
+++ b/tests/checkasm/aacpsdsp.c
@@ -81,7 +81,7 @@ static void test_hybrid_analysis(void)
declare_func(void, INTFLOAT (*out)[2], INTFLOAT (*in)[2],
const INTFLOAT (*filter)[8][2],
- int stride, int n);
+ ptrdiff_t stride, int n);
randomize((INTFLOAT *)in, 12 * 2);
randomize((INTFLOAT *)filter, N * 8 * 2);
--
2.13.1
More information about the ffmpeg-devel
mailing list