From 31e3990657ac29f5c74e9035ec2115c3f5cbd9c7 Mon Sep 17 00:00:00 2001 From: Dimitri Podborski Date: Mon, 18 Sep 2023 08:47:51 -0700 Subject: [PATCH 1/2] fix #163 newline before `extends` keyword, newline before opening `{` syntax highlight for cpp remove unnecessary spaces --- index.bs | 81 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/index.bs b/index.bs index ec1a821..b165774 100644 --- a/index.bs +++ b/index.bs @@ -205,8 +205,10 @@ The AV1SampleEntry sample entry identifies that the track contains [= ### Syntax ### {#av1sampleentry-syntax} -``` -class AV1SampleEntry extends VisualSampleEntry('av01') { +```cpp +class AV1SampleEntry +extends VisualSampleEntry('av01') +{ AV1CodecConfigurationBox config; } ``` @@ -219,9 +221,9 @@ Let MaxRenderWidth be the maximum RenderWidth and MaxRenderHeight be the maximum The width and height in the TrackHeaderBox SHOULD be equal to MaxRenderWidth and MaxRenderHeight, respectively. Additionally, if MaxRenderWidth and MaxRenderHeight values do not equal respectively the [=max_frame_width_minus_1=] + 1 and [=max_frame_height_minus_1=] + 1 values of the [=Sequence Header OBU=], a PixelAspectRatioBox box SHALL be present in the sample entry and set such that: -``` +```cpp hSpacing / vSpacing = MaxRenderWidth * (max_frame_height_minus_1 + 1) / - ((max_frame_width_minus_1 + 1) * MaxRenderHeight) + ((max_frame_width_minus_1 + 1) * MaxRenderHeight) ``` The compressorname field of the [=VisualSampleEntry=] is an informative name. It is formatted in a fixed 32-byte field, with the first byte set to the number of bytes to be displayed, followed by that number of bytes of displayable data, followed by padding to complete 32 bytes total (including the size byte). The value "\012AOM Coding" is RECOMMENDED; the first byte is a count of the remaining bytes, here represented by \012, which (being octal 12) is decimal 10, the number of bytes in the rest of the string. @@ -254,33 +256,36 @@ AV1 Codec Configuration Box {#av1codecconfigurationbox-section} ### Syntax ### {#av1codecconfigurationbox-syntax} -``` -class AV1CodecConfigurationBox extends Box('av1C'){ +```cpp +class AV1CodecConfigurationBox +extends Box('av1C') +{ AV1CodecConfigurationRecord av1Config; } -aligned (8) class AV1CodecConfigurationRecord { - unsigned int (1) marker = 1; - unsigned int (7) version = 1; - unsigned int (3) seq_profile; - unsigned int (5) seq_level_idx_0; - unsigned int (1) seq_tier_0; - unsigned int (1) high_bitdepth; - unsigned int (1) twelve_bit; - unsigned int (1) monochrome; - unsigned int (1) chroma_subsampling_x; - unsigned int (1) chroma_subsampling_y; - unsigned int (2) chroma_sample_position; - unsigned int (3) reserved = 0; - - unsigned int (1) initial_presentation_delay_present; - if (initial_presentation_delay_present) { - unsigned int (4) initial_presentation_delay_minus_one; +aligned(8) class AV1CodecConfigurationRecord +{ + unsigned int(1) marker = 1; + unsigned int(7) version = 1; + unsigned int(3) seq_profile; + unsigned int(5) seq_level_idx_0; + unsigned int(1) seq_tier_0; + unsigned int(1) high_bitdepth; + unsigned int(1) twelve_bit; + unsigned int(1) monochrome; + unsigned int(1) chroma_subsampling_x; + unsigned int(1) chroma_subsampling_y; + unsigned int(2) chroma_sample_position; + unsigned int(3) reserved = 0; + + unsigned int(1) initial_presentation_delay_present; + if(initial_presentation_delay_present) { + unsigned int(4) initial_presentation_delay_minus_one; } else { - unsigned int (4) reserved = 0; + unsigned int(4) reserved = 0; } - unsigned int (8) configOBUs[]; + unsigned int(8) configOBUs[]; } ``` @@ -428,8 +433,10 @@ The AV1ForwardKeyFrameSampleGroupEntry documents samples that contain ### Syntax ### {#forwardkeyframesamplegroupentry-syntax} -``` -class AV1ForwardKeyFrameSampleGroupEntry extends VisualSampleGroupEntry('av1f') { +```cpp +class AV1ForwardKeyFrameSampleGroupEntry +extends VisualSampleGroupEntry('av1f') +{ unsigned int(8) fwd_distance; } ``` @@ -458,8 +465,10 @@ The AV1MultiFrameSampleGroupEntry documents samples that contain mult ### Syntax ### {#multiframesamplegroupentry-syntax} -``` -class AV1MultiFrameSampleGroupEntry extends VisualSampleGroupEntry('av1m') { +```cpp +class AV1MultiFrameSampleGroupEntry +extends VisualSampleGroupEntry('av1m') +{ } ``` @@ -482,8 +491,10 @@ The AV1SwitchFrameSampleGroupEntry documents samples that start with ### Syntax ### {#switchframesamplegroupentry-syntax} -``` -class AV1SwitchFrameSampleGroupEntry extends VisualSampleGroupEntry('av1s') { +```cpp +class AV1SwitchFrameSampleGroupEntry +extends VisualSampleGroupEntry('av1s') +{ } ``` @@ -506,14 +517,16 @@ The AV1MetadataSampleGroupEntry documents samples that contain [=meta ### Syntax ### {#metadatasamplegroupentry-syntax} -``` -class AV1MetadataSampleGroupEntry extends VisualSampleGroupEntry('av1M') { +```cpp +class AV1MetadataSampleGroupEntry +extends VisualSampleGroupEntry('av1M') +{ } ``` For this sample group entry, the grouping_type_parameter syntax is as follows: -``` +```cpp { unsigned int (8) metadata_type; unsigned int (24) metadata_specific_parameters; From 6dbceaa84e693d2e7237d21a37174d056d38fdbd Mon Sep 17 00:00:00 2001 From: Dimitri Podborski Date: Mon, 18 Sep 2023 10:08:30 -0700 Subject: [PATCH 2/2] changelog --- index.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/index.bs b/index.bs index b165774..e131bac 100644 --- a/index.bs +++ b/index.bs @@ -671,3 +671,4 @@ Changes since v1.2.0 release {#changelist} - Add a NOTE to clarify the mdcv box. - Clarify requirements on sample entry when encryption is used. - Clarify the colr box. +- Shorten long lines