[FFmpeg-devel] [PATCH 1/3] lavu: Add AVSphericalMapping type and frame side data

Michael Niedermayer michael at niedermayer.cc
Sun Nov 13 01:11:31 EET 2016


Hi

On Sat, Nov 12, 2016 at 12:30:52PM -0500, Vittorio Giovara wrote:
> On Sat, Nov 12, 2016 at 9:41 AM, James Almer <jamrial at gmail.com> wrote:
> > On 11/11/2016 10:39 PM, Michael Niedermayer wrote:
> >> On Fri, Nov 11, 2016 at 05:49:00PM -0500, Vittorio Giovara wrote:
[...]
> >>
> >>> +    double yaw;   ///< Clockwise rotation around the up vector [-180, 180].
> >>> +    double pitch; ///< Counter-clockwise rotation around the right vector [-90, 90].
> >>> +    double roll;  ///< Counter-clockwise rotation around the forward vector [-180, 180].
> >>
> >> please use intXY (64 or 32 as preferred) so there are no platform
> >> rounding dependancies
> 
> These are rotation angles which are inherently floating point, and

Theres nothing inherently floating point on an angle.


> consistent with what other rotation-related APIs export (eg.
> av_display_matrix_rotation_get()).

> Besides using intXX would lose
> precision that the original specification offers.

int64_t has about a thousand times higher precission than a double
for storing general -180°..+180° angles. This is because doubles have
11 bits for a exponent which is exactly the same value for most of the
angles

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

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161113/19f3f265/attachment.sig>


More information about the ffmpeg-devel mailing list