First public contribution.
2 * LIBOIL - Library of Optimized Inner Loops
3 * Copyright (c) 2004 David A. Schleef <ds@schleef.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
27 //Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
33 #include <liboil/liboil.h>
34 #include <liboil/liboilfunction.h>
36 OIL_DECLARE_CLASS (trans8x8_u16);
39 trans8x8_u16_c1 (uint16_t *dest, int dstr, const uint16_t *src, int sstr)
46 d = OIL_OFFSET(dest, 2*i);
47 s = OIL_OFFSET(src, sstr*i);
49 OIL_GET(d,dstr*j,uint16_t) = s[j];
53 OIL_DEFINE_IMPL (trans8x8_u16_c1, trans8x8_u16);
56 trans8x8_u16_c2 (uint16_t *dest, int dstr, const uint16_t *src, int sstr)
62 d = OIL_OFFSET(dest, 2*i);
63 s = OIL_OFFSET(src, sstr*i);
64 *d = *s; s++; d = OIL_OFFSET(d, dstr);
65 *d = *s; s++; d = OIL_OFFSET(d, dstr);
66 *d = *s; s++; d = OIL_OFFSET(d, dstr);
67 *d = *s; s++; d = OIL_OFFSET(d, dstr);
68 *d = *s; s++; d = OIL_OFFSET(d, dstr);
69 *d = *s; s++; d = OIL_OFFSET(d, dstr);
70 *d = *s; s++; d = OIL_OFFSET(d, dstr);
71 *d = *s; s++; d = OIL_OFFSET(d, dstr);
74 OIL_DEFINE_IMPL (trans8x8_u16_c2, trans8x8_u16);
77 trans8x8_u16_c3 (uint16_t *dest, int dstr, const uint16_t *src, int sstr)
83 d = OIL_OFFSET(dest, 2*i);
84 s = OIL_OFFSET(src, sstr*i);
85 OIL_GET(d,dstr*0,uint16_t) = s[0];
86 OIL_GET(d,dstr*1,uint16_t) = s[1];
87 OIL_GET(d,dstr*2,uint16_t) = s[2];
88 OIL_GET(d,dstr*3,uint16_t) = s[3];
89 OIL_GET(d,dstr*4,uint16_t) = s[4];
90 OIL_GET(d,dstr*5,uint16_t) = s[5];
91 OIL_GET(d,dstr*6,uint16_t) = s[6];
92 OIL_GET(d,dstr*7,uint16_t) = s[7];
95 OIL_DEFINE_IMPL (trans8x8_u16_c3, trans8x8_u16);
98 trans8x8_u16_c4 (uint16_t *dest, int dstr, const uint16_t *src, int sstr)
104 d = OIL_OFFSET(dest, 2*i);
105 s = OIL_OFFSET(src, sstr*i);
106 OIL_GET(d,dstr*0,uint16_t) = *s++;
107 OIL_GET(d,dstr*1,uint16_t) = *s++;
108 OIL_GET(d,dstr*2,uint16_t) = *s++;
109 OIL_GET(d,dstr*3,uint16_t) = *s++;
110 OIL_GET(d,dstr*4,uint16_t) = *s++;
111 OIL_GET(d,dstr*5,uint16_t) = *s++;
112 OIL_GET(d,dstr*6,uint16_t) = *s++;
113 OIL_GET(d,dstr*7,uint16_t) = *s++;
117 OIL_DEFINE_IMPL (trans8x8_u16_c4, trans8x8_u16);
124 OilFunctionImpl* __oil_function_impl_trans8x8_u16_c1() {
125 return &_oil_function_impl_trans8x8_u16_c1;
131 OilFunctionImpl* __oil_function_impl_trans8x8_u16_c2() {
132 return &_oil_function_impl_trans8x8_u16_c2;
138 OilFunctionImpl* __oil_function_impl_trans8x8_u16_c3() {
139 return &_oil_function_impl_trans8x8_u16_c3;
145 OilFunctionImpl* __oil_function_impl_trans8x8_u16_c4() {
146 return &_oil_function_impl_trans8x8_u16_c4;