2019-03-06 12:31 GMT+01:00, [email protected] <[email protected]>: > On Wed, Mar 6, 2019 at 3:55 PM Carl Eugen Hoyos <[email protected]> wrote: >> >> 2019-03-06 4:18 GMT+01:00, Jun Zhao <[email protected]>:
>> > + // 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 [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
