[FFmpeg-soc] [soc]: r1795 - libavfilter/vf_transpose.c

vitor subversion at mplayerhq.hu
Mon Jan 7 20:17:50 CET 2008


Author: vitor
Date: Mon Jan  7 20:17:50 2008
New Revision: 1795

Log:
vf_transpose cannot handle packet pixel formats

Modified:
   libavfilter/vf_transpose.c

Modified: libavfilter/vf_transpose.c
==============================================================================
--- libavfilter/vf_transpose.c	(original)
+++ libavfilter/vf_transpose.c	Mon Jan  7 20:17:50 2008
@@ -19,6 +19,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/**
+ * @file vf_transpose.c
+ * Transposition filter
+ *
+ * @todo Handle packed pixel formats
+ */
+
 #include "avfilter.h"
 
 typedef struct
@@ -35,6 +42,17 @@ static int config_props_input(AVFilterLi
     return 0;
 }
 
+static int query_formats(AVFilterContext *ctx)
+{
+    avfilter_set_common_formats(ctx,
+        avfilter_make_format_list(10,
+                PIX_FMT_YUV444P,  PIX_FMT_YUV422P,  PIX_FMT_YUV420P,
+                PIX_FMT_YUV411P,  PIX_FMT_YUV410P,
+                PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P,
+                PIX_FMT_YUV440P,  PIX_FMT_YUVJ440P));
+    return 0;
+}
+
 static int config_props_output(AVFilterLink *link)
 {
     link->w = link->src->inputs[0]->h;
@@ -75,6 +93,8 @@ AVFilter avfilter_vf_transpose =
 
     .priv_size = sizeof(TransContext),
 
+    .query_formats = query_formats,
+
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AV_PAD_VIDEO,
                                     .draw_slice      = draw_slice,



More information about the FFmpeg-soc mailing list