[x264-devel] Building images of Motion-Compensation residues

Loren Merritt lorenm at u.washington.edu
Wed Oct 1 00:00:23 CEST 2008


On Tue, 30 Sep 2008, kurosu at free.fr wrote:

> I'm trying to obtain images made of motion-compensation residues, i.e.
> subtraction of the original block with the reference block(s).

Residual is never stored anywhere as pixels. It's stored as DCT coefs, and 
then one function does both the iDCT and adds it to the prediction.
If you want the quantized residual, then you could backup the prediction 
(h->mb.pic.p_fdec), and subtract it again from the reconstructed samples 
(also h->mb.pic.p_fdec).
If you want the ideal residual, then subtract p_fdec from p_fenc after mc 
but before residual coding.

--Loren Merritt


More information about the x264-devel mailing list