[FFmpeg-devel] [PATCH 2/3] lavfi/overlay: simpler up-rounded w/h computations.

Clément Bœsch ubitux at gmail.com
Thu May 9 17:01:03 CEST 2013


On Wed, May 08, 2013 at 12:48:45AM +0200, Stefano Sabatini wrote:
> On date Tuesday 2013-05-07 16:39:32 +0200, Clément Bœsch encoded:
> > ---
> >  libavfilter/vf_overlay.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> > index 1681979..ce1b10b 100644
> > --- a/libavfilter/vf_overlay.c
> > +++ b/libavfilter/vf_overlay.c
> > @@ -478,10 +478,10 @@ static void blend_image(AVFilterContext *ctx,
> >          for (i = 0; i < 3; i++) {
> >              int hsub = i ? over->hsub : 0;
> >              int vsub = i ? over->vsub : 0;
> > -            int src_wp = FFALIGN(src_w, 1<<hsub) >> hsub;
> > -            int src_hp = FFALIGN(src_h, 1<<vsub) >> vsub;
> > -            int dst_wp = FFALIGN(dst_w, 1<<hsub) >> hsub;
> > -            int dst_hp = FFALIGN(dst_h, 1<<vsub) >> vsub;
> > +            int src_wp = ROUNDED_RSHIFT(src_w, hsub);
> > +            int src_hp = ROUNDED_RSHIFT(src_h, vsub);
> > +            int dst_wp = ROUNDED_RSHIFT(dst_w, hsub);
> > +            int dst_hp = ROUNDED_RSHIFT(dst_h, vsub);
> 
> LGTM once you agree on the new name.

Pushed.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130509/2ba33906/attachment.asc>


More information about the ffmpeg-devel mailing list