31 *size =
sizeof(*spherical);
38 size_t *left,
size_t *top,
39 size_t *right,
size_t *bottom)
42 uint64_t orig_width = (uint64_t) width * UINT32_MAX /
44 uint64_t orig_height = (uint64_t) height * UINT32_MAX /
48 *left = (orig_width * map->
bound_left + UINT32_MAX - 1) / UINT32_MAX;
49 *top = (orig_height * map->
bound_top + UINT32_MAX - 1) / UINT32_MAX;
50 *right = orig_width - width - *left;
51 *bottom = orig_height - height - *top;
AVSphericalMapping * av_spherical_alloc(size_t *size)
Allocate a AVSphericalVideo structure and initialize its fields to default values.
Memory handling functions.
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection...
Video represents a sphere mapped on a flat surface using equirectangular projection.
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.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
uint32_t bound_bottom
Distance from the bottom edge.
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
uint32_t bound_right
Distance from the right edge.
int av_spherical_from_name(const char *name)
Get the AVSphericalProjection form a human-readable name.
#define FF_ARRAY_ELEMS(a)
AVSphericalProjection
Projection of the video surface(s) on a sphere.
const VDPAUPixFmtMap * map
This structure describes how to handle spherical videos, outlining information about projection...
uint32_t bound_top
Distance from the top edge.
static const char * spherical_projection_names[]
uint32_t bound_left
Distance from the left edge.
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.