diff options
author | James Almer <jamrial@gmail.com> | 2017-03-21 14:29:52 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-21 14:29:52 -0300 |
commit | 5a49097b42cbc3eab888d15a91eeaf5520b5c381 (patch) | |
tree | 080300f20bca98deac895f2ca86a25b72a8428e8 /libavcodec/arm | |
parent | 2c8a3aa985acc906ecab37357f2798da7cb9822d (diff) | |
parent | 2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428 (diff) | |
download | ffmpeg-5a49097b42cbc3eab888d15a91eeaf5520b5c381.tar.gz |
Merge commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428'
* commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428':
idct: Change type of array stride parameters to ptrdiff_t
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/idct.h | 13 | ||||
-rw-r--r-- | libavcodec/arm/idctdsp_init_arm.c | 13 | ||||
-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 | 16 | ||||
-rw-r--r-- | libavcodec/arm/vc1dsp_neon.S | 6 |
6 files changed, 31 insertions, 25 deletions
diff --git a/libavcodec/arm/idct.h b/libavcodec/arm/idct.h index 39cef3a874..6c79a69c5f 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_init_arm.c b/libavcodec/arm/idctdsp_init_arm.c index 0068e3f86c..43782b238a 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" @@ -34,25 +35,29 @@ void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest, /* 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/simple_idct_armv6.S b/libavcodec/arm/simple_idct_armv6.S index 79cf5d41fb..f95c20d295 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 c3e573c00a..726d4cbefa 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 bb873e687e..c3401441eb 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_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_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, 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 c4f4db9c8e..611cbf2234 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 |