mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
webp-lossless-bitstream-spec: add PredictorTransformOutput
Describe the addition of the residual value to the predicted value. Bug: webp:611 Change-Id: Id0300937eeebbafec3b2cd15376c56418c98a3bf
This commit is contained in:
parent
cd7e02bece
commit
4298e9765c
@ -363,6 +363,20 @@ exceptional. The pixels on the rightmost column are predicted by using the modes
|
||||
\[0..13\], just like pixels not on the border, but the leftmost pixel on the
|
||||
same row as the current pixel is instead used as the TR-pixel.
|
||||
|
||||
The final pixel value is obtained by adding each channel of the predicted value
|
||||
to the encoded residual value.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
void PredictorTransformOutput(uint32 residual, uint32 pred,
|
||||
uint8* alpha, uint8* red,
|
||||
uint8* green, uint8* blue) {
|
||||
*alpha = ALPHA(residual) + ALPHA(pred);
|
||||
*red = RED(residual) + RED(pred);
|
||||
*green = GREEN(residual) + GREEN(pred);
|
||||
*blue = BLUE(residual) + BLUE(pred);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
### 4.2 Color Transform
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user