From dd2793c880ea72c9aacda8245596694d9b4f378c Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 28 May 2011 21:51:03 +0200 Subject: lavfi: add LUT (LookUp Table) generic filters --- libavfilter/avfilter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 7628cd51ec..6dd5020ecf 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -26,7 +26,7 @@ #include "libavutil/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 18 +#define LIBAVFILTER_VERSION_MINOR 19 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ -- cgit v1.2.3 From 15f03725ced37e3b99e76f63f52cb92e10f134e2 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 28 May 2011 22:00:26 +0200 Subject: lavfi: add negate filter This filter is a simple wrapper around the LUT filter. --- libavfilter/avfilter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 6dd5020ecf..bcfc4c6df9 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -26,7 +26,7 @@ #include "libavutil/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 19 +#define LIBAVFILTER_VERSION_MINOR 20 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ -- cgit v1.2.3 From 44f669e7bc4f7f064e3f81d3596637a0e043b501 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 11 Jun 2011 18:43:11 +0200 Subject: lavfi: add vsink_buffer, and use it in ff* tools Also add the public interface libavfilter/vsink_buffer.h. --- libavfilter/avfilter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index bcfc4c6df9..5ac70399ac 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -26,7 +26,7 @@ #include "libavutil/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 20 +#define LIBAVFILTER_VERSION_MINOR 21 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ -- cgit v1.2.3 From 527ca3985c736ffe077a82fdf3616f0fd571b923 Mon Sep 17 00:00:00 2001 From: Mina Nagy Zaki Date: Tue, 7 Jun 2011 21:17:23 +0300 Subject: lavfi: use int64_t lists in AVFilteFormats The list type was changed to int64_t to be able to hold channel layouts. avfilter_make_format_list() still takes a int32_t array and converts it to int64_t. A new function, avfilter_make_format64_list, that takes int64_t arrays has been added. --- libavfilter/avfilter.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 5ac70399ac..1a3a69de57 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -26,7 +26,7 @@ #include "libavutil/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 21 +#define LIBAVFILTER_VERSION_MINOR 22 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ @@ -223,7 +223,7 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref); */ typedef struct AVFilterFormats { unsigned format_count; ///< number of formats - int *formats; ///< list of media formats + int64_t *formats; ///< list of media formats unsigned refcount; ///< number of references to this list struct AVFilterFormats ***refs; ///< references to this list @@ -238,6 +238,7 @@ typedef struct AVFilterFormats { * @return the format list, with no existing references */ AVFilterFormats *avfilter_make_format_list(const int *fmts); +AVFilterFormats *avfilter_make_format64_list(const int64_t *fmts); /** * Add fmt to the list of media formats contained in *avff. @@ -247,7 +248,7 @@ AVFilterFormats *avfilter_make_format_list(const int *fmts); * @return a non negative value in case of success, or a negative * value corresponding to an AVERROR code in case of error */ -int avfilter_add_format(AVFilterFormats **avff, int fmt); +int avfilter_add_format(AVFilterFormats **avff, int64_t fmt); /** * Return a list of all formats supported by FFmpeg for the given media type. -- cgit v1.2.3 From fd2c0a5db242a3c89a89f1dd2ae9e3155e48f9e2 Mon Sep 17 00:00:00 2001 From: Mina Nagy Zaki Date: Sun, 19 Jun 2011 20:31:24 +0200 Subject: lavfi: add layout negotiation fields and helper functions. --- libavfilter/avfilter.h | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 1a3a69de57..c276f3037e 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -26,7 +26,7 @@ #include "libavutil/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 22 +#define LIBAVFILTER_VERSION_MINOR 23 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ @@ -255,6 +255,11 @@ int avfilter_add_format(AVFilterFormats **avff, int64_t fmt); */ AVFilterFormats *avfilter_all_formats(enum AVMediaType type); +/** + * Return a list of all channel layouts supported by FFmpeg. + */ +AVFilterFormats *avfilter_all_channel_layouts(void); + /** * Return a format list which contains the intersection of the formats of * a and b. Also, all the references of a, all the references of b, and @@ -466,11 +471,13 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int per int64_t channel_layout, int planar); /** - * A helper for query_formats() which sets all links to the same list of - * formats. If there are no links hooked to this filter, the list of formats is - * freed. + * Helpers for query_formats() which set all links to the same list of + * formats/layouts. If there are no links hooked to this filter, the list + * of formats is freed. */ -void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats); +void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats); +void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats); +void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats); /** Default handler for query_formats() */ int avfilter_default_query_formats(AVFilterContext *ctx); @@ -521,9 +528,9 @@ typedef struct AVFilter { void (*uninit)(AVFilterContext *ctx); /** - * Queries formats supported by the filter and its pads, and sets the - * in_formats for links connected to its output pads, and out_formats - * for links connected to its input pads. + * Queries formats/layouts supported by the filter and its pads, and sets + * the in_formats/in_chlayouts for links connected to its output pads, + * and out_formats/out_chlayouts for links connected to its input pads. * * @return zero on success, a negative value corresponding to an * AVERROR code otherwise @@ -593,13 +600,18 @@ struct AVFilterLink { int format; ///< agreed upon media format /** - * Lists of formats supported by the input and output filters respectively. - * These lists are used for negotiating the format to actually be used, - * which will be loaded into the format member, above, when chosen. + * Lists of formats and channel layouts supported by the input and output + * filters respectively. These lists are used for negotiating the format + * to actually be used, which will be loaded into the format and + * channel_layout members, above, when chosen. + * */ AVFilterFormats *in_formats; AVFilterFormats *out_formats; + AVFilterFormats *in_chlayouts; + AVFilterFormats *out_chlayouts; + /** * The buffer reference currently being sent across the link by the source * filter. This is used internally by the filter system to allow -- cgit v1.2.3