Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: source/libvpx/vp9/decoder/x86/vp9_idct_blk_sse2.c

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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_ports/config.h"
12 #include "vp9/common/vp9_blockd.h"
13 #include "vp9/decoder/vp9_dequantize.h"
14
15 void vp9_idct_dequant_dc_0_2x_sse2(short *q, const short *dq,
16 unsigned char *pre, unsigned char *dst,
17 int dst_stride, const short *dc);
18
19 void vp9_idct_dequant_dc_full_2x_sse2(short *q, const short *dq,
20 unsigned char *pre, unsigned char *dst,
21 int dst_stride, const short *dc);
22
23 void vp9_idct_dequant_0_2x_sse2(short *q, const short *dq,
24 unsigned char *pre, unsigned char *dst,
25 int dst_stride, int blk_stride);
26
27 void vp9_idct_dequant_full_2x_sse2(short *q, const short *dq,
28 unsigned char *pre, unsigned char *dst,
29 int dst_stride, int blk_stride);
30
31 void vp9_dequant_dc_idct_add_y_block_sse2(short *q, const short *dq,
32 unsigned char *pre,
33 unsigned char *dst,
34 int stride, unsigned short *eobs,
35 const short *dc) {
36 int i;
37
38 for (i = 0; i < 4; i++) {
39 if (((short *)(eobs))[0] & 0xfefe)
40 vp9_idct_dequant_dc_full_2x_sse2(q, dq, pre, dst, stride, dc);
41 else
42 vp9_idct_dequant_dc_0_2x_sse2(q, dq, pre, dst, stride, dc);
43
44 if (((short *)(eobs))[1] & 0xfefe)
45 vp9_idct_dequant_dc_full_2x_sse2(q + 32, dq, pre + 8, dst + 8,
46 stride, dc + 2);
47 else
48 vp9_idct_dequant_dc_0_2x_sse2(q + 32, dq, pre + 8, dst + 8,
49 stride, dc + 2);
50
51 q += 64;
52 dc += 4;
53 pre += 64;
54 dst += stride * 4;
55 eobs += 4;
56 }
57 }
58
59 void vp9_dequant_idct_add_y_block_sse2(short *q, const short *dq,
60 unsigned char *pre, unsigned char *dst,
61 int stride, unsigned short *eobs) {
62 int i;
63
64 for (i = 0; i < 4; i++) {
65 if (((short *)(eobs))[0] & 0xfefe)
66 vp9_idct_dequant_full_2x_sse2(q, dq, pre, dst, stride, 16);
67 else
68 vp9_idct_dequant_0_2x_sse2(q, dq, pre, dst, stride, 16);
69
70 if (((short *)(eobs))[1] & 0xfefe)
71 vp9_idct_dequant_full_2x_sse2(q + 32, dq, pre + 8, dst + 8, stride, 16);
72 else
73 vp9_idct_dequant_0_2x_sse2(q + 32, dq, pre + 8, dst + 8, stride, 16);
74
75 q += 64;
76 pre += 64;
77 dst += stride * 4;
78 eobs += 4;
79 }
80 }
81
82 void vp9_dequant_idct_add_uv_block_sse2(short *q, const short *dq,
83 unsigned char *pre,
84 unsigned char *dstu,
85 unsigned char *dstv,
86 int stride, unsigned short *eobs) {
87 if (((short *)(eobs))[0] & 0xfefe)
88 vp9_idct_dequant_full_2x_sse2(q, dq, pre, dstu, stride, 8);
89 else
90 vp9_idct_dequant_0_2x_sse2(q, dq, pre, dstu, stride, 8);
91
92 q += 32;
93 pre += 32;
94 dstu += stride * 4;
95
96 if (((short *)(eobs))[1] & 0xfefe)
97 vp9_idct_dequant_full_2x_sse2(q, dq, pre, dstu, stride, 8);
98 else
99 vp9_idct_dequant_0_2x_sse2(q, dq, pre, dstu, stride, 8);
100
101 q += 32;
102 pre += 32;
103
104 if (((short *)(eobs))[2] & 0xfefe)
105 vp9_idct_dequant_full_2x_sse2(q, dq, pre, dstv, stride, 8);
106 else
107 vp9_idct_dequant_0_2x_sse2(q, dq, pre, dstv, stride, 8);
108
109 q += 32;
110 pre += 32;
111 dstv += stride * 4;
112
113 if (((short *)(eobs))[3] & 0xfefe)
114 vp9_idct_dequant_full_2x_sse2(q, dq, pre, dstv, stride, 8);
115 else
116 vp9_idct_dequant_0_2x_sse2(q, dq, pre, dstv, stride, 8);
117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698