forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

slice_seg.rs17 lines, 808 bytesHistoryRawDownload
1//! The header of a slice segment (7.4.7.1). A dependent slice segment has no
2//! slice header of its own: it takes the values of the independent segment before
3//! it. Only its address, its entry points and its position in the NAL unit belong
4//! to it.
5
6use ec_h265_syntax::slice::SliceHeader;
7
8/// The header a dependent slice segment decodes with: `base` (the header of the
9/// slice's independent segment) with the segment's own fields.
10pub fn inherit(base: &SliceHeader, segment: &SliceHeader) -> SliceHeader {
11 let mut header = base.clone();
12 header.first_slice_segment_in_pic = segment.first_slice_segment_in_pic;
13 header.dependent_slice_segment = true;
14 header.segment_address = segment.segment_address;
15 header.entry_point_offsets = segment.entry_point_offsets.clone();
16 header
17}