On Thu, Dec 20, 2007 at 08:18:48PM +0100, lu_zero wrote: > Author: lu_zero > Date: Thu Dec 20 20:18:48 2007 > New Revision: 1620 > > Log: > Fold even and odd passes for 53
benchmark missing :)
also combining even & odd does not need unrolling the loops by x2
which should have been done seperately and benchmarked seperately ideally
ohh well its not really important, it would just have been nice ...
>
> Modified:
> dirac/libavcodec/dirac_wavelet.c
>
> Modified: dirac/libavcodec/dirac_wavelet.c
> ==============================================================================
> --- dirac/libavcodec/dirac_wavelet.c (original)
> +++ dirac/libavcodec/dirac_wavelet.c Thu Dec 20 20:18:48 2007
> @@ -166,28 +166,43 @@ START_TIMER
> + synthline[1]
> + 2) >> 2;
> data[0] = (synthline[0] + 1) >> 1;
> - for (x = 1; x < width - 1; x++) {
> +
> + for (x = 1; x < width - 2; x += 2) {
> + // even
> synthline[2*x] -= (synthline[2*x - 1]
> + synthline[2*x + 1]
> + 2) >> 2;
> data[2*x] = (synthline[2*x] + 1) >> 1;
> + synthline[2*x + 2] -= (synthline[2*x + 1]
> + + synthline[2*x + 3]
> + + 2) >> 2;
> + data[2*x + 2] = (synthline[2*x + 2] + 1) >> 1;
> + // odd
> + synthline[2*x - 1] += (synthline[2*x - 2]
> + + synthline[2*x]
> + + 1) >> 1;
> + data[2*x - 1] = (synthline[2*x - 1] + 1) >> 1;
> + synthline[2*x + 1] += (synthline[2*x]
> + + synthline[2*x + 2]
> + + 1) >> 1;
> + data[2*x + 1] = (synthline[2*x + 1] + 1) >> 1;
> }
is it really needed to write both data and synthline here, isnt one unused?
also cant the 2 arrays be merged?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
signature.asc
Description: Digital signature
_______________________________________________ FFmpeg-soc mailing list [email protected] http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
