[PATCH] correct illegal instruction on < armv5tE
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp) here's the compilation faillure: | ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -isystem/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include -fexpensive-optimizations -frename-registers -fomit-frame-pointer -Os -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -isystem/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include -I/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include/SDL -D_REENTRANT -I/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include/freetype2 -I/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include -isystem/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include -c -o libmpeg2/motion_comp_arm.o libmpeg2/motion_comp_arm.c | ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -isystem/home/gnutoo/oetmp/staging/arm-angstrom-linux-gnueabi/usr/include -c -o libmpeg2/motion_comp_arm_s.o libmpeg2/motion_comp_arm_s.S | libmpeg2/motion_comp_arm_s.S: Assembler messages: | libmpeg2/motion_comp_arm_s.S:29: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:39: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:65: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:70: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:75: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:89: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:98: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:120: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:126: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:132: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:158: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:183: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:197: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:212: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:227: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:250: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:271: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:283: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:296: Error: selected processor does not support `pld [r1]' | libmpeg2/motion_comp_arm_s.S:309: Error: selected processor does not support `pld [r1]' | make: *** [libmpeg2/motion_comp_arm_s.o] Error 1 | FATAL: oe_runmake failed NOTE: Task failed: /home/gnutoo/oetmp/work/armv4t-angstrom-linux-gnueabi/mplayer-0.0+1.0rc2+svnr27726-r7/temp/log.do_compile.18445 NOTE: package mplayer-0.0+1.0rc2+svnr27726-r7: task do_compile: failed ERROR: TaskFailed event exception, aborting NOTE: package mplayer-0.0+1.0rc2+svnr27726: failed ERROR: Build of /home/gnutoo/dev/embedded/oe/local_repository/packages/mplayer/mplayer_svn.bb do_compile failed ERROR: Task 7 (/home/gnutoo/dev/embedded/oe/local_repository/packages/mplayer/mplayer_svn.bb, do_compile) failed NOTE: Tasks Summary: Attempted 736 tasks of which 730 didn't need to be rerun and 1 failed. ERROR: '/home/gnutoo/dev/embedded/oe/local_repository/packages/mplayer/mplayer_svn.bb' failed NOTE: build 200810072146: completed With the patch it builds and runs fine(I tested youtube videos with a script) I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
Hi, On Wednesday 08 October 2008 01:01, GNUtoo@no-log.org wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp) [...] I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
Then just use #ifdef HAVE_ARMV5TE #endif /* HAVE_ARMV5TE */ closure around this instruction. Best regards, Andrew
Hi,
On Wednesday 08 October 2008 01:01, GNUtoo@no-log.org wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp) [...] I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
Then just use #ifdef HAVE_ARMV5TE #endif /* HAVE_ARMV5TE */ closure around this instruction.
Best regards, Andrew thanks a lot...here's the updated patch...it took a long time because I don't have much time theses days I tested it and it compiles and runs(youtube works)
On Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hi,
On Wednesday 08 October 2008 01:01, GNUtoo@no-log.org wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp)
[...]
I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
Then just use #ifdef HAVE_ARMV5TE #endif /* HAVE_ARMV5TE */ closure around this instruction.
Best regards, Andrew
thanks a lot...here's the updated patch...it took a long time because I don't have much time theses days
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). Have you tried looking into configure script from ffmpeg and 'libavcodec/armv4l/dsputil_arm_s.S' to see how this can be done better?
I tested it and it compiles and runs(youtube works)
Youtube videos have nothing to do with libmpeg2. If you want to test your changes, you need to get some mpeg1 or mpeg2 sample files (or convert some videos to mpeg1/mpeg2 with mencoder). By the way, libmpeg2 may be slower than ffmpeg so you might want to benchmark ffmpeg vs. libmpeg2 on your device. If libmpeg2 is slower there, just compiling mplayer without libmpeg2 support is a good idea. Also I wonder about your target device. Is it more or less common hardware or just some kind of exotic development board? I'm asking because this armv4 unfriendly code has been used in mplayer for ages and nobody cared until now. It makes me think that the number of mplayer users having armv4 hardware is close to zero. This fact of course does not encourage working on any armv4 fixes or improvements. But if armv4 is still alive, I would be glad to work on improving it a bit, or at least fixing all the known issues. And patches are surely welcome. -- Best regards, Siarhei Siamashka
Also I wonder about your target device. Is it more or less common hardware or just some kind of exotic development board? I'm asking because this armv4 unfriendly code has been used in mplayer for ages and nobody cared until now. It makes me think that the number of mplayer users having armv4 hardware is close to zero. This fact of course does not encourage working on any armv4 fixes or improvements.
But if armv4 is still alive, I would be glad to work on improving it a bit, or at least fixing all the known issues. And patches are surely welcome. My device is the openmoko freerunner GTA02.(http://en.wikipedia.org/wiki/Neo_FreeRunner , http://wiki.openmoko.org/wiki/Main_Page) It's the totally(but the firmwares) free/open phone... I don't know the exact number of users(mabe a lot more than other devices...) but it has an active community(and some of the openembedded well known devellopers works for openmoko such as zecke,Michael Lauer(mickeyl) and even Harald Welte(I don't think that he's in the openembedded community ) worked for the openmoko company http://en.wikipedia.org/wiki/Harald_Welte#Openmoko and works for it again: http://laforge.gnumonks.org/weblog/2008/10/07/#20081007-uboot)
My device is the openmoko freerunner GTA02.
Won't you run into severe performance issues on that platform? The 920T series is not quite lightning fast, so you'd probably need at least hardware colorspace transformation and scaling support to display anything larger than thumbnail size. Is there any progress on that side? From what I've read, the Neo's graphics accelerator (Smedia Glamo 3362) is as tightly NDA'd as its GSM chip. On the other hand, implementing full hardware video acceleration (the Glamo can do MPEG4), would be awesome. vaapi has still a long way to go, it seems. But I don't want to criticise your effort, improving compatibility is always a good thing.
On the other hand, implementing full hardware video acceleration (the Glamo can do MPEG4), would be awesome. vaapi has still a long way to go, it seems. we have hardware acceleration for videos with a patched mplayer bug: *it's ugly(i don't mean the code...i mean the colours) *it uses framebuffer and not X see http://unadventure.wordpress.com/2008/06/08/accelerating-in-my-pocket/
and yes it's slow...and between lastest trunk and the 1.0rc2-r7 the lastest trunk seems a lot slower on youtube(i'll test with mpeg2)
On Tuesday 14 October 2008, GNUtoo@no-log.org wrote:
On the other hand, implementing full hardware video acceleration (the Glamo can do MPEG4), would be awesome. vaapi has still a long way to go, it seems.
we have hardware acceleration for videos with a patched mplayer bug: *it's ugly(i don't mean the code...i mean the colours)
Regarding the colors, this must be some bug probably, too bad if it is in some closed source component. Regarding "patched mplayer bug", is it the one with PLD instruction or there is something else to fix?
*it uses framebuffer and not X see http://unadventure.wordpress.com/2008/06/08/accelerating-in-my-pocket/
and yes it's slow...
From what I can see, it shows sthe numbers that are not impressive at all, maybe even just decoding MPEG4 video on the ARM core could be faster. One of the comments there mentions that you have Xv supported there with Xglamo, so this is a good thing for video playback (unless implementation sucks and it has a heavy overhead itself).
and between lastest trunk and the 1.0rc2-r7 the lastest trunk seems a lot slower on youtube(i'll test with mpeg2)
Do you mean the latest trunk of that Glamo thing? Or trunk in MPlayer SVN? If there are some noticeable performance regressions in MPlayer, you can try to search for the revision where it got introduced and report it. As libavcodec is an svn:externals, this makes everything a bit more complicated, but you can still get some older SVN snapshots using date: 'svn up -r {SOMEDATE}'. It might be easier to do performance regressions investigation with FFmpeg itself. -- Best regards, Siarhei Siamashka
closed source component. Regarding "patched mplayer bug", is it the one with PLD instruction or there is something else to fix? for now there is only the PLD instruction to fix
On Monday 13 October 2008, Gregor Riepl wrote:
My device is the openmoko freerunner GTA02.
Won't you run into severe performance issues on that platform? The 920T series is not quite lightning fast, so you'd probably need at least hardware colorspace transformation and scaling support to display anything larger than thumbnail size.
Just FYI, video decoding capabilities limit for Nokia 770 with 926ejs core running at 252MHz is currently something like this video: http://samples.mplayerhq.hu/benchmark/testsuite1/matrixbench_normdivx_vbrmp3... There are some frames dropped in heavy action scenes, but overall it is watchable. Video is decoded on ARM core, audio is offloaded to DSP and has almost zero overhead, there is hardware YUV support, but scaling is performed in software. Now regarding this freerunner GTA02, it is armv4, but cpu frequency is much higher and it can probably compensate missing armv5te edsp instructions. Smaller instructions cache (16K vs. 32K) is a bit worrying, so it might affect performance and compilation with -O2 or -Os instead of -O3 might be preferable. There was also a discussion about video decoding performance on Sharp Zaurus (PXA270 416MHz, xscale) and it is supposedly quite horrible according to: http://thread.gmane.org/gmane.linux.distributions.angstrom.user/1583/focus=1... They suspected that Sharp Zaurus has very bad memory bandwidth performance and it kills everything. I also tried to take part in that discussion as I was very curious what exactly could be wrong (Sharp Zaurus seems to be a similar or better hardware than Nokia 770 as it also has armv5te instructions support and even iwmmxt, has hardware YUV but also no arbitrary hardware scaling). But they did not seem to be very motivated to even try benchmarking anything or accept any help :)
Is there any progress on that side? From what I've read, the Neo's graphics accelerator (Smedia Glamo 3362) is as tightly NDA'd as its GSM chip. On the other hand, implementing full hardware video acceleration (the Glamo can do MPEG4), would be awesome. vaapi has still a long way to go, it seems.
But I don't want to criticise your effort, improving compatibility is always a good thing.
I think it is not only compatibility, but there is also some quite visible practical use. For example, flash video was also mentioned and it should play just fine on this hardware. -- Best regards, Siarhei Siamashka
On Monday 13 October 2008, GNUtoo@no-log.org wrote:
Also I wonder about your target device. Is it more or less common hardware or just some kind of exotic development board? I'm asking because this armv4 unfriendly code has been used in mplayer for ages and nobody cared until now. It makes me think that the number of mplayer users having armv4 hardware is close to zero. This fact of course does not encourage working on any armv4 fixes or improvements.
But if armv4 is still alive, I would be glad to work on improving it a bit, or at least fixing all the known issues. And patches are surely welcome.
My device is the openmoko freerunner GTA02.(http://en.wikipedia.org/wiki/Neo_FreeRunner , http://wiki.openmoko.org/wiki/Main_Page) It's the totally(but the firmwares) free/open phone... I don't know the exact number of users(mabe a lot more than other devices...) but it has an active community(and some of the openembedded well known devellopers works for openmoko such as zecke,Michael Lauer(mickeyl) and even Harald Welte(I don't think that he's in the openembedded community ) worked for the openmoko company http://en.wikipedia.org/wiki/Harald_Welte#Openmoko and works for it again: http://laforge.gnumonks.org/weblog/2008/10/07/#20081007-uboot)
Interesting, so armv4 is not dead yet for general purpose video decoding/playback and this Neo FreeRunner started shipping several months ago. So we may expect some armv4 code contributors to MPlayer and FFmpeg in the near future, unless Neo FreeRunner turns out to be a market failure. Thanks for the information. -- Best regards, Siarhei Siamashka
Also I wonder about your target device. Is it more or less common hardware or just some kind of exotic development board? I'm asking because this armv4 unfriendly code has been used in mplayer for ages and nobody cared until now. It makes me think that the number of mplayer users having armv4 hardware is close to zero. This fact of course does not encourage working on any armv4 fixes or improvements.
But if armv4 is still alive, I would be glad to work on improving it a bit, or at least fixing all the known issues. And patches are surely welcome. My device is the openmoko freerunner GTA02.(http://en.wikipedia.org/wiki/Neo_FreeRunner , http://wiki.openmoko.org/wiki/Main_Page) It's the totally(but the firmwares) free/open phone... I don't know the exact number of users(mabe a lot more than other devices...) but it has an active community(and some of the openembedded well known devellopers works for openmoko such as zecke,Michael Lauer(mickeyl) and even Harald Welte(I don't think that he's in the openembedded community ) worked for the openmoko company http://en.wikipedia.org/wiki/Harald_Welte#Openmoko and works for it again: http://laforge.gnumonks.org/weblog/2008/10/07/#20081007-uboot)
sorry for the duplicate...but my wemail(squirrelmail) displayed an error...so I thought it wasn't sent
Also I wonder about your target device. Is it more or less common hardware or just some kind of exotic development board? I'm asking because this armv4 unfriendly code has been used in mplayer for ages and nobody cared until now. It makes me think that the number of mplayer users having armv4 hardware is close to zero. This fact of course does not encourage working on any armv4 fixes or improvements.
But if armv4 is still alive, I would be glad to work on improving it a bit, or at least fixing all the known issues. And patches are surely welcome. My device is the openmoko freerunner GTA02.(http://en.wikipedia.org/wiki/Neo_FreeRunner , http://wiki.openmoko.org/wiki/Main_Page) It's the totally(but the firmwares) free/open phone... I don't know the exact number of users(mabe a lot more than other devices...) but it has an active community(and some of the openembedded well known devellopers works for openmoko such as zecke,Michael Lauer(mickeyl) and even Harald Welte(I don't think that he's in the openembedded community ) worked for the openmoko company http://en.wikipedia.org/wiki/Harald_Welte#Openmoko and works for it again: http://laforge.gnumonks.org/weblog/2008/10/07/#20081007-uboot)
On Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hi,
On Wednesday 08 October 2008 01:01, GNUtoo@no-log.org wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp)
[...]
I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
Then just use #ifdef HAVE_ARMV5TE #endif /* HAVE_ARMV5TE */ closure around this instruction.
Best regards, Andrew
thanks a lot...here's the updated patch...it took a long time because I don't have much time theses days
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). I looked at the configure file of mplayer trunk and there is the following inside: if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF int main(void) { __asm__ volatile ("pld [r0]"); return 0; } EOF pld=no cc_check && pld=yes echores "$pld" so if I add the following to the beginning of the assembly file would it work? #ifndef HAVE_PLD .macro pld reg .endm #endif More precisely is the checks in the configure script enough or should I also add that in the configure script: enabled armv4l && check_asm pld '"pld [r0]"'
On Thu, Nov 06, 2008 at 11:59:53PM +0100, GNUtoo@no-log.org wrote:
on Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). I looked at the configure file of mplayer trunk and there is the following inside: if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF int main(void) { __asm__ volatile ("pld [r0]"); return 0; } EOF pld=no cc_check && pld=yes echores "$pld" so if I add the following to the beginning of the assembly file would it work? #ifndef HAVE_PLD .macro pld reg .endm #endif More precisely is the checks in the configure script enough or should I also add that in the configure script: enabled armv4l && check_asm pld '"pld [r0]"'
What we have is enough. It accomplishes exactly what you need. Diego
On Thu, Nov 06, 2008 at 11:59:53PM +0100, GNUtoo@no-log.org wrote:
on Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). I looked at the configure file of mplayer trunk and there is the following inside: if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF int main(void) { __asm__ volatile ("pld [r0]"); return 0; } EOF pld=no cc_check && pld=yes echores "$pld" so if I add the following to the beginning of the assembly file would it work? #ifndef HAVE_PLD .macro pld reg .endm #endif More precisely is the checks in the configure script enough or should I also add that in the configure script: enabled armv4l && check_asm pld '"pld [r0]"'
What we have is enough. It accomplishes exactly what you need.
Diego Thanks a lot!!! I attached the patch for applying the following code to the libmpeg2/motion_comp_arm_s.S: #ifndef HAVE_PLD .macro pld reg .endm #endif
On Thu, Nov 06, 2008 at 11:59:53PM +0100, GNUtoo@no-log.org wrote:
on Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). I looked at the configure file of mplayer trunk and there is the following inside: if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF int main(void) { __asm__ volatile ("pld [r0]"); return 0; } EOF pld=no cc_check && pld=yes echores "$pld" so if I add the following to the beginning of the assembly file would it work? #ifndef HAVE_PLD .macro pld reg .endm #endif More precisely is the checks in the configure script enough or should I also add that in the configure script: enabled armv4l && check_asm pld '"pld [r0]"'
What we have is enough. It accomplishes exactly what you need.
Diego Thanks a lot!!! I attached the patch for applying the following code to the libmpeg2/motion_comp_arm_s.S: #ifndef HAVE_PLD .macro pld reg .endm #endif_______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng I was forgetting to tell the test setup: on my computer: mencoder matrixbench_normdivx_vbrmp3.avi -oac none -ovc lavc -lavcopts vcodec=mpeg2video -of mpeg -o matrix_openmoko.mpeg2 on the device: DISPLAY=:0 mplayer -ao null -vo xv -fs -vf framestep=2 -vc mpeg12 /media/mmcblk0p2/matrix_openmoko.mpeg2 it's slow...but the colours are ok
On Wed, Nov 12, 2008 at 09:37:49PM +0100, GNUtoo@no-log.org wrote:
On Thu, Nov 06, 2008 at 11:59:53PM +0100, GNUtoo@no-log.org wrote:
on Sunday 12 October 2008, GNUtoo@no-log.org wrote:
Hmm, ifdefs around every instruction look extremely ugly. In addition, they have exactly the same effect as just removing all PLD instructions even for ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when compiling this assembly file). I looked at the configure file of mplayer trunk and there is the following inside: if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF int main(void) { __asm__ volatile ("pld [r0]"); return 0; } EOF pld=no cc_check && pld=yes echores "$pld" so if I add the following to the beginning of the assembly file would it work? #ifndef HAVE_PLD .macro pld reg .endm #endif More precisely is the checks in the configure script enough or should I also add that in the configure script: enabled armv4l && check_asm pld '"pld [r0]"'
What we have is enough. It accomplishes exactly what you need.
Thanks a lot!!! I attached the patch for applying the following code to the libmpeg2/motion_comp_arm_s.S: --- trunk.orig/libmpeg2/motion_comp_arm_s.S +++ trunk/libmpeg2/motion_comp_arm_s.S @@ -18,6 +18,11 @@ @ along with mpeg2dec; if not, write to the Free Software @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#ifndef HAVE_PLD +.macro pld reg +.endm +#endif
The patch is incorrect, this file does not #include config.h, so the preprocessor can never check the condition properly. Diego
On Wednesday 08 October 2008, GNUtoo@no-log.org wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp)
here's the compilation faillure:
[...]
With the patch it builds and runs fine(I tested youtube videos with a script)
A better fix is to update configure script to support detection of availability of PLD instruction in the same way as it is done in FFmpeg.
I bet the patch won't be accepted as-is because it has a performance cost on the platform where the pld instruction is supported because the pld instruction preloads things...
The usefulness of PLD instruction there is quite questionable even on the platforms which support it. The code needs to be benchmarked. -- Best regards, Siarhei Siamashka
On Wed, Oct 8, 2008 at 12:01 AM, <GNUtoo@no-log.org> wrote:
hello, I wanted to cross-compile mplayer from svn but it failed...that's because the pld instruction is not supported by my platform(armv4): More precisely the pld instruction was introduced in armv5tE variants( but is not present on armv5texp)
By the way, if you are interested in a good work of mplayer on armv4 devices, you may also consider trying to fix libavcodec/armv4l/jrevdct_arm.S as it currently is somewhat broken (results in artefacts on video decoding). Any patches that are generated against libavcodec directory should be submitted to ffmpeg. It is also important to have a good video output driver as YUV->RGB conversion takes a lot of resources. If your target platform has any kind of hardware YUV support, it will help video decoding significantly. Let me know if you also need a fast code for rotation/scaling on ARM (HW scaling/rotation is of course better if it is supported). Regarding audio decoders, you need to avoid any of them using floating point math, the most obvious example is mp3lib which is used as a default mp3 decoder in mplayer. A good choice of fixed point audio decoders is libmad for mp3 (ffmp3 also works, but is slower than libmad) and tremor for vorbis. Also somebody submitted a patch for fixed point wma decoder some time ago, you can look in the mailing list archives. Good luck in mplayer hacking :)
Am Wed, 8 Oct 2008 10:46:02 +0300 schrieb "Siarhei Siamashka" <siarhei.siamashka@gmail.com>:
Regarding audio decoders, you need to avoid any of them using floating point math, the most obvious example is mp3lib which is used as a default mp3 decoder in mplayer. A good choice of fixed point audio decoders is libmad for mp3
Just a note on that: libmpg123, the active spawn of what once led to mp3lib, can be compiled to use fixed point math for the actual decoding. In the current development version (http://mpg123.org/snapshot), this also works with the internal resampling (what can save CPU cycles). I don't have a performance comparisong of libmad and libmpg123 on ARM on hand, but there are people who seem to use libmpg123 happily on such devices (i.e. Nintendo DS or Sony PSP, also lately someone with a ColdFire thingy without FPU). Well, I'm just poking a bit on the replace-mp3lib-by-libmpg123 issue. I know it would be best settled by me doing a patch, but perhaps this is an opportunity to offload this work to someone who wants efficient mpeg audio decoding with a decoder that's still maintained on ARM;-) (On the other hand, I still need to include the recent AMD64 SSE code from mp3lib... once that is in libmpg123, we got a full replacement/enhancement). Alrigthy then, Thomas.
participants (6)
-
Andrew Savchenko -
Diego Biurrun -
GNUtoo@no-log.org -
Gregor Riepl -
Siarhei Siamashka -
Thomas Orgis