Gautam Ramakrishnan (12020-07-04): > > Minor: we could have FFBETWEEN() for that. > I shall use this.
You would need to add it first, which is ok by me.
Note that (x >= a) && (x < b) can be written in a more efficient way:
(unsigned)x - a < (unsigned)b - a
> If I got you right, you mean initialize 'line' outside the first for loop.
> Keep incrementing after every line is traversed. This is similar to the
> one in jpeg2000dec.c. Shall do that if that is what you meant.
Yes, that is exactly what I mean.
> Should manually take the 2's complement instead? Could write
> an inline function for that.
I think we cannot avoid doing this.
> > The multiplication can overflow.
> width and height could both be 32 bit. Typecasting to 64 bit might
> also overflow in that
> case. Any other alternatives?
We must check the operands before multiplying. Something like this:
if (height > INT_MAX / width / bpp)
Regards,
--
Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
