FFmpeg
Data Structures | Macros | Functions | Variables
vf_exposure.c File Reference
#include <float.h>
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

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

Macros

#define OFFSET(x)   offsetof(ExposureContext, x)
 
#define VF   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static int exposure_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (exposure)
 

Variables

static const AVFilterPad exposure_inputs []
 
static const AVOption exposure_options []
 
const AVFilter ff_vf_exposure
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 134 of file vf_exposure.c.

◆ VF

Definition at line 135 of file vf_exposure.c.

Function Documentation

◆ exposure_slice()

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

Definition at line 43 of file vf_exposure.c.

Referenced by config_input().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 83 of file vf_exposure.c.

◆ config_input()

static av_cold int config_input ( AVFilterLink inlink)
static

Definition at line 115 of file vf_exposure.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( exposure  )

Variable Documentation

◆ exposure_inputs

const AVFilterPad exposure_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}

Definition at line 125 of file vf_exposure.c.

◆ exposure_options

const AVOption exposure_options[]
static
Initial value:
= {
{ "exposure", "set the exposure correction", OFFSET(exposure), AV_OPT_TYPE_FLOAT, {.dbl=0}, -3, 3, VF },
{ "black", "set the black level correction", OFFSET(black), AV_OPT_TYPE_FLOAT, {.dbl=0}, -1, 1, VF },
{ NULL }
}

Definition at line 137 of file vf_exposure.c.

◆ ff_vf_exposure

const AVFilter ff_vf_exposure
Initial value:
= {
.name = "exposure",
.description = NULL_IF_CONFIG_SMALL("Adjust exposure of the video stream."),
.priv_size = sizeof(ExposureContext),
.priv_class = &exposure_class,
.process_command = ff_filter_process_command,
}

Definition at line 145 of file vf_exposure.c.

OFFSET
#define OFFSET(x)
Definition: vf_exposure.c:134
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:37
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
AV_PIX_FMT_GBRPF32
#define AV_PIX_FMT_GBRPF32
Definition: pixfmt.h:532
ExposureContext
Definition: vf_exposure.c:28
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:901
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:182
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition: opt.h:271
FILTER_PIXFMTS
#define FILTER_PIXFMTS(...)
Definition: filters.h:248
VF
#define VF
Definition: vf_exposure.c:135
AV_PIX_FMT_GBRAPF32
#define AV_PIX_FMT_GBRAPF32
Definition: pixfmt.h:533
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:152
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
exposure_inputs
static const AVFilterPad exposure_inputs[]
Definition: vf_exposure.c:125
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_exposure.c:83
config_input
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_exposure.c:115