| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 } | 835 } |
| 836 #endif | 836 #endif |
| 837 #if defined(HAS_SCALEADDROW_NEON) | 837 #if defined(HAS_SCALEADDROW_NEON) |
| 838 if (TestCpuFlag(kCpuHasNEON)) { | 838 if (TestCpuFlag(kCpuHasNEON)) { |
| 839 ScaleAddRow = ScaleAddRow_Any_NEON; | 839 ScaleAddRow = ScaleAddRow_Any_NEON; |
| 840 if (IS_ALIGNED(src_width, 16)) { | 840 if (IS_ALIGNED(src_width, 16)) { |
| 841 ScaleAddRow = ScaleAddRow_NEON; | 841 ScaleAddRow = ScaleAddRow_NEON; |
| 842 } | 842 } |
| 843 } | 843 } |
| 844 #endif | 844 #endif |
| 845 #if defined(HAS_SCALEADDROW_DSPR2) |
| 846 if (TestCpuFlag(kCpuHasDSPR2)) { |
| 847 ScaleAddRow = ScaleAddRow_Any_DSPR2; |
| 848 if (IS_ALIGNED(src_width, 16)) { |
| 849 ScaleAddRow = ScaleAddRow_DSPR2; |
| 850 } |
| 851 } |
| 852 #endif |
| 845 | 853 |
| 846 for (j = 0; j < dst_height; ++j) { | 854 for (j = 0; j < dst_height; ++j) { |
| 847 int boxheight; | 855 int boxheight; |
| 848 int iy = y >> 16; | 856 int iy = y >> 16; |
| 849 const uint8* src = src_ptr + iy * src_stride; | 857 const uint8* src = src_ptr + iy * src_stride; |
| 850 y += dy; | 858 y += dy; |
| 851 if (y > max_y) { | 859 if (y > max_y) { |
| 852 y = max_y; | 860 y = max_y; |
| 853 } | 861 } |
| 854 boxheight = MIN1((y >> 16) - iy); | 862 boxheight = MIN1((y >> 16) - iy); |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 return I420Scale(src_y, src_width, src_u, src_halfwidth, src_v, src_halfwidth, | 1778 return I420Scale(src_y, src_width, src_u, src_halfwidth, src_v, src_halfwidth, |
| 1771 src_width, src_height, dst_y, dst_width, dst_u, | 1779 src_width, src_height, dst_y, dst_width, dst_u, |
| 1772 dst_halfwidth, dst_v, dst_halfwidth, dst_width, aheight, | 1780 dst_halfwidth, dst_v, dst_halfwidth, dst_width, aheight, |
| 1773 interpolate ? kFilterBox : kFilterNone); | 1781 interpolate ? kFilterBox : kFilterNone); |
| 1774 } | 1782 } |
| 1775 | 1783 |
| 1776 #ifdef __cplusplus | 1784 #ifdef __cplusplus |
| 1777 } // extern "C" | 1785 } // extern "C" |
| 1778 } // namespace libyuv | 1786 } // namespace libyuv |
| 1779 #endif | 1787 #endif |
| OLD | NEW |