avcodec: add emuedge_linesize_type
Currently all uses of the emu edge code as well as the code itself assume int linesize changing some but not changing all would introduce a security issue once all use this typedef a simple search and replace can be done to switch them all to ptrdiff_t Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -214,7 +214,8 @@ void mpeg_motion_internal(MpegEncContext *s,
|
|||||||
{
|
{
|
||||||
uint8_t *ptr_y, *ptr_cb, *ptr_cr;
|
uint8_t *ptr_y, *ptr_cb, *ptr_cr;
|
||||||
int dxy, uvdxy, mx, my, src_x, src_y,
|
int dxy, uvdxy, mx, my, src_x, src_y,
|
||||||
uvsrc_x, uvsrc_y, v_edge_pos, uvlinesize, linesize;
|
uvsrc_x, uvsrc_y, v_edge_pos;
|
||||||
|
emuedge_linesize_type uvlinesize, linesize;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if(s->quarter_sample)
|
if(s->quarter_sample)
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
typedef int emuedge_linesize_type;
|
||||||
|
|
||||||
#define EMULATED_EDGE(depth) \
|
#define EMULATED_EDGE(depth) \
|
||||||
void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, ptrdiff_t linesize,\
|
void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, ptrdiff_t linesize,\
|
||||||
int block_w, int block_h,\
|
int block_w, int block_h,\
|
||||||
|
@@ -27,7 +27,7 @@ void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
|
|||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
int start_y, start_x, end_y, end_x;
|
int start_y, start_x, end_y, end_x;
|
||||||
int linesize = linesize_arg;
|
emuedge_linesize_type linesize = linesize_arg;
|
||||||
|
|
||||||
if (!w || !h)
|
if (!w || !h)
|
||||||
return;
|
return;
|
||||||
|
@@ -46,7 +46,7 @@ static av_always_inline void emulated_edge_mc(uint8_t *buf, const uint8_t *src,
|
|||||||
emu_edge_core_func *core_fn)
|
emu_edge_core_func *core_fn)
|
||||||
{
|
{
|
||||||
int start_y, start_x, end_y, end_x, src_y_add = 0;
|
int start_y, start_x, end_y, end_x, src_y_add = 0;
|
||||||
int linesize = linesize_arg;
|
emuedge_linesize_type linesize = linesize_arg;
|
||||||
|
|
||||||
if(!w || !h)
|
if(!w || !h)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user