I am using intel IPP libraries for decoding H264 video stream. Video streams in 30 FPS with 1280 x 780 resolution.
For decoding one H264 video channel, the decoderprogramtakes around 30 - 40 % of CPU usage.
Even after calling the
and below is the code snippet which i used for decoding H264 video stream data. Please let me know if i am missing anything in my code which consumes more CPU.
Ipp8u *cVideoData; // Contains the pointer to compressed video frame
Ipp8u *cRGBData; // Buffer allocated for decompressed RGB image
int RGBimgWidth = 1280;
int RGBimgHeight = 780;
int VideoDataSize; // datasize of compressed image
UMC::Status status = UMC::UMC_OK;
Params.m_pData = &DataIn;
if(!m_bdecInit && status = pH264Decoder->Init(&Params)!=UMC::UMC_OK)
m_bdecInit = true;
status = pH264Decoder->GetFrame(&DataIn, &DataOut);
if (status == UMC::UMC_OK)
RGBimgWidth = Params.info.clip_info.width;
RGBimgHeight = Params.info.clip_info.height;
status = pH264Decoder->GetFrame(NULL, &DataOut);
if (status != UMC::UMC_OK)
Which compiler are you using to compile the sample application? H.264 is threaded with OpenMP. It requires the compiler to support OpenMP ( Intel C++, Visual C++ 2008, etc).
If this also looks fine, you can attach a bitstream, so we can have a check.
Hi Emmanuel and scorpuva,
This has two questions here:
1) If the decoder tries to decode as faster as possible, what is CPU usage here, what is the max frame rate it can get?
I just tried the attached SampleVideo.264 file with UMC umc_h264_dec_con sample application. It almost reached the 100% CPU usage. I test at my laptop with Core 2 Duo T7300, 2.0G, and the frame rate is about 90fps.
2)If application code only wants to maintain about 30fps, what is CPU usage will be enough.
I agree with Emmanuel. 30%-40% usage of a core 2 duo 2.44 might be enough for decoding the attached video file.
The video streams in the frame rate of 30 FPS from the h264 encoder with the bitrate of 3mbps. Currently it takes around 30 - 40 percent.
I tested the same video stream withVLC player which takes around 15 - 20 percent. Both the VLC and My decompression module are using the RTSP connection with the h264 encoder. How does VLC can decode the same video stream with cpu usage of 15- 20 %?. How to make the IPP decoder to consume cpu below