[FFmpeg-devel] [PATCH 4/7] avcodec/mips: loongson set xvid as default idct algorithm

Michael Niedermayer michael at niedermayer.cc
Tue Dec 13 02:41:47 EET 2016


On Mon, Oct 10, 2016 at 04:09:43PM +0800, 周晓勇 wrote:
> From e4d648fd34601cbe23a54af5d9489537896c6478 Mon Sep 17 00:00:00 2001
> From: Zhou Xiaoyong <zhouxiaoyong at loongson.cn>
> Date: Mon, 10 Oct 2016 14:42:58 +0800
> Subject: [PATCH 4/7] avcodec/mips: loongson set xvid as default idct algorithm
> 
> 
> ---
>  libavcodec/mips/idctdsp_init_mips.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/libavcodec/mips/idctdsp_init_mips.c b/libavcodec/mips/idctdsp_init_mips.c
> index 8c26bca..7beb1f6 100644
> --- a/libavcodec/mips/idctdsp_init_mips.c
> +++ b/libavcodec/mips/idctdsp_init_mips.c
> @@ -20,6 +20,7 @@
>   */
>  
>  #include "idctdsp_mips.h"
> +#include "xvididct_mips.h"
>  
>  #if HAVE_MSA
>  static av_cold void idctdsp_init_msa(IDCTDSPContext *c, AVCodecContext *avctx,
> @@ -49,7 +50,9 @@ static av_cold void idctdsp_init_mmi(IDCTDSPContext *c, AVCodecContext *avctx,
>          (avctx->bits_per_raw_sample != 10) &&
>          (avctx->bits_per_raw_sample != 12) &&
>          (avctx->idct_algo == FF_IDCT_AUTO)) {
> -                c->idct = ff_simple_idct_mmi;
> +                c->idct_put = ff_xvid_idct_put_mmi;
> +                c->idct_add = ff_xvid_idct_add_mmi;
> +                c->idct = ff_xvid_idct_mmi;
>                  c->perm_type = FF_IDCT_PERM_NONE;
>      }

This would affect encoders and some generated files would decode with
artifacts

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161213/3c75c9e2/attachment.sig>


More information about the ffmpeg-devel mailing list