[FFmpeg-devel] [PATCH/RFC] avutil/pixelutils: port ppc/altivec sad functions

Clément Bœsch u at pkh.me
Sun Aug 24 21:39:11 CEST 2014


On Sun, Aug 24, 2014 at 12:21:38PM +0000, Carl Eugen Hoyos wrote:
> Clément Bœsch <u <at> pkh.me> writes:
> 
> > +OBJS-$(CONFIG_PIXELUTILS) += ppc/pixelutils_init.o
> > +
> >  ALTIVEC-OBJS += ppc/float_dsp_altivec.o                                 \
> > +ALTIVEC-OBJS-$(CONFIG_PIXELUTILS) += ppc/pixelutils_altivec.o           \
> 
> Something is wrong here, I suspect the "\" have 
> to be removed.
> 

Mmh yeah

> [...]
> 
> > +++ b/libavutil/ppc/pixelutils_altivec.h
> 
> > +int ff_pixelutils_sad_8x8_altivec(const uint8_t *src1, ptrdiff_t
> 
> ptrdiff_t needs an include of <stdint.h> or similar.
> 

OK

> I see the following error running pixelutils-test 
> with your patch applied and the above issues 
> fixed:
> 
> $ make fate-pixelutils
> TEST    pixelutils
> --- ./tests/ref/fate/pixelutils 2014-08-24 12:18:09.000000000 +0200
> +++ tests/data/fate/pixelutils  2014-08-24 14:20:02.000000000 +0200
> @@ -1,7 +1,7 @@
>  [OK] [UU] SAD [random] 2x2=409 ref=409
>  [OK] [UU] SAD [random] 4x4=1370 ref=1370
>  [OK] [UU] SAD [random] 8x8=5178 ref=5178
> -[OK] [UU] SAD [random] 16x16=20946 ref=20946
> +[FAIL] [UU] SAD [random] 16x16=21951 ref=20946
>  [OK] [AU] SAD [random] 2x2=320 ref=320
>  [OK] [AU] SAD [random] 4x4=1522 ref=1522
>  [OK] [AU] SAD [random] 8x8=5821 ref=5821
> Test pixelutils failed. Look at tests/data/fate/pixelutils.err for details.
> make: *** [fate-pixelutils] Error 1
> 

Interesting. So it means aligned read on unaligned addresses doesn't
explode but raise random results (just like if it was masking the lower
bits)?

And it also means that 8x8 actually works with unaligned addresses for
both sources. while 16x16 will only tolerate the second source as
unaligned?

[...]

Thanks for the testing

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140824/58207b47/attachment.asc>


More information about the ffmpeg-devel mailing list