comparison libswscale/swscale_internal.h @ 26133:94cc4bac8cd0

Turn ancient V offset numerical constants into named ones. Add a check that checks that the width is within the chosen constant. This might have been exploitable.
author michael
date Wed, 05 Mar 2008 03:00:25 +0000
parents afd429e00184
children 5884743208b6
comparison
equal deleted inserted replaced
26132:b6280829f7f8 26133:94cc4bac8cd0
28 #endif 28 #endif
29 29
30 #include "avutil.h" 30 #include "avutil.h"
31 31
32 #define MAX_FILTER_SIZE 256 32 #define MAX_FILTER_SIZE 256
33
34 #define VOF 4096
35 #define VOFW 2048
33 36
34 typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY, 37 typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,
35 int srcSliceH, uint8_t* dst[], int dstStride[]); 38 int srcSliceH, uint8_t* dst[], int dstStride[]);
36 39
37 /* this struct should be aligned on at least 32-byte boundary */ 40 /* this struct should be aligned on at least 32-byte boundary */
68 int16_t *vLumFilter; 71 int16_t *vLumFilter;
69 int16_t *vLumFilterPos; 72 int16_t *vLumFilterPos;
70 int16_t *vChrFilter; 73 int16_t *vChrFilter;
71 int16_t *vChrFilterPos; 74 int16_t *vChrFilterPos;
72 75
73 uint8_t formatConvBuffer[4000]; //FIXME dynamic alloc, but we have to change a lot of code for this to be useful 76 uint8_t formatConvBuffer[VOF]; //FIXME dynamic alloc, but we have to change a lot of code for this to be useful
74 77
75 int hLumFilterSize; 78 int hLumFilterSize;
76 int hChrFilterSize; 79 int hChrFilterSize;
77 int vLumFilterSize; 80 int vLumFilterSize;
78 int vChrFilterSize; 81 int vChrFilterSize;