[FFmpeg-devel] [PATCH 3/5] avcodec/h264chroma_template: Replace variable by constant in chroma mc
Kieran Kunhya
kieran618 at googlemail.com
Mon Jul 14 19:49:19 EEST 2025
On Sun, 13 Jul 2025, 02:11 Michael Niedermayer, <michael at niedermayer.cc>
wrote:
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/h264chroma_template.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/libavcodec/h264chroma_template.c
> b/libavcodec/h264chroma_template.c
> index b9d24f5a0cd..b20811a71ae 100644
> --- a/libavcodec/h264chroma_template.c
> +++ b/libavcodec/h264chroma_template.c
> @@ -54,7 +54,7 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t
> *_dst /*align 8*/, const ui
> }\
> } else {\
> for(i=0; i<h; i++){\
> - OP(dst[0], (A*src[0]));\
> + OP(dst[0], (64*src[0]));\
> dst+= stride;\
> src+= stride;\
> }\
> @@ -91,8 +91,8 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t
> *_dst /*align 8*/, const ui
> }\
> } else {\
> for ( i = 0; i < h; i++){\
> - OP(dst[0], A * src[0]);\
> - OP(dst[1], A * src[1]);\
> + OP(dst[0], 64 * src[0]);\
> + OP(dst[1], 64 * src[1]);\
> dst += stride;\
> src += stride;\
> }\
> @@ -134,10 +134,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t
> *_dst /*align 8*/, const ui
> }\
> } 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[0], 64 * src[0]);\
> + OP(dst[1], 64 * src[1]);\
> + OP(dst[2], 64 * src[2]);\
> + OP(dst[3], 64 * src[3]);\
> dst += stride;\
> src += stride;\
> }\
> @@ -187,14 +187,14 @@ static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t
> *_dst /*align 8*/, const ui
> }\
> } 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]);\
> + OP(dst[0], 64 * src[0]);\
> + OP(dst[1], 64 * src[1]);\
> + OP(dst[2], 64 * src[2]);\
> + OP(dst[3], 64 * src[3]);\
> + OP(dst[4], 64 * src[4]);\
> + OP(dst[5], 64 * src[5]);\
> + OP(dst[6], 64 * src[6]);\
> + OP(dst[7], 64 * src[7]);\
> dst += stride;\
> src += stride;\
> }\
> --
> 2.49.0
>
Some explanation of what this is for would help.
Kieran
>
More information about the ffmpeg-devel
mailing list