[PATCH] Give sane names to the filters dealing with aspect ratio.
Stefano Sabatini
stefano.sabatini-lala
Thu Nov 18 17:57:05 CET 2010
---
libavfilter/Makefile | 4 ++--
libavfilter/allfilters.c | 4 ++--
libavfilter/vf_aspect.c | 26 +++++++++++++-------------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 71dcf2a..3794e8b 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -19,7 +19,6 @@ OBJS-$(CONFIG_ANULLSRC_FILTER) += asrc_anullsrc.o
OBJS-$(CONFIG_ANULLSINK_FILTER) += asink_anullsink.o
-OBJS-$(CONFIG_ASPECT_FILTER) += vf_aspect.o
OBJS-$(CONFIG_BLACKFRAME_FILTER) += vf_blackframe.o
OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o
@@ -33,9 +32,10 @@ OBJS-$(CONFIG_NULL_FILTER) += vf_null.o
OBJS-$(CONFIG_OCV_SMOOTH_FILTER) += vf_libopencv.o
OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o
OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
-OBJS-$(CONFIG_PIXELASPECT_FILTER) += vf_aspect.o
OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o
+OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o
OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o
+OBJS-$(CONFIG_SETSAR_FILTER) += vf_aspect.o
OBJS-$(CONFIG_SETTB_FILTER) += vf_settb.o
OBJS-$(CONFIG_SLICIFY_FILTER) += vf_slicify.o
OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index d30e95a..9ca6921 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -40,7 +40,6 @@ void avfilter_register_all(void)
REGISTER_FILTER (ANULLSINK, anullsink, asink);
- REGISTER_FILTER (ASPECT, aspect, vf);
REGISTER_FILTER (BLACKFRAME, blackframe, vf);
REGISTER_FILTER (CROP, crop, vf);
REGISTER_FILTER (CROPDETECT, cropdetect, vf);
@@ -54,9 +53,10 @@ void avfilter_register_all(void)
REGISTER_FILTER (OCV_SMOOTH, ocv_smooth, vf);
REGISTER_FILTER (PAD, pad, vf);
REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
- REGISTER_FILTER (PIXELASPECT, pixelaspect, vf);
REGISTER_FILTER (SCALE, scale, vf);
+ REGISTER_FILTER (SETDAR, setdar, vf);
REGISTER_FILTER (SETPTS, setpts, vf);
+ REGISTER_FILTER (SETSAR, setsar, vf);
REGISTER_FILTER (SETTB, settb, vf);
REGISTER_FILTER (SLICIFY, slicify, vf);
REGISTER_FILTER (TRANSPOSE, transpose, vf);
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index cccb117..bb99064 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -66,9 +66,9 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
avfilter_start_frame(link->dst->outputs[0], picref);
}
-#if CONFIG_ASPECT_FILTER
-/* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */
-static int frameaspect_config_props(AVFilterLink *inlink)
+#if CONFIG_SETDAR_FILTER
+/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
+static int setdar_config_props(AVFilterLink *inlink)
{
AspectContext *aspect = inlink->dst->priv;
@@ -79,9 +79,9 @@ static int frameaspect_config_props(AVFilterLink *inlink)
return 0;
}
-AVFilter avfilter_vf_aspect = {
- .name = "aspect",
- .description = NULL_IF_CONFIG_SMALL("Set the frame aspect ratio."),
+AVFilter avfilter_vf_setdar = {
+ .name = "setdar",
+ .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
.init = init,
@@ -89,7 +89,7 @@ AVFilter avfilter_vf_aspect = {
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
- .config_props = frameaspect_config_props,
+ .config_props = setdar_config_props,
.get_video_buffer = avfilter_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = avfilter_null_end_frame },
@@ -99,12 +99,12 @@ AVFilter avfilter_vf_aspect = {
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
};
-#endif /* CONFIG_ASPECT_FILTER */
+#endif /* CONFIG_SETDAR_FILTER */
-#if CONFIG_PIXELASPECT_FILTER
-AVFilter avfilter_vf_pixelaspect = {
- .name = "pixelaspect",
- .description = NULL_IF_CONFIG_SMALL("Set the pixel aspect ratio."),
+#if CONFIG_SETSAR_FILTER
+AVFilter avfilter_vf_setsar = {
+ .name = "setsar",
+ .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
.init = init,
@@ -121,5 +121,5 @@ AVFilter avfilter_vf_pixelaspect = {
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
};
-#endif /* CONFIG_PIXELASPECT_FILTER */
+#endif /* CONFIG_SETSAR_FILTER */
--
1.7.1
--HlL+5n6rz5pIUxbD--
More information about the ffmpeg-devel
mailing list