JPEG/R: lift the checking criteria for width 8-alignment
JPEG/R library uses jpeg-turbo for JPEG encoding, which runs DCT transform on block size of 16x16 for luma, and 8x8 for chroma. The resolution in the bug report is not 16-aligned and it results in null pointer dereference for the last line in jpeg-turbo. The original checking for 8-alignment width was wrong (should check 16-alignment). jpeg-turbo has some edge case handling for this case, and it requires some extra room at the end of input. This change removed the checking criteria by adding a padding zero method. A reason size of the padding zeros is a CB block, which is 8x8, 64 bytes. Bug: 277982036 Test: CTS: ImageReaderTest#testJpegR, uint test: jpegrencoderhelper_test.cpp Change-Id: I1313a002db6d4bc63b32dc3dd3d6ccdf06779149
Loading
Please register or sign in to comment