avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size
authorJames Almer <jamrial@gmail.com>
Wed, 24 Sep 2014 22:51:02 +0000 (19:51 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 25 Sep 2014 00:43:19 +0000 (21:43 -0300)
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
12 files changed:
libavcodec/alpha/idctdsp_alpha.c
libavcodec/alpha/idctdsp_alpha.h
libavcodec/alpha/idctdsp_alpha_asm.S
libavcodec/arm/idctdsp_arm.S
libavcodec/arm/idctdsp_init_arm.c
libavcodec/arm/idctdsp_init_armv6.c
libavcodec/arm/idctdsp_init_neon.c
libavcodec/idctdsp.c
libavcodec/idctdsp.h
libavcodec/x86/idctdsp.asm
libavcodec/x86/idctdsp.h
libavcodec/x86/idctdsp_mmx.c

index 1050697..1923ebb 100644 (file)
 #include "asm.h"
 
 void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
-                                int line_size);
+                                ptrdiff_t line_size);
 void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
-                                int line_size);
+                                ptrdiff_t line_size);
 
 void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
-                                 int line_size);
+                                 ptrdiff_t line_size);
 void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
-                                 int line_size);
+                                 ptrdiff_t line_size);
 
 #if 0
 /* These functions were the base for the optimized assembler routines,
index e52cd80..bf98495 100644 (file)
@@ -23,9 +23,9 @@
 #include <stdint.h>
 
 extern void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
-                                        int line_size);
+                                        ptrdiff_t line_size);
 extern void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
-                                        int line_size);
+                                        ptrdiff_t line_size);
 
 void ff_simple_idct_axp(int16_t *block);
 void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block);
index e3a8364..f545df9 100644 (file)
@@ -33,7 +33,7 @@
 
 /************************************************************************
  * void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- *                                 int line_size)
+ *                                 ptrdiff_t line_size)
  */
         .align 6
         .globl put_pixels_clamped_mvi_asm
@@ -83,7 +83,7 @@ put_pixels_clamped_mvi_asm:
 
 /************************************************************************
  * void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- *                                 int line_size)
+ *                                 ptrdiff_t line_size)
  */
         .align 6
         .globl add_pixels_clamped_mvi_asm
index e8333c4..057eff9 100644 (file)
@@ -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
index 2d846dc..da5da06 100644 (file)
@@ -30,7 +30,7 @@
 #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 */
index 648f1fd..a3470a8 100644 (file)
@@ -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)
index 80c391c..b70c5b0 100644 (file)
@@ -27,9 +27,9 @@
 #include "idct.h"
 #include "idctdsp_arm.h"
 
-void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int);
-void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
-void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, int);
+void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
+void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
+void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
 
 av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
                                   unsigned high_bit_depth)
index 75695ef..b497221 100644 (file)
@@ -80,11 +80,11 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
     }
 }
 
-void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
-void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
+void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
+void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
 
 static void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
-                                 int line_size)
+                                 ptrdiff_t line_size)
 {
     int i;
 
@@ -138,7 +138,7 @@ static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pix
 
 static void put_signed_pixels_clamped_c(const int16_t *block,
                                         uint8_t *av_restrict pixels,
-                                        int line_size)
+                                        ptrdiff_t line_size)
 {
     int i, j;
 
@@ -158,7 +158,7 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
 }
 
 static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
-                                 int line_size)
+                                 ptrdiff_t line_size)
 {
     int i;
 
index 8d60656..538b716 100644 (file)
@@ -52,13 +52,13 @@ typedef struct IDCTDSPContext {
     /* pixel ops : interface with DCT */
     void (*put_pixels_clamped)(const int16_t *block /* align 16 */,
                                uint8_t *pixels /* align 8 */,
-                               int line_size);
+                               ptrdiff_t line_size);
     void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */,
                                       uint8_t *pixels /* align 8 */,
-                                      int line_size);
+                                      ptrdiff_t line_size);
     void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
                                uint8_t *pixels /* align 8 */,
-                               int line_size);
+                               ptrdiff_t line_size);
 
     void (*idct)(int16_t *block /* align 16 */);
 
@@ -95,8 +95,8 @@ typedef struct IDCTDSPContext {
     enum idct_permutation_type perm_type;
 } IDCTDSPContext;
 
-extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
-extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
+extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
+extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
 
 void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx);
 
index 44a1a6e..c3f37c4 100644 (file)
@@ -31,7 +31,7 @@ SECTION_TEXT
 
 ;--------------------------------------------------------------------------
 ;void ff_put_signed_pixels_clamped(const int16_t *block, uint8_t *pixels,
-;                                  int line_size)
+;                                  ptrdiff_t line_size)
 ;--------------------------------------------------------------------------
 
 %macro PUT_SIGNED_PIXELS_CLAMPED_HALF 1
index 9b7177a..252e704 100644 (file)
 #include <stdint.h>
 
 void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
-                               int line_size);
+                               ptrdiff_t line_size);
 void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
-                               int line_size);
+                               ptrdiff_t line_size);
 void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
-                                      int line_size);
+                                      ptrdiff_t line_size);
 void ff_put_signed_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels,
-                                       int line_size);
+                                       ptrdiff_t line_size);
 
 #endif /* AVCODEC_X86_IDCTDSP_H */
index a72b941..0ce9a92 100644 (file)
 #include "config.h"
 #include "libavutil/cpu.h"
 #include "libavutil/x86/asm.h"
+#include "libavcodec/idctdsp.h"
 #include "idctdsp.h"
 #include "inline_asm.h"
 
 #if HAVE_INLINE_ASM
 
 void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
-                               int line_size)
+                               ptrdiff_t line_size)
 {
     const int16_t *p;
     uint8_t *pix;
@@ -89,7 +90,7 @@ void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
 }
 
 void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
-                               int line_size)
+                               ptrdiff_t line_size)
 {
     const int16_t *p;
     uint8_t *pix;