[PATCH] Define AVFILTER_CAP_SUPPORT_NEG_LINESIZES.

Stefano Sabatini stefano.sabatini-lala
Sat Nov 6 20:25:46 CET 2010


---
 libavfilter/avfilter.h       |   10 ++++++++++
 libavfilter/vf_aspect.c      |    2 ++
 libavfilter/vf_blackframe.c  |    2 ++
 libavfilter/vf_crop.c        |    2 ++
 libavfilter/vf_cropdetect.c  |    2 ++
 libavfilter/vf_drawbox.c     |    2 ++
 libavfilter/vf_fifo.c        |    2 ++
 libavfilter/vf_format.c      |    3 +++
 libavfilter/vf_frei0r.c      |    1 +
 libavfilter/vf_hflip.c       |    1 +
 libavfilter/vf_null.c        |    2 ++
 libavfilter/vf_pad.c         |    3 +++
 libavfilter/vf_pixdesctest.c |    2 ++
 libavfilter/vf_scale.c       |    1 +
 libavfilter/vf_setpts.c      |    2 ++
 libavfilter/vf_settb.c       |    2 ++
 libavfilter/vf_slicify.c     |    2 ++
 libavfilter/vf_transpose.c   |    2 ++
 libavfilter/vf_unsharp.c     |    2 ++
 libavfilter/vf_vflip.c       |    2 ++
 libavfilter/vf_yadif.c       |    2 ++
 libavfilter/vsink_nullsink.c |    2 ++
 libavfilter/vsrc_buffer.c    |    1 +
 libavfilter/vsrc_nullsrc.c   |    2 ++
 24 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 0de6c39..729c2ba 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -490,6 +490,11 @@ AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms,
                                                   int64_t channel_layout, int planar);
 
 /**
+ * The filter can handle negative linesizes.
+ */
+#define AVFILTER_CAP_SUPPORT_NEG_LINESIZES 0x0001
+
+/**
  * Filter definition. This defines the pads a filter contains, and all the
  * callback functions used to interact with the filter.
  */
@@ -531,6 +536,11 @@ typedef struct AVFilter {
      * NULL_IF_CONFIG_SMALL() macro to define it.
      */
     const char *description;
+
+    /**
+     * Filter capabilities, see AVFILTER_CAP_*
+     */
+    int capabilities;
 } AVFilter;
 
 /** An instance of a filter */
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 6f86bf2..534d96e 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -126,6 +126,8 @@ AVFilter avfilter_vf_setsar = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
 #endif /* CONFIG_SETSAR_FILTER */
 
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index 47ab3cf..2f67ffc 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -126,4 +126,6 @@ AVFilter avfilter_vf_blackframe = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 0d10feb..9d60fd2 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -336,4 +336,6 @@ AVFilter avfilter_vf_crop = {
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_output, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 2fe7530..03fbd74 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -211,4 +211,6 @@ AVFilter avfilter_vf_cropdetect = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index 114a2ac..5b74760 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -140,4 +140,6 @@ AVFilter avfilter_vf_drawbox = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_fifo.c b/libavfilter/vf_fifo.c
index cb9eebf..c117d76 100644
--- a/libavfilter/vf_fifo.c
+++ b/libavfilter/vf_fifo.c
@@ -116,4 +116,6 @@ AVFilter avfilter_vf_fifo = {
                                     .type            = AVMEDIA_TYPE_VIDEO,
                                     .request_frame   = request_frame, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 5e2c099..773f46b 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -112,6 +112,7 @@ AVFilter avfilter_vf_format = {
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
 #endif /* CONFIG_FORMAT_FILTER */
 
@@ -142,6 +143,8 @@ AVFilter avfilter_vf_noformat = {
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
 #endif /* CONFIG_NOFORMAT_FILTER */
 
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 48f5b49..14c678e 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -360,4 +360,5 @@ AVFilter avfilter_vf_frei0r = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 4deb14a..153ab2c 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -158,4 +158,5 @@ AVFilter avfilter_vf_hflip = {
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c
index 989cd86..a0b0ba3 100644
--- a/libavfilter/vf_null.c
+++ b/libavfilter/vf_null.c
@@ -39,4 +39,6 @@ AVFilter avfilter_vf_null = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index f86e4c6..c89c76a 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -338,6 +338,7 @@ AVFilter avfilter_vf_pad = {
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_output, },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
 
 #endif /* CONFIG_PAD_FILTER */
@@ -462,6 +463,8 @@ AVFilter avfilter_vsrc_color = {
                                     .request_frame   = color_request_frame,
                                     .config_props    = color_config_props },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
 
 #endif /* CONFIG_COLOR_FILTER */
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 1d2f971..f2e45ea 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -125,4 +125,6 @@ AVFilter avfilter_vf_pixdesctest = {
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index d99e0c1..bd37933 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -216,4 +216,5 @@ AVFilter avfilter_vf_scale = {
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_props, },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c
index 0921df7..0366a30 100644
--- a/libavfilter/vf_setpts.c
+++ b/libavfilter/vf_setpts.c
@@ -154,4 +154,6 @@ AVFilter avfilter_vf_setpts = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_settb.c b/libavfilter/vf_settb.c
index b5b40bb..13febef 100644
--- a/libavfilter/vf_settb.c
+++ b/libavfilter/vf_settb.c
@@ -138,4 +138,6 @@ AVFilter avfilter_vf_settb = {
                                     .type            = AVMEDIA_TYPE_VIDEO,
                                     .config_props    = config_output_props, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_slicify.c b/libavfilter/vf_slicify.c
index 82406fe..238f9e6 100644
--- a/libavfilter/vf_slicify.c
+++ b/libavfilter/vf_slicify.c
@@ -114,4 +114,6 @@ AVFilter avfilter_vf_slicify = {
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index 8d44e56..b8fb4c1 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -209,4 +209,6 @@ AVFilter avfilter_vf_transpose = {
                                     .config_props    = config_props_output,
                                     .type            = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 5cc5aa1..f7fe9e2 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -241,4 +241,6 @@ AVFilter avfilter_vf_unsharp = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 9d5d75f..4461ee1 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -101,4 +101,6 @@ AVFilter avfilter_vf_vflip = {
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 5c4a245..90c183c 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -336,4 +336,6 @@ AVFilter avfilter_vf_yadif = {
                                     .poll_frame       = poll_frame,
                                     .request_frame    = request_frame, },
                                   { .name = NULL}},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c
index 0998bd0..a1e85a4 100644
--- a/libavfilter/vsink_nullsink.c
+++ b/libavfilter/vsink_nullsink.c
@@ -42,4 +42,6 @@ AVFilter avfilter_vsink_nullsink = {
         { .name = NULL},
     },
     .outputs   = (AVFilterPad[]) {{ .name = NULL }},
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index 74d9bf6..d798cc3 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -161,4 +161,5 @@ AVFilter avfilter_vsrc_buffer = {
                                     .poll_frame      = poll_frame,
                                     .config_props    = config_props, },
                                   { .name = NULL}},
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
diff --git a/libavfilter/vsrc_nullsrc.c b/libavfilter/vsrc_nullsrc.c
index 1cd06e1..e73c3e3 100644
--- a/libavfilter/vsrc_nullsrc.c
+++ b/libavfilter/vsrc_nullsrc.c
@@ -126,4 +126,6 @@ AVFilter avfilter_vsrc_nullsrc = {
         },
         { .name = NULL}
     },
+
+    .capabilities = AVFILTER_CAP_SUPPORT_NEG_LINESIZES,
 };
-- 
1.7.1


--lrZ03NoBR/3+SXJZ
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0003-Add-vflipfix-filter.patch"




More information about the ffmpeg-devel mailing list