[FFmpeg-cvslog] avcodec: Change get_pixels() to ptrdiff_t linesize
Michael Niedermayer
git at videolan.org
Wed Aug 6 15:59:53 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 6 15:43:38 2014 +0200| [305f72aee77bc36d1da9feaec42f9ddcdc9b0689] | committer: Michael Niedermayer
avcodec: Change get_pixels() to ptrdiff_t linesize
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=305f72aee77bc36d1da9feaec42f9ddcdc9b0689
---
libavcodec/alpha/pixblockdsp_alpha.c | 2 +-
libavcodec/arm/pixblockdsp_init_arm.c | 2 +-
libavcodec/avdct.h | 2 +-
libavcodec/dv.h | 2 +-
libavcodec/pixblockdsp.h | 2 +-
libavcodec/pixblockdsp_template.c | 2 +-
libavcodec/ppc/pixblockdsp.c | 2 +-
libavcodec/version.h | 2 +-
libavcodec/x86/pixblockdsp.asm | 4 +---
libavcodec/x86/pixblockdsp_init.c | 4 ++--
10 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/libavcodec/alpha/pixblockdsp_alpha.c b/libavcodec/alpha/pixblockdsp_alpha.c
index 4e49c9b..866b762 100644
--- a/libavcodec/alpha/pixblockdsp_alpha.c
+++ b/libavcodec/alpha/pixblockdsp_alpha.c
@@ -23,7 +23,7 @@
#include "asm.h"
static void get_pixels_mvi(int16_t *restrict block,
- const uint8_t *restrict pixels, int line_size)
+ const uint8_t *restrict pixels, ptrdiff_t line_size)
{
int h = 8;
diff --git a/libavcodec/arm/pixblockdsp_init_arm.c b/libavcodec/arm/pixblockdsp_init_arm.c
index b77c523..76d7509 100644
--- a/libavcodec/arm/pixblockdsp_init_arm.c
+++ b/libavcodec/arm/pixblockdsp_init_arm.c
@@ -24,7 +24,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/pixblockdsp.h"
-void ff_get_pixels_armv6(int16_t *block, const uint8_t *pixels, int stride);
+void ff_get_pixels_armv6(int16_t *block, const uint8_t *pixels, ptrdiff_t stride);
void ff_diff_pixels_armv6(int16_t *block, const uint8_t *s1,
const uint8_t *s2, int stride);
diff --git a/libavcodec/avdct.h b/libavcodec/avdct.h
index 4190203..380efe1 100644
--- a/libavcodec/avdct.h
+++ b/libavcodec/avdct.h
@@ -64,7 +64,7 @@ typedef struct AVDCT {
void (*get_pixels)(int16_t *block /* align 16 */,
const uint8_t *pixels /* align 8 */,
- int line_size);
+ ptrdiff_t line_size);
} AVDCT;
/**
diff --git a/libavcodec/dv.h b/libavcodec/dv.h
index 14cfbce..aa761dc 100644
--- a/libavcodec/dv.h
+++ b/libavcodec/dv.h
@@ -45,7 +45,7 @@ typedef struct DVVideoContext {
uint8_t dv_zigzag[2][64];
- void (*get_pixels)(int16_t *block, const uint8_t *pixels, int line_size);
+ void (*get_pixels)(int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);
void (*fdct[2])(int16_t *block);
void (*idct_put[2])(uint8_t *dest, int line_size, int16_t *block);
me_cmp_func ildct_cmp;
diff --git a/libavcodec/pixblockdsp.h b/libavcodec/pixblockdsp.h
index 2f94f8b..d4b8590 100644
--- a/libavcodec/pixblockdsp.h
+++ b/libavcodec/pixblockdsp.h
@@ -26,7 +26,7 @@
typedef struct PixblockDSPContext {
void (*get_pixels)(int16_t *block /* align 16 */,
const uint8_t *pixels /* align 8 */,
- int line_size);
+ ptrdiff_t line_size);
void (*diff_pixels)(int16_t *block /* align 16 */,
const uint8_t *s1 /* align 8 */,
const uint8_t *s2 /* align 8 */,
diff --git a/libavcodec/pixblockdsp_template.c b/libavcodec/pixblockdsp_template.c
index 3aeddf5..d1e9102 100644
--- a/libavcodec/pixblockdsp_template.c
+++ b/libavcodec/pixblockdsp_template.c
@@ -19,7 +19,7 @@
#include "bit_depth_template.c"
static void FUNCC(get_pixels)(int16_t *av_restrict block, const uint8_t *_pixels,
- int line_size)
+ ptrdiff_t line_size)
{
const pixel *pixels = (const pixel *) _pixels;
int i;
diff --git a/libavcodec/ppc/pixblockdsp.c b/libavcodec/ppc/pixblockdsp.c
index 42c5be8..4580c3d 100644
--- a/libavcodec/ppc/pixblockdsp.c
+++ b/libavcodec/ppc/pixblockdsp.c
@@ -36,7 +36,7 @@
#if HAVE_ALTIVEC
static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels,
- int line_size)
+ ptrdiff_t line_size)
{
int i;
vector unsigned char perm = vec_lvsl(0, pixels);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index dc7af8b..0c85004 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 72
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
diff --git a/libavcodec/x86/pixblockdsp.asm b/libavcodec/x86/pixblockdsp.asm
index 00ee9b4..7c5377b 100644
--- a/libavcodec/x86/pixblockdsp.asm
+++ b/libavcodec/x86/pixblockdsp.asm
@@ -26,9 +26,8 @@
SECTION .text
INIT_MMX mmx
-; void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, int line_size)
+; void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, ptrdiff_t line_size)
cglobal get_pixels, 3,4
- movsxdifnidn r2, r2d
add r0, 128
mov r3, -128
pxor m7, m7
@@ -52,7 +51,6 @@ cglobal get_pixels, 3,4
INIT_XMM sse2
cglobal get_pixels, 3, 4, 5
- movsxdifnidn r2, r2d
lea r3, [r2*3]
pxor m4, m4
movh m0, [r1]
diff --git a/libavcodec/x86/pixblockdsp_init.c b/libavcodec/x86/pixblockdsp_init.c
index 4c31b80..4d06a44 100644
--- a/libavcodec/x86/pixblockdsp_init.c
+++ b/libavcodec/x86/pixblockdsp_init.c
@@ -23,8 +23,8 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/pixblockdsp.h"
-void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, int line_size);
-void ff_get_pixels_sse2(int16_t *block, const uint8_t *pixels, int line_size);
+void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);
+void ff_get_pixels_sse2(int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);
void ff_diff_pixels_mmx(int16_t *block, const uint8_t *s1, const uint8_t *s2,
int stride);
void ff_diff_pixels_sse2(int16_t *block, const uint8_t *s1, const uint8_t *s2,
More information about the ffmpeg-cvslog
mailing list