[FFmpeg-devel] [PATCH v2] avutil/{color_utils, csp}: merge color_utils into csp and expose API

Leo Izen leo.izen at gmail.com
Mon Jan 30 20:22:15 EET 2023


On 1/30/23 12:08, Zhao Zhili wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Leo Izen
>> Sent: 2023年1月31日 0:50
>> To: ffmpeg-devel at ffmpeg.org
>> Cc: Leo Izen <leo.izen at gmail.com>
>> Subject: [FFmpeg-devel] [PATCH v2] avutil/{color_utils, csp}: merge color_utils into csp and expose API
>>
>> libavutil/color_utils contains some avpriv_ symbols that map
>> enum AVTransferCharacteristic values to gamma-curve approximations and
>> to the actual transfer functions to invert them (i.e. -> linear).
>>
>> There's two issues with this:
>> (1) avpriv is evil and should be avoided whenever possible
>> (2) libavutil/csp.h exposes a public API for handling color that
>>      already handles primaries and matricies
>>
>> I don't see any reason this API has to be private, so this commit takes
>> the functionality from avutil/color_utils and merges it into avutil/csp
>> with an exposed av_ API rather than the previous avpriv_ API.
>>
>> Every reference to the previous API has been updated to point to the
>> new one. color_utils.h has been deleted as well. This should not break
>> any applications as it only contained avpriv_ symbols in the first
>> place, so nothing in that header could be referenced by other
>> applications.
> 
> Isn't it break old libavcodec which linked to the new libavutil?
> 

That's why it's in the major version bump thread.

- Leo Izen (thebombzen)




More information about the ffmpeg-devel mailing list