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

Michael Niedermayer michael at niedermayer.cc
Wed Dec 11 02:35:25 EET 2024


Hi

On Fri, Dec 06, 2024 at 03:32:01PM +0100, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
> 
> Only add the condensed values that we actually care about. Group them into
> a new struct to make it easier to discard or replace this metadata.
> 
> Define a special comparison function that does not choke on undefined/unknown
> metadata.

[...]

> diff --git a/libswscale/utils.h b/libswscale/utils.h
> index 4d204ef6cc..1263e3f8ed 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 0/0 == 0/0 */
> +static inline int ff_q_equal(const AVRational a, const AVRational b)
> +{
> +    return (a.den || b.den) ? !av_cmp_q(a, b) : a.den == b.den;
> +}

in which case is a.den == b.den untrue ?


[...]

thx


--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- 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/20241211/6f9a62e4/attachment.sig>


More information about the ffmpeg-devel mailing list