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

IPP Samples 7.0 H264 distorted color

ehanshum
Beginner
1,063 Views
Hi all,

I'm developing a real time streaming application on 32bit Linux platform where raw YUY2 images are encoded using H264 codec. However, after updating to IPP samples 7.0.3 from IPP samples 6.1.6, the decoded video stream suffers from color distortion. Attached is a comparison image: Captured image on left; encoded and decoded image on right.

I checked UMC manual and there seems to be no mention about additional settings but the samples code for the decoder seem to have changed a lot.

The only changes I made to the H264 codecs are as mentioned in these threads:

http://software.intel.com/en-us/forums/showpost.php?p=94083
http://software.intel.com/en-us/forums/showpost.php?p=138397

Previously, the changes are also applied to IPP samples 6.1.6 but there are no problems.

Kindly advise on my problem.

Thank you.
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
1,063 Views
Hello,

it seems on theorder of R-G-B channels has been switched to B-G-R. Please check color conversion step in your application.

Regards,
Vladimir
0 Kudos
ehanshum
Beginner
1,063 Views
Hi Vladimir,

There is no color conversion in my application ... I am capturing YUYV images from LInux UVC webcams. In the wrapper classes for the encoder and decoder I initialized UMC::VideoData with UMC::YUY2.

Below are the settings I used for H264EncoderParams:

[bash]    m_EncoderParams.key_frame_controls.method = UMC::H264_KFCM_INTERVAL;
    m_EncoderParams.key_frame_controls.interval = 20;
    m_EncoderParams.key_frame_controls.idr_interval = 1;
    m_EncoderParams.B_frame_rate = 0;
    m_EncoderParams.treat_B_as_reference = 0;
    m_EncoderParams.num_ref_frames = 2;
    m_EncoderParams.num_ref_to_start_code_B_slice = 1;
    m_EncoderParams.num_slices = 1;
    m_EncoderParams.profile_idc = UMC::H264_HIGH10_PROFILE;
    m_EncoderParams.level_idc = 50;
    m_EncoderParams.chroma_format_idc = 1;
    m_EncoderParams.bit_depth_luma = 8;
    m_EncoderParams.bit_depth_chroma = 8;
    m_EncoderParams.aux_format_idc = 0;
    m_EncoderParams.bit_depth_aux = 8;
    m_EncoderParams.alpha_incr_flag = 0;
    m_EncoderParams.alpha_opaque_value = 0;
    m_EncoderParams.alpha_transparent_value = 0;
    m_EncoderParams.rate_controls.method = UMC::H264_RCM_VBR;
    m_EncoderParams.rate_controls.quantI = 30;
    m_EncoderParams.rate_controls.quantP = 30;
    m_EncoderParams.rate_controls.quantB = 30;
    m_EncoderParams.use_weighted_bipred = 0;
    m_EncoderParams.use_weighted_pred = 0;
    m_EncoderParams.use_implicit_weighted_bipred = 0;
    m_EncoderParams.direct_pred_mode = 1;
    m_EncoderParams.use_direct_inference = 1;
    m_EncoderParams.mv_search_method = 2;
    m_EncoderParams.me_split_mode = 0;
    m_EncoderParams.me_search_x = 8;
    m_EncoderParams.me_search_y = 8;
    m_EncoderParams.deblocking_filter_idc = 0;
    m_EncoderParams.deblocking_filter_alpha = 0;
    m_EncoderParams.deblocking_filter_beta = 0;
    m_EncoderParams.transform_8x8_mode_flag = 0;
    m_EncoderParams.use_default_scaling_matrix = 0;
    m_EncoderParams.qpprime_y_zero_transform_bypass_flag = 0;
    m_EncoderParams.entropy_coding_mode = 0;
    m_EncoderParams.cabac_init_idc = 2;
    m_EncoderParams.coding_type = 0;
    m_EncoderParams.numThreads = 1;
    m_EncoderParams.m_QualitySpeed = 1;[/bash]


0 Kudos
Reply