[FFmpeg-devel] [PATCH] HAVE_AMD3DNOW

Pavel Pavlov pavel
Wed Jun 10 03:03:48 CEST 2009


> -----Original Message-----
> On Tue, Jun 09, 2009 at 04:05:14PM -0400, Pavel Pavlov wrote:
> > > > 
> > > > Well, did you try to use some diff viewer that could
> > > colorize my patch
> > > > so it doesn't look ugly? ;)
> > > 
> > > your patch is ugly no matter which color
> > > 
> > 
> > Did you try pink??
> 
> not explicitly, but as the patch is ugly due to its content 
> and not the color, no matter which color it stays ugly


Do you use monochrome display?? With pink coloring my patch is perfect.
I refuse to hear that you don't like it.


> > Well, I call it exactly as it's called. Icl Intel compiler doesn't 
> > come as a standalone toolset without any dependencies. It needs ms 
> > compiler on windows and gcc toolset on linux.
> > As far as I know it doesn't have it's onwn c/c++ std lib, 
> it's only a 
> > tool that converts c/c++ code to object files and then it uses host 
> > compiler libs and tools to create final executables. On 
> linux it uses 
> > gnu assembler to handle inline asm and that's why it works as is on 
> > linux. On win32 masm asm is used, so they wrote builtin 
> assembler to 
> > handle att asm. And that's why it's so contastrained: no lables, no 
> > direct symbol references, some instructions aren't implemented etc.
> 
> i doubt masm lacks 3dnow support
> 

Seems that win32 icl doesn't use ms assembler. So, no matter what syntax
some or all 3dnow opcodes aren't supported.


> > > anyway, as said fixing --disable-3dnow is welcome if clean (your 
> > > patch is
> > > not)
> > > and making ffmpeg compileable on intels c compiler for 
> windows first 
> > > needs an explanation of which instructions why do not 
> compile. Once 
> > > we are past that we can discuss which solution (like 
> disabling all 
> > > asm) is appropriate
> > >
> > 
> > Disabling all asm is not appropriate solution.
> 
> neither is disabling all 3dnow


To be able to debug ffmpeg with ms ide that's more than appropriate. My
goal is to get as close as possible to general release build. I don't
know that well ffmpeg codebase, but as far as I understood it by
inspectig the code, 3dnow versions of functions will almost never be
used on cpu's that are newer than p3. Almost in all cases there are
other mmx2 or sse optimized functions. So essentially, most of the 3dnow
code is dead weight anyways.


> 
> > See my previous thread: [BUG] : reading memory past the end of the 
> > buffer At some point we started to get crashes (on some 
> pc's/cameras 
> > only) with code that worked for years and I decided to 
> compile ffmpeg 
> > in my spare time with icl to be able to debug the problem. It's not 
> > importat why and what was crashing, the point is that it 
> would never 
> > crash if asm optimisations were disabled.
> 
> > So, it would be nice to have a complete ffmpeg built with all 
> > optimizations enabled.
> 
> but thats not what your patch does ...
> 

Well, you may find one million of other reason like that one. Off course
than patch doesn't do even 1/10 to get it compiled with icl, however,
without it ffmpeg won't compile with icl. I'm trying to clean my changes
and step by step send it in, so they could be reviewed and accepted.
Even if one day I get tired to beg for it to included and unsibscribe
from the list to never come back here, everything I sent in will help
others who have similar goal.


Unsupported instructions:
c:/ffmpeg/libavcodec/x86/cavsdsp_mmx.c(437) (col. 1): error: unknown
opcode "pavgusb" -- __asm
c:/ffmpeg/libavcodec/x86/dsputil_mmx.c(2717) (col. 9): error: unknown
opcode "pf2id" -- __asm
c:/ffmpeg/libavcodec/x86/dsputil_mmx.c(2717) (col. 9): error: unknown
opcode "femms" -- __asm
c:/ffmpeg/libavcodec/x86/fft_3dn2.c(152) (col. 5): error: unknown opcode
"pfmul" -- __asm
c:/ffmpeg/libavcodec/x86/fft_3dn2.c(152) (col. 5): error: unknown opcode
"pfadd" -- __asm
c:/ffmpeg/libavcodec/x86/fft_3dn2.c(152) (col. 5): error: unknown opcode
"pfsub" -- __asm
c:/ffmpeg/libavcodec/x86/fft_3dn2.c(152) (col. 5): error: unknown opcode
"pswapd" -- __asm
c:/ffmpeg/libavcodec/x86/fft_3dn2.c(152) (col. 5): error: unknown opcode
"pfpnacc" -- __asm
c:/ffmpeg/libavcodec/h264.c(5459) (col. 32): error: unknown opcode
"cltd" -- __asm

There are a few places that it rejects add (can't determin operand size
error: specify suffix, or something like that). Also, note that cltd has
nothing to do with 3dnow, it's real name is cdq.




More information about the ffmpeg-devel mailing list