[FFmpeg-devel] PATCH: av_strtod

Ramiro Polla ramiro.polla
Tue Jun 2 06:09:07 CEST 2009


On Mon, Jun 1, 2009 at 11:59 PM, Pavel Pavlov <pavel at summit-tech.ca> wrote:
>> > Then my lib doesn't pass seek_test.exe.
>> This is also known issue. Look for a thread on this list about huge
> negative numbers, MinGW32, and printf or something. MinGW32 has a printf
> implementation that recently fixed this issue, and it also suits us
> well.
>
> Basically, nodoby wants to "pollute code with ugly workarounds for
> broken platforms/compilers", that's like a regular answer :)

Yes, it should be stamped somewhere prominent so we don't have to
repeat ourselves so often =)

[...]
> Seek_test could instead print string like
> "43243245324543543253245235432/44100" instead of doing float point
> division and printing the result. In case of seek test its task to to

IIRC Michael made a suggestion on that thread that I never followed
since I discovered MinGW had "fixed" the issue on their end. Maybe
you're interested in following up and sending a patch.

[...]
> The MANGLE problem was quite a disaster, as it would require too many
> changes that almost for sure would lead to bugs and endless testing, but
> there is a nice way to fix it. Hopefully, it will be reviewed by ffmpeg
> developers and taken into ffmpeg.
> I redefined MANGLE as
> //#define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
> #define MANGLE(mem) "%["#mem"]"
>
> Which makes final asm look instead of:
> ? ? ? ?"movzbl _ff_h264_lps_range(%0, %%ebx, 2), %%esi\n\t"
> It became
> ? ? ? ?"movzbl %[ff_h264_lps_range](%0, %%ebx, 2), %%esi\n\t"
>
> Then ff_h264_lps_range has to be properly declared to make sure that
> compiler understands that this variable isn't externally imported.
>
> And all I had to do is to to modify list of asm inputs everywhere where
> I had undefined variables. Moreover, named asm inputs are obviously a
> good idea especially with ffmpeg's inline asm where there are multiple
> defines that reference asm args by %0 %1 etc. which makes this code
> understandable only by the original author. Named args are less error

gcc 2.95 and some early 3.x, which are supported compilers, don't
support named args.

[...]

Ramiro Polla



More information about the ffmpeg-devel mailing list