Community
cancel
Showing results for 
Search instead for 
Did you mean: 
IDZ_A_Intel
Employee
62 Views

H.264 UMC encoder: non-IDR I frame is generated, even when idr_interval is set to 1

I'm using IPP 6.1 with the lastest update.

I wrote a program that uses your UMCH.264 encoder and I found that sometimes it generates non-IDR I frames, even I set the H264EncoderParams::key_frame_controls.idr_interval to 1.

My parameters are like this:

params->chroma_format_idc = 1;

params->profile_idc = H264_BASE_PROFILE;

params->entropy_coding_mode = 0;

params->B_frame_rate = 0;

params->coding_type = 0;

params->mv_search_method = 6;

params->me_split_mode = 0;

params->me_search_x = params->me_search_y = 8;

params->deblocking_filter_idc = 0;

params->num_ref_frames = 1;

params->rate_controls.method = H264_RCM_VBR;

params->rate_controls.quantI = 20 - (quality_ - QUALITY_STANDARD) * 3;

params->rate_controls.quantP = 32 - (quality_ - QUALITY_STANDARD) * 3;

params->rate_controls.quantB = 50;

params->info.bitrate = 0;

params->key_frame_controls.method = H264_KFCM_INTERVAL;

params->key_frame_controls.interval = keyInterval_;

params->key_frame_controls.idr_interval = 1;

My application requires that all I-frames must be decoded by itself (i.e. all I frames must be IDR frame)
In my knowledge, to make an I frame an IDR frame, setting idr_interval to 1 is all I have to do.

But with this setting, UMC encoder sometimes generates non-IDR I frame.



H264CoreEncoder_Encoder function in umc_h264_gen_enc_tmpl.cpp.h ,

switch (ePictureType) {

case INTRAPIC:

if (core_enc->m_pCurrentFrame->m_bIsIDRPic || core_enc->m_uFrames_Num == 0) {

// Right now, only the first INTRAPIC in a sequence is an IDR Frame

ePic_Class = IDR_PIC;

core_enc->m_l1_cnt_to_start_B = core_enc->m_info.num_ref_to_start_code_B_slice;

} else {

ePic_Class = REFERENCE_PIC;

}

break;


Sometimes ePic_Class becomes REFERENCE_PIC(non-IDR frame, right?)and this I frame cannot be decoded solely.

Please let me know - Is my parameter wrong? or something is wrong in IPP UMC sample?

Regards,
stoh

0 Kudos
2 Replies
Ying_H_Intel
Employee
62 Views

Just for your reference,
the dicussion in http://software.intel.com/en-us/forums/showthread.php?t=79567&o=a&s=lrseems similiar.

Regards,
Ying
Ying_H_Intel
Employee
62 Views

One additional notes , for make sure each I frame become IDR frame, youmaymodifythis condition

switch (ePictureType) {
case INTRAPIC:
// if (core_enc->m_pCurrentFrame->m_bIsIDRPic || core_enc->m_uFrames_Num == 0)
if (core_enc->m_pCurrentFrame->m_bIsIDRPic || core_enc->m_uFrames_Num == 0 || core_enc->m_info.key_frame_controls.idr_interval == 1)
{
ePic_Class = IDR_PIC;
core_enc->m_l1_cnt_to_start_B = core_enc->m_info.num_ref_to_start_code_B_slice;
}

Happy new year!

Best wishes,
Ying

Reply