[FFmpeg-devel] [PATCH 1/3] lavu: Add AVSphericalMapping type and frame side data
James Almer
jamrial at gmail.com
Sat Nov 12 16:41:51 EET 2016
On 11/11/2016 10:39 PM, Michael Niedermayer wrote:
> On Fri, Nov 11, 2016 at 05:49:00PM -0500, Vittorio Giovara wrote:
> [...]
>> +/**
>> + * This structure describes how to handle spherical videos, outlining
>> + * information about projection, initial layout, and any other view modifier.
>> + *
>> + * @note The struct must be allocated with av_spherical_alloc() and
>> + * its size is not a part of the public ABI.
>> + */
>> +typedef struct AVSphericalMapping {
>> + /**
>> + * Projection type.
>> + */
>> + enum AVSphericalProjection projection;
>> +
>> + /**
>> + * @name Initial orientation
>> + * @{
>> + * These fields represent the pose values that measure the rotation
>> + * transformation (in degrees) to be applied to the projection.
>> + * See this equirectangular projection as example:
>> + *
>> + * @code{.unparsed}
>> + * Yaw
>> + * -180 0 180
>> + * 90 +-------------+-------------+ 180
>> + * | | |
>> + * P | | o> |
>> + * i | ^ |
>> + * t 0 +-------------X-------------+ 0 Roll
>> + * c | | |
>> + * h | | |
>> + * | | |
>> + * -90 +-------------+-------------+ -180
>> + *
>> + * X - the default camera center
>> + * ^ - the default up vector
>> + * > - the up vector for a rotation of 90 degrees
>> + * o - the image center for yaw = 90, pitch = 45, roll = 0
>> + * @endcode
>> + *
>> + * The order of transformation is always yaw, followed by pitch, and
>> + * finally by roll.
>> + */
>
>> + 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
>
CCing Vittorio so he can see this.
More information about the ffmpeg-devel
mailing list