You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting a 16-bit file to a packed 10-bit file, if the input file is not an exact multiple of 8 bytes, the last iteration reads past the end of inputBuffer. Since outputBuffer::operator[] is used to assign to the output, it will properly resize as needed.
When unpacking a 10-bit file to a 16-bit file, if the input file is not an exact multiple of 5 bytes, inputBuffer is resized (but will have whatever garbage was already there), but the assignment into output will write past the end of the outputBuffer.
I can see two possible solutions:
error on an offending input stream
pad the input with 0s as needed to fill the last iteration
The text was updated successfully, but these errors were encountered:
When converting a 16-bit file to a packed 10-bit file, if the input file is not an exact multiple of 8 bytes, the last iteration reads past the end of inputBuffer. Since outputBuffer::operator[] is used to assign to the output, it will properly resize as needed.
When unpacking a 10-bit file to a 16-bit file, if the input file is not an exact multiple of 5 bytes, inputBuffer is resized (but will have whatever garbage was already there), but the assignment into output will write past the end of the outputBuffer.
I can see two possible solutions:
The text was updated successfully, but these errors were encountered: