diff options
author | James Almer <jamrial@gmail.com> | 2017-03-21 15:20:45 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-21 15:20:45 -0300 |
commit | a8474df9447d6466c77d3ec8f414cda2662f057b (patch) | |
tree | 508b0b6cbb90c13e0a9ff44023f5df96b21420fd /libavcodec/h264chroma_template.c | |
parent | 5a49097b42cbc3eab888d15a91eeaf5520b5c381 (diff) | |
parent | e4a94d8b36c48d95a7d412c40d7b558422ff659c (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/h264chroma_template.c')
-rw-r--r-- | libavcodec/h264chroma_template.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/libavcodec/h264chroma_template.c b/libavcodec/h264chroma_template.c index 072b5e03f7..a3ca07b518 100644 --- a/libavcodec/h264chroma_template.c +++ b/libavcodec/h264chroma_template.c @@ -19,12 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/avassert.h" +#include <stddef.h> + +#include "libavutil/avassert.h" #include "bit_depth_template.c" #define H264_CHROMA_MC(OPNAME, OP)\ -static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst/*align 8*/, uint8_t *_src/*align 1*/, int stride, int h, int x, int y){\ +static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ pixel *dst = (pixel*)_dst;\ pixel *src = (pixel*)_src;\ const int A=(8-x)*(8-y);\ @@ -58,7 +60,8 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst/*align 8*/, uint8_t * }\ }\ }\ -static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t *_src/*align 1*/, int stride, int h, int x, int y){\ +static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +{\ pixel *dst = (pixel*)_dst;\ pixel *src = (pixel*)_src;\ const int A=(8-x)*(8-y);\ @@ -79,7 +82,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t * }\ } else if (B + C) {\ 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]));\ OP(dst[1], (A*src[1] + E*src[step+1]));\ @@ -96,7 +99,8 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t * }\ }\ \ -static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst/*align 8*/, uint8_t *_src/*align 1*/, int stride, int h, int x, int y){\ +static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +{\ pixel *dst = (pixel*)_dst;\ pixel *src = (pixel*)_src;\ const int A=(8-x)*(8-y);\ @@ -119,7 +123,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst/*align 8*/, uint8_t * }\ } else if (B + C) {\ 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]));\ OP(dst[1], (A*src[1] + E*src[step+1]));\ @@ -140,7 +144,8 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst/*align 8*/, uint8_t * }\ }\ \ -static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst/*align 8*/, uint8_t *_src/*align 1*/, int stride, int h, int x, int y){\ +static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +{\ pixel *dst = (pixel*)_dst;\ pixel *src = (pixel*)_src;\ const int A=(8-x)*(8-y);\ @@ -167,7 +172,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst/*align 8*/, uint8_t * }\ } else if (B + C) {\ 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]));\ OP(dst[1], (A*src[1] + E*src[step+1]));\ |