PDA

View Full Version : Logarithm problems


sempronio
11th May 2005, 17:18
I have some problem modifying xvidcore src. I noticed that simple logarithms and shift operations doesn't work fine after some asm function, such as bgr_to_yv12_mmx. In this particular case, those math functions return totally wrong values.

Anybody knows why?

Thx

Leak
11th May 2005, 18:20
Originally posted by sempronio
I have some problem modifying xvidcore src. I noticed that simple logarithms and shift operations doesn't work fine after some asm function, such as bgr_to_yv12_mmx. In this particular case, those math functions return totally wrong values.

<educated guess>
Missing emms instruction after it's done using the mmx registers? (MMX and FPU don't mix well without emms...)
</educated guess>

np: Autechre - Part 1 (XLTronic Radio 25.01.05)

Koepi
12th May 2005, 07:50
Originally posted by Leak
<educated guess>
Missing emms instruction after it's done using the mmx registers? (MMX and FPU don't mix well without emms...)
</educated guess>


That'd result in an (caught / not caught) exception, not in wrong results.

Maybe treating unsigned 64bit ints as 32bit ints could give you wrong results - and the other way around, also 16bit ints as 32 bits ints would give weird results.

Cheers
Koepi