On 6/17/2024 7:09 PM, James Almer wrote:
> No, it's av_d2q(), av_q2d(), and av_rescale() as needed. Same as we do 
> for Mastering Display and Ambient Viewing Environment Metadata.
> The reason to use AVRational is that in this specific spec the values 
> have a denominator of 10000, but in others it doesn't need to, allowing 
> for more precise values (Matroska would store it as a double, in fact).

This is unfortunate. Possibly we should add some util func for this case,
as it's a case I know I've personally hit more than once (with bugs caused
by lossy roundtrip) in my own code - I ended up manually using num/den in
the end.

> So we shouldn't define our API for one specific implementation but 
> rather in a generic way that should accommodate to any potential 
> implementation. I think we already did the former with a Google 
> implementation (x.y fixed point values), and i want to avoid doing it again.

Will send a v3 set using AVRational, then.

- Derek
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to