1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

Merge commit 'a339e919cad1ab0125948f0dd9d49f6cb590db89'

* commit 'a339e919cad1ab0125948f0dd9d49f6cb590db89':
  ea: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2017-03-21 15:55:44 -03:00
commit b16752f694
7 changed files with 13 additions and 11 deletions

View File

@ -72,8 +72,8 @@ static void cmv_decode_intra(CmvContext * s, AVFrame *frame,
} }
} }
static void cmv_motcomp(unsigned char *dst, int dst_stride, static void cmv_motcomp(unsigned char *dst, ptrdiff_t dst_stride,
const unsigned char *src, int src_stride, const unsigned char *src, ptrdiff_t src_stride,
int x, int y, int x, int y,
int xoffset, int yoffset, int xoffset, int yoffset,
int width, int height){ int width, int height){

View File

@ -77,7 +77,8 @@ static inline void ea_idct_col(int16_t *dest, const int16_t *src) {
IDCT_COL(dest, src); IDCT_COL(dest, src);
} }
void ff_ea_idct_put_c(uint8_t *dest, int linesize, int16_t *block) { void ff_ea_idct_put_c(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
{
int i; int i;
int16_t temp[64]; int16_t temp[64];
block[0] += 4; block[0] += 4;

View File

@ -19,8 +19,9 @@
#ifndef AVCODEC_EAIDCT_H #ifndef AVCODEC_EAIDCT_H
#define AVCODEC_EAIDCT_H #define AVCODEC_EAIDCT_H
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
void ff_ea_idct_put_c(uint8_t *dest, int linesize, int16_t *block); void ff_ea_idct_put_c(uint8_t *dest, ptrdiff_t linesize, int16_t *block);
#endif /* AVCODEC_EAIDCT_H */ #endif /* AVCODEC_EAIDCT_H */

View File

@ -80,8 +80,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0; return 0;
} }
static inline void comp(unsigned char *dst, int dst_stride, static inline void comp(unsigned char *dst, ptrdiff_t dst_stride,
unsigned char *src, int src_stride, int add) unsigned char *src, ptrdiff_t src_stride, int add)
{ {
int j, i; int j, i;
for (j=0; j<8; j++) for (j=0; j<8; j++)

View File

@ -107,7 +107,7 @@ static void tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb
static void tgq_idct_put_mb(TgqContext *s, int16_t (*block)[64], AVFrame *frame, static void tgq_idct_put_mb(TgqContext *s, int16_t (*block)[64], AVFrame *frame,
int mb_x, int mb_y) int mb_x, int mb_y)
{ {
int linesize = frame->linesize[0]; ptrdiff_t linesize = frame->linesize[0];
uint8_t *dest_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16; uint8_t *dest_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16;
uint8_t *dest_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8; uint8_t *dest_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8;
uint8_t *dest_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8; uint8_t *dest_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8;
@ -123,7 +123,7 @@ static void tgq_idct_put_mb(TgqContext *s, int16_t (*block)[64], AVFrame *frame,
} }
static inline void tgq_dconly(TgqContext *s, unsigned char *dst, static inline void tgq_dconly(TgqContext *s, unsigned char *dst,
int dst_stride, int dc) ptrdiff_t dst_stride, int dc)
{ {
int level = av_clip_uint8((dc*s->qtable[0] + 2056) >> 4); int level = av_clip_uint8((dc*s->qtable[0] + 2056) >> 4);
int j; int j;
@ -134,7 +134,7 @@ static inline void tgq_dconly(TgqContext *s, unsigned char *dst,
static void tgq_idct_put_mb_dconly(TgqContext *s, AVFrame *frame, static void tgq_idct_put_mb_dconly(TgqContext *s, AVFrame *frame,
int mb_x, int mb_y, const int8_t *dc) int mb_x, int mb_y, const int8_t *dc)
{ {
int linesize = frame->linesize[0]; ptrdiff_t linesize = frame->linesize[0];
uint8_t *dest_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16; uint8_t *dest_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16;
uint8_t *dest_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8; uint8_t *dest_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8;
uint8_t *dest_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8; uint8_t *dest_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8;

View File

@ -227,7 +227,7 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
for (x = 0; x < s->avctx->width / 4; x++) { for (x = 0; x < s->avctx->width / 4; x++) {
unsigned int vector = get_bits(&gb, vector_bits); unsigned int vector = get_bits(&gb, vector_bits);
const uint8_t *src; const uint8_t *src;
int src_stride; ptrdiff_t src_stride;
if (vector < num_mvs) { if (vector < num_mvs) {
int mx = x * 4 + s->mv_codebook[vector][0]; int mx = x * 4 + s->mv_codebook[vector][0];

View File

@ -94,7 +94,7 @@ static inline void tqi_idct_put(AVCodecContext *avctx, AVFrame *frame,
int16_t (*block)[64]) int16_t (*block)[64])
{ {
TqiContext *t = avctx->priv_data; TqiContext *t = avctx->priv_data;
int linesize = frame->linesize[0]; ptrdiff_t linesize = frame->linesize[0];
uint8_t *dest_y = frame->data[0] + t->mb_y * 16 * linesize + t->mb_x * 16; uint8_t *dest_y = frame->data[0] + t->mb_y * 16 * linesize + t->mb_x * 16;
uint8_t *dest_cb = frame->data[1] + t->mb_y * 8 * frame->linesize[1] + t->mb_x * 8; uint8_t *dest_cb = frame->data[1] + t->mb_y * 8 * frame->linesize[1] + t->mb_x * 8;
uint8_t *dest_cr = frame->data[2] + t->mb_y * 8 * frame->linesize[2] + t->mb_x * 8; uint8_t *dest_cr = frame->data[2] + t->mb_y * 8 * frame->linesize[2] + t->mb_x * 8;