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

Side by Side Diff: third_party/libwebp/dsp/filters.c

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 years, 11 months 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
« no previous file with comments | « third_party/libwebp/dsp/enc_sse41.c ('k') | third_party/libwebp/dsp/filters_msa.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license 3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source 4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found 5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may 6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree. 7 // be found in the AUTHORS file in the root of the source tree.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 // 9 //
10 // Spatial prediction using various filters 10 // Spatial prediction using various filters
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 } 221 }
222 222
223 //------------------------------------------------------------------------------ 223 //------------------------------------------------------------------------------
224 // Init function 224 // Init function
225 225
226 WebPFilterFunc WebPFilters[WEBP_FILTER_LAST]; 226 WebPFilterFunc WebPFilters[WEBP_FILTER_LAST];
227 WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST]; 227 WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST];
228 228
229 extern void VP8FiltersInitMIPSdspR2(void); 229 extern void VP8FiltersInitMIPSdspR2(void);
230 extern void VP8FiltersInitMSA(void);
231 extern void VP8FiltersInitNEON(void);
230 extern void VP8FiltersInitSSE2(void); 232 extern void VP8FiltersInitSSE2(void);
231 233
232 static volatile VP8CPUInfo filters_last_cpuinfo_used = 234 static volatile VP8CPUInfo filters_last_cpuinfo_used =
233 (VP8CPUInfo)&filters_last_cpuinfo_used; 235 (VP8CPUInfo)&filters_last_cpuinfo_used;
234 236
235 WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInit(void) { 237 WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInit(void) {
236 if (filters_last_cpuinfo_used == VP8GetCPUInfo) return; 238 if (filters_last_cpuinfo_used == VP8GetCPUInfo) return;
237 239
238 WebPUnfilters[WEBP_FILTER_NONE] = NULL; 240 WebPUnfilters[WEBP_FILTER_NONE] = NULL;
239 WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter; 241 WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter;
240 WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter; 242 WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter;
241 WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter; 243 WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter;
242 244
243 WebPFilters[WEBP_FILTER_NONE] = NULL; 245 WebPFilters[WEBP_FILTER_NONE] = NULL;
244 WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter; 246 WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter;
245 WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter; 247 WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter;
246 WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter; 248 WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
247 249
248 if (VP8GetCPUInfo != NULL) { 250 if (VP8GetCPUInfo != NULL) {
249 #if defined(WEBP_USE_SSE2) 251 #if defined(WEBP_USE_SSE2)
250 if (VP8GetCPUInfo(kSSE2)) { 252 if (VP8GetCPUInfo(kSSE2)) {
251 VP8FiltersInitSSE2(); 253 VP8FiltersInitSSE2();
252 } 254 }
253 #endif 255 #endif
256 #if defined(WEBP_USE_NEON)
257 if (VP8GetCPUInfo(kNEON)) {
258 VP8FiltersInitNEON();
259 }
260 #endif
254 #if defined(WEBP_USE_MIPS_DSP_R2) 261 #if defined(WEBP_USE_MIPS_DSP_R2)
255 if (VP8GetCPUInfo(kMIPSdspR2)) { 262 if (VP8GetCPUInfo(kMIPSdspR2)) {
256 VP8FiltersInitMIPSdspR2(); 263 VP8FiltersInitMIPSdspR2();
257 } 264 }
258 #endif 265 #endif
266 #if defined(WEBP_USE_MSA)
267 if (VP8GetCPUInfo(kMSA)) {
268 VP8FiltersInitMSA();
269 }
270 #endif
259 } 271 }
260 filters_last_cpuinfo_used = VP8GetCPUInfo; 272 filters_last_cpuinfo_used = VP8GetCPUInfo;
261 } 273 }
OLDNEW
« no previous file with comments | « third_party/libwebp/dsp/enc_sse41.c ('k') | third_party/libwebp/dsp/filters_msa.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698