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 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 []
 
const 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 }
}

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 }
}

Definition at line 126 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,
}

Definition at line 134 of file vf_exposure.c.

OFFSET
#define OFFSET(x)
Definition: vf_exposure.c:123
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:115
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
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:842
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:126
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
query_formats
static av_cold int query_formats(AVFilterContext *ctx)
Definition: vf_exposure.c:78
VF
#define VF
Definition: vf_exposure.c:124
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:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
exposure_inputs
static const AVFilterPad exposure_inputs[]
Definition: vf_exposure.c:104
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
config_input
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_exposure.c:94