team-charls / charls

CharLS, a C++ JPEG-LS library implementation
BSD 3-Clause "New" or "Revised" License
188 stars 74 forks source link

Fix the incorrect computation for bytes_per_plane if custom stride is used #198

Closed vbaderks closed 2 years ago

vbaderks commented 2 years ago

The bytes_per_plane value was using the default stride and not the passed custom stride. For multi component images with interleave mode none this caused the second plane to overwrite part of the first decoded plane, etc.

Also added a check to verify the passed stride argument, it should minimal be the default stride.