[FFmpeg-devel] [PATCH 2/7] avcodec: [loongarch] Optimize h264_chroma_mc with LASX.

殷时友 yinshiyou-hf at loongson.cn
Tue Dec 14 14:35:48 EET 2021



> 2021年12月14日 下午3:15,Hao Chen <chenhao at loongson.cn> 写道:
> 
> From: Shiyou Yin <yinshiyou-hf at loongson.cn>
> 
> ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
> before:170
> after :183
> 
> Change-Id: I42ff23cc2dc7c32bd1b7e4274da9d9ec87065f20
> ---
> libavcodec/h264chroma.c                       |    2 +
> libavcodec/h264chroma.h                       |    1 +
> libavcodec/loongarch/Makefile                 |    2 +
> .../loongarch/h264chroma_init_loongarch.c     |   37 +
> libavcodec/loongarch/h264chroma_lasx.c        | 1280 +++++++++++
> libavcodec/loongarch/h264chroma_lasx.h        |   36 +
> libavutil/loongarch/loongson_intrinsics.h     | 1881 +++++++++++++++++
> 7 files changed, 3239 insertions(+)
> create mode 100644 libavcodec/loongarch/Makefile
> create mode 100644 libavcodec/loongarch/h264chroma_init_loongarch.c
> create mode 100644 libavcodec/loongarch/h264chroma_lasx.c
> create mode 100644 libavcodec/loongarch/h264chroma_lasx.h
> create mode 100644 libavutil/loongarch/loongson_intrinsics.h
> 
> 

> diff --git a/libavutil/loongarch/loongson_intrinsics.h b/libavutil/loongarch/loongson_intrinsics.h
> new file mode 100644
> index 0000000000..865d6ae9bd
> --- /dev/null
> +++ b/libavutil/loongarch/loongson_intrinsics.h
> @@ -0,0 +1,1881 @@
> +/*
> + * Copyright (c) 2021 Loongson Technology Corporation Limited
> + * All rights reserved.
> + * Contributed by Shiyou Yin <yinshiyou-hf at loongson.cn>
> + *                Xiwei Gu   <guxiwei-hf at loongson.cn>
> + *                Lu Wang    <wanglu at loongson.cn>
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + *
> + */
> +
> +#ifndef AVUTIL_LOONGARCH_LOONGSON_INTRINSICS_H
> +#define AVUTIL_LOONGARCH_LOONGSON_INTRINSICS_H
> +
> +/*
> + * Copyright (c) 2021 Loongson Technology Corporation Limited
> + * All rights reserved.
> + * Contributed by Shiyou Yin <yinshiyou-hf at loongson.cn>
> + *                Xiwei Gu   <guxiwei-hf at loongson.cn>
> + *                Lu Wang    <wanglu at loongson.cn>
> + *
> + * This file is maintained in LSOM project, don't change it directly.
> + * You can get the latest version of this header from: ***
> + *
> + */
> +
> +#ifndef LOONGSON_INTRINSICS_H
> +#define LOONGSON_INTRINSICS_H
> +
> +/**
> + * MAJOR version: Macro usage changes.
> + * MINOR version: Add new functions, or bug fix.
> + * MICRO version: Comment changes or implementation changes.
> + */
> +#define LSOM_VERSION_MAJOR 1
> +#define LSOM_VERSION_MINOR 0
> +#define LSOM_VERSION_MICRO 0
> +
> 

Use the latest version 1.0.3.


More information about the ffmpeg-devel mailing list