Hello,
I'm developing a s/w for monitoring h264 video streams from the ip cameras.
My company is using MainConcept H264 Decoder now, but we have a plan to change video decoder to Intel IPP. (So we already purchased 2copy of IPP)
In short, I made own decoder class using UMC of IPP and MainConcept function to compare performance of decoding time and tested it. As a result, Mainconept is faster than UMC::H264VideoDecoder of IPP. (more than 2times)
TestCase is..
1. Application make threads per each video streams (It can receive streams from 16 ip cameras, so there are 16 threads for decoding in a application )
2. A thread have it's own video decoder object.
3. A thread decode a camera's h264 video data and then push decoded video into rendering queue.(or no rendering)
4. Application has been linked as dynamic linked library. (both IPP and Mainconcept)
5. I tested it with 16 channel video decoding, 30fps, Wide D1(928*480) for 10 seconds.
6. Mainconcept take about 1 seconds, IPP take more than 2 seconds.
I think I can improve decoding performace of IPP by modification of UMC class, but I don't know how to change it.
Please give me some advices about UMC class or IPP.
Best regards.
See below for understanding my code (It decode one video frame, it can decode h264, mpeg4 and mjpeg)
int IppCommonVideoDecoderProduct::Decode(const XNSDECODER_VIDEO_INFO &video_info, XNSDECODER_VIDEO_BUFFER *video_buffer)
{
UMC::Status status;
UMC::MediaData data_in;
UMC::VideoData data_out;
if (video_decoder_params_->m_info.videoInfo.m_iWidth != video_info.frame_width ||
video_decoder_params_->m_info.videoInfo.m_iHeight != video_info.frame_height) {
video_decoder_params_->m_info.videoInfo.m_iWidth = video_info.frame_width;
video_decoder_params_->m_info.videoInfo.m_iHeight = video_info.frame_height;
if ((status=video_decoder_->Init(video_decoder_params_.get())) != UMC::UMC_OK) {
return XNSDECODER_ERROR_DECODE_FAIL;
}
}
data_in.SetBufferPointer(video_info.frame_data, video_info.frame_size);
data_in.SetDataSize(video_info.frame_size);
int error_code = SetOutData(video_info, video_buffer, &data_out);
if (error_code != XNSDECODER_SUCCESS) {
return error_code;
}
if (deinterace_option_ != XNSDECODER_DEINTERACE_OFF) {
data_out.m_picStructure = UMC::PS_PROGRESSIVE;
}
if ((status = video_decoder_->GetFrame(&data_in, &data_out)) != UMC::UMC_OK) {
// h.264 i-frame decoding error
if (status == UMC::UMC_ERR_NOT_ENOUGH_DATA) {
status = video_decoder_->GetFrame(NULL, &data_out);
}
}
if (status != UMC::UMC_OK) {
return XNSDECODER_ERROR_DECODE_FAIL;
}
return XNSDECODER_SUCCESS;
}

