2016-02-23 0:22 GMT+01:00 Ganesh Ajjanagadde <gajja...@gmail.com>: > On Fri, Feb 19, 2016 at 1:06 PM, Martin Vignali > <martin.vign...@gmail.com> wrote: > > Hello, > > > > Is it necessary to clip value, if B == 0 ? > > Well, integer division by 0 is undefined... > > > > > > > Martin > > > > 2016-02-19 18:47 GMT+01:00 Timothy Gu <timothyg...@gmail.com>: > > > [...] >
Yes, but in that case, zero division can't happen, because B == 0 is tested. For now, this is the line av_clip_uint8(B == 0 ? 255 : 255 * A / B)) I think something like this can be enough : B == 0 ? 255 : av_clip_uint8(255 * A / B)) Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel