32 *
size =
sizeof(*spherical);
39 size_t *left,
size_t *top,
40 size_t *right,
size_t *bottom)
43 uint64_t orig_width = (uint64_t)
width * UINT32_MAX /
44 (UINT32_MAX -
map->bound_right -
map->bound_left);
45 uint64_t orig_height = (uint64_t)
height * UINT32_MAX /
46 (UINT32_MAX -
map->bound_bottom -
map->bound_top);
49 *left = (orig_width *
map->bound_left + UINT32_MAX - 1) / UINT32_MAX;
50 *top = (orig_height *
map->bound_top + UINT32_MAX - 1) / UINT32_MAX;
51 *right = orig_width -
width - *left;
52 *bottom = orig_height -
height - *top;
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
int av_spherical_from_name(const char *name)
Get the AVSphericalProjection form a human-readable name.
AVSphericalProjection
Projection of the video surface(s) on a sphere.
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.
void av_spherical_tile_bounds(const AVSphericalMapping *map, size_t width, size_t height, size_t *left, size_t *top, size_t *right, size_t *bottom)
Convert the bounding fields from an AVSphericalVideo from 0.32 fixed point to pixels.
AVSphericalMapping * av_spherical_alloc(size_t *size)
Allocate a AVSphericalVideo structure and initialize its fields to default values.
@ AV_SPHERICAL_EQUIRECTANGULAR
Video represents a sphere mapped on a flat surface using equirectangular projection.
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
@ AV_SPHERICAL_CUBEMAP
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
const VDPAUPixFmtMap * map
Memory handling functions.
#define FF_ARRAY_ELEMS(a)
static const char *const spherical_projection_names[]
This structure describes how to handle spherical videos, outlining information about projection,...