Merge branch 'opencv:4.x' into pr-output-marker-score

This commit is contained in:
Jonas Perolini 2025-03-14 11:57:23 +01:00 committed by GitHub
commit 814529893f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,9 +319,9 @@ bool GifDecoder::lzwDecode() {
lzwMinCodeSize = m_strm.getByte();
const int lzwMaxSize = (1 << 12); // 4096 is the maximum size of the LZW table (12 bits)
int lzwCodeSize = lzwMinCodeSize + 1;
CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
int clearCode = 1 << lzwMinCodeSize;
int exitCode = clearCode + 1;
CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
int colorTableSize = clearCode;
int lzwTableSize = exitCode;