[FFmpeg-devel] [PATCH] tests/checkasm/pixblockdsp: Test only aligned by 8 diff/get pixels

Michael Niedermayer michael at niedermayer.cc
Sat Jul 2 23:34:15 EEST 2016


On Mon, Jun 27, 2016 at 10:48:01PM +0200, Michael Niedermayer wrote:
> On Sun, Jun 26, 2016 at 01:59:05PM +0200, Hendrik Leppkes wrote:
> > On Sun, Jun 26, 2016 at 11:16 AM, Michael Niedermayer
> > <michael at niedermayer.cc> wrote:
> > > They are documented as requiring 8 byte aligned source
> > >
> > > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > > ---
> > >  tests/checkasm/pixblockdsp.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tests/checkasm/pixblockdsp.c b/tests/checkasm/pixblockdsp.c
> > > index 66bfdb7..28ee500 100644
> > > --- a/tests/checkasm/pixblockdsp.c
> > > +++ b/tests/checkasm/pixblockdsp.c
> > > @@ -49,7 +49,7 @@
> > >          int i;                                                                             \
> > >          declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);    \
> > >                                                                                             \
> > > -        for (i = 0; i < BUF_UNITS; i++) {                                              \
> > > +        for (i = 0; i < BUF_UNITS; i+=8) {                                              \
> > >              int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */      \
> > >              int dst_offset = i * 64; /* dst must be aligned */                             \
> > >              randomize_buffers();                                                           \
> > > @@ -66,7 +66,7 @@
> > >          int i;                                                                             \
> > >          declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, int stride); \
> > >                                                                                             \
> > > -        for (i = 0; i < BUF_UNITS; i++) {                                              \
> > > +        for (i = 0; i < BUF_UNITS; i+=8) {                                              \
> > >              int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */      \
> > >              int dst_offset = i * 64; /* dst must be aligned */                             \
> > >              randomize_buffers();                                                           \
> > > --
> > > 1.7.9.5
> > >
> > 
> > BUF_UNITS is 8, so that change would entirely eliminate the loop.
> > Maybe src_offset should just be changed to be aligned properly,
> > keeping the loop? Or is the only purpose of the loop to test
> > alignment?
> 
> you mean something like this? :
> commit e3ff4df1c0a83a178d0aaf102486d7fbc97994d1
> Author: Michael Niedermayer <michael at niedermayer.cc>
> Date:   Mon Jun 27 22:03:14 2016 +0200
> 
>     tests/checkasm/pixblockdsp: Test 8 byte aligned positions
> 
>     The code is documented as to require 8byte alignment
> 
>     Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

applied

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160702/dfba46d3/attachment.sig>


More information about the ffmpeg-devel mailing list