Skip to content

Latest commit

 

History

History
133 lines (119 loc) · 5.41 KB

06.bitstream.syntax.md

File metadata and controls

133 lines (119 loc) · 5.41 KB

Syntax structures

General

This section presents the syntax structures in a tabular form. The meaning of each of the syntax elements is presented in [Section 6][].

AOMedia ITU-T T.35 metadata syntax

| --------------------------------------------------------- | ---------------- | | metadata_itut_t35( ) { | Type | @@itu_t_t35_country_code | f(8) | if ( itu_t_t35_country_code == 0xB5 ) { | @@itu_t_t35_terminal_provider_code | f(16) | if ( itu_t_t35_terminal_provider_code == 0x5890 ) { | aom_itu_t_t35_payload() | } | } {:.syntax }

Note: The syntax above represents signaling of ITU-T T.35 metadata reserved for AOMedia and not general ITU-T T.35 syntax. {:.alert .alert-info }

Note: The last byte of the valid content of the data is considered to be the last byte that is not equal to zero. This rule is to prevent the dropping of valid bytes by systems that interpret trailing zero bytes as a padding continuation of the trailing bits. This implies that when any payload data is present, at least one byte of the payload data (including the trailing bit) shall not be equal to 0. {:.alert .alert-info }

AOMedia ITU-T T.35 payload syntax

| --------------------------------------------------------- | ---------------- | |aom_itu_t_t35_payload( ) { | Type | @@itu_t_t35_terminal_provider_oriented_code | f(16) | if ( itu_t_t35_terminal_provider_oriented_code == 0x0001 ) { | av1_film_grain_params( ) | } | } {:.syntax }

Note: This specification only provides the value of the itu_t_t35_terminal_provider_oriented_code that identifies the av1 film grain parameters metadata. The complete syntax of aom_itu_t_t35_payload( ) and the list of values for AOMedia itu_t_t35_terminal_provider_oriented_code are defined in the AOMedia metadata registry specification. {:.alert .alert-info }

Film grain parameters syntax

| --------------------------------------------------------- | ---------------- | | av1_film_grain_params( ) { | Type | @@apply_grain | f(1) | if ( !apply_grain ) { | reset_grain_params() | return | } | @@grain_seed | f(16) | @@film_grain_param_set_idx | f(3) | @@update_grain | f(1) | if ( !update_grain ) { | tempGrainSeed = grain_seed | load_grain_params( film_grain_param_set_idx ) | grain_seed = tempGrainSeed | return | } | @@num_y_points | f(4) | for ( i = 0; i < num_y_points; i++ ) { | @@point_y_value[ i ] | f(8) | @@point_y_scaling[ i ] | f(8) | } | @@luma_only_grain | f(1) | if ( luma_only_grain ) { | chroma_scaling_from_luma = 0 | } else { | @@chroma_scaling_from_luma | f(1) | } | if ( luma_only_grain || chroma_scaling_from_luma ) { | num_cb_points = 0 | num_cr_points = 0 | } else { | @@num_cb_points | f(4) | for ( i = 0; i < num_cb_points; i++ ) { | @@point_cb_value[ i ] | f(8) | @@point_cb_scaling[ i ] | f(8) | } | @@num_cr_points | f(4) | for ( i = 0; i < num_cr_points; i++ ) { | @@point_cr_value[ i ] | f(8) | @@point_cr_scaling[ i ] | f(8) | } | } | @@grain_scaling_minus_8 | f(2) | @@ar_coeff_lag | f(2) | numPosLuma = 2 * ar_coeff_lag * ( ar_coeff_lag + 1 ) | if ( num_y_points ) { | numPosChroma = numPosLuma + 1 | for ( i = 0; i < numPosLuma; i++ ) | @@ar_coeffs_y_plus_128[ i ] | f(8) | } else { | numPosChroma = numPosLuma | } | if ( chroma_scaling_from_luma || num_cb_points ) { | for ( i = 0; i < numPosChroma; i++ ) | @@ar_coeffs_cb_plus_128[ i ] | f(8) | } | if ( chroma_scaling_from_luma || num_cr_points ) { | for ( i = 0; i < numPosChroma; i++ ) | @@ar_coeffs_cr_plus_128[ i ] | f(8) | } | @@ar_coeff_shift_minus_6 | f(2) | @@grain_scale_shift | f(2) | if ( num_cb_points ) { | @@cb_mult | f(8) | @@cb_luma_mult | f(8) | @@cb_offset | f(9) | } | if ( num_cr_points ) { | @@cr_mult | f(8) | @@cr_luma_mult | f(8) | @@cr_offset | f(9) | } | @@overlap_flag | f(1) | @@clip_to_restricted_range | f(1) | save_grain_params( film_grain_param_set_idx ) | } {:.syntax }