FFmpeg
Data Structures | Macros | Functions | Variables
vf_identity.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
#include "video.h"
#include "scene_sad.h"

Go to the source code of this file.

Data Structures

struct  IdentityContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(IdentityContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define PF_NOALPHA(suf)   AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf
 
#define PF_ALPHA(suf)   AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf
 
#define PF(suf)   PF_NOALPHA(suf), PF_ALPHA(suf)
 

Functions

static unsigned identity_line_8bit (const uint8_t *main_line, const uint8_t *ref_line, int outw)
 
static unsigned identity_line_16bit (const uint8_t *mmain_line, const uint8_t *rref_line, int outw)
 
static int compute_images_msad (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int compute_images_identity (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void set_meta (AVFilterContext *ctx, AVDictionary **metadata, const char *key, char comp, float d)
 
static int do_identity (FFFrameSync *fs)
 
static av_cold int init (AVFilterContext *ctx)
 
static int config_input_ref (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static enum AVPixelFormat pix_fmts []
 
static const AVFilterPad identity_inputs []
 
static const AVFilterPad identity_outputs []
 
static const AVOption options []
 

Detailed Description

Calculate the Identity between two input videos.

Definition in file vf_identity.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 58 of file vf_identity.c.

◆ FLAGS

Definition at line 59 of file vf_identity.c.

◆ PF_NOALPHA

#define PF_NOALPHA (   suf)    AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf

◆ PF_ALPHA

#define PF_ALPHA (   suf)    AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf

◆ PF

#define PF (   suf)    PF_NOALPHA(suf), PF_ALPHA(suf)

Function Documentation

◆ identity_line_8bit()

static unsigned identity_line_8bit ( const uint8_t *  main_line,
const uint8_t *  ref_line,
int  outw 
)
static

Definition at line 61 of file vf_identity.c.

Referenced by config_input_ref().

◆ identity_line_16bit()

static unsigned identity_line_16bit ( const uint8_t *  mmain_line,
const uint8_t *  rref_line,
int  outw 
)
static

Definition at line 71 of file vf_identity.c.

Referenced by config_input_ref().

◆ compute_images_msad()

static int compute_images_msad ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 95 of file vf_identity.c.

Referenced by config_input_ref().

◆ compute_images_identity()

static int compute_images_identity ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 123 of file vf_identity.c.

Referenced by config_input_ref().

◆ set_meta()

static void set_meta ( AVFilterContext ctx,
AVDictionary **  metadata,
const char *  key,
char  comp,
float  d 
)
static

Definition at line 152 of file vf_identity.c.

Referenced by do_identity().

◆ do_identity()

static int do_identity ( FFFrameSync fs)
static

Definition at line 170 of file vf_identity.c.

Referenced by init().

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 235 of file vf_identity.c.

◆ config_input_ref()

static int config_input_ref ( AVFilterLink inlink)
static

Definition at line 259 of file vf_identity.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 313 of file vf_identity.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 342 of file vf_identity.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 348 of file vf_identity.c.

Variable Documentation

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ identity_inputs

const AVFilterPad identity_inputs[]
static
Initial value:
= {
{
.name = "main",
},{
.name = "reference",
.config_props = config_input_ref,
},
}

Definition at line 375 of file vf_identity.c.

◆ identity_outputs

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

Definition at line 386 of file vf_identity.c.

◆ options

const AVOption options[]
static
Initial value:
= {
{ NULL }
}

Definition at line 394 of file vf_identity.c.

AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:426
config_input_ref
static int config_input_ref(AVFilterLink *inlink)
Definition: vf_identity.c:259
PF_NOALPHA
#define PF_NOALPHA(suf)
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:99
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:384
AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:422
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:205
AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:420
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:388
AV_PIX_FMT_YUVJ411P
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition: pixfmt.h:248
AV_PIX_FMT_YUVJ422P
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:79
AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:424
AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:425
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:387
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:80
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:385
AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:423
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:78
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_GBRP9
#define AV_PIX_FMT_GBRP9
Definition: pixfmt.h:419
P
#define P
AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:421
AV_PIX_FMT_YUVJ440P
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition: pixfmt.h:100
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:158
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:73
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:72
PF
#define PF(suf)
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:386
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_identity.c:313