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/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "stereo3d.h"

Go to the source code of this file.

Data Structures

struct  StereoComponent
 
struct  Stereo3DContext
 
struct  ThreadData
 

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,
  CHECKERBOARD_LR, CHECKERBOARD_RL, INTERLEAVE_COLS_LR, INTERLEAVE_COLS_RL,
  HDMI, STEREO_CODE_COUNT
}
 

Functions

 AVFILTER_DEFINE_CLASS (stereo3d)
 
static int query_formats (AVFilterContext *ctx)
 
static uint8_t ana_convert (const int *coeff, const uint8_t *left, const uint8_t *right)
 
static void anaglyph_ic (uint8_t *dst, uint8_t *lsrc, uint8_t *rsrc, ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize, int width, int height, const int *ana_matrix_r, const int *ana_matrix_g, const int *ana_matrix_b)
 
static void anaglyph (uint8_t *dst, uint8_t *lsrc, uint8_t *rsrc, ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize, int width, int height, const int *ana_matrix_r, const int *ana_matrix_g, const int *ana_matrix_b)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void interleave_cols_to_any (Stereo3DContext *s, int *out_off, int p, AVFrame *in, AVFrame *out, int d)
 
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 []
 
static enum AVPixelFormat other_pix_fmts []
 
static const AVFilterPad stereo3d_inputs []
 
static const AVFilterPad stereo3d_outputs []
 
AVFilter ff_vf_stereo3d
 

Macro Definition Documentation

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

Definition at line 156 of file vf_stereo3d.c.

Definition at line 157 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 
CHECKERBOARD_LR 
CHECKERBOARD_RL 
INTERLEAVE_COLS_LR 
INTERLEAVE_COLS_RL 
HDMI 
STEREO_CODE_COUNT 

Definition at line 35 of file vf_stereo3d.c.

Function Documentation

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

Definition at line 273 of file vf_stereo3d.c.

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

Definition at line 306 of file vf_stereo3d.c.

Referenced by anaglyph(), and anaglyph_ic().

static void anaglyph_ic ( uint8_t dst,
uint8_t lsrc,
uint8_t rsrc,
ptrdiff_t  dst_linesize,
ptrdiff_t  l_linesize,
ptrdiff_t  r_linesize,
int  width,
int  height,
const int *  ana_matrix_r,
const int *  ana_matrix_g,
const int *  ana_matrix_b 
)
static

Definition at line 317 of file vf_stereo3d.c.

Referenced by filter_frame().

static void anaglyph ( uint8_t dst,
uint8_t lsrc,
uint8_t rsrc,
ptrdiff_t  dst_linesize,
ptrdiff_t  l_linesize,
ptrdiff_t  r_linesize,
int  width,
int  height,
const int *  ana_matrix_r,
const int *  ana_matrix_g,
const int *  ana_matrix_b 
)
static

Definition at line 337 of file vf_stereo3d.c.

Referenced by config_output().

static int config_output ( AVFilterLink outlink)
static

Definition at line 357 of file vf_stereo3d.c.

static int filter_slice ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 602 of file vf_stereo3d.c.

Referenced by filter_frame().

static void interleave_cols_to_any ( Stereo3DContext s,
int *  out_off,
int  p,
AVFrame in,
AVFrame out,
int  d 
)
static

Definition at line 626 of file vf_stereo3d.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame inpicref 
)
static

Definition at line 663 of file vf_stereo3d.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 1081 of file vf_stereo3d.c.

Variable Documentation

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

Definition at line 81 of file vf_stereo3d.c.

Referenced by config_output().

const AVOption stereo3d_options[]
static

Definition at line 159 of file vf_stereo3d.c.

enum AVPixelFormat anaglyph_pix_fmts[]
static
Initial value:
= {
}
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:64
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:65

Definition at line 214 of file vf_stereo3d.c.

Referenced by query_formats().

enum AVPixelFormat other_pix_fmts[]
static

Definition at line 219 of file vf_stereo3d.c.

Referenced by query_formats().

const AVFilterPad stereo3d_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
Definition: vf_stereo3d.c:663

Definition at line 1088 of file vf_stereo3d.c.

const AVFilterPad stereo3d_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: vf_stereo3d.c:357

Definition at line 1097 of file vf_stereo3d.c.

AVFilter ff_vf_stereo3d
Initial value:
= {
.name = "stereo3d",
.description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."),
.priv_size = sizeof(Stereo3DContext),
.priv_class = &stereo3d_class,
}
static const AVFilterPad stereo3d_outputs[]
Definition: vf_stereo3d.c:1097
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_stereo3d.c:1081
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:114
static const AVFilterPad stereo3d_inputs[]
Definition: vf_stereo3d.c:1088
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static int query_formats(AVFilterContext *ctx)
Definition: vf_stereo3d.c:273
static int flags
Definition: cpu.c:47

Definition at line 1106 of file vf_stereo3d.c.