Skip to content

Commit

Permalink
Removed syntax dependency on semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-norkin committed Jan 10, 2024
1 parent 715a641 commit cb15542
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions 06.bitstream.syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ each of the syntax elements is presented in [Section 6][].
| /* Add reserved bits so that av1_film_grain_payload is byte aligned */
| @@reserved_4bits | f(4)
| @@num_film_grain_sets_minus1 | f(3)
| for ( i = 0; i < num_film_grain_sets_minus1 + 1; i++ ) { |
| av1_film_grain_payload( )
| for ( setIdx = 0; setIdx < num_film_grain_sets_minus1 + 1; setIdx++ ) { |
| av1_film_grain_payload( setIdx )
| }
| selectedParamSet = select_film_grain_param_set( )
| load_grain_params( selectedParamSet )
Expand All @@ -41,7 +41,7 @@ each of the syntax elements is presented in [Section 6][].
### Film grain parameter payload syntax

| ----------------------------------------------------------------- | ---------------- |
| av1_film_grain_payload( ) { | **Type**
| av1_film_grain_payload( setIdx ) { | **Type**
| /* Store the current bit-stream position */
| startPosition = get_position( )
|
Expand All @@ -55,7 +55,7 @@ each of the syntax elements is presented in [Section 6][].
| @@payload_size | f(n)
|
| /* Receive the film grain parameters */
| av1_film_grain_params( )
| av1_film_grain_params( setIdx )
|
| /* Determine the number of bits consumed by the payload */
| currentPosition = get_position( )
Expand All @@ -70,8 +70,10 @@ each of the syntax elements is presented in [Section 6][].
### Film grain parameters syntax

| --------------------------------------------------------- | ---------------- |
| av1_film_grain_params( ) { | **Type**
| av1_film_grain_params( setIdx ) { | **Type**
| @@film_grain_param_set_idx | f(3)
| if (!setIdx)
| filmGrainParamSetIdxForPrediction = film_grain_param_set_idx
| @@apply_grain_flag | f(1)
| if ( !apply_grain_flag ) {
| load_grain_params( film_grain_param_set_idx )
Expand Down Expand Up @@ -112,8 +114,8 @@ each of the syntax elements is presented in [Section 6][].
| video_full_range_flag | f(1)
| }
| }
| @@predict_scaling_flag | f(1)
| if (predict_scaling_flag) {
| @@predict_scaling_flag | f(1)
| if (predict_scaling_flag && setIdx) {
| @@predict_y_scaling_flag | f(1)
| } else {
| predict_y_scaling_flag = 0
Expand All @@ -130,6 +132,8 @@ each of the syntax elements is presented in [Section 6][].
| }
| } else {
| @@num_y_points | f(4)
| if (!setIdx)
| numYPointsInRef = num_y_points
| if (num_y_points) {
| @@point_y_value_increment_bits_minus1 | f(3)
| bitsIncr = point_y_value_increment_bits_minus1 + 1
Expand All @@ -150,7 +154,7 @@ each of the syntax elements is presented in [Section 6][].
| num_cb_points = 0
| num_cr_points = 0
| } else {
| if (predict_scaling_flag) {
| if (predict_scaling_flag && setIdx) {
| @@predict_cb_scaling_flag | f(1)
| } else
| predict_cb_scaling_flag = 0
Expand All @@ -166,6 +170,8 @@ each of the syntax elements is presented in [Section 6][].
| }
| } else {
| @@num_cb_points | f(4)
| if (!setIdx)
| numCbPointsInRef = num_cb_points
| if (num_cb_points) {
| @@point_cb_value_increment_bits_minus1 | f(3)
| bitsIncr = point_cb_value_increment_bits_minus1 + 1
Expand All @@ -178,7 +184,7 @@ each of the syntax elements is presented in [Section 6][].
| }
| }
| }
| if (predict_scaling_flag) {
| if (predict_scaling_flag && setIdx) {
| @@predict_cr_scaling_flag | f(1)
| } else
| predict_cr_scaling_flag = 0
Expand All @@ -194,6 +200,8 @@ each of the syntax elements is presented in [Section 6][].
| }
| } else {
| @@num_cr_points | f(4)
| if (!setIdx)
| numCrPointsInRef = num_cr_points
| if (num_cr_points) {
| @@point_cr_value_increment_bits_minus1 | f(3)
| bitsIncr = point_cr_value_increment_bits_minus1 + 1
Expand Down

0 comments on commit cb15542

Please sign in to comment.