Libav
Functions | Variables
stereo3d.c File Reference
#include <stdint.h>
#include <string.h>
#include "common.h"
#include "mem.h"
#include "stereo3d.h"

Go to the source code of this file.

Functions

AVStereo3Dav_stereo3d_alloc (void)
 Allocate an AVStereo3D structure and set its fields to default values. More...
 
AVStereo3Dav_stereo3d_create_side_data (AVFrame *frame)
 Allocate a complete AVFrameSideData and add it to the frame. More...
 
const char * av_stereo3d_type_name (unsigned int type)
 Provide a human-readable name of a given stereo3d type. More...
 
int av_stereo3d_from_name (const char *name)
 Get the AVStereo3DType form a human-readable name. More...
 

Variables

static const char * stereo3d_type_names []
 

Function Documentation

◆ av_stereo3d_alloc()

AVStereo3D* av_stereo3d_alloc ( void  )

Allocate an AVStereo3D structure and set its fields to default values.

The resulting struct can be freed using av_freep().

Returns
An AVStereo3D filled with default values or NULL on failure.

Definition at line 28 of file stereo3d.c.

Referenced by ff_mkv_stereo3d_conv().

◆ av_stereo3d_create_side_data()

AVStereo3D* av_stereo3d_create_side_data ( AVFrame frame)

Allocate a complete AVFrameSideData and add it to the frame.

Parameters
frameThe frame which side data is added to.
Returns
The AVStereo3D structure to be filled by caller.

Definition at line 33 of file stereo3d.c.

Referenced by decode_frame(), h264_export_frame_props(), mpeg_field_start(), request_frame(), and set_side_data().

◆ av_stereo3d_type_name()

const char* av_stereo3d_type_name ( unsigned int  type)

Provide a human-readable name of a given stereo3d type.

Parameters
typeThe input stereo3d type value.
Returns
The name of the stereo3d value, or "unknown".

Definition at line 57 of file stereo3d.c.

Referenced by dump_stereo3d(), and show_stream().

◆ av_stereo3d_from_name()

int av_stereo3d_from_name ( const char *  name)

Get the AVStereo3DType form a human-readable name.

Parameters
typeThe input string.
Returns
The AVStereo3DType value, or -1 if not found.

Definition at line 65 of file stereo3d.c.

Variable Documentation

◆ stereo3d_type_names

const char* stereo3d_type_names[]
static
Initial value:
= {
[AV_STEREO3D_2D] = "2D",
[AV_STEREO3D_SIDEBYSIDE] = "side by side",
[AV_STEREO3D_TOPBOTTOM] = "top and bottom",
[AV_STEREO3D_FRAMESEQUENCE] = "frame alternate",
[AV_STEREO3D_CHECKERBOARD] = "checkerboard",
[AV_STEREO3D_SIDEBYSIDE_QUINCUNX] = "side by side (quincunx subsampling)",
[AV_STEREO3D_LINES] = "interleaved lines",
[AV_STEREO3D_COLUMNS] = "interleaved columns",
}
Views are packed per line, as if interlaced.
Definition: stereo3d.h:97
Views are alternated temporally.
Definition: stereo3d.h:66
Views are next to each other, but when upscaling apply a checkerboard pattern.
Definition: stereo3d.h:87
Video is not stereoscopic (and metadata has to be there).
Definition: stereo3d.h:35
Views are on top of each other.
Definition: stereo3d.h:55
Views are next to each other.
Definition: stereo3d.h:45
Views are packed in a checkerboard-like structure per pixel.
Definition: stereo3d.h:76
Views are packed per column.
Definition: stereo3d.h:107

Definition at line 46 of file stereo3d.c.

Referenced by av_stereo3d_from_name(), and av_stereo3d_type_name().