[FFmpeg-devel] Doubts regarding SoftFloat

Umair Khan omerjerk at gmail.com
Thu Jun 2 06:24:29 CEST 2016


Hi,

On Thu, Jun 2, 2016 at 4:02 AM, Moritz Barsnick <barsnick at gmx.net> wrote:
> To expand on Michael's comments:
>
> On Tue, May 31, 2016 at 21:02:01 +0530, Umair Khan wrote:
>> I replaced floats in my code with SoftFloat and the results weren't as expected.
>
> Why did you implement your own multiply()? It makes incorrect
> assumptions about how SoftFloat works, as far as I can tell by a quick
> glance.

Okay. I was going to use the already present multiply function only.
But I just left it because, the multiply function is not being used in
the file I'm trying to get decoded first.

>> 3. After making the changes, the exp part was always one less than
>> what it should have been (I couldn't figure out why) and the mantissa
>> was totally different altogether. This is the commit which converts
>
> You should be using SoftFloat via its API an not touching its
> internals. (As Michael explained, and what it quite obvious from its
> code, is that its exponent has a representation with an offset of 1. Or
> something like that.)

By internals, do you mean accessing the mant and exp part ?
I'm just getting their values and printing them. I'm not altering them
explicitly.
I'll look into it a bit more now.

Umair


More information about the ffmpeg-devel mailing list