ソースを参照

LibGfx/WebPLossless: Add spec note about combining predicted values

No behavior change. This got clarified in the spec in
https://chromium-review.googlesource.com/c/webm/libwebp/+/4638649
Nico Weber 1 年間 前
コミット
c1b289c144

+ 2 - 0
Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp

@@ -645,6 +645,8 @@ ErrorOr<NonnullRefPtr<Bitmap>> PredictorTransform::transform(NonnullRefPtr<Bitma
             u8 predictor = Color::from_argb(predictor_scanline[predictor_x]).green();
             u8 predictor = Color::from_argb(predictor_scanline[predictor_x]).green();
 
 
             ARGB32 predicted = TRY(predict(predictor, TL, T, TR, L));
             ARGB32 predicted = TRY(predict(predictor, TL, T, TR, L));
+
+            // "The final pixel value is obtained by adding each channel of the predicted value to the encoded residual value."
             bitmap_scanline[x] = add_argb32(bitmap_scanline[x], predicted);
             bitmap_scanline[x] = add_argb32(bitmap_scanline[x], predicted);
 
 
             TL = T;
             TL = T;