summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264chroma_template.c43
1 files changed, 39 insertions, 4 deletions
diff --git a/libavcodec/h264chroma_template.c b/libavcodec/h264chroma_template.c
index b64172aadf..072b5e03f7 100644
--- a/libavcodec/h264chroma_template.c
+++ b/libavcodec/h264chroma_template.c
@@ -42,7 +42,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
- }else{\
+ } else if (B + C) {\
const int E= B+C;\
const int step= C ? stride : 1;\
for(i=0; i<h; i++){\
@@ -50,6 +50,12 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
+ } else {\
+ for(i=0; i<h; i++){\
+ OP(dst[0], (A*src[0]));\
+ dst+= stride;\
+ src+= stride;\
+ }\
}\
}\
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){\
@@ -71,7 +77,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
- }else{\
+ } else if (B + C) {\
const int E= B+C;\
const int step= C ? stride : 1;\
for(i=0; i<h; i++){\
@@ -80,6 +86,13 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
+ } else {\
+ for ( i = 0; i < h; i++){\
+ OP(dst[0], A * src[0]);\
+ OP(dst[1], A * src[1]);\
+ dst += stride;\
+ src += stride;\
+ }\
}\
}\
\
@@ -104,7 +117,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
- }else{\
+ } else if (B + C) {\
const int E= B+C;\
const int step= C ? stride : 1;\
for(i=0; i<h; i++){\
@@ -115,6 +128,15 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
+ } else {\
+ for ( i = 0; i < h; i++){\
+ OP(dst[0], A * src[0]);\
+ OP(dst[1], A * src[1]);\
+ OP(dst[2], A * src[2]);\
+ OP(dst[3], A * src[3]);\
+ dst += stride;\
+ src += stride;\
+ }\
}\
}\
\
@@ -143,7 +165,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
- }else{\
+ } else if (B + C) {\
const int E= B+C;\
const int step= C ? stride : 1;\
for(i=0; i<h; i++){\
@@ -158,6 +180,19 @@ static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst/*align 8*/, uint8_t *
dst+= stride;\
src+= stride;\
}\
+ } else {\
+ for ( i = 0; i < h; i++){\
+ OP(dst[0], A * src[0]);\
+ OP(dst[1], A * src[1]);\
+ OP(dst[2], A * src[2]);\
+ OP(dst[3], A * src[3]);\
+ OP(dst[4], A * src[4]);\
+ OP(dst[5], A * src[5]);\
+ OP(dst[6], A * src[6]);\
+ OP(dst[7], A * src[7]);\
+ dst += stride;\
+ src += stride;\
+ }\
}\
}