[FFmpeg-devel] [PATCH v2 2/5] avutil/stereo3d: Fill out stereo info provided by Vision Pro files

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Jun 17 22:02:26 EEST 2024


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


More information about the ffmpeg-devel mailing list