[FFmpeg-devel] Once again: Multithreaded H.264 decoding with ffmpeg?

Michael Niedermayer michaelni
Sat May 31 14:27:02 CEST 2008

On Sat, May 31, 2008 at 05:58:00AM -0600, Loren Merritt wrote:
> On Fri, 30 May 2008, Michel Lespinasse wrote:
> > On Fri, May 30, 2008 at 02:26:21PM -0600, Jason Garrett-Glaser wrote:
> >> Main benefit of yasm:
> >>
> >> * vastly more powerful macro system that makes it far easier to
> >> generalize a small function to dozens of specific cases
> >>
> >> This allows us to do the following:
> >>
> >> * abstraction between MMX and SSE code; write a single function that does both
> >> * automatic handling of macros that permute their arguments; see
> >> x264's DCT functions
> >> * automatic handling of 32-bit vs 64-bit abstraction
> >
> > I think the above can also be achived using mmx.h and the C preprocessor.
> > At least that's what I used in libmpeg2's IDCT code.
> Which point are you responding to?
> Abstraction between MMX and SSE can be done in gcc, but it's more complex. 
> There are several things that need to be defined (reg prefix, reg size, 
> movdqu, movdqa, movq) and gcc doesn't support defines inside macros and 
> gcc warns about redefines, so that's a bunch of lines every time you 
> switch. Plus extra ugly quotes all over since defines only apply in C 
> context, not in asm strings. Or instead of global defines, you can add all 
> of those parameters to every macro, which is fewer LOC but hardly cleaner.

I dont know if it would help but i think code like

"#define MOVQ movq      \n\t"

"MOVQ ....                  "

should work if you make the asm from gcc run through cpp before gas

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080531/49d2c391/attachment.pgp>

More information about the ffmpeg-devel mailing list