38 int jobnr,
int nb_jobs);
47 const int slice_start = (
height * jobnr) / nb_jobs;
49 const float black =
s->black;
50 const float scale =
s->scale;
52 for (
int p = 0; p < 3; p++) {
54 float *ptr = (
float *)
frame->
data[p] + slice_start * linesize;
56 for (
int x = 0; x <
width; x++)
57 ptr[x] = (ptr[x] - black) * scale;
71 s->scale = 1.f / (
exp2f(-
s->exposure) -
s->black);
123 #define OFFSET(x) offsetof(ExposureContext, x)
124 #define VF AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
138 .priv_class = &exposure_class,
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
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.
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Main libavfilter public API header.
#define flags(name, subs,...)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
#define AV_PIX_FMT_GBRPF32
AVPixelFormat
Pixel format.
#define AV_PIX_FMT_GBRAPF32
Describe the class of an AVClass context structure.
A link between two filters.
AVFilterContext * dst
dest filter
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int(* do_slice)(AVFilterContext *s, void *arg, int jobnr, int nb_jobs)
static const AVFilterPad exposure_inputs[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static av_cold int query_formats(AVFilterContext *ctx)
static av_cold int config_input(AVFilterLink *inlink)
static const AVOption exposure_options[]
static const AVFilterPad exposure_outputs[]
static int exposure_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
AVFILTER_DEFINE_CLASS(exposure)