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 1050697fddbd8ac42389a53dd10b0bf9dcb9350d..1923ebbc5fb164bd0695e37831bc859fb0efdc03 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 e52cd80047165a3e2d24ca47e054c81037c88b20..bf984950f2c04ccffc54ce6ad244fb9c46cf4d89 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 e3a8364a48cb45230383412924804bd19a06bce7..f545df9e4f2617d608abbebb1a51a05aba736a83 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 e8333c4b709ac807768140866da99d1c242e8abb..057eff9be8e7ac613bcbb8c3b8ba163bbf672a6b 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 2d846dc5bd85f1d92cb8fd7bbd016a152beae8c5..da5da068bea038a92f6b294c97969154505887ca 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 648f1fdfc1812d99969616e066773b3c31a058ca..a3470a83df8b388afd2bbba5b1e5bbc2d2d603d5 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 80c391c520964f14b777be54a18a40acc16fbdda..b70c5b0d44ea0e54435b20a5e239335c195fd378 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 75695ef437f9e517a5420d5ab09ddb7e1b468e3f..b4972211de8674e753b074678bfe7e4530e49feb 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 8d606569325f5161dadd98ad9b447571b6966272..538b71669cacc9aa9264b3da1e7b98ffdb578930 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 44a1a6ef856d0ae56013937fb99b156354dd0a81..c3f37c4910983f462149ba4db91a4535a7df12fd 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 9b7177a58cc0739f04322cc7746e470217d21c25..252e70433827c350594548d4ed520e6a0f658d10 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 a72b9416b1b11922280373a3c0d4e93dac6d57e1..0ce9a92390224b4ae7fffa932c92d5d38a69d51b 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;