Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

8 bit grayscale mjpeg decode problem

ynhuang
Beginner
722 Views
Hi

I use ipp 5.3 towrite a program to dispaly stream from ip camera. I use UMC jpeg decoder to decode mjpeg stream.

It works well until decode8 bit grayscalemjpeg. The image incorrect and sometime UMC jpeg decoder crash.

Does anyone knows ipp and UMC 5.3 support 8 bit grayscalemjpeg ? Or how to fix this problem ?

0 Kudos
5 Replies
Sergey_Ryadno
New Contributor I
722 Views
Quoting - ynhuang
Hi

I use ipp 5.3 towrite a program to dispaly stream from ip camera. I use UMC jpeg decoder to decode mjpeg stream.

It works well until decode8 bit grayscalemjpeg. The image incorrect and sometime UMC jpeg decoder crash.

Does anyone knows ipp and UMC 5.3 support 8 bit grayscalemjpeg ? Or how to fix this problem ?


Hi, can you attach here this 8 bit grayscale mjpeg file? It will be very helpful to us in invistigating this issue.
0 Kudos
ynhuang
Beginner
722 Views
Quoting - sryadno

Hi, can you attach here this 8 bit grayscale mjpeg file? It will be very helpful to us in invistigating this issue.

Hi sryadno,
grayscale.zip is the mjpeg file that I use.
0 Kudos
Sergey_Ryadno
New Contributor I
722 Views
Quoting - ynhuang
Hi

I use ipp 5.3 towrite a program to dispaly stream from ip camera. I use UMC jpeg decoder to decode mjpeg stream.

It works well until decode8 bit grayscalemjpeg. The image incorrect and sometime UMC jpeg decoder crash.

Does anyone knows ipp and UMC 5.3 support 8 bit grayscalemjpeg ? Or how to fix this problem ?



Hi, try to change incodecjpegsrcjpegdec.cpp in function ColorConvert() in case "Gray to BGR"

this strings

pSrc8u[0] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[1] = m_ccomp[2].GetCCBufferPtr(thread_id);
pSrc8u[2] = m_ccomp[2].GetCCBufferPtr(thread_id);

to this

pSrc8u[0] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[1] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[2] = m_ccomp[0].GetCCBufferPtr(thread_id);

I think it mast fix this issue.




0 Kudos
Sergey_Ryadno
New Contributor I
722 Views
Quoting - sryadno


Hi, try to change incodecjpegsrcjpegdec.cpp in function ColorConvert() in case "Gray to BGR"

this strings

pSrc8u[0] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[1] = m_ccomp[2].GetCCBufferPtr(thread_id);
pSrc8u[2] = m_ccomp[2].GetCCBufferPtr(thread_id);

to this

pSrc8u[0] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[1] = m_ccomp[0].GetCCBufferPtr(thread_id);
pSrc8u[2] = m_ccomp[0].GetCCBufferPtr(thread_id);

I think it mast fix this issue.





Applying of this changes lead to correct show attached mjpeg file in umc simple_player.
0 Kudos
ynhuang
Beginner
722 Views
Quoting - sryadno

Applying of this changes lead to correct show attached mjpeg file in umc simple_player.

Thanks a lot. I can dispaly this video correct now
0 Kudos
Reply