2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
14 void vp8_short_fdct4x4_c(short *input
, short *output
, int pitch
)
21 for (i
= 0; i
< 4; i
++)
23 a1
= ((ip
[0] + ip
[3])<<3);
24 b1
= ((ip
[1] + ip
[2])<<3);
25 c1
= ((ip
[1] - ip
[2])<<3);
26 d1
= ((ip
[0] - ip
[3])<<3);
31 op
[1] = (c1
* 2217 + d1
* 5352 + 14500)>>12;
32 op
[3] = (d1
* 2217 - c1
* 5352 + 7500)>>12;
40 for (i
= 0; i
< 4; i
++)
47 op
[0] = ( a1
+ b1
+ 7)>>4;
48 op
[8] = ( a1
- b1
+ 7)>>4;
50 op
[4] =((c1
* 2217 + d1
* 5352 + 12000)>>16) + (d1
!=0);
51 op
[12] = (d1
* 2217 - c1
* 5352 + 51000)>>16;
58 void vp8_short_fdct8x4_c(short *input
, short *output
, int pitch
)
60 vp8_short_fdct4x4_c(input
, output
, pitch
);
61 vp8_short_fdct4x4_c(input
+ 4, output
+ 16, pitch
);
64 void vp8_short_walsh4x4_c(short *input
, short *output
, int pitch
)
73 for (i
= 0; i
< 4; i
++)
75 a1
= ((ip
[0] + ip
[2])<<2);
76 d1
= ((ip
[1] + ip
[3])<<2);
77 c1
= ((ip
[1] - ip
[3])<<2);
78 b1
= ((ip
[0] - ip
[2])<<2);
80 op
[0] = a1
+ d1
+ (a1
!=0);
91 for (i
= 0; i
< 4; i
++)