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

Go to the source code of this file.

Data Structures

struct  ExposureContext
 

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 *frame)
 
static av_cold int query_formats (AVFilterContext *ctx)
 
static av_cold int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (exposure)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

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

Definition at line 123 of file vf_exposure.c.

◆ VF

Definition at line 124 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 41 of file vf_exposure.c.

Referenced by config_input().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 66 of file vf_exposure.c.

◆ query_formats()

static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 78 of file vf_exposure.c.

◆ config_input()

static av_cold int config_input ( AVFilterLink inlink)
static

Definition at line 94 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",
.needs_writable = 1,
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_exposure.c:66
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_exposure.c:94

Definition at line 104 of file vf_exposure.c.

◆ exposure_outputs

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

Definition at line 115 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 }
}
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
#define VF
Definition: vf_exposure.c:124
#define OFFSET(x)
Definition: vf_exposure.c:123

Definition at line 126 of file vf_exposure.c.

◆ ff_vf_exposure

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,
}
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
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:882
#define flags(name, subs,...)
Definition: cbs_av1.c:572
#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:126
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
static const AVFilterPad exposure_inputs[]
Definition: vf_exposure.c:104
static av_cold int query_formats(AVFilterContext *ctx)
Definition: vf_exposure.c:78
static const AVFilterPad exposure_outputs[]
Definition: vf_exposure.c:115

Definition at line 134 of file vf_exposure.c.