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

Side by Side Diff: source/libvpx/vp9/encoder/ppc/vp9_csystemdependent.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
12 #include "vp9/encoder/vp9_variance.h"
13 #include "vp9/encoder/vp9_onyx_int.h"
14
15 SADFunction *vp9_sad16x16;
16 SADFunction *vp9_sad16x8;
17 SADFunction *vp9_sad8x16;
18 SADFunction *vp9_sad8x8;
19 SADFunction *vp9_sad4x4;
20
21 variance_function *vp9_variance4x4;
22 variance_function *vp9_variance8x8;
23 variance_function *vp9_variance8x16;
24 variance_function *vp9_variance16x8;
25 variance_function *vp9_variance16x16;
26
27 variance_function *vp9_mse16x16;
28
29 sub_pixel_variance_function *vp9_sub_pixel_variance4x4;
30 sub_pixel_variance_function *vp9_sub_pixel_variance8x8;
31 sub_pixel_variance_function *vp9_sub_pixel_variance8x16;
32 sub_pixel_variance_function *vp9_sub_pixel_variance16x8;
33 sub_pixel_variance_function *vp9_sub_pixel_variance16x16;
34
35 int (*vp9_block_error)(short *coeff, short *dqcoeff);
36 int (*vp9_mbblock_error)(MACROBLOCK *mb, int dc);
37
38 int (*vp9_mbuverror)(MACROBLOCK *mb);
39 unsigned int (*vp9_get_mb_ss)(short *);
40 void (*vp9_short_fdct4x4)(short *input, short *output, int pitch);
41 void (*vp9_short_fdct8x4)(short *input, short *output, int pitch);
42 void (*vp8_fast_fdct4x4)(short *input, short *output, int pitch);
43 void (*vp8_fast_fdct8x4)(short *input, short *output, int pitch);
44 void (*short_walsh4x4)(short *input, short *output, int pitch);
45
46 void (*vp9_subtract_b)(BLOCK *be, BLOCKD *bd, int pitch);
47 void (*vp9_subtract_mby)(short *diff, unsigned char *src, unsigned char *pred, i nt stride);
48 void (*vp9_subtract_mbuv)(short *diff, unsigned char *usrc, unsigned char *vsrc, unsigned char *pred, int stride);
49 void (*vp8_fast_quantize_b)(BLOCK *b, BLOCKD *d);
50
51 // c imports
52 extern int block_error_c(short *coeff, short *dqcoeff);
53 extern int vp9_mbblock_error_c(MACROBLOCK *mb, int dc);
54
55 extern int vp9_mbuverror_c(MACROBLOCK *mb);
56 extern unsigned int vp8_get8x8var_c(unsigned char *src_ptr, int source_stride, unsigned char *ref_ptr, int recon_stride, unsigned int *SSE, int *Sum);
57 extern void short_fdct4x4_c(short *input, short *output, int pitch);
58 extern void short_fdct8x4_c(short *input, short *output, int pitch);
59 extern void vp9_short_walsh4x4_c(short *input, short *output, int pitch);
60
61 extern void vp9_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch);
62 extern void subtract_mby_c(short *diff, unsigned char *src, unsigned char *pred, int stride);
63 extern void subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsr c, unsigned char *pred, int stride);
64 extern void vp8_fast_quantize_b_c(BLOCK *b, BLOCKD *d);
65
66 extern SADFunction sad16x16_c;
67 extern SADFunction sad16x8_c;
68 extern SADFunction sad8x16_c;
69 extern SADFunction sad8x8_c;
70 extern SADFunction sad4x4_c;
71
72 extern variance_function variance16x16_c;
73 extern variance_function variance8x16_c;
74 extern variance_function variance16x8_c;
75 extern variance_function variance8x8_c;
76 extern variance_function variance4x4_c;
77 extern variance_function mse16x16_c;
78
79 extern sub_pixel_variance_function sub_pixel_variance4x4_c;
80 extern sub_pixel_variance_function sub_pixel_variance8x8_c;
81 extern sub_pixel_variance_function sub_pixel_variance8x16_c;
82 extern sub_pixel_variance_function sub_pixel_variance16x8_c;
83 extern sub_pixel_variance_function sub_pixel_variance16x16_c;
84
85 extern unsigned int vp9_get_mb_ss_c(short *);
86
87 // ppc
88 extern int vp9_block_error_ppc(short *coeff, short *dqcoeff);
89
90 extern void vp9_short_fdct4x4_ppc(short *input, short *output, int pitch);
91 extern void vp9_short_fdct8x4_ppc(short *input, short *output, int pitch);
92
93 extern void vp9_subtract_mby_ppc(short *diff, unsigned char *src, unsigned char *pred, int stride);
94 extern void vp9_subtract_mbuv_ppc(short *diff, unsigned char *usrc, unsigned cha r *vsrc, unsigned char *pred, int stride);
95
96 extern SADFunction vp9_sad16x16_ppc;
97 extern SADFunction vp9_sad16x8_ppc;
98 extern SADFunction vp9_sad8x16_ppc;
99 extern SADFunction vp9_sad8x8_ppc;
100 extern SADFunction vp9_sad4x4_ppc;
101
102 extern variance_function vp9_variance16x16_ppc;
103 extern variance_function vp9_variance8x16_ppc;
104 extern variance_function vp9_variance16x8_ppc;
105 extern variance_function vp9_variance8x8_ppc;
106 extern variance_function vp9_variance4x4_ppc;
107 extern variance_function vp9_mse16x16_ppc;
108
109 extern sub_pixel_variance_function vp9_sub_pixel_variance4x4_ppc;
110 extern sub_pixel_variance_function vp9_sub_pixel_variance8x8_ppc;
111 extern sub_pixel_variance_function vp9_sub_pixel_variance8x16_ppc;
112 extern sub_pixel_variance_function vp9_sub_pixel_variance16x8_ppc;
113 extern sub_pixel_variance_function vp9_sub_pixel_variance16x16_ppc;
114
115 extern unsigned int vp8_get8x8var_ppc(unsigned char *src_ptr, int source_stride , unsigned char *ref_ptr, int recon_stride, unsigned int *SSE, int *Sum);
116 extern unsigned int vp8_get16x16var_ppc(unsigned char *src_ptr, int source_stri de, unsigned char *ref_ptr, int recon_stride, unsigned int *SSE, int *Sum);
117
118 void vp9_cmachine_specific_config(void) {
119 // Pure C:
120 vp9_mbuverror = vp9_mbuverror_c;
121 vp8_fast_quantize_b = vp8_fast_quantize_b_c;
122 vp9_short_fdct4x4 = vp9_short_fdct4x4_ppc;
123 vp9_short_fdct8x4 = vp9_short_fdct8x4_ppc;
124 vp8_fast_fdct4x4 = vp9_short_fdct4x4_ppc;
125 vp8_fast_fdct8x4 = vp9_short_fdct8x4_ppc;
126 short_walsh4x4 = vp9_short_walsh4x4_c;
127
128 vp9_variance4x4 = vp9_variance4x4_ppc;
129 vp9_variance8x8 = vp9_variance8x8_ppc;
130 vp9_variance8x16 = vp9_variance8x16_ppc;
131 vp9_variance16x8 = vp9_variance16x8_ppc;
132 vp9_variance16x16 = vp9_variance16x16_ppc;
133 vp9_mse16x16 = vp9_mse16x16_ppc;
134
135 vp9_sub_pixel_variance4x4 = vp9_sub_pixel_variance4x4_ppc;
136 vp9_sub_pixel_variance8x8 = vp9_sub_pixel_variance8x8_ppc;
137 vp9_sub_pixel_variance8x16 = vp9_sub_pixel_variance8x16_ppc;
138 vp9_sub_pixel_variance16x8 = vp9_sub_pixel_variance16x8_ppc;
139 vp9_sub_pixel_variance16x16 = vp9_sub_pixel_variance16x16_ppc;
140
141 vp9_get_mb_ss = vp9_get_mb_ss_c;
142
143 vp9_sad16x16 = vp9_sad16x16_ppc;
144 vp9_sad16x8 = vp9_sad16x8_ppc;
145 vp9_sad8x16 = vp9_sad8x16_ppc;
146 vp9_sad8x8 = vp9_sad8x8_ppc;
147 vp9_sad4x4 = vp9_sad4x4_ppc;
148
149 vp9_block_error = vp9_block_error_ppc;
150 vp9_mbblock_error = vp9_mbblock_error_c;
151
152 vp9_subtract_b = vp9_subtract_b_c;
153 vp9_subtract_mby = vp9_subtract_mby_ppc;
154 vp9_subtract_mbuv = vp9_subtract_mbuv_ppc;
155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698