| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "SkBitmapProcState.h" | 8 #include "SkBitmapProcState.h" |
| 9 #include "SkBitmapProcState_filter.h" | 9 #include "SkBitmapProcState_filter.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 outRow); | 382 outRow); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 // Convolves horizontally along four rows. The row data is given in | 386 // Convolves horizontally along four rows. The row data is given in |
| 387 // |src_data| and continues for the num_values() of the filter. | 387 // |src_data| and continues for the num_values() of the filter. |
| 388 // The algorithm is almost same as |ConvolveHorizontally_SSE2|. Please | 388 // The algorithm is almost same as |ConvolveHorizontally_SSE2|. Please |
| 389 // refer to that function for detailed comments. | 389 // refer to that function for detailed comments. |
| 390 void convolve4RowsHorizontally_neon(const unsigned char* srcData[4], | 390 void convolve4RowsHorizontally_neon(const unsigned char* srcData[4], |
| 391 const SkConvolutionFilter1D& filter, | 391 const SkConvolutionFilter1D& filter, |
| 392 unsigned char* outRow[4]) { | 392 unsigned char* outRow[4], |
| 393 size_t outRowBytes) { |
| 393 | 394 |
| 394 uint8x8_t coeff_mask0 = vcreate_u8(0x0100010001000100); | 395 uint8x8_t coeff_mask0 = vcreate_u8(0x0100010001000100); |
| 395 uint8x8_t coeff_mask1 = vcreate_u8(0x0302030203020302); | 396 uint8x8_t coeff_mask1 = vcreate_u8(0x0302030203020302); |
| 396 uint8x8_t coeff_mask2 = vcreate_u8(0x0504050405040504); | 397 uint8x8_t coeff_mask2 = vcreate_u8(0x0504050405040504); |
| 397 uint8x8_t coeff_mask3 = vcreate_u8(0x0706070607060706); | 398 uint8x8_t coeff_mask3 = vcreate_u8(0x0706070607060706); |
| 398 int num_values = filter.numValues(); | 399 int num_values = filter.numValues(); |
| 399 | 400 |
| 400 int filterOffset, filterLength; | 401 int filterOffset, filterLength; |
| 401 // |mask| will be used to decimate all extra filter coefficients that are | 402 // |mask| will be used to decimate all extra filter coefficients that are |
| 402 // loaded by SIMD when |filter_length| is not divisible by 4. | 403 // loaded by SIMD when |filter_length| is not divisible by 4. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 515 } |
| 515 } | 516 } |
| 516 | 517 |
| 517 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) { | 518 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) { |
| 518 procs->fExtraHorizontalReads = 3; | 519 procs->fExtraHorizontalReads = 3; |
| 519 procs->fConvolveVertically = &convolveVertically_neon; | 520 procs->fConvolveVertically = &convolveVertically_neon; |
| 520 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon; | 521 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon; |
| 521 procs->fConvolveHorizontally = &convolveHorizontally_neon; | 522 procs->fConvolveHorizontally = &convolveHorizontally_neon; |
| 522 procs->fApplySIMDPadding = &applySIMDPadding_neon; | 523 procs->fApplySIMDPadding = &applySIMDPadding_neon; |
| 523 } | 524 } |
| OLD | NEW |