summaryrefslogtreecommitdiff
path: root/libavcodec/rv40dsp.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-21 15:20:45 -0300
committerJames Almer <jamrial@gmail.com>2017-03-21 15:20:45 -0300
commita8474df9447d6466c77d3ec8f414cda2662f057b (patch)
tree508b0b6cbb90c13e0a9ff44023f5df96b21420fd /libavcodec/rv40dsp.c
parent5a49097b42cbc3eab888d15a91eeaf5520b5c381 (diff)
parente4a94d8b36c48d95a7d412c40d7b558422ff659c (diff)
Merge commit 'e4a94d8b36c48d95a7d412c40d7b558422ff659c'
* commit 'e4a94d8b36c48d95a7d412c40d7b558422ff659c': h264chroma: Change type of stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/rv40dsp.c')
-rw-r--r--libavcodec/rv40dsp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c
index 95ba0a9259..5579bd9bed 100644
--- a/libavcodec/rv40dsp.c
+++ b/libavcodec/rv40dsp.c
@@ -292,7 +292,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);\
@@ -313,7 +316,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));\
@@ -325,7 +328,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);\
@@ -350,7 +356,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));\