[FFmpeg-devel] [PATCH] H.264 predictive lossless: again
Sat Nov 29 12:58:05 CET 2008
> i cannot see any sense in this change, nor in the similar ones for other
> block sizes. It should be well possible to leave the prediction alone
> add the residual and modify the result in the special cases
I'll deal with the trivial points later; this appears to be the main
substantive issue here.
The easiest, fastest, and least-code way to do predictive lossless is
Add residual to fdec, *without saturation*, so negative numbers get
stored as wrapped-around positive values/etc. This works because the
standard specifies that overflow shall not occur with
transform_bypass, and so saturation never has to be handled with real
Are you saying that we should instead make a new residual_add function
that *sets* the pixel values equal to the residual instead of
*adding*, so that zero isn't necessary?
More information about the ffmpeg-devel