In ipp-samples v5.3, audio-video-codecs/codec/jpeg/src/jpegenc.cpp, at line 2557, thereis anassumption that an image's width and row step size are the same.
However, this is not necessarily the case.
When the image's width androw step size differ, the encoder will write beyond the end of thebuffer allocated for a color component's m_ss_buf. The erroneous linecurrently reads roi.width = srcStep; It should be something likeroi.width = (curr_comp->m_hsampling == 1) ? m_src.width / 2 :m_src.width;