diff options
author | Philip Langdale <philipl@overt.org> | 2018-10-24 11:52:42 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2018-11-02 11:24:05 -0700 |
commit | 598f0f39271d6033588b4d8ccc672c5bdc85fec7 (patch) | |
tree | 4450a872e639537fab7432d7f4d7c73c3da58ed1 /libavfilter/yadif.h | |
parent | ef1aadffc785b48ed62c45d954289e754f43ef46 (diff) | |
download | ffmpeg-598f0f39271d6033588b4d8ccc672c5bdc85fec7.tar.gz |
libavfilter/vf_yadif: Make frame management logic and options shareable
I'm writing a cuda implementation of yadif, and while this
obviously has a very different implementation of the actual
filtering, all the frame management is unchanged. To avoid
duplicating that logic, let's make it shareable.
From the perspective of the existing filter, the only real change
is introducing a function pointer for the filter() function so it
can be specified for the specific filter.
Diffstat (limited to 'libavfilter/yadif.h')
-rw-r--r-- | libavfilter/yadif.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavfilter/yadif.h b/libavfilter/yadif.h index d23d1380d0..32d6f4a0d4 100644 --- a/libavfilter/yadif.h +++ b/libavfilter/yadif.h @@ -19,6 +19,7 @@ #ifndef AVFILTER_YADIF_H #define AVFILTER_YADIF_H +#include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avfilter.h" @@ -54,6 +55,8 @@ typedef struct YADIFContext { AVFrame *prev; AVFrame *out; + void (*filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff); + /** * Required alignment for filter_line */ @@ -71,4 +74,10 @@ typedef struct YADIFContext { void ff_yadif_init_x86(YADIFContext *yadif); +int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame); + +int ff_yadif_request_frame(AVFilterLink *link); + +extern const AVOption ff_yadif_options[]; + #endif /* AVFILTER_YADIF_H */ |