Commit 52730e0f authored by Diego Biurrun's avatar Diego Biurrun

iir_filter: Change type of array stride parameters to ptrdiff_t

ptrdiff_t is the correct type for array strides and similar.
parent 6b527629
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/log.h"
#include "iirfilter.h" #include "iirfilter.h"
...@@ -278,7 +279,8 @@ av_cold struct FFIIRFilterState *ff_iir_filter_init_state(int order) ...@@ -278,7 +279,8 @@ av_cold struct FFIIRFilterState *ff_iir_filter_init_state(int order)
void ff_iir_filter(const struct FFIIRFilterCoeffs *c, void ff_iir_filter(const struct FFIIRFilterCoeffs *c,
struct FFIIRFilterState *s, int size, struct FFIIRFilterState *s, int size,
const int16_t *src, int sstep, int16_t *dst, int dstep) const int16_t *src, ptrdiff_t sstep,
int16_t *dst, ptrdiff_t dstep)
{ {
if (c->order == 2) { if (c->order == 2) {
FILTER_O2(int16_t, S16) FILTER_O2(int16_t, S16)
...@@ -291,7 +293,8 @@ void ff_iir_filter(const struct FFIIRFilterCoeffs *c, ...@@ -291,7 +293,8 @@ void ff_iir_filter(const struct FFIIRFilterCoeffs *c,
void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *c, void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *c,
struct FFIIRFilterState *s, int size, struct FFIIRFilterState *s, int size,
const float *src, int sstep, float *dst, int dstep) const float *src, ptrdiff_t sstep,
float *dst, ptrdiff_t dstep)
{ {
if (c->order == 2) { if (c->order == 2) {
FILTER_O2(float, FLT) FILTER_O2(float, FLT)
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
#ifndef AVCODEC_IIRFILTER_H #ifndef AVCODEC_IIRFILTER_H
#define AVCODEC_IIRFILTER_H #define AVCODEC_IIRFILTER_H
#include "avcodec.h" #include <stddef.h>
#include <stdint.h>
struct FFIIRFilterCoeffs; struct FFIIRFilterCoeffs;
struct FFIIRFilterState; struct FFIIRFilterState;
...@@ -102,7 +103,7 @@ void ff_iir_filter_free_state(struct FFIIRFilterState *state); ...@@ -102,7 +103,7 @@ void ff_iir_filter_free_state(struct FFIIRFilterState *state);
* @param dstep destination stride * @param dstep destination stride
*/ */
void ff_iir_filter(const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterState *state, void ff_iir_filter(const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterState *state,
int size, const int16_t *src, int sstep, int16_t *dst, int dstep); int size, const int16_t *src, ptrdiff_t sstep, int16_t *dst, ptrdiff_t dstep);
/** /**
* Perform IIR filtering on floating-point input samples. * Perform IIR filtering on floating-point input samples.
...@@ -117,6 +118,7 @@ void ff_iir_filter(const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterSta ...@@ -117,6 +118,7 @@ void ff_iir_filter(const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterSta
*/ */
void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *coeffs, void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *coeffs,
struct FFIIRFilterState *state, int size, struct FFIIRFilterState *state, int size,
const float *src, int sstep, float *dst, int dstep); const float *src, ptrdiff_t sstep,
float *dst, ptrdiff_t dstep);
#endif /* AVCODEC_IIRFILTER_H */ #endif /* AVCODEC_IIRFILTER_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment