mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_hysteresis: allow using framesync options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
789731affa
commit
5f1bb258ab
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
typedef struct HysteresisContext {
|
typedef struct HysteresisContext {
|
||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
|
FFFrameSync fs;
|
||||||
|
|
||||||
int planes;
|
int planes;
|
||||||
int threshold;
|
int threshold;
|
||||||
|
@ -40,7 +41,6 @@ typedef struct HysteresisContext {
|
||||||
int width[4], height[4];
|
int width[4], height[4];
|
||||||
int nb_planes;
|
int nb_planes;
|
||||||
int depth;
|
int depth;
|
||||||
FFFrameSync fs;
|
|
||||||
|
|
||||||
uint8_t *map;
|
uint8_t *map;
|
||||||
uint32_t *xy;
|
uint32_t *xy;
|
||||||
|
@ -58,8 +58,6 @@ static const AVOption hysteresis_options[] = {
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(hysteresis);
|
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
static const enum AVPixelFormat pix_fmts[] = {
|
||||||
|
@ -350,6 +348,8 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||||
av_freep(&s->xy);
|
av_freep(&s->xy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRAMESYNC_DEFINE_CLASS(hysteresis, HysteresisContext, fs);
|
||||||
|
|
||||||
static const AVFilterPad hysteresis_inputs[] = {
|
static const AVFilterPad hysteresis_inputs[] = {
|
||||||
{
|
{
|
||||||
.name = "base",
|
.name = "base",
|
||||||
|
@ -375,6 +375,7 @@ static const AVFilterPad hysteresis_outputs[] = {
|
||||||
AVFilter ff_vf_hysteresis = {
|
AVFilter ff_vf_hysteresis = {
|
||||||
.name = "hysteresis",
|
.name = "hysteresis",
|
||||||
.description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."),
|
.description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."),
|
||||||
|
.preinit = hysteresis_framesync_preinit,
|
||||||
.priv_size = sizeof(HysteresisContext),
|
.priv_size = sizeof(HysteresisContext),
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
.query_formats = query_formats,
|
.query_formats = query_formats,
|
||||||
|
|
Loading…
Reference in New Issue