[FFmpeg-devel] [PATCH v2 02/17] swscale/utils: add HDR metadata to SwsFormat

Michael Niedermayer michael at niedermayer.cc
Thu Dec 19 06:07:16 EET 2024


Hi


On Mon, Dec 16, 2024 at 12:17:23PM +0100, Niklas Haas wrote:
[...]
> diff --git a/libswscale/utils.h b/libswscale/utils.h
> index 4d204ef6cc..52b1e67644 100644
> --- a/libswscale/utils.h
> +++ b/libswscale/utils.h
> @@ -21,26 +21,55 @@
>  #ifndef SWSCALE_UTILS_H
>  #define SWSCALE_UTILS_H
>  
> +#include "libavutil/csp.h"
>  #include "libavutil/pixdesc.h"
>  
>  #include "swscale.h"
>  
> +/* Like av_cmp_q but considers x/0 == y/0 */
> +static inline int ff_q_equal(const AVRational a, const AVRational b)
> +{
> +    return (!a.den && !b.den) || !av_cmp_q(a, b);
> +}

if thats true for all cases then ok

feels a little odd to me that -inf == NaN == +inf

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241219/354253f9/attachment.sig>


More information about the ffmpeg-devel mailing list