[FFmpeg-devel] [PATCH] libavfilter/vf_scale: Ensure scaled video is divisible by n

Lars Kiesow lkiesow at uos.de
Mon Aug 12 17:02:46 EEST 2019


Hi Michael,

> > +             if (scale->force_divisible_by > 1) {
> > +                 w = ceil(w / (float)scale->force_divisible_by) *
> > scale->force_divisible_by;
> > +                 h = ceil(h / (float)scale->force_divisible_by) *
> > scale->force_divisible_by;  
> 
> you dont need float here and its better not to use float when not
> needed so theres a chance less for platform bitexactness issues

Updated the patch so it's only using integers as well when rounding up.
I hope this works for you.

Best regards,
Lars


More information about the ffmpeg-devel mailing list