[FFmpeg-devel] [PATCH] Fast half-float to float conversion

Reimar Döffinger Reimar.Doeffinger
Tue Jun 30 17:07:59 CEST 2009

On Tue, Jun 30, 2009 at 07:55:04AM -0700, Frank Barchard wrote:
> On Tue, Jun 30, 2009 at 7:08 AM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de>wrote:
> > Personally I don't think there is any need for such optimization for the
> > first implementation of such a rare format as OpenEXR, it can still be
> > added after the rest has passed review (though Michael sometimes has a
> > different opinion on these kinds of things), and hopefully in a way that
> > can
> > be properly optimized with assembly (whether ARM NEON or SSE2 or
> > whatever).
> I agree.    A small/simple version that can be done in hardware would be
> good for now.
> Graphic chips are starting to support half float.  So at some point we'll
> just want to pass the images along to be rendered as is.

It seems more like the opposite way to me: they supported half float since a
long time, but use it less and less nowadays and may eventually remove support
for it.

> Conversion could be done in swscaler.

That may well be nicer, but also more effort.

> Also a test that converts from half float to float and back again losslessly
> would be good.

Well, that depends a bit on what kind of data we are talking about. To be honest,
for image data supporting NaN and INF seems rather pointless to me (actually when
it comes to contrast/brightness adjustments I'd think most users would prefer it
if it wasn't supported). Also FFmpeg in general is compiled to not distinguish
between +0.0 and -0.0.

More information about the ffmpeg-devel mailing list