[FFmpeg-devel] [PATCH v2 2/5] avutil/stereo3d: Fill out stereo info provided by Vision Pro files
James Almer
jamrial at gmail.com
Mon Jun 17 21:09:01 EEST 2024
On 6/17/2024 2:07 PM, Derek Buitenhuis wrote:
> On 6/17/2024 5:53 PM, James Almer wrote:
>> Maybe this should be an AVRational then.
>
> While that is probably 'more correct', it does mean that in 100% places
> this could be used, it'll have to be converted back to the -10000 to 10000
> range. Is there a simple way to do that with an AVRational that doesn't
> involve a round trip to a double or float (i.e. lossy)?
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).
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.
>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list