[FFmpeg-devel] FFMpeg on SH4 (STi7109)

Måns Rullgård mans
Tue Nov 18 15:25:31 CET 2008

Jean-Michel Hautbois wrote:
> 2008/11/18 M?ns Rullg?rd <mans at mansr.com>
>> Jean-Michel Hautbois wrote:
>> > Hi everybody !
>> >
>> > I am currently trying to compile ffmpeg for the sh4 platform. I have a
>> > STi7109 based board, and I am currently doing:
>> May the gods have mercy on you.
> Doesn't sound promising :s

I've had some less than ideal experiences with that chip.  Hopefully you'll
have better luck.

>> > ./configure --enable-cross-compile --cross-prefix=sh4-linux- --arch=sh4
>> > --extra-cflags=-fno-strict-aliasing
>> >
>> > I have read the discussions here:
>> > *http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2006-March/002478.html
>> > *here:*
>> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-December/039133.html
>> > *and here:*
>> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-January/040685.html
>> >
>> > *I am currently facing the following errors:
>> > libavcodec/sh4/qpel.c: At top level:
>> > libavcodec/sh4/qpel.c:1080: error: static declaration of
>> > 'ff_put_qpel8_mc11_old_c' follows non-static declaration
>> > ./libavcodec/dsputil.h:143: error: previous declaration of
>> That file looks like a duplicate of parts of dsputil.c.  Something is
>> definitely fishy here.
> I am OK with you, but what may I do ?

You could try removing that file from the build entirely, and remove any
references to its symbols.  These should be limited to setting function
pointers in DSPContext, so removing those lines will merely result in
the default functions being used instead.

>> > And I have a lot of these.
>> > Is there something I have to specify in the configure command in order to
>> > obtain a working executable ?
>> It looks like the SH4 support is broken.  Someone should fix it...
> What do you mean ? Support from who ? Nobody is currently developping for
> sh4, that's it ?

I mean FFmpeg support.  Evidently, nobody has done an SH4 build for some
time.  Some help fixing it would certainly be appreciated.

>> > After this first step, I would like to use the ST231 cores. Do I have to
>> > use the STAPI ? Or is there any other way to do this ?
>> Do you have full documentation for the chip?  The datasheets I have
>> provide very little information about how to access these cores.  I
>> suppose you could reverse engineer the ST driver.*
> No I don't. I think I have the same sheets, and it doesn't help a lot.
> Reverse engineering is just impossible ! :)

Then you're probably stuck with the ST drivers.  Not much fun, I know.

> But if I could compile, and run ffmpeg on the board, that would be a very
> encouraging first step ;).

I suggest you disable SH4 optimisations until you get a working build.
Once we have a working base, we can start fixing the optimised code.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list