[FFmpeg-devel] [PATCH 2/7] libavfilter/vf_overlay.c: Add '\' for every line of the blend_slice_yuv function by vim column edit
Lance Wang
lance.lmwang at gmail.com
Sat May 25 02:29:58 EEST 2019
On Saturday, May 25, 2019, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> Am Fr., 24. Mai 2019 um 11:36 Uhr schrieb <lance.lmwang at gmail.com>:
> >
> > From: Limin Wang <lance.lmwang at gmail.com>
> >
> > ---
> > libavfilter/vf_overlay.c | 52 ++++++++++++++++++++--------------------
> > 1 file changed, 26 insertions(+), 26 deletions(-)
> >
> > diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> > index b468cedf2e..c1abd3e1b2 100644
> > --- a/libavfilter/vf_overlay.c
> > +++ b/libavfilter/vf_overlay.c
> > @@ -598,32 +598,32 @@ static inline void alpha_composite(const AVFrame
> *src, const AVFrame *dst,
> > }
> > }
> >
> > -static av_always_inline void blend_slice_yuv(AVFilterContext *ctx,
> > - AVFrame *dst, const
> AVFrame *src,
> > - int hsub, int vsub,
> > - int main_has_alpha,
> > - int x, int y,
> > - int is_straight,
> > - int jobnr, int nb_jobs)
> > -{
> > - OverlayContext *s = ctx->priv;
> > - const int src_w = src->width;
> > - const int src_h = src->height;
> > - const int dst_w = dst->width;
> > - const int dst_h = dst->height;
> > -
> > - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 0, 0,
> 0, x, y, main_has_alpha,
> > - s->main_desc->comp[0].plane,
> s->main_desc->comp[0].offset, s->main_desc->comp[0].step, is_straight, 1,
> > - jobnr, nb_jobs);
> > - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 1, hsub,
> vsub, x, y, main_has_alpha,
> > - s->main_desc->comp[1].plane,
> s->main_desc->comp[1].offset, s->main_desc->comp[1].step, is_straight, 1,
> > - jobnr, nb_jobs);
> > - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 2, hsub,
> vsub, x, y, main_has_alpha,
> > - s->main_desc->comp[2].plane,
> s->main_desc->comp[2].offset, s->main_desc->comp[2].step, is_straight, 1,
> > - jobnr, nb_jobs);
> > -
> > - if (main_has_alpha)
> > - alpha_composite(src, dst, src_w, src_h, dst_w, dst_h, x, y,
> jobnr, nb_jobs);
> > +static av_always_inline void blend_slice_yuv(AVFilterContext *ctx,
> \
> > + AVFrame *dst, const
> AVFrame *src, \
> > + int hsub, int vsub,
> \
> > + int main_has_alpha,
> \
> > + int x, int y,
> \
> > + int is_straight,
> \
> > + int jobnr, int nb_jobs)
> \
> > +{
> \
> > + OverlayContext *s = ctx->priv;
> \
> > + const int src_w = src->width;
> \
> > + const int src_h = src->height;
> \
> > + const int dst_w = dst->width;
> \
> > + const int dst_h = dst->height;
> \
> > +
> \
> > + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 0, 0,
> 0, x, y, main_has_alpha, \
> > + s->main_desc->comp[0].plane,
> s->main_desc->comp[0].offset, s->main_desc->comp[0].step, is_straight, 1, \
> > + jobnr, nb_jobs);
> \
> > + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 1, hsub,
> vsub, x, y, main_has_alpha, \
> > + s->main_desc->comp[1].plane,
> s->main_desc->comp[1].offset, s->main_desc->comp[1].step, is_straight, 1, \
> > + jobnr, nb_jobs);
> \
> > + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 2, hsub,
> vsub, x, y, main_has_alpha, \
> > + s->main_desc->comp[2].plane,
> s->main_desc->comp[2].offset, s->main_desc->comp[2].step, is_straight, 1, \
> > + jobnr, nb_jobs);
> \
> > +
> \
> > + if (main_has_alpha)
> \
> > + alpha_composite(src, dst, src_w, src_h, dst_w, dst_h, x, y,
> jobnr, nb_jobs); \
>
> I believe merging patches 2, 3 and 4 makes understanding them easier.
> Maybe also add a line to the commit message that this is to simplify
> a future change.
I split into more patch for better code review. That's okay if need to
one.
For the commit message, please fix with it anyway.
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list