mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec: Change get_pixels() to ptrdiff_t linesize
Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6b1df5544e
commit
305f72aee7
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
@ -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 */,
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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, \
|
||||
|
@ -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]
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user