Skip to content

Conversation

@arabian9ts
Copy link

Thank you for the great repository!
I'm considering using pic_struct_present_flag for SEI analysis.

The comment in the code states that if BitstreamRestrictionFlag == 1, parsing may fail due to missing bits. However, it is unclear in which specific samples this issue occurs.

At least according to ITU-T H.264 (04/2017), the standard specifically defines both pic_struct_present_flag and bitstream_restriction_flag as 1-bit fields. I think it would be very useful to parse these fields.

https://www.itu.int/itu-t/recommendations/rec.aspx?rec=13189

sps.Frame_crop_left_offset = bs.ReadUE() // frame_crop_left_offset
sps.Frame_crop_right_offset = bs.ReadUE() // frame_crop_right_offset
sps.Frame_crop_top_offset = bs.ReadUE() // frame_crop_top_offset
sps.Frame_crop_bottom_offset = bs.ReadUE() // frame_crop_bottom_offset
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The editor will automatically insert spaces. sorry.

sps.Offset_for_non_ref_pic = bs.ReadSE() // offset_for_non_ref_pic
sps.Offset_for_top_to_bottom_field = bs.ReadSE() // offset_for_top_to_bottom_field
num_ref_frames_in_pic_order_cnt_cycle := bs.ReadUE()
sps.Offset_for_ref_frame = make([]int64, num_ref_frames_in_pic_order_cnt_cycle)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here index out of range was occurring so fixed to initialize the slice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant