[FFmpeg-devel] [PATCH v3 2/5] avcodec/mips: Refine get_cabac_inline_mips.

殷时友 yinshiyou-hf at loongson.cn
Wed Apr 28 12:57:45 EEST 2021



> 2021年4月12日 下午11:59,殷时友 <yinshiyou-hf at loongson.cn> 写道:
> 
> 
>> 2021年3月31日 下午10:39,Michael Niedermayer <michael at niedermayer.cc> 写道:
>> 
>> On Tue, Mar 30, 2021 at 08:51:52PM +0800, Shiyou Yin wrote:
>>> 1. Refined function get_cabac_inline_mips.
>>> 2. Optimize function get_cabac_bypass and get_cabac_bypass_sign.
>>> 
>>> Speed of decoding h264: 4.89x ==> 5.05x(tested on 3A4000).
>>> ---
>>> libavcodec/mips/cabac.h | 131 +++++++++++++++++++++++++++++++++++++-----------
>>> 1 file changed, 102 insertions(+), 29 deletions(-)
>> 
>> This breaks fate with qemu mips
>> 
>> --- ffmpeg/tests/ref/fate/hevc-cabac-tudepth	2021-03-26 18:34:55.142789579 +0100
>> +++ tests/data/fate/hevc-cabac-tudepth	2021-03-31 16:36:50.613173111 +0200
>> @@ -3,4 +3,4 @@
>> #codec_id 0: rawvideo
>> #dimensions 0: 64x64
>> #sar 0: 0/1
>> -0,          0,          0,        1,    12288, 0x0127a0d9
>> +0,          0,          0,        1,    12288, 0xa330b3bd
>> Test hevc-cabac-tudepth failed. Look at tests/data/fate/hevc-cabac-tudepth.err for details.
>> ffmpeg/tests/Makefile:255: recipe for target 'fate-hevc-cabac-tudepth' failed
>> make: *** [fate-hevc-cabac-tudepth] Error 1
>> 
> 
> This bug is caused by using ‘lhu’ to load two byte date on bigendian environment. Has been fixed in V4.  
> Please help  to merge them.
> 
> BTW, I found another failed case ‘fate-sub2video_time_limited’  when testing origin/master
> with cross compiler mips-linux-gnu-gcc-8 on debian10-x64 and run fate  with qemu-mips.
> I will try to analyze it later.
> 
> My configuration: --samples=../../fate-suite/ --target-exec='/usr/bin/qemu-mips -cpu 74Kf -L /usr/mips-linux-gnu/' --cross-prefix=/usr/mips-linux-gnu/bin/ --cc=mips-linux-gnu-gcc-8 --arch=mips --target-os=linux --optflags='-O3 -g -static' --extra-ldflags=‘-static' --enable-cross-compile --enable-static --enable-gpl --disable-pthreads --disable-iconv --disable-mipsfpu
> 
> TEST    sub2video_time_limited
> --- src/tests/ref/fate/sub2video_time_limited	2021-04-10 11:53:37.661350105 +0800
> +++ tests/data/fate/sub2video_time_limited	2021-04-12 23:18:29.355527385 +0800
> @@ -4,5 +4,5 @@
> #dimensions 0: 1920x1080
> #sar 0: 0/1
> 0,          2,          2,        1,  8294400, 0x00000000
> -0,          2,          2,        1,  8294400, 0xa87c518f
> -0,         10,         10,        1,  8294400, 0xa87c518f
> +0,          2,          2,        1,  8294400, 0xea5a518f
> +0,         10,         10,        1,  8294400, 0xea5a518f
> Test sub2video_time_limited failed. Look at tests/data/fate/sub2video_time_limited.err for details.
> make: *** [src/tests/Makefile:256:fate-sub2video_time_limited] 错误 1
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe”.

Hello, Michael
Can fate-sub2video_time_limited pass on your mips qemu before? I doubt if it’s qemu’s problem.
I build latest master branch without my patch set and disabled all asm code, then run fate test in qemu-mips which download from debian10 repository. 

../ffmpeg/configure --samples=../../fate-suite/ --target-exec='/usr/bin/qemu-mips -cpu 74Kf -L /usr/mips-linux-gnu/' --cross-prefix=/usr/mips-linux-gnu/bin/ --cc=mips-linux-gnu-gcc-8 --arch=mips --target-os=linux --optflags='-O3 -g -static' --extra-ldflags=-static --enable-cross-compile --enable-static --enable-gpl --disable-mipsfpu --disable-iconv --disable-pthreads  --disable-asm --cpu=74kf
make fate-sub2video_time_limited



More information about the ffmpeg-devel mailing list