[x264-devel] Re: Pixel_satd_wxh function

Laurent Aimar fenrir at via.ecp.fr
Mon Oct 18 13:59:14 CEST 2004


On Wed, Sep 22, 2004, Stephen Henry wrote:
> I'm messing around with the source code and I have a question. In the
> function pixel_satd_wxh, the code seems to suggest that the encoder is
> calculating a residual (using the pixel_sub_4x4 function) and then
> performing a series of loops calculating s01, s23 etc... What is the
> purpose of these loops?
 In fact satd does a hadamard transform and then computes a sad:
So it does

 D = Diff for a 4x4 block between source and predited pixels.
 Then 
 H = [ +1 +1 +1 +1
       +1 -1 +1 -1   * D
       +1 +1 -1 -1 
       +1 -1 -1 +1 ]

 then return Sum(abs(Hij))

 The series of loops is just an optimised version for this special
matrix multiplication.

 SATD gives a little PSNR improvement over SAD (but it has a little
speed cost).

-- 
fenrir

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list