[FFmpeg-devel] [PATCH] tests/checkasm/pixblockdsp: Test only aligned by 8 diff/get pixels
Hendrik Leppkes
h.leppkes at gmail.com
Sun Jun 26 13:59:05 CEST 2016
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?
- Hendrik
More information about the ffmpeg-devel
mailing list