1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
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.
9 */
10
11 #include "vpx_config.h"
12 #include "vp8_rtcd.h"
13
14 /* place these declarations here because we don't want to maintain them
15 * outside of this scope
16 */
17 void idct_dequant_full_2x_neon(short *q, short *dq, unsigned char *dst,
18 int stride);
19 void idct_dequant_0_2x_neon(short *q, short dq, unsigned char *dst, int stride);
20
vp8_dequant_idct_add_y_block_neon(short * q,short * dq,unsigned char * dst,int stride,char * eobs)21 void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst,
22 int stride, char *eobs) {
23 int i;
24
25 for (i = 0; i < 4; ++i) {
26 if (((short *)(eobs))[0]) {
27 if (((short *)eobs)[0] & 0xfefe)
28 idct_dequant_full_2x_neon(q, dq, dst, stride);
29 else
30 idct_dequant_0_2x_neon(q, dq[0], dst, stride);
31 }
32
33 if (((short *)(eobs))[1]) {
34 if (((short *)eobs)[1] & 0xfefe)
35 idct_dequant_full_2x_neon(q + 32, dq, dst + 8, stride);
36 else
37 idct_dequant_0_2x_neon(q + 32, dq[0], dst + 8, stride);
38 }
39 q += 64;
40 dst += 4 * stride;
41 eobs += 4;
42 }
43 }
44
vp8_dequant_idct_add_uv_block_neon(short * q,short * dq,unsigned char * dstu,unsigned char * dstv,int stride,char * eobs)45 void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq,
46 unsigned char *dstu,
47 unsigned char *dstv, int stride,
48 char *eobs) {
49 if (((short *)(eobs))[0]) {
50 if (((short *)eobs)[0] & 0xfefe)
51 idct_dequant_full_2x_neon(q, dq, dstu, stride);
52 else
53 idct_dequant_0_2x_neon(q, dq[0], dstu, stride);
54 }
55
56 q += 32;
57 dstu += 4 * stride;
58
59 if (((short *)(eobs))[1]) {
60 if (((short *)eobs)[1] & 0xfefe)
61 idct_dequant_full_2x_neon(q, dq, dstu, stride);
62 else
63 idct_dequant_0_2x_neon(q, dq[0], dstu, stride);
64 }
65
66 q += 32;
67
68 if (((short *)(eobs))[2]) {
69 if (((short *)eobs)[2] & 0xfefe)
70 idct_dequant_full_2x_neon(q, dq, dstv, stride);
71 else
72 idct_dequant_0_2x_neon(q, dq[0], dstv, stride);
73 }
74
75 q += 32;
76 dstv += 4 * stride;
77
78 if (((short *)(eobs))[3]) {
79 if (((short *)eobs)[3] & 0xfefe)
80 idct_dequant_full_2x_neon(q, dq, dstv, stride);
81 else
82 idct_dequant_0_2x_neon(q, dq[0], dstv, stride);
83 }
84 }
85