This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
To any TI H.264 encoder expert,
In order to insert a 32-bit timeStamp value into the H.264 stream, I have modified Venc1_process() as follows:
Int Venc1_process(Venc1_Handle hVe, Buffer_Handle hInBuf, Buffer_Handle hOutBuf, XDS_Int32 frameCount) {
...
}
Using a stream analyzer, I have determined that the changes in SEI Picture Timing Messages I observe seem to reflect changes in the inArgs timeStamp value but in only in the value of cpb_removal_delay such that it repeats modulo 30 i.e., it takes on values of 0,1,..29,0,1,..29,.. etc.
I assume that this is normal behavior - is it?
Here is a typical SEI Picture Timing Message output:
0
cpb_removal_delay should not reset at 30. I am not able to open the attached parameter set. Can you post it again?
also is it possible to share a stream?
Adithya,
Thank you for your prompt reply and, sorry, I wasn't very clear:
Instead of writing "Using a stream analyzer, I have determined that the changes in SEI Picture Timing Messages I observe seem to reflect changes in the inArgs timeStamp value but in only in the value of cpb_removal_delay such that it repeats modulo 30 i.e., it takes on values of 0,1,..29,0,1,..29,.. etc."
Instead, I should have stated that "...I observe that the value of cpb_removal_delay appears to repeat modulo the IDR Frame Interval - which I currently have set to 30." And, clearly, this behavior is in accordance with ITU-T Rec. H.264 - correct?
Also, can you tell me in which future version of the TI H.264 Encoder will the SEI Picture Timing Message will carry hours:minutes:seconds? I know that the current version of the H.264 Decoder already supports this functionality.
Thanks,
-Chuck
P.S. My previous post was cut off but here is a typical SPS/PPS with SEI Picture Timing Messages:
0x00000000 H264 Sequence Parameter Set
profile_idc = 100 (PROFILE_IDC_High)
constraint_set0_flag = 0
constraint_set1_flag = 0
constraint_set2_flag = 0
constraint_set3_flag = 0
reserved_zero_4bits = 0
level_idc = 42
seq_parameter_set_id = 0
chroma_format_idc = 1
bit_depth_luma_minus8 = 0
bit_depth_chroma_minus8 = 0
qpprime_y_zero_transform_bypass_flag = 0
seq_scaling_matrix_present_flag = 1
log2_max_frame_num_minus4 = 0
pic_order_cnt_type = 2
num_ref_frames = 1
gaps_in_frame_num_value_allowed_flag = 0
pic_width_in_mbs_minus1 = 79 (1280)
pic_height_in_map_units_minus1 = 44 (720)
frame_mbs_only_flag = 1
direct_8x8_inference_flag = 1
frame_cropping_flag = 0
vui_parameters_present_flag = 1
vui_parameters():
aspect_ratio_info_present_flag = 1
aspect_ratio_idc = 1
overscan_info_present_flag = 0
video_signal_type_present_flag = 1
video_format = 2
video_full_range_flag = 1
colour_description_present_flag = 0
chroma_loc_info_present_flag = 0
timing_info_present_flag = 1
num_units_in_tick = 1
time_scale = 60
fixed_frame_rate_flag = 0
nal_hrd_parameters_present_flag = 1
hrd_parameters():
cpb_cnt_minus1 = 0
bit_rate_scale = 0
cpb_size_scale = 2
bit_rate_value_minus1[0] = 976561, cpb_size_value_minus1[0] = 976561, cbr_flag[0] = 0
initial_cpb_removal_delay_length_minus1 = 23
cpb_removal_delay_length_minus1 = 23
dpb_output_delay_length_minus1 = 23
time_offset_length = 24
vcl_hrd_parameters_present_flag = 0
low_delay_hrd_flag = 1
pic_struct_present_flag = 0
bitstream_restriction_flag = 1
motion_vectors_over_pic_boundaries_flag = 1
max_bytes_per_pic_denom = 0
max_bits_per_mb_denom = 0
log2_max_mv_length_horizontal = 16
log2_max_mv_length_vertical = 16
num_reorder_frames = 0
max_dec_frame_buffering = 1
0x0000007C H264 Picture Parameter Set
pic_parameter_set_id = 0
seq_parameter_set_id = 0
entropy_coding_mode_flag = 1
pic_order_present_flag = 0
num_slice_groups_minus1 = 0
num_ref_idx_L0_active_minus1 = 0
num_ref_idx_L1_active_minus1 = 0
weighted_pred_flag = 0
weighted_bipred_idc = 0
pic_init_qp_minus26 = 0
pic_init_qs_minus26 = 0
chroma_qp_index_offset = 0
deblocking_filter_control_present_flag = 1
constrained_intra_pred_flag = 0
redundant_pic_cnt_present_flag = 0
transform_8x8_mode_flag = 0
pic_scaling_matrix_present_flag = 0
0x00000084 H264 SEI
BUFFERING_PERIOD
seq_paramater_set_id = 0
nal_initial_cpb_removal_delay[0] = 90000, nal_initial_cpb_removal_delay_offset[0] = 0
PIC_TIMING
cpb_removal_delay = 0
dpb_output_delay = 0
pic_struct = 0 (frame)
num_clock_ts = 0
...
0x0002B557 H264 SEI
BUFFERING_PERIOD
seq_paramater_set_id = 0
nal_initial_cpb_removal_delay[0] = 90000, nal_initial_cpb_removal_delay_offset[0] = 0
PIC_TIMING
cpb_removal_delay = 30
dpb_output_delay = 0
pic_struct = 0 (frame)
num_clock_ts = -905969664
0x0002C6A1 H264 SEI
PIC_TIMING
cpb_removal_delay = 1
dpb_output_delay = 0
pic_struct = 0 (frame)
num_clock_ts = -905969664
Chuck,
You are correct about the cpb_removal_delay. Sorry I didn't get it.
There is no plan to provide hours:minutes:seconds information as a part of the SEI message.
Adithya,
If there are no plans to implement the hours:minutes:seconds functions within the Picture Timing SEI Message, what is the best way to convey that information to the H.264 decoder application? Should we use the User Data Unregistered SEI Message? Or is there a better mechanism to do so?
Thanks,
-Chuck
Chuck,
You could use user data unregistered SEI. It is described in the link below
http://processors.wiki.ti.com/index.php/DM36x_H.264_encoder_FAQ#How_to_insert_user_data_SEI_message_in_H.264_bitstream.3F
You could still use cpb_removal_delay at the decoder. If even it resets, it is known that it is because of IDR. cpb_removal_delay can be used to find out frame skips at the encoder.
It was very nice, if such a feature for DM8148/DM8168 would be available, too. Is there any hope concerning this, inserting user-defined SEI? Or have I overseen somewhat?
Thanks in advance,
Joern.