mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	WebP: Add missing spec quotes in a comment, tweak whitespace
This commit is contained in:
		
							parent
							
								
									141143a1c6
								
							
						
					
					
						commit
						4e92027513
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -266,12 +266,12 @@ static ErrorOr<void> decode_webp_chunk_ALPH(Chunk const& alph_chunk, Bitmap& bit | ||||||
|     // [...]
 |     // [...]
 | ||||||
|     //
 |     //
 | ||||||
|     // The final value is derived by adding the decompressed value X to the predictor and using modulo-256 arithmetic"
 |     // The final value is derived by adding the decompressed value X to the predictor and using modulo-256 arithmetic"
 | ||||||
| 
 |  | ||||||
|     switch (filtering_method) { |     switch (filtering_method) { | ||||||
|     case 0: |     case 0: | ||||||
|         // Method 0: predictor = 0
 |         // "Method 0: predictor = 0"
 | ||||||
|         // Nothing to do.
 |         // Nothing to do.
 | ||||||
|         break; |         break; | ||||||
|  | 
 | ||||||
|     case 1: |     case 1: | ||||||
|         // "Method 1: predictor = A"
 |         // "Method 1: predictor = A"
 | ||||||
|         // "The top-left value at location (0, 0) uses 0 as predictor value. Otherwise,
 |         // "The top-left value at location (0, 0) uses 0 as predictor value. Otherwise,
 | ||||||
|  | @ -286,6 +286,7 @@ static ErrorOr<void> decode_webp_chunk_ALPH(Chunk const& alph_chunk, Bitmap& bit | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         break; |         break; | ||||||
|  | 
 | ||||||
|     case 2: |     case 2: | ||||||
|         // "Method 2: predictor = B"
 |         // "Method 2: predictor = B"
 | ||||||
|         // "The top-left value at location (0, 0) uses 0 as predictor value. Otherwise,
 |         // "The top-left value at location (0, 0) uses 0 as predictor value. Otherwise,
 | ||||||
|  | @ -300,6 +301,7 @@ static ErrorOr<void> decode_webp_chunk_ALPH(Chunk const& alph_chunk, Bitmap& bit | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         break; |         break; | ||||||
|  | 
 | ||||||
|     case 3: |     case 3: | ||||||
|         // "Method 3: predictor = clip(A + B - C)"
 |         // "Method 3: predictor = clip(A + B - C)"
 | ||||||
|         //  where clip(v) is equal to:
 |         //  where clip(v) is equal to:
 | ||||||
|  | @ -321,8 +323,8 @@ static ErrorOr<void> decode_webp_chunk_ALPH(Chunk const& alph_chunk, Bitmap& bit | ||||||
|                 alpha[y * bitmap.width() + x] += clamp(A + B - C, 0, 255); |                 alpha[y * bitmap.width() + x] += clamp(A + B - C, 0, 255); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         break; |         break; | ||||||
|  | 
 | ||||||
|     default: |     default: | ||||||
|         return Error::from_string_literal("WebPImageDecoderPlugin: uncompressed ALPH invalid filtering method"); |         return Error::from_string_literal("WebPImageDecoderPlugin: uncompressed ALPH invalid filtering method"); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nico Weber
						Nico Weber