[FFmpeg-devel] [PATCH 1/3] avfilter: Rename blend_modes.c -> blend_modes_template.c
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Wed Feb 16 06:38:04 EET 2022
Michael Niedermayer:
> This is more consistent with similar usage
>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> .../{blend_modes.c => blend_modes_template.c} | 0
> libavfilter/vf_blend.c | 14 +++++++-------
> 2 files changed, 7 insertions(+), 7 deletions(-)
> rename libavfilter/{blend_modes.c => blend_modes_template.c} (100%)
>
> diff --git a/libavfilter/blend_modes.c b/libavfilter/blend_modes_template.c
> similarity index 100%
> rename from libavfilter/blend_modes.c
> rename to libavfilter/blend_modes_template.c
> diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
> index 2d433e439f..e912ba4cb8 100644
> --- a/libavfilter/vf_blend.c
> +++ b/libavfilter/vf_blend.c
> @@ -34,31 +34,31 @@
> #define BOTTOM 1
>
> #define DEPTH 8
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 9
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 10
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 12
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 14
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 16
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> #undef DEPTH
> #define DEPTH 32
> -#include "blend_modes.c"
> +#include "blend_modes_template.c"
>
> typedef struct BlendContext {
> const AVClass *class;
Right now make's vf_blend.d contains an entry
src/libavfilter/blend_modes.c; if one applies this patch, said file does
no longer exist and make errors out with "No rule to make target
'src/libavfilter/blend_modes.c', needed by 'libavfilter/vf_blend.o'.",
because the blend_modes.c prerequisite can't be made. In
3044d0efee9136c19dfdcf6dcdf957e910a73fd5 I made the build process treat
templates just like headers so that they can be deleted without this
error. Would there be any negative side-effects of doing the same for
all files?
(Btw: The AC-3 decoder also uses a misnamed template; I didn't fix it
because of the aforementioned issue.)
- Andreas
More information about the ffmpeg-devel
mailing list