OLD | NEW |
1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 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 // ARM NEON version of speed-critical encoding functions. | 10 // ARM NEON version of speed-critical encoding functions. |
11 // | 11 // |
12 // adapted from libvpx (http://www.webmproject.org/code/) | 12 // adapted from libvpx (http://www.webmproject.org/code/) |
13 | 13 |
14 #include "./dsp.h" | 14 #include "./dsp.h" |
15 | 15 |
16 #if defined(__cplusplus) || defined(c_plusplus) | |
17 extern "C" { | |
18 #endif | |
19 | |
20 #if defined(WEBP_USE_NEON) | 16 #if defined(WEBP_USE_NEON) |
21 | 17 |
22 #include "../enc/vp8enci.h" | 18 #include "../enc/vp8enci.h" |
23 | 19 |
24 //------------------------------------------------------------------------------ | 20 //------------------------------------------------------------------------------ |
25 // Transforms (Paragraph 14.4) | 21 // Transforms (Paragraph 14.4) |
26 | 22 |
27 // Inverse transform. | 23 // Inverse transform. |
28 // This code is pretty much the same as TransformOneNEON in the decoder, except | 24 // This code is pretty much the same as TransformOneNEON in the decoder, except |
29 // for subtraction to *ref. See the comments there for algorithmic explanations. | 25 // for subtraction to *ref. See the comments there for algorithmic explanations. |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 "vtrn.32 q8, q9 \n" | 482 "vtrn.32 q8, q9 \n" |
487 "vtrn.32 q15, q14 \n" | 483 "vtrn.32 q15, q14 \n" |
488 | 484 |
489 // The first Q register is a, the second b. | 485 // The first Q register is a, the second b. |
490 // q0/8 tmp[0-3] | 486 // q0/8 tmp[0-3] |
491 // q13/15 tmp[4-7] | 487 // q13/15 tmp[4-7] |
492 // q1/9 tmp[8-11] | 488 // q1/9 tmp[8-11] |
493 // q12/14 tmp[12-15] | 489 // q12/14 tmp[12-15] |
494 | 490 |
495 // These are still in 01 45 23 67 order. We fix it easily in the addition | 491 // These are still in 01 45 23 67 order. We fix it easily in the addition |
496 // case but the subtraction propegates them. | 492 // case but the subtraction propagates them. |
497 "vswp d3, d27 \n" | 493 "vswp d3, d27 \n" |
498 "vswp d19, d31 \n" | 494 "vswp d19, d31 \n" |
499 | 495 |
500 // a0 = tmp[0] + tmp[8] | 496 // a0 = tmp[0] + tmp[8] |
501 "vadd.s32 q2, q0, q1 \n" | 497 "vadd.s32 q2, q0, q1 \n" |
502 "vadd.s32 q3, q8, q9 \n" | 498 "vadd.s32 q3, q8, q9 \n" |
503 | 499 |
504 // a1 = tmp[4] + tmp[12] | 500 // a1 = tmp[4] + tmp[12] |
505 "vadd.s32 q10, q13, q12 \n" | 501 "vadd.s32 q10, q13, q12 \n" |
506 "vadd.s32 q11, q15, q14 \n" | 502 "vadd.s32 q11, q15, q14 \n" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 VP8FTransform = FTransform; | 623 VP8FTransform = FTransform; |
628 | 624 |
629 VP8ITransformWHT = ITransformWHT; | 625 VP8ITransformWHT = ITransformWHT; |
630 VP8FTransformWHT = FTransformWHT; | 626 VP8FTransformWHT = FTransformWHT; |
631 | 627 |
632 VP8TDisto4x4 = Disto4x4; | 628 VP8TDisto4x4 = Disto4x4; |
633 VP8TDisto16x16 = Disto16x16; | 629 VP8TDisto16x16 = Disto16x16; |
634 #endif // WEBP_USE_NEON | 630 #endif // WEBP_USE_NEON |
635 } | 631 } |
636 | 632 |
637 #if defined(__cplusplus) || defined(c_plusplus) | |
638 } // extern "C" | |
639 #endif | |
OLD | NEW |