FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
vf_stereo3d.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  StereoComponent
 
struct  Stereo3DContext
 

Macros

#define OFFSET(x)   offsetof(Stereo3DContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Enumerations

enum  StereoCode {
  ANAGLYPH_RC_GRAY, ANAGLYPH_RC_HALF, ANAGLYPH_RC_COLOR, ANAGLYPH_RC_DUBOIS,
  ANAGLYPH_GM_GRAY, ANAGLYPH_GM_HALF, ANAGLYPH_GM_COLOR, ANAGLYPH_GM_DUBOIS,
  ANAGLYPH_YB_GRAY, ANAGLYPH_YB_HALF, ANAGLYPH_YB_COLOR, ANAGLYPH_YB_DUBOIS,
  ANAGLYPH_RB_GRAY, ANAGLYPH_RG_GRAY, MONO_L, MONO_R,
  INTERLEAVE_ROWS_LR, INTERLEAVE_ROWS_RL, SIDE_BY_SIDE_LR, SIDE_BY_SIDE_RL,
  SIDE_BY_SIDE_2_LR, SIDE_BY_SIDE_2_RL, ABOVE_BELOW_LR, ABOVE_BELOW_RL,
  ABOVE_BELOW_2_LR, ABOVE_BELOW_2_RL, ALTERNATING_LR, ALTERNATING_RL,
  STEREO_CODE_COUNT
}
 

Functions

 AVFILTER_DEFINE_CLASS (stereo3d)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static uint8_t ana_convert (const int *coeff, uint8_t *left, uint8_t *right)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpicref)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const int ana_coeff [][3][6]
 
static const AVOption stereo3d_options []
 
static enum AVPixelFormat anaglyph_pix_fmts [] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE }
 
static enum AVPixelFormat other_pix_fmts []
 
static const AVFilterPad stereo3d_inputs []
 
static const AVFilterPad stereo3d_outputs []
 
AVFilter avfilter_vf_stereo3d
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(Stereo3DContext, x)

Definition at line 144 of file vf_stereo3d.c.

Definition at line 145 of file vf_stereo3d.c.

Enumeration Type Documentation

enum StereoCode
Enumerator:
ANAGLYPH_RC_GRAY 
ANAGLYPH_RC_HALF 
ANAGLYPH_RC_COLOR 
ANAGLYPH_RC_DUBOIS 
ANAGLYPH_GM_GRAY 
ANAGLYPH_GM_HALF 
ANAGLYPH_GM_COLOR 
ANAGLYPH_GM_DUBOIS 
ANAGLYPH_YB_GRAY 
ANAGLYPH_YB_HALF 
ANAGLYPH_YB_COLOR 
ANAGLYPH_YB_DUBOIS 
ANAGLYPH_RB_GRAY 
ANAGLYPH_RG_GRAY 
MONO_L 
MONO_R 
INTERLEAVE_ROWS_LR 
INTERLEAVE_ROWS_RL 
SIDE_BY_SIDE_LR 
SIDE_BY_SIDE_RL 
SIDE_BY_SIDE_2_LR 
SIDE_BY_SIDE_2_RL 
ABOVE_BELOW_LR 
ABOVE_BELOW_RL 
ABOVE_BELOW_2_LR 
ABOVE_BELOW_2_RL 
ALTERNATING_LR 
ALTERNATING_RL 
STEREO_CODE_COUNT 

Definition at line 32 of file vf_stereo3d.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( stereo3d  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 223 of file vf_stereo3d.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 254 of file vf_stereo3d.c.

static uint8_t ana_convert ( const int *  coeff,
uint8_t left,
uint8_t right 
)
inlinestatic

Definition at line 433 of file vf_stereo3d.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame inpicref 
)
static

Definition at line 444 of file vf_stereo3d.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 589 of file vf_stereo3d.c.

Variable Documentation

const int ana_coeff[][3][6]
static

Definition at line 72 of file vf_stereo3d.c.

Referenced by config_output().

const AVOption stereo3d_options[]
static

Definition at line 147 of file vf_stereo3d.c.

enum AVPixelFormat anaglyph_pix_fmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE }
static

Definition at line 193 of file vf_stereo3d.c.

Referenced by query_formats().

enum AVPixelFormat other_pix_fmts[]
static
const AVFilterPad stereo3d_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 596 of file vf_stereo3d.c.

const AVFilterPad stereo3d_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}

Definition at line 605 of file vf_stereo3d.c.

AVFilter avfilter_vf_stereo3d
Initial value:
= {
.name = "stereo3d",
.description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."),
.priv_size = sizeof(Stereo3DContext),
.priv_class = &stereo3d_class,
}

Definition at line 614 of file vf_stereo3d.c.