[FFmpeg-devel] swscale : add bitexact conv for grayf32 and gray16 to f32 conv

Martin Vignali martin.vignali at gmail.com
Thu Aug 23 21:13:13 EEST 2018


Hello,

Patch in attach add some bitexact conversion for grayf32
and unscaled conv for gray16 to grayf32.

Pass fate test for me (x86_64, macos 10.12)

001 : Add bit exact conv for float to uint16
002 : Add bit exact conv for float to uint8
003 : Add bit exact lut generation for 8b to float (alloc/free the lut).
004 : Add bit exact and non bitexact lut generation for 16b to float and
add unscale conv from uint16 to grayF32.
In bit exact mode, the last part of the lut (32768 to 65535), have on some
value an offset of 1 in the mantissa part (comparing to float conv). In
practice, doesn't have a visual impact on the result.

I will add later patch to add swap managment in the unscale part for float
input/output

I still have a problem with output func :
yuv2plane1_float_c_template/yuv2planeX_float_c_template,
where i would like to use the uint2float lut, store inside SwsContext, but
doesn't find a way to pass it to the processing func.


Will take a look later, for SIMD for the float to uint conv (in order to
decide if we keep float and bitexact version of the conv).
For lut generation, i'm not sure, trying to add SIMD is need
(probably not a lot of impact on global speed)


Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-swscale-input-add-bit_exact-for-float-to-uint16-conv.patch
Type: application/octet-stream
Size: 4451 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180823/e9a0126f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-swscale-add-bit_exact-lut-creation-for-8bit-to-float.patch
Type: application/octet-stream
Size: 4042 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180823/e9a0126f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-swscale-swscale_unscaled-add-conversion-from-float-Y.patch
Type: application/octet-stream
Size: 6634 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180823/e9a0126f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-swscale-unscale-add-bitexact-conversion-for-float-to.patch
Type: application/octet-stream
Size: 2705 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180823/e9a0126f/attachment-0003.obj>


More information about the ffmpeg-devel mailing list