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

H.264 encoder + Polycom m100

Livikin_Alexey
Beginner
471 Views
Hi,

We try implement h.264 encoder for video conference systems. Him must operate on BASELINE profile and produce constant bitrate output. We maid code based on samples (GetFrame function) , but Polycom m100 dont show anything. At same time Linphone work fine. We use next params for encoder:

key_frame_controls.method = H264_KFCM_INTERVAL;
key_frame_controls.interval = 100; // for safety
key_frame_controls.idr_interval = 0;
B_frame_rate = 0;
treat_B_as_reference = 0;
num_ref_frames = 0;
num_ref_to_start_code_B_slice = 0;
num_slices = 0; // Autoselect
profile_idc = H264_PROFILE_BASELINE;
level_idc = 0; //Autoselect
chroma_format_idc = 1; // YUV 420.
bit_depth_luma = 8;
bit_depth_chroma = 8;
aux_format_idc = 0;
bit_depth_aux = 8;
alpha_incr_flag = 0;
alpha_opaque_value = 0;
alpha_transparent_value = 0;
rate_controls.method = H264_RCM_CBR;
rate_controls.quantI = 30;
rate_controls.quantP = 30;
rate_controls.quantB = 0;
info.bitrate = 128000;
info.clip_info.width = 352;
info.clip_info.height = 288;
info.framerate = 15.000;
mv_search_method = 2;
me_split_mode = 0;
me_search_x = 8;
me_search_y = 8;
use_weighted_pred = 1;
use_weighted_bipred = 0;
use_implicit_weighted_bipred = 0;
direct_pred_mode = 0;
use_direct_inference = 1;
deblocking_filter_idc = 1; // 0 is "on". 1 - "off"
deblocking_filter_alpha = 1;
deblocking_filter_beta = 1;
transform_8x8_mode_flag = 0;
use_default_scaling_matrix = 0;
qpprime_y_zero_transform_bypass_flag =0;
entropy_coding_mode = 0;
cabac_init_idc = 0;
coding_type = 0;
m_do_weak_forced_key_frames = false;
write_access_unit_delimiters = 0;
use_transform_for_intra_decision = false;
numFramesToEncode = 0;
m_QualitySpeed = 0;
quant_opt_level = 0;

Input data is static blue image. Encoded pictures at 70 - 700 bytes. So advanced packetization dont use.

Where the problem? Please help.

0 Kudos
6 Replies
Ying_H_Intel
Employee
471 Views
Hi

according to the h.264 parameter sample:

/* CommentLine: H.264 Sequence.*/
stream.yuv /* name of source files */
300 /* number of frames to encode */
0 200 0 /* reserved; I frames interval (0-for I frames only); IDR interval */
3 1 /* number of B frames between I (or P) and next P; B reference mode */
4 1 0 /* num_ref_frames (0-16), minimum length of list1 for backward prediction (only 1 is supported!), number of slices. */
0 0 /* profile_idc (0-auto, 66-base, 77-main, 100-high, 110-high10, 122-high422, 244-high444), if profile is specified, unsupported values will be changed; level_idc (0-auto) */
352 /* horizontal_size */
288 /* vertical_size */
5 /* frame_rate_code (0-30fps, 1-15fps, 2-24fps, 3-25fps, 4-30fps, 5-30fps, 6-50fps, 7-60fps, 8-60fps) */
1 8 8 /* chroma_format_idc (0-monochrom, 1-420), bit_depth_luma (8 only), bit_depth_chroma (8 only) */
0 8 0 0 0 /* aux_format_idc: [0,3], bit_depth_aux: (8 only), alpha_incr_flag: 0, 1; alpha_opaque_value: [0, 255]; alpha_transparent_value: [0, 255] */
2 0 0 0 1000000 /* RC method(0-constant QP, 1-CBR, 2-VBR); start qp values for I, P, B slices; bitrate (bits per second) */
2 1 8 8 /* ME method (0-Full, 1-CLog, 2-Log, 3-EPZS, 4-Full ortho, 5-Log ortho, 6-TTS); subblock split (0-16x16, 1-8x8, 2-4x4); search_x; search_y */
0 0 0 /* weighted_pred_flag (unsupported!); weighted_bipred_idc (unsupported!); reserved */
1 0 /* direct type (0-temporal 1-spatial 2-auto); direct_8x8_inference_flag */
0 0 0 /* disable_deblocking_idc (0-on, 1-off, 2-on without crossing slice boundaries); deblocking_filter_alpha, deblocking_filter_beta */
1 0 0 /* transform_8x8_mode (0-off, 1-on); scaling matrices for 8x8 transform (0-flat, 1-default); qpprime_y_zero_transform_bypass_flag (unsupported!) */
0 /* reserved */
0 /* reserved */
1 2 /* entropy_coding_mode_flag (0-cavlc, 1-cabac); cabac_init_idc (0-2) */
0 /* picture coding type (0-FRM, 1-FLD) */
1 0 /* speed/quality grade (0-maximum speed, 5-maximum quality); optimal quantization (0-off, 1-on) */

Thereis not obvious problem in your setting.
but theIPP h.264 encodershould produce generalstream (without anyspecial format ) with


Known Limitations

  • Encoder produce only JM9.2 compatible streams
  • SI and SP slice types are not supported.
  • Slice Data Partitioning is not supported.
  • - Annex A - Enforcement of Profile and Level Restrictions is not supported.
  • - Annex C - Full conformance with HRD (Hypothetical Reference Decoder) is not supported.
  • - Annex D - SEI (Supplemental Enhancement Information) is not supported.
  • - Annex E - VUI (Video Usability Information) is not supported.
  • Long Term Reference frames are not supported.
  • FMO (flexible macroblock ordering) is not supported.
  • ASO (arbitrary slice order) is not supported.
  • Weighted prediction is not supported.
  • The encoder only supports slices with MBs in raster order. All slices are the same size (in MBs) with any remainder going to the final slice. The maximum number of slices is the number of MB rows (one slice per row of 16x16 MBs).
  • Encoder does not support frame resizing. Thus input and output frame sizes should be the same.
  • Custom and default scale matrices are not supported. Standard scaling matrices are always used.
  • Transform 8x8 can be used for inter coding only.
  • The encoder assumes that input VideoData object contains frame in YUV420 (I420 according to FOURCC.org) format

Have you tested the parameter by UMC encoder and simple_player.exe under \ipp-samples\audio-video-codecs\application\umc_video_enc_con? how does it work?

And you mentioned, that Polycom m100 don't show anything. At same time Linphone work fine. does it mean polycom asked some special format about the encdded steam?
Could you record a piece of stream and attach with the post?

Regards,
Ying

0 Kudos
Livikin_Alexey
Beginner
471 Views
Thanks for reply. After some study i think its packetization issues..... Are there any examples for get encoded data in NALUs?
0 Kudos
Ying_H_Intel
Employee
471 Views
Hi Alexey,

You reminder me, I recalled, the IPP h264 encoder can't produce the packetization-Mode 0 bitstream(Single-NAL), only support H.264 packetization-mode=1, butmost Voip devices negotiate packetization-mode=0, may bethis is the cause.

Best Regards,
Ying
0 Kudos
Livikin_Alexey
Beginner
471 Views
Hi Ying,

I dont asked about that, but its interesting.When locate sample code for packetization-mode=1? In standard samples i dont find...

Thanx.
0 Kudos
Pavel_V_Intel
Employee
471 Views
Good day.

First of all:
use_weighted_pred = 1;
use_weighted_bipred = 0;
use_implicit_weighted_bipred = 0;
direct_pred_mode = 0;
use_direct_inference = 1;
use_weighted_pred and use_direct_inference are not baseline options you should disable them.

Unfortunately I neither can tell anything about Polycom m100 compatibility with our codec, nor have means to test it.

After some study i think its packetization issues..... Are there any examples for get encoded data in NALUs?
I am not sure I understand. You want to repack stream into your own NALs?

When locate sample code for packetization-mode=1? In standard samples i dont find...
We don't use RTP streaming in our samples. By default our codec cannot generate NAL units with limited size (which make it poorly compatible with packetization-mode=0) however there is experimental branch which can be activated by SLICE_CHECK_LIMIT definition in umc_h264_config.h. After that you can use parameter num_slices with negative value to set maximum limit in bytes for slices. By doing that you can fit NAL units into required limits for RTP streaming.
0 Kudos
Livikin_Alexey
Beginner
471 Views
Hi,

Thanx SLICE_CHECK_LIMIT helpfull...

Best Regards,
Alexey.
0 Kudos
Reply