diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-30 09:51:17 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-07-01 12:14:16 +0200 |
commit | 7464a53aaa5a241858ffbcb0194d3fc44a7aa441 (patch) | |
tree | dd17645623fb10135a6ded42bdb262a41841e53c /libavfilter/formats.c | |
parent | 518d8d436566e6260d73346cd999ff69eeb94e49 (diff) |
lavfi: make pix_fmt_is_in() in vf_lut.c an internal function
Also generalize it, making it accept ints rather than pixel formats.
Allow factorization.
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index eccb52304b..b6e30e7ab4 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -22,6 +22,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/audioconvert.h" #include "avfilter.h" +#include "internal.h" /** * Add all refs from a to ret and destroy a. @@ -73,6 +74,17 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) return ret; } +int ff_fmt_is_in(int fmt, const int *fmts) +{ + const int *p; + + for (p = fmts; *p != -1; p++) { + if (fmt == *p) + return 1; + } + return 0; +} + #define MAKE_FORMAT_LIST() \ AVFilterFormats *formats; \ int count = 0; \ |