Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ynhuang
Beginner
115 Views

8 bit grayscale mjpeg decode problem

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
115 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.
ynhuang
Beginner
115 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.
Sergey_Ryadno
New Contributor I
115 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.




Sergey_Ryadno
New Contributor I
115 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.
ynhuang
Beginner
115 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
Reply