mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	WebP/Lossy: Variable naming fix for constants from last pull request
This commit is contained in:
		
							parent
							
								
									bd5290dd45
								
							
						
					
					
						commit
						ea54c58930
					
				
					 2 changed files with 5 additions and 5 deletions
				
			
		|  | @ -235,7 +235,7 @@ ErrorOr<FrameHeader> decode_VP8_frame_header(BooleanDecoder& decoder) | ||||||
|     u8 refresh_entropy_probs = TRY(L(1)); // Has no effect in webp files.
 |     u8 refresh_entropy_probs = TRY(L(1)); // Has no effect in webp files.
 | ||||||
|     dbgln_if(WEBP_DEBUG, "refresh_entropy_probs {}", refresh_entropy_probs); |     dbgln_if(WEBP_DEBUG, "refresh_entropy_probs {}", refresh_entropy_probs); | ||||||
| 
 | 
 | ||||||
|     memcpy(header.coefficient_probabilities, default_coeff_probs, sizeof(header.coefficient_probabilities)); |     memcpy(header.coefficient_probabilities, DEFAULT_COEFFICIENT_PROBABILITIES, sizeof(header.coefficient_probabilities)); | ||||||
|     TRY(decode_VP8_frame_header_coefficient_probabilities(decoder, header.coefficient_probabilities)); |     TRY(decode_VP8_frame_header_coefficient_probabilities(decoder, header.coefficient_probabilities)); | ||||||
| 
 | 
 | ||||||
|     // https://datatracker.ietf.org/doc/html/rfc6386#section-9.11 "Remaining Frame Header Data (Key Frame)"
 |     // https://datatracker.ietf.org/doc/html/rfc6386#section-9.11 "Remaining Frame Header Data (Key Frame)"
 | ||||||
|  | @ -376,7 +376,7 @@ ErrorOr<void> decode_VP8_frame_header_coefficient_probabilities(BooleanDecoder& | ||||||
|                 for (int l = 0; l < 11; l++) { |                 for (int l = 0; l < 11; l++) { | ||||||
|                     // token_prob_update() says L(1) and L(8), but it's actually B(p) and L(8).
 |                     // token_prob_update() says L(1) and L(8), but it's actually B(p) and L(8).
 | ||||||
|                     // https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates" describes it correctly.
 |                     // https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates" describes it correctly.
 | ||||||
|                     if (TRY(B(coeff_update_probs[i][j][k][l]))) |                     if (TRY(B(COEFFICIENT_UPDATE_PROBABILITIES[i][j][k][l]))) | ||||||
|                         coefficient_probabilities[i][j][k][l] = TRY(L(8)); |                         coefficient_probabilities[i][j][k][l] = TRY(L(8)); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -221,7 +221,7 @@ const Prob KEYFRAME_BLOCK_MODE_PROBABILITIES[num_intra_bmodes][num_intra_bmodes] | ||||||
| // clang-format on
 | // clang-format on
 | ||||||
| 
 | 
 | ||||||
| // https://datatracker.ietf.org/doc/html/rfc6386#section-13.2 "Coding of Individual Coefficient Values"
 | // https://datatracker.ietf.org/doc/html/rfc6386#section-13.2 "Coding of Individual Coefficient Values"
 | ||||||
| enum dct_token { | enum DCTToken { | ||||||
|     DCT_0,         /* value 0 */ |     DCT_0,         /* value 0 */ | ||||||
|     DCT_1,         /* 1 */ |     DCT_1,         /* 1 */ | ||||||
|     DCT_2,         /* 2 */ |     DCT_2,         /* 2 */ | ||||||
|  | @ -239,7 +239,7 @@ enum dct_token { | ||||||
| 
 | 
 | ||||||
| // https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates"
 | // https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates"
 | ||||||
| // clang-format off
 | // clang-format off
 | ||||||
| static Prob constexpr coeff_update_probs[4][8][3][num_dct_tokens - 1] = { | static Prob constexpr COEFFICIENT_UPDATE_PROBABILITIES[4][8][3][num_dct_tokens - 1] = { | ||||||
|     { |     { | ||||||
|         { |         { | ||||||
|             { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, |             { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | ||||||
|  | @ -413,7 +413,7 @@ static Prob constexpr coeff_update_probs[4][8][3][num_dct_tokens - 1] = { | ||||||
| 
 | 
 | ||||||
| // https://datatracker.ietf.org/doc/html/rfc6386#section-13.5 "Default Token Probability Table"
 | // https://datatracker.ietf.org/doc/html/rfc6386#section-13.5 "Default Token Probability Table"
 | ||||||
| // clang-format off
 | // clang-format off
 | ||||||
| static Prob constexpr default_coeff_probs[4][8][3][num_dct_tokens - 1] = { | static Prob constexpr DEFAULT_COEFFICIENT_PROBABILITIES[4][8][3][num_dct_tokens - 1] = { | ||||||
|     { |     { | ||||||
|         { |         { | ||||||
|             { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |             { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nico Weber
						Nico Weber