[FFmpeg-devel] [PATCH] Give sane names to the filters dealing with aspect ratio.
Stefano Sabatini
stefano.sabatini-lala
Thu Nov 18 22:33:02 CET 2010
---
libavfilter/Makefile | 4 ++--
libavfilter/allfilters.c | 4 ++--
libavfilter/vf_aspect.c | 24 ++++++++++++------------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 71dcf2a..344518c 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,8 +32,9 @@ 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_SETPAR_FILTER) += vf_aspect.o
OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o
OBJS-$(CONFIG_SETTB_FILTER) += vf_settb.o
OBJS-$(CONFIG_SLICIFY_FILTER) += vf_slicify.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index d30e95a..4e98ab9 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,8 +53,9 @@ 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 (SETPAR, setpar, vf);
REGISTER_FILTER (SETPTS, setpts, vf);
REGISTER_FILTER (SETTB, settb, vf);
REGISTER_FILTER (SLICIFY, slicify, vf);
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index cccb117..75aea2f 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,11 +99,11 @@ 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",
+#if CONFIG_SETPAR_FILTER
+AVFilter avfilter_vf_setpar = {
+ .name = "setpar",
.description = NULL_IF_CONFIG_SMALL("Set the pixel aspect ratio."),
.init = init,
@@ -121,5 +121,5 @@ AVFilter avfilter_vf_pixelaspect = {
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
};
-#endif /* CONFIG_PIXELASPECT_FILTER */
+#endif /* CONFIG_SETPAR_FILTER */
--
1.7.1
More information about the ffmpeg-devel
mailing list