2019-03-06 12:31 GMT+01:00, myp...@gmail.com <myp...@gmail.com>: > On Wed, Mar 6, 2019 at 3:55 PM Carl Eugen Hoyos <ceffm...@gmail.com> wrote: >> >> 2019-03-06 4:18 GMT+01:00, Jun Zhao <mypopy...@gmail.com>:
>> > + // accumulation of 8-bits uint_8 (uint8_t *src) into 32-bits >> > (uint32_t *ii) >> > + // data type, it will have a risk of an integral value becoming >> > larger than >> > + // the 32-bits integer capacity and resulting in an integer >> > overflow. >> > + if ((w * h * UINT8_MAX) > UINT32_MAX) >> >> I don't think UINT8_MAX increases readability and I suspect >> this should contain "UINT32_MAX / (w*h)" or similar on >> one side. >> > You means like: UINT32_MAX/w < (UINT8_MAX * h) ? Actually: (UINT32_MAX / w < 255 * h) (But that may only be me) Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel