FFmpeg
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 config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (exposure)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

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

Definition at line 105 of file vf_exposure.c.

◆ VF

Definition at line 106 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.

◆ config_input()

static av_cold int config_input ( AVFilterLink inlink)
static

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

◆ exposure_outputs

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

Definition at line 98 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 108 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 116 of file vf_exposure.c.

OFFSET
#define OFFSET(x)
Definition: vf_exposure.c:105
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_exposure.c:66
exposure_outputs
static const AVFilterPad exposure_outputs[]
Definition: vf_exposure.c:98
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
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:117
FILTER_PIXFMTS
#define FILTER_PIXFMTS(...)
Definition: internal.h:177
AV_PIX_FMT_GBRPF32
#define AV_PIX_FMT_GBRPF32
Definition: pixfmt.h:433
ExposureContext
Definition: vf_exposure.c:30
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:882
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:146
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:227
VF
#define VF
Definition: vf_exposure.c:106
AV_PIX_FMT_GBRAPF32
#define AV_PIX_FMT_GBRAPF32
Definition: pixfmt.h:434
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:121
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
exposure_inputs
static const AVFilterPad exposure_inputs[]
Definition: vf_exposure.c:88
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
AVFILTERPAD_FLAG_NEEDS_WRITABLE
#define AVFILTERPAD_FLAG_NEEDS_WRITABLE
The filter expects writable frames from its input link, duplicating data buffers if needed.
Definition: internal.h:69
config_input
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_exposure.c:78