[vlc-devel] [PATCH 10/16] Add deinterleaving test case.
Jean-Baptiste Kempf
jb at videolan.org
Mon Jul 6 18:14:41 CEST 2015
OK.
On 26 Jun, glenvt18 wrote :
> ---
> test/testbsops.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/test/testbsops.c b/test/testbsops.c
> index a8588bd..6654c89 100644
> --- a/test/testbsops.c
> +++ b/test/testbsops.c
> @@ -318,6 +318,36 @@ main (void)
> c = BS_SHR8(a, 3);
> vec_testeq(b, c);
>
> +#ifdef BS_LOAD_DEINTERLEAVE_8
> +
> + /* test BS_LOAD_DEINTERLEAVE_8 */
> +
> + {
> + /* block cipher sbox + perm */
> + dvbcsa_bs_word_t d, buf_in[2], buf_out[4];
> + int i;
> + uint8_t *src, *dst;
> +
> + a = BS_VAL(0x0001020304050607LL, 0x08090a0b0c0d0e0fLL);
> + b = BS_VAL(0x8f8e8d8c8b8a8988LL, 0x8786858483828180LL);
> + buf_in[0] = a;
> + buf_in[1] = b;
> + src = (uint8_t *)buf_in;
> + dst = (uint8_t *)buf_out;
> + for (i = 0; i < BS_BATCH_BYTES * 2; i++)
> + {
> + dst[i * 2] = src[i];
> + dst[i * 2 + 1] = src[i] + 0x10;
> + }
> + BS_LOAD_DEINTERLEAVE_8(buf_out, c, d);
> + vec_testeq(a, c);
> + vec_testeq(BS_OR(a, BS_VAL8(10)), d);
> + BS_LOAD_DEINTERLEAVE_8(buf_out + 2, c, d);
> + vec_testeq(b, c);
> + vec_testeq(BS_OR(b, BS_VAL8(10)), d);
> + }
> +#endif
> +
> #endif
>
> puts("Ok");
> --
> 1.9.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list