On Mon Oct 16 23:45:45 2023 +0000, Zebediah Figura wrote:
This is overestimation because we can't do any better, right? In that case it probably deserves a comment just to clarify that's what's happening.
Yeah, that entire function is confusing. It's supposed to return the max size of a compressed frame, but I don't think there is any real upper bound for that, you can cram in as many optional extensions as you want.
So yes, it's guessing decompressed size as an upper bound. It'll break for 1x1 videos (can't fit the MPEG headers in three bytes), and videos crammed full of junk data, but let's just not care about those.
But comments, sure, can do. And the Cinepak branch's comment is suspicious at best - what does biSizeImage have to do with compressed size?