mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
h264chroma: Change type of stride parameters to ptrdiff_t
This avoids SIMD-optimized functions having to sign-extend their stride argument manually to be able to do pointer arithmetic.
This commit is contained in:
parent
2ec9fa5ec6
commit
e4a94d8b36
17 changed files with 110 additions and 110 deletions
|
|
@ -291,7 +291,10 @@ static const int rv40_bias[4][4] = {
|
|||
};
|
||||
|
||||
#define RV40_CHROMA_MC(OPNAME, OP)\
|
||||
static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\
|
||||
static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst /*align 8*/,\
|
||||
uint8_t *src /*align 1*/,\
|
||||
ptrdiff_t stride, int h, int x, int y)\
|
||||
{\
|
||||
const int A = (8-x) * (8-y);\
|
||||
const int B = ( x) * (8-y);\
|
||||
const int C = (8-x) * ( y);\
|
||||
|
|
@ -312,7 +315,7 @@ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*a
|
|||
}\
|
||||
}else{\
|
||||
const int E = B + C;\
|
||||
const int step = C ? stride : 1;\
|
||||
const ptrdiff_t step = C ? stride : 1;\
|
||||
for(i = 0; i < h; i++){\
|
||||
OP(dst[0], (A*src[0] + E*src[step+0] + bias));\
|
||||
OP(dst[1], (A*src[1] + E*src[step+1] + bias));\
|
||||
|
|
@ -324,7 +327,10 @@ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*a
|
|||
}\
|
||||
}\
|
||||
\
|
||||
static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\
|
||||
static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/,\
|
||||
uint8_t *src/*align 1*/,\
|
||||
ptrdiff_t stride, int h, int x, int y)\
|
||||
{\
|
||||
const int A = (8-x) * (8-y);\
|
||||
const int B = ( x) * (8-y);\
|
||||
const int C = (8-x) * ( y);\
|
||||
|
|
@ -349,7 +355,7 @@ static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*a
|
|||
}\
|
||||
}else{\
|
||||
const int E = B + C;\
|
||||
const int step = C ? stride : 1;\
|
||||
const ptrdiff_t step = C ? stride : 1;\
|
||||
for(i = 0; i < h; i++){\
|
||||
OP(dst[0], (A*src[0] + E*src[step+0] + bias));\
|
||||
OP(dst[1], (A*src[1] + E*src[step+1] + bias));\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue