[FFmpeg-devel] [PATCH v1 1/6] avcodec/la: add LSX optimization for h264 idct.

yinshiyou-hf at loongson.cn yinshiyou-hf at loongson.cn
Tue May 9 05:47:21 EEST 2023




> -----原始邮件-----
> 发件人: "Hao Chen" <chenhao at loongson.cn>
> 发送时间:2023-05-04 16:49:47 (星期四)
> 收件人: ffmpeg-devel at ffmpeg.org
> 抄送: "Shiyou Yin" <yinshiyou-hf at loongson.cn>
> 主题: [FFmpeg-devel] [PATCH v1 1/6] avcodec/la: add LSX optimization for h264 idct.
> 

> diff --git a/libavcodec/loongarch/h264dsp_lasx.h b/libavcodec/loongarch/h264dsp_loongarch.h
> similarity index 68%
> rename from libavcodec/loongarch/h264dsp_lasx.h
> rename to libavcodec/loongarch/h264dsp_loongarch.h
> index 4cf813750b..28dca2b537 100644
> --- a/libavcodec/loongarch/h264dsp_lasx.h
> +++ b/libavcodec/loongarch/h264dsp_loongarch.h
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2021 Loongson Technology Corporation Limited
> + * Copyright (c) 2023 Loongson Technology Corporation Limited
>   * Contributed by Shiyou Yin <yinshiyou-hf at loongson.cn>
>   *                Xiwei  Gu  <guxiwei-hf at loongson.cn>
>   *
> @@ -20,11 +20,34 @@
>   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>   */
>  
> -#ifndef AVCODEC_LOONGARCH_H264DSP_LASX_H
> -#define AVCODEC_LOONGARCH_H264DSP_LASX_H
> +#ifndef AVCODEC_LOONGARCH_H264DSP_LOONGARCH_H
> +#define AVCODEC_LOONGARCH_H264DSP_LOONGARCH_H
>  
>  #include "libavcodec/h264dec.h"
> +#include "config.h"
>  
> +void ff_h264_idct_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride);
> +void ff_h264_idct8_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride);
> +void ff_h264_idct_dc_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride);
> +void ff_h264_idct8_dc_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride);
> +void ff_h264_luma_dc_dequant_idct_8_lsx(int16_t *_output, int16_t *_input, int qmul);
> +void ff_h264_idct_add16_8_lsx(uint8_t *dst, const int32_t *blk_offset,
> +                              int16_t *block, int32_t dst_stride,
> +                              const uint8_t nzc[15 * 8]);
> +void ff_h264_idct8_add4_8_lsx(uint8_t *dst, const int32_t *blk_offset,
> +                              int16_t *block, int32_t dst_stride,
> +                              const uint8_t nzc[15 * 8]);
> +void ff_h264_idct_add8_8_lsx(uint8_t **dst, const int32_t *blk_offset,
> +                             int16_t *block, int32_t dst_stride,
> +                             const uint8_t nzc[15 * 8]);
> +void ff_h264_idct_add8_422_8_lsx(uint8_t **dst, const int32_t *blk_offset,
> +                                 int16_t *block, int32_t dst_stride,
> +                                 const uint8_t nzc[15 * 8]);
> +void ff_h264_idct_add16_intra_8_lsx(uint8_t *dst, const int32_t *blk_offset,
> +                                    int16_t *block, int32_t dst_stride,
> +                                    const uint8_t nzc[15 * 8]);
> +
> +#if HAVE_LASX
>  void ff_h264_h_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride,
>                                 int alpha, int beta, int8_t *tc0);
>  void ff_h264_v_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride,
> @@ -65,33 +88,16 @@ void ff_weight_h264_pixels4_8_lasx(uint8_t *src, ptrdiff_t stride,
>  void ff_h264_add_pixels4_8_lasx(uint8_t *_dst, int16_t *_src, int stride);
>  
>  void ff_h264_add_pixels8_8_lasx(uint8_t *_dst, int16_t *_src, int stride);
> -void ff_h264_idct_add_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride);
> -void ff_h264_idct8_addblk_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride);
> -void ff_h264_idct4x4_addblk_dc_lasx(uint8_t *dst, int16_t *src,
> -                                    int32_t dst_stride);
> -void ff_h264_idct8_dc_addblk_lasx(uint8_t *dst, int16_t *src,
> +void ff_h264_idct8_add_8_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride);
> +void ff_h264_idct8_dc_add_8_lasx(uint8_t *dst, int16_t *src,
>                                    int32_t dst_stride);
> -void ff_h264_idct_add16_lasx(uint8_t *dst, const int32_t *blk_offset,
> -                             int16_t *block, int32_t dst_stride,
> -                             const uint8_t nzc[15 * 8]);
> -void ff_h264_idct8_add4_lasx(uint8_t *dst, const int32_t *blk_offset,
> -                             int16_t *block, int32_t dst_stride,
> -                             const uint8_t nzc[15 * 8]);
> -void ff_h264_idct_add8_lasx(uint8_t **dst, const int32_t *blk_offset,
> -                            int16_t *block, int32_t dst_stride,
> -                            const uint8_t nzc[15 * 8]);
> -void ff_h264_idct_add8_422_lasx(uint8_t **dst, const int32_t *blk_offset,
> -                                int16_t *block, int32_t dst_stride,
> -                                const uint8_t nzc[15 * 8]);
> -void ff_h264_idct_add16_intra_lasx(uint8_t *dst, const int32_t *blk_offset,
> -                                   int16_t *block, int32_t dst_stride,
> -                                   const uint8_t nzc[15 * 8]);
> -void ff_h264_deq_idct_luma_dc_lasx(int16_t *dst, int16_t *src,
> -                                   int32_t de_qval);
> -
> +void ff_h264_idct8_add4_8_lasx(uint8_t *dst, const int32_t *blk_offset,
> +                               int16_t *block, int32_t dst_stride,
> +                               const uint8_t nzc[15 * 8]);

This function has not been initialized.


本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it. 


More information about the ffmpeg-devel mailing list