[FFmpeg-devel] [PATCH v2 7/7] swscale/input: add rgbaf16 input support

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Aug 15 07:15:01 EEST 2022


Leo Izen:
> On 8/14/22 12:48, Timo Rothenpieler wrote:
>> This is by no means perfect, since at least ddagrab will return scRGB
>> data with values outside of 0.0f to 1.0f for HDR values.
>> Its primary purpose is to be able to work with the format at all.
>> ---
>>   libavutil/Makefile            |   1 +
>>   libswscale/half2float.c       |  19 +++++
>>   libswscale/input.c            | 130 ++++++++++++++++++++++++++++++++++
>>   libswscale/slice.c            |   9 ++-
>>   libswscale/swscale_internal.h |  10 +++
>>   libswscale/utils.c            |   2 +
>>   libswscale/version.h          |   2 +-
>>   7 files changed, 171 insertions(+), 2 deletions(-)
>>   create mode 100644 libswscale/half2float.c
>>
>> diff --git a/libavutil/Makefile b/libavutil/Makefile
>> index 3d9c07aea8..1aac1a4cc0 100644
>> --- a/libavutil/Makefile
>> +++ b/libavutil/Makefile
>> @@ -131,6 +131,7 @@ OBJS =
>> adler32.o                                                        \
>>         
>> float_dsp.o                                                      \
>>         
>> fixed_dsp.o                                                      \
>>         
>> frame.o                                                          \
>> +      
>> half2float.o                                                     \
>>         
>> hash.o                                                           \
>>         
>> hdr_dynamic_metadata.o                                           \
>>         
>> hdr_dynamic_vivid_metadata.o                                     \
> 
> This .o Makefile addition appears in patch 7/7, but the actual creation
> of the .c file is in patch 4/7. Is this intentional? Because if it is, I
> am a bit confused.
> 

If I am not mistaken, libavutil itself does not make use of these; so it
should not be added to the libavutil Makefile at all; instead it should
be added to the libswscale one, because it is libswscale that (with this
patch) makes use of it.
Because of this, this patchset should lead to linking errors when
creating shared libs.

- Andreas


More information about the ffmpeg-devel mailing list