World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Spherical video mapping
+ Граф связей класса Spherical video mapping:

Классы

struct  AVSphericalMapping
 

Определения типов

typedef struct AVSphericalMapping AVSphericalMapping
 

Перечисления

enum  AVSphericalProjection { AV_SPHERICAL_EQUIRECTANGULAR, AV_SPHERICAL_CUBEMAP, AV_SPHERICAL_EQUIRECTANGULAR_TILE }
 

Функции

AVSphericalMappingav_spherical_alloc (size_t *size)
 
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)
 
const char * av_spherical_projection_name (enum AVSphericalProjection projection)
 
int av_spherical_from_name (const char *name)
 

Подробное описание

A spherical video file contains surfaces that need to be mapped onto a sphere. Depending on how the frame was converted, a different distortion transformation or surface recomposition function needs to be applied before the video should be mapped and displayed.

Типы

◆ AVSphericalMapping

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

This structure describes how to handle spherical videos, outlining information about projection, initial layout, and any other view modifier.

Заметки
The struct must be allocated with av_spherical_alloc() and its size is not a part of the public ABI.

Перечисления

◆ AVSphericalProjection

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

Projection of the video surface(s) on a sphere.

Элементы перечислений
AV_SPHERICAL_EQUIRECTANGULAR 

Video represents 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. Faces are oriented upwards for the front, left, right, and back faces. The up face is oriented so the top of the face is forwards and the down face is oriented so the top of the face is to the back.

AV_SPHERICAL_EQUIRECTANGULAR_TILE 

Video represents a portion of a sphere mapped on a flat surface using equirectangular projection. The bounding fields indicate the position of the current video in a larger surface.

См. определение в файле spherical.h строка 51

Функции

◆ av_spherical_alloc()

AVSphericalMapping* av_spherical_alloc ( size_t size)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

Allocate a AVSphericalVideo structure and initialize its fields to default values.

Возвращает
the newly allocated struct or NULL on failure

◆ av_spherical_tile_bounds()

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 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

Convert the bounding fields from an AVSphericalVideo from 0.32 fixed point to pixels.

Аргументы
mapThe AVSphericalVideo map to read bound values from.
widthWidth of the current frame or stream.
heightHeight of the current frame or stream.
leftPixels from the left edge.
topPixels from the top edge.
rightPixels from the right edge.
bottomPixels from the bottom edge.

◆ av_spherical_projection_name()

const char* av_spherical_projection_name ( enum AVSphericalProjection  projection)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

Provide a human-readable name of a given AVSphericalProjection.

Аргументы
projectionThe input AVSphericalProjection.
Возвращает
The name of the AVSphericalProjection, or "unknown".

◆ av_spherical_from_name()

int av_spherical_from_name ( const char *  name)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/spherical.h>

Get the AVSphericalProjection form a human-readable name.

Аргументы
nameThe input string.
Возвращает
The AVSphericalProjection value, or -1 if not found.
AV_SPHERICAL_EQUIRECTANGULAR_TILE
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Definition: spherical.h:72
AV_SPHERICAL_EQUIRECTANGULAR
@ AV_SPHERICAL_EQUIRECTANGULAR
Definition: spherical.h:56
AV_SPHERICAL_CUBEMAP
@ AV_SPHERICAL_CUBEMAP
Definition: spherical.h:65