FFmpeg
|
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "framesync.h"
Go to the source code of this file.
Macros | |
#define | OFFSET(member) offsetof(FFFrameSync, member) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM |
Enumerations | |
enum | { STATE_BOF, STATE_RUN, STATE_EOF } |
Variables | |
static const AVOption | framesync_options [] |
const AVClass | ff_framesync_class |
#define OFFSET | ( | member | ) | offsetof(FFFrameSync, member) |
Definition at line 28 of file framesync.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 29 of file framesync.c.
anonymous enum |
Enumerator | |
---|---|
STATE_BOF | |
STATE_RUN | |
STATE_EOF |
Definition at line 70 of file framesync.c.
|
static |
Definition at line 31 of file framesync.c.
const AVClass* ff_framesync_child_class_iterate | ( | void ** | iter | ) |
Definition at line 63 of file framesync.c.
|
static |
Definition at line 313 of file framesync.c.
Referenced by framesync_advance().
void ff_framesync_preinit | ( | FFFrameSync * | fs | ) |
Pre-initialize a frame sync structure.
It sets the class pointer and inits the options to their default values. The entire structure is expected to be already set to 0. This step is optional, but necessary to use the options.
Definition at line 78 of file framesync.c.
Referenced by ff_framesync_init(), and preinit().
int ff_framesync_init | ( | FFFrameSync * | fs, |
AVFilterContext * | parent, | ||
unsigned | nb_in | ||
) |
Initialize a frame sync structure.
The entire structure is expected to be already set to 0 or preinited.
fs | frame sync structure to initialize |
parent | parent AVFilterContext object |
nb_in | number of inputs |
Definition at line 86 of file framesync.c.
Referenced by config_output(), config_props(), ff_framesync_init_dualinput(), init_framesync(), lut2_config_output(), and program_opencl_config_output().
|
static |
Definition at line 106 of file framesync.c.
Referenced by framesync_advance(), and framesync_sync_level_update().
|
static |
Definition at line 113 of file framesync.c.
Referenced by ff_framesync_configure(), and framesync_inject_status().
int ff_framesync_configure | ( | FFFrameSync * | fs | ) |
Configure a frame sync structure.
Must be called after all options are set but before all use.
Definition at line 137 of file framesync.c.
Referenced by config_output(), config_props(), config_props_output(), init_framesync(), lut2_config_output(), overlay_cuda_config_output(), overlay_opencl_config_output(), overlay_vaapi_config_output(), overlay_vulkan_config_output(), and program_opencl_config_output().
|
static |
Definition at line 187 of file framesync.c.
Referenced by ff_framesync_activate().
|
static |
Definition at line 238 of file framesync.c.
Referenced by framesync_inject_status().
|
static |
Definition at line 245 of file framesync.c.
Referenced by consume_from_fifos().
|
static |
Definition at line 258 of file framesync.c.
Referenced by consume_from_fifos().
int ff_framesync_get_frame | ( | FFFrameSync * | fs, |
unsigned | in, | ||
AVFrame ** | rframe, | ||
unsigned | get | ||
) |
Get the current frame in an input.
fs | frame sync structure |
in | index of the input |
rframe | used to return the current frame (or NULL) |
get | if not zero, the calling code needs to get ownership of the returned frame; the current frame will either be duplicated or removed from the framesync structure |
Definition at line 269 of file framesync.c.
Referenced by blend_frame(), do_scale(), ff_framesync_dualinput_get(), overlay_opencl_blend(), overlay_vaapi_blend(), overlay_vulkan_blend(), process_frame(), program_opencl_filter(), and remap_opencl_process_frame().
void ff_framesync_uninit | ( | FFFrameSync * | fs | ) |
Free all memory currently allocated.
Definition at line 301 of file framesync.c.
Referenced by config_props(), overlay_cuda_uninit(), overlay_opencl_uninit(), overlay_qsv_uninit(), overlay_vaapi_uninit(), overlay_vulkan_uninit(), program_opencl_uninit(), remap_opencl_uninit(), stack_uninit(), and uninit().
int ff_framesync_activate | ( | FFFrameSync * | fs | ) |
Examine the frames in the filter's input and try to produce output.
This function can be the complete implementation of the activate method of a filter using framesync.
Definition at line 352 of file framesync.c.
Referenced by activate(), overlay_cuda_activate(), overlay_opencl_activate(), overlay_vaapi_activate(), overlay_vulkan_activate(), program_opencl_activate(), and stack_activate().
int ff_framesync_init_dualinput | ( | FFFrameSync * | fs, |
AVFilterContext * | parent | ||
) |
Initialize a frame sync structure for dualinput.
Compared to generic framesync, dualinput assumes the first input is the main one and the filtering is performed on it. The first input will be the only one with sync set and generic timeline support will just pass it unchanged when disabled.
Equivalent to ff_framesync_init(fs, parent, 2) then setting the time base, sync and ext modes on the inputs.
Definition at line 372 of file framesync.c.
Referenced by config_output(), config_props_output(), overlay_cuda_config_output(), overlay_opencl_config_output(), overlay_vaapi_config_output(), and overlay_vulkan_config_output().
int ff_framesync_dualinput_get | ( | FFFrameSync * | fs, |
AVFrame ** | f0, | ||
AVFrame ** | f1 | ||
) |
f0 | used to return the main frame |
f1 | used to return the second frame, or NULL if disabled |
Definition at line 390 of file framesync.c.
Referenced by blend_frame_for_dualinput(), do_convolve(), do_corr(), do_identity(), do_morpho(), do_psnr(), do_ssim(), do_ssim360(), do_vmaf(), do_xpsnr(), ff_framesync_dualinput_get_writable(), overlay_cuda_blend(), process_frame(), and varblur_frame().
int ff_framesync_dualinput_get_writable | ( | FFFrameSync * | fs, |
AVFrame ** | f0, | ||
AVFrame ** | f1 | ||
) |
Same as ff_framesync_dualinput_get(), but make sure that f0 is writable.
Definition at line 410 of file framesync.c.
Referenced by do_alphamerge(), do_blend(), and load_apply_palette().
|
static |
Definition at line 36 of file framesync.c.
const AVClass ff_framesync_class |
Definition at line 54 of file framesync.c.
Referenced by child_class_iterate(), ff_framesync_child_class_iterate(), and ff_framesync_preinit().