30 printf(
"Testing av_spherical_alloc()\n");
33 printf(
"alloc: OK, size>0=%s, default projection=%d\n",
34 size > 0 ?
"yes" :
"no",
map->projection);
42 printf(
"alloc (no size): %s\n",
map ?
"OK" :
"FAIL");
46 printf(
"\nTesting av_spherical_projection_name()\n");
52 printf(
"\nTesting av_spherical_from_name()\n");
60 printf(
"\nTesting projection name round-trip\n");
64 printf(
"roundtrip %d (%s): %s\n",
i,
name, rt ==
i ?
"OK" :
"FAIL");
68 printf(
"\nTesting av_spherical_tile_bounds()\n");
71 size_t left, top, right, bottom;
80 map->bound_bottom = 0;
82 printf(
"full frame: left=%zu top=%zu right=%zu bottom=%zu\n",
83 left, top, right, bottom);
88 map->bound_right = UINT32_MAX / 2;
89 map->bound_bottom = UINT32_MAX / 2;
91 printf(
"quarter top-left: left=%zu top=%zu right=%zu bottom=%zu\n",
92 left, top, right, bottom);
95 map->bound_left = UINT32_MAX / 4;
96 map->bound_top = UINT32_MAX / 4;
97 map->bound_right = UINT32_MAX / 4;
98 map->bound_bottom = UINT32_MAX / 4;
100 printf(
"centered: left=%zu top=%zu right=%zu bottom=%zu\n",
101 left, top, right, bottom);
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
AVSphericalMapping * av_spherical_alloc(size_t *size)
Allocate a AVSphericalVideo structure and initialize its fields to default values.
int av_spherical_from_name(const char *name)
Get the AVSphericalProjection form a human-readable name.
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.
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
@ AV_SPHERICAL_PARAMETRIC_IMMERSIVE
Parametric Immersive projection (Apple).
const VDPAUPixFmtMap * map
Memory handling functions.
This structure describes how to handle spherical videos, outlining information about projection,...