[FFmpeg-devel] Loongson Optimization Patchs and Machine Express Issuse

周晓勇 zhouxiaoyong at loongson.cn
Sun Apr 26 05:38:10 CEST 2015


HAVE_LOONGSON is insteaded by HAVE_LOONGSON3. Even Loongson-2E and 2F support Loongson SIMD instructs but have low performance for decoding. We plan to fucus on optimizing Loongson-3A1000, 3B1500 and 3A1500, and modify the configure file to support Loongson-2 series later by adding HAVE_LOONGSON2.


在 2015-04-25 19:41:46,"Michael Niedermayer" <michael at niedermayer.cc> 写道:

>On Wed, Apr 22, 2015 at 02:27:11PM +0800, 周晓勇 wrote:
>> Hi Michael,
>>     We have prepared the patchs and Loongson-3A machine for you, but DHL needs consignee's phone number in case they could not contact u. Could you send me your phone number right now? I have make an appointment with courier tomorrow morning.
>>     The enclosures are our Loongson-3 patchs for ffmpeg-master based on fbdaebb29861d32acc93fa55fd13554a2ae32eb4.
>>     Cause the machine belong to the company, our boss need one Electronic Receipt to confirm that i do not keep the machine privately. Could you email me one receipt with your sign after you receive it?
>> 
>> Thanks.
>> 
>> 
>> 
>> --
>[...]
>
>>  aacsbr_mips.h             |    4 ++--
>>  iirfilter_mips.c          |    4 ++++
>>  mpegaudiodsp_mips_float.c |    6 ++++++
>>  sbrdsp_mips.c             |    4 ++++
>>  4 files changed, 16 insertions(+), 2 deletions(-)
>> 2ee4cc1afabace5d2b6fa52ea91b211187cc18f0  0002-avcodec-mips-disable-assembly-not-supported-for-Loon.patch
>> From 3488470e6099444ed5d9cd75c181ce69d824267f Mon Sep 17 00:00:00 2001
>> From: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
>> Date: Wed, 15 Apr 2015 20:18:15 +0800
>> Subject: [PATCH 02/11] avcodec/mips: disable assembly not supported for
>>  Loongson-3
>
>applied
>
>
>[...]
>
>>  mathops.h      |    3 ++
>>  mips/mathops.h |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++------
>>  2 files changed, 73 insertions(+), 8 deletions(-)
>> 001ca979230cbffc83a1004d01c1b9d7a66f1577  0003-avcodec-optimize-mathops-for-Loongson-3-v1.patch
>> From 6cb445778ef2730eb1f33ddb3ef30a5ed017e787 Mon Sep 17 00:00:00 2001
>> From: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
>> Date: Thu, 16 Apr 2015 14:42:44 +0800
>> Subject: [PATCH 03/11] avcodec: optimize mathops for Loongson-3 v1
>> 
>> ---
>>  libavcodec/mathops.h      |  3 ++
>>  libavcodec/mips/mathops.h | 78 ++++++++++++++++++++++++++++++++++++++++++-----
>>  2 files changed, 73 insertions(+), 8 deletions(-)
>> 
>> diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
>> index 87d110b..46283ca 100644
>> --- a/libavcodec/mathops.h
>> +++ b/libavcodec/mathops.h
>> @@ -211,6 +211,8 @@ if ((y) < (x)) {\
>>  #   define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
>>  #endif /* FASTDIV */
>>  
>> +#ifndef ff_sqrt
>> +#define ff_sqrt ff_sqrt
>>  static inline av_const unsigned int ff_sqrt(unsigned int a)
>>  {
>>      unsigned int b;
>> @@ -230,6 +232,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
>>  
>>      return b - (a < b * b);
>>  }
>> +#endif
>>  
>>  static inline int8_t ff_u8_to_s8(uint8_t a)
>>  {
>> diff --git a/libavcodec/mips/mathops.h b/libavcodec/mips/mathops.h
>> index 5673fc0..cdc7705 100644
>> --- a/libavcodec/mips/mathops.h
>> +++ b/libavcodec/mips/mathops.h
>> @@ -1,5 +1,6 @@
>>  /*
>>   * Copyright (c) 2009 Mans Rullgard <mans at mansr.com>
>> + * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong at loongson.cn>
>>   *
>>   * This file is part of FFmpeg.
>>   *
>> @@ -27,14 +28,73 @@
>>  
>>  #if HAVE_INLINE_ASM
>>  
>> -#if HAVE_LOONGSON
>> +#if HAVE_LOONGSON3
>
>This removes optimizations for loongson (1 or whatever) ?
>is that intended ?
>
>
>-- 
>Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
>The real ebay dictionary, page 2
>"100% positive feedback" - "All either got their money back or didnt complain"
>"Best seller ever, very honest" - "Seller refunded buyer after failed scam"



More information about the ffmpeg-devel mailing list