[FFmpeg-devel] [PATCH 4/4] avcodec: loongson optimized h264pred with mmi

Michael Niedermayer michael at niedermayer.cc
Sun Jul 12 19:17:22 CEST 2015


On Sun, Jul 12, 2015 at 06:52:09PM +0200, Michael Niedermayer wrote:
> On Sun, Jul 12, 2015 at 05:46:46PM +0200, Michael Niedermayer wrote:
> > On Sun, Jul 12, 2015 at 09:13:18PM +0800, 周晓勇 wrote:
> > > 
> > > 
> > > 
> > > > -----原始邮件-----
> > > > 发件人: "Michael Niedermayer" <michael at niedermayer.cc>
> > > > 发送时间: 2015年7月12日 星期日
> > > > 收件人: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
> > > > 抄送: 
> > > > 主题: Re: [FFmpeg-devel] [PATCH 4/4] avcodec: loongson optimized h264pred with mmi
> > > > 
> > > > On Sat, Jul 11, 2015 at 09:02:51PM +0200, Michael Niedermayer wrote:
> > > > > On Sun, Jul 05, 2015 at 11:43:37PM +0200, Michael Niedermayer wrote:
> > > > > > On Sat, Jul 04, 2015 at 12:14:51PM +0800, 周晓勇 wrote:
> > > > > > > i will offer a download source of Fedora21 OS next Monday.
> > > > > > > i will run yum-builddep ffmpeg-xxx.src.rpm for preparing devel environment.
> > > > > > >  what else do you need to install, because it maybe slow for downloading other packages abroad.
> > > > > > > the new FC21 build with mips64el N64 API and mips64r2(-march=loongson3a) isa, and enabled ARCH_MIPS64 after ffmpeg configure.
> > > > > > > the FC19-O32 was slow, so aborted.
> > > > > > 
> > > > > > other things hmm
> > > > > > ccache, dash, screen
> > > > > 
> > > > > with dash configure finished in 1minute instead of 4 with bash (on loongson)
> > > > 
> > > > fate no longer passes after installing Fedora21
> > > > 
> > > > with
> > > > dash ./configure --enable-gpl --cc='ccache gcc' --enable-pthreads --samples=/home/loongson/fate/ --enable-nonfree  --enable-version3 --assert-level=2
> > > > i get failure due to illegal instructions
> > > > 
> > > > with
> > > > dash ./configure --enable-gpl --cc='ccache gcc' --enable-pthreads --samples=/home/loongson/fate/ --enable-nonfree  --enable-version3 --assert-level=2  --cpu=loongson3a --enable-loongson3
> > > > it fails in dca tests:
> > > > 
> > > > TEST    dca-core
> > > > TEST    dca-xll
> > > > stddev:  853.28 PSNR: 37.71 MAXDIFF:11651 bytes:  1554432/   700416
> > > > MAXDIFF: |11651 - 0| >= 1
> > > > size: |1554432 - 700416| >= 0
> > > > Test dca-core failed. Look at tests/data/fate/dca-core.err for details.
> > > > tests/Makefile:202: recipe for target 'fate-dca-core' failed
> > > > make: *** [fate-dca-core] Error 1
> > > > make: *** Waiting for unfinished jobs....
> > > > stddev:  219.18 PSNR: 49.51 MAXDIFF: 2483 bytes:  8994816/  1073152
> > > > MAXDIFF: |2483 - 0| >= 1
> > > > size: |8994816 - 1073152| >= 0
> > > > Test dca-xll failed. Look at tests/data/fate/dca-xll.err for details.
> > > > tests/Makefile:202: recipe for target 'fate-dca-xll' failed
> > > > make: *** [fate-dca-xll] Error 1
> > > > 
> > > 
> > > yes, i got this dca failure too. i have encountered many other errors in fate test.
> > 
> > > why do you think it's due to illegal instructions? 
> > 
> > when --cpu=loongson3a --enable-loongson3 is not added then make fate
> > fails and displays "illegal instruction"
> > 
> > this worked before the upgrade to Fedora21
> > 
> > 
> > > i have no idea because ffmpeg or ffplay could decode and play the media data regularly only with wrong decoding.
> > > if there is illegal instructions, when run ffmpeg or ffplay commands it will show illegal instruction caution.
> > > in addition, with no optimization fate failed as well.
> > 
> > so what is the plan to continue ?
> > you suggested to upgrade to Fedora21 but fate does not pass after the
> > upgrade
> > 
> > you should have tested this before suggesting an upgrade!
> > 
> > i cannot test your patches if fate does not pass
> > 
> > will you fix the failures in Fedora21 or is there some other solution
> > so we can continue to test and apply patches for loongson
> > ?
> 
> building libavcodec/dca_parser.c with
> -O0
> fixes the fate-dca-core and fate-dca-xll failure

looks like a compiler bug:

@@ -66,6 +66,7 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
         for (i = 0; i < buf_size; i++) {
             state = (state << 8) | buf[i];
             if (IS_MARKER(state)) {
+    av_log(0,0, "MRK0 %d %LX %X %d %d\n", i, state, pc1->lastmarker,pc1->framesize, pc1->size);
                 if (!pc1->lastmarker ||
                     pc1->lastmarker == CORE_MARKER(state) ||
                     pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM) {
@@ -75,6 +76,7 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
                     else
                         pc1->lastmarker = CORE_MARKER(state);
                     i++;
+    av_log(0,0, "END0 %d %LX %X %d %d\n", i, state, pc1->lastmarker,pc1->framesize, pc1->size);
                     break;
                 }
             }

I get this diff between working and not working:

 MRK0 5 7FFE8001FC3C 0 0 0
 END0 6 7FFE8001FC3C 7FFE8001 0 0
 END1 1011 7FFE8001FC3C 7FFE8001 0 1006
 dca_parse_params
 dca_parse_params END
 MRK0 5 FFFF7FFE8001FC3C 7FFE8001 1006 0
-END0 6 FFFF7FFE8001FC3C 7FFE8001 1006 0
 ENF
-END1 5 80007FFE8001FC3C 7FFE8001 1006 1006


assuming this is really a compiler bug
can you fix the compiler or where can i find a working "gcc" package ?

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- 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/20150712/a11f2603/attachment.sig>


More information about the ffmpeg-devel mailing list