|
|
|
@ -268,7 +268,7 @@ typedef struct SANMVideoContext { |
|
|
|
|
uint32_t pal[PALETTE_SIZE]; |
|
|
|
|
int16_t delta_pal[PALETTE_DELTA]; |
|
|
|
|
|
|
|
|
|
int pitch; |
|
|
|
|
ptrdiff_t pitch; |
|
|
|
|
int width, height; |
|
|
|
|
int aligned_width, aligned_height; |
|
|
|
|
int prev_seq; |
|
|
|
@ -623,7 +623,7 @@ static inline void codec37_mv(uint8_t *dst, const uint8_t *src, |
|
|
|
|
static int old_codec37(SANMVideoContext *ctx, int top, |
|
|
|
|
int left, int width, int height) |
|
|
|
|
{ |
|
|
|
|
int stride = ctx->pitch; |
|
|
|
|
ptrdiff_t stride = ctx->pitch; |
|
|
|
|
int i, j, k, t; |
|
|
|
|
uint8_t *dst, *prev; |
|
|
|
|
int skip_run = 0; |
|
|
|
@ -861,7 +861,7 @@ static int old_codec47(SANMVideoContext *ctx, int top, |
|
|
|
|
{ |
|
|
|
|
uint32_t decoded_size; |
|
|
|
|
int i, j; |
|
|
|
|
int stride = ctx->pitch; |
|
|
|
|
ptrdiff_t stride = ctx->pitch; |
|
|
|
|
uint8_t *dst = (uint8_t *)ctx->frm0 + left + top * stride; |
|
|
|
|
uint8_t *prev1 = (uint8_t *)ctx->frm1; |
|
|
|
|
uint8_t *prev2 = (uint8_t *)ctx->frm2; |
|
|
|
@ -1014,11 +1014,11 @@ static int decode_nop(SANMVideoContext *ctx) |
|
|
|
|
return AVERROR_PATCHWELCOME; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, int pitch) |
|
|
|
|
static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, ptrdiff_t pitch) |
|
|
|
|
{ |
|
|
|
|
uint8_t *dst = (uint8_t *)pdest; |
|
|
|
|
uint8_t *src = (uint8_t *)psrc; |
|
|
|
|
int stride = pitch * 2; |
|
|
|
|
ptrdiff_t stride = pitch * 2; |
|
|
|
|
|
|
|
|
|
switch (block_size) { |
|
|
|
|
case 2: |
|
|
|
@ -1033,7 +1033,7 @@ static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, int pitc |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void fill_block(uint16_t *pdest, uint16_t color, int block_size, int pitch) |
|
|
|
|
static void fill_block(uint16_t *pdest, uint16_t color, int block_size, ptrdiff_t pitch) |
|
|
|
|
{ |
|
|
|
|
int x, y; |
|
|
|
|
|
|
|
|
@ -1045,7 +1045,7 @@ static void fill_block(uint16_t *pdest, uint16_t color, int block_size, int pitc |
|
|
|
|
|
|
|
|
|
static int draw_glyph(SANMVideoContext *ctx, uint16_t *dst, int index, |
|
|
|
|
uint16_t fg_color, uint16_t bg_color, int block_size, |
|
|
|
|
int pitch) |
|
|
|
|
ptrdiff_t pitch) |
|
|
|
|
{ |
|
|
|
|
int8_t *pglyph; |
|
|
|
|
uint16_t colors[2] = { fg_color, bg_color }; |
|
|
|
@ -1065,7 +1065,7 @@ static int draw_glyph(SANMVideoContext *ctx, uint16_t *dst, int index, |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int opcode_0xf7(SANMVideoContext *ctx, int cx, int cy, int block_size, int pitch) |
|
|
|
|
static int opcode_0xf7(SANMVideoContext *ctx, int cx, int cy, int block_size, ptrdiff_t pitch) |
|
|
|
|
{ |
|
|
|
|
uint16_t *dst = ctx->frm0 + cx + cy * ctx->pitch; |
|
|
|
|
|
|
|
|
@ -1099,7 +1099,7 @@ static int opcode_0xf7(SANMVideoContext *ctx, int cx, int cy, int block_size, in |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int opcode_0xf8(SANMVideoContext *ctx, int cx, int cy, int block_size, int pitch) |
|
|
|
|
static int opcode_0xf8(SANMVideoContext *ctx, int cx, int cy, int block_size, ptrdiff_t pitch) |
|
|
|
|
{ |
|
|
|
|
uint16_t *dst = ctx->frm0 + cx + cy * ctx->pitch; |
|
|
|
|
|
|
|
|
@ -1369,8 +1369,8 @@ static int copy_output(SANMVideoContext *ctx, SANMFrameHeader *hdr) |
|
|
|
|
{ |
|
|
|
|
uint8_t *dst; |
|
|
|
|
const uint8_t *src = (uint8_t*) ctx->frm0; |
|
|
|
|
int ret, dstpitch, height = ctx->height; |
|
|
|
|
int srcpitch = ctx->pitch * (hdr ? sizeof(ctx->frm0[0]) : 1); |
|
|
|
|
int ret, height = ctx->height; |
|
|
|
|
ptrdiff_t dstpitch, srcpitch = ctx->pitch * (hdr ? sizeof(ctx->frm0[0]) : 1); |
|
|
|
|
|
|
|
|
|
if ((ret = ff_get_buffer(ctx->avctx, ctx->frame, 0)) < 0) |
|
|
|
|
return ret; |
|
|
|
|