diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-09-07 17:02:06 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-09-29 14:48:03 +0200 |
commit | 2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428 (patch) | |
tree | da4a550527ba5dc67e81e3f384b048fc2250f583 /libavcodec/arm | |
parent | b2939a75270bc7e971462648168aa3a2a48c1c8c (diff) | |
download | ffmpeg-streaming-2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428.zip ffmpeg-streaming-2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428.tar.gz |
idct: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/idct.h | 13 | ||||
-rw-r--r-- | libavcodec/arm/idctdsp_arm.S | 2 | ||||
-rw-r--r-- | libavcodec/arm/idctdsp_init_arm.c | 15 | ||||
-rw-r--r-- | libavcodec/arm/idctdsp_init_armv6.c | 2 | ||||
-rw-r--r-- | libavcodec/arm/simple_idct_armv6.S | 4 | ||||
-rw-r--r-- | libavcodec/arm/simple_idct_neon.S | 4 | ||||
-rw-r--r-- | libavcodec/arm/vc1dsp_init_neon.c | 14 | ||||
-rw-r--r-- | libavcodec/arm/vc1dsp_neon.S | 6 |
8 files changed, 33 insertions, 27 deletions
diff --git a/libavcodec/arm/idct.h b/libavcodec/arm/idct.h index 168d64b..db4d6c5 100644 --- a/libavcodec/arm/idct.h +++ b/libavcodec/arm/idct.h @@ -19,6 +19,7 @@ #ifndef AVCODEC_ARM_IDCT_H #define AVCODEC_ARM_IDCT_H +#include <stddef.h> #include <stdint.h> void ff_j_rev_dct_arm(int16_t *data); @@ -26,15 +27,15 @@ void ff_j_rev_dct_arm(int16_t *data); void ff_simple_idct_arm(int16_t *data); void ff_simple_idct_armv5te(int16_t *data); -void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, int16_t *data); -void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, int16_t *data); +void ff_simple_idct_put_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data); void ff_simple_idct_armv6(int16_t *data); -void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data); -void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data); +void ff_simple_idct_put_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); void ff_simple_idct_neon(int16_t *data); -void ff_simple_idct_put_neon(uint8_t *dest, int line_size, int16_t *data); -void ff_simple_idct_add_neon(uint8_t *dest, int line_size, int16_t *data); +void ff_simple_idct_put_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); #endif /* AVCODEC_ARM_IDCT_H */ diff --git a/libavcodec/arm/idctdsp_arm.S b/libavcodec/arm/idctdsp_arm.S index 34f467e..0d6a76b 100644 --- a/libavcodec/arm/idctdsp_arm.S +++ b/libavcodec/arm/idctdsp_arm.S @@ -22,7 +22,7 @@ #include "config.h" #include "libavutil/arm/asm.S" -@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, int stride) +@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, ptrdiff_t stride) function ff_add_pixels_clamped_arm, export=1, align=5 push {r4-r10} mov r10, #8 diff --git a/libavcodec/arm/idctdsp_init_arm.c b/libavcodec/arm/idctdsp_init_arm.c index 8207c31..8216985 100644 --- a/libavcodec/arm/idctdsp_init_arm.c +++ b/libavcodec/arm/idctdsp_init_arm.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <stddef.h> #include <stdint.h> #include "libavutil/attributes.h" @@ -30,29 +31,33 @@ #include "idctdsp_arm.h" void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest, - int line_size); + ptrdiff_t line_size); /* XXX: those functions should be suppressed ASAP when all IDCTs are * converted */ -static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block) +static void j_rev_dct_arm_put(uint8_t *dest, ptrdiff_t line_size, + int16_t *block) { ff_j_rev_dct_arm(block); ff_put_pixels_clamped(block, dest, line_size); } -static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block) +static void j_rev_dct_arm_add(uint8_t *dest, ptrdiff_t line_size, + int16_t *block) { ff_j_rev_dct_arm(block); ff_add_pixels_clamped(block, dest, line_size); } -static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block) +static void simple_idct_arm_put(uint8_t *dest, ptrdiff_t line_size, + int16_t *block) { ff_simple_idct_arm(block); ff_put_pixels_clamped(block, dest, line_size); } -static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block) +static void simple_idct_arm_add(uint8_t *dest, ptrdiff_t line_size, + int16_t *block) { ff_simple_idct_arm(block); ff_add_pixels_clamped(block, dest, line_size); diff --git a/libavcodec/arm/idctdsp_init_armv6.c b/libavcodec/arm/idctdsp_init_armv6.c index 8f0c49b..3941ee8 100644 --- a/libavcodec/arm/idctdsp_init_armv6.c +++ b/libavcodec/arm/idctdsp_init_armv6.c @@ -27,7 +27,7 @@ #include "idctdsp_arm.h" void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels, - int line_size); + ptrdiff_t line_size); av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth) diff --git a/libavcodec/arm/simple_idct_armv6.S b/libavcodec/arm/simple_idct_armv6.S index 6072346..a8de990 100644 --- a/libavcodec/arm/simple_idct_armv6.S +++ b/libavcodec/arm/simple_idct_armv6.S @@ -390,7 +390,7 @@ function ff_simple_idct_armv6, export=1 pop {r4-r11, pc} endfunc -/* ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data); */ +/* ff_simple_idct_add_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); */ function ff_simple_idct_add_armv6, export=1 push {r0, r1, r4-r11, lr} sub sp, sp, #128 @@ -407,7 +407,7 @@ function ff_simple_idct_add_armv6, export=1 pop {r4-r11, pc} endfunc -/* ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data); */ +/* ff_simple_idct_put_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); */ function ff_simple_idct_put_armv6, export=1 push {r0, r1, r4-r11, lr} sub sp, sp, #128 diff --git a/libavcodec/arm/simple_idct_neon.S b/libavcodec/arm/simple_idct_neon.S index a1cde8d..9e0a97a 100644 --- a/libavcodec/arm/simple_idct_neon.S +++ b/libavcodec/arm/simple_idct_neon.S @@ -261,7 +261,7 @@ endconst pop {r4-r7, pc} .endm -/* void ff_simple_idct_put_neon(uint8_t *dst, int line_size, int16_t *data); */ +/* void ff_simple_idct_put_neon(uint8_t *dst, ptrdiff_t line_size, int16_t *data); */ function ff_simple_idct_put_neon, export=1 idct_start r2 @@ -316,7 +316,7 @@ function idct_col4_add8_neon bx lr endfunc -/* void ff_simple_idct_add_neon(uint8_t *dst, int line_size, int16_t *data); */ +/* void ff_simple_idct_add_neon(uint8_t *dst, ptrdiff_t line_size, int16_t *data); */ function ff_simple_idct_add_neon, export=1 idct_start r2 diff --git a/libavcodec/arm/vc1dsp_init_neon.c b/libavcodec/arm/vc1dsp_init_neon.c index 9ded7a2..55d3a65 100644 --- a/libavcodec/arm/vc1dsp_init_neon.c +++ b/libavcodec/arm/vc1dsp_init_neon.c @@ -25,14 +25,14 @@ #include "config.h" void ff_vc1_inv_trans_8x8_neon(int16_t *block); -void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, int linesize, int16_t *block); -void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, int linesize, int16_t *block); -void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, int linesize, int16_t *block); +void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, int linesize, int16_t *block); -void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, int linesize, int16_t *block); -void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, int linesize, int16_t *block); -void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, int linesize, int16_t *block); +void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int rnd); diff --git a/libavcodec/arm/vc1dsp_neon.S b/libavcodec/arm/vc1dsp_neon.S index fa87ede..1653a4c 100644 --- a/libavcodec/arm/vc1dsp_neon.S +++ b/libavcodec/arm/vc1dsp_neon.S @@ -426,7 +426,7 @@ function ff_vc1_inv_trans_8x8_neon, export=1 bx lr endfunc -@ (uint8_t *dest [r0], int linesize [r1], int16_t *block [r2]) +@ (uint8_t *dest [r0], ptrdiff_t stride [r1], int16_t *block [r2]) function ff_vc1_inv_trans_8x4_neon, export=1 vld1.64 {q0-q1}, [r2,:128]! @ load 8 * 4 * 2 = 64 bytes / 16 bytes per quad = 4 quad registers vld1.64 {q2-q3}, [r2,:128] @@ -511,7 +511,7 @@ function ff_vc1_inv_trans_8x4_neon, export=1 bx lr endfunc -@ (uint8_t *dest [r0], int linesize [r1], int16_t *block [r2]) +@ (uint8_t *dest [r0], ptrdiff_t stride [r1], int16_t *block [r2]) function ff_vc1_inv_trans_4x8_neon, export=1 mov r12, #(8 * 2) @ 8 elements per line, each element 2 bytes vld4.16 {d0[], d2[], d4[], d6[]}, [r2,:64], r12 @ read each column into a q register @@ -593,7 +593,7 @@ endfunc vshr.s16 q1, q1, #\rshift @ dst[3,1] >>= rshift .endm -@ (uint8_t *dest [r0], int linesize [r1], int16_t *block [r2]) +@ (uint8_t *dest [r0], ptrdiff_t stride [r1], int16_t *block [r2]) function ff_vc1_inv_trans_4x4_neon, export=1 mov r12, #(8 * 2) @ 8 elements per line, each element 2 bytes vld4.16 {d0[], d1[], d2[], d3[]}, [r2,:64], r12 @ read each column into a register |