Chromium Code Reviews| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 #define HAS_I422TORGB565ROW_SSSE3 | 114 #define HAS_I422TORGB565ROW_SSSE3 |
| 115 #define HAS_I422TORGBAROW_SSSE3 | 115 #define HAS_I422TORGBAROW_SSSE3 |
| 116 #define HAS_I422TOUYVYROW_SSE2 | 116 #define HAS_I422TOUYVYROW_SSE2 |
| 117 #define HAS_I422TOYUY2ROW_SSE2 | 117 #define HAS_I422TOYUY2ROW_SSE2 |
| 118 #define HAS_J400TOARGBROW_SSE2 | 118 #define HAS_J400TOARGBROW_SSE2 |
| 119 #define HAS_J422TOARGBROW_SSSE3 | 119 #define HAS_J422TOARGBROW_SSSE3 |
| 120 #define HAS_J422TOABGRROW_SSSE3 | 120 #define HAS_J422TOABGRROW_SSSE3 |
| 121 #define HAS_H422TOARGBROW_SSSE3 | 121 #define HAS_H422TOARGBROW_SSSE3 |
| 122 #define HAS_H422TOABGRROW_SSSE3 | 122 #define HAS_H422TOABGRROW_SSSE3 |
| 123 #define HAS_MERGEUVROW_SSE2 | 123 #define HAS_MERGEUVROW_SSE2 |
| 124 #define HAS_MIRRORROW_SSE2 | |
|
harryjin
2015/09/30 02:42:07
So for the very few SSE2 only case, things just go
| |
| 125 #define HAS_MIRRORROW_SSSE3 | 124 #define HAS_MIRRORROW_SSSE3 |
| 126 #define HAS_MIRRORROW_UV_SSSE3 | 125 #define HAS_MIRRORROW_UV_SSSE3 |
| 127 #define HAS_MIRRORUVROW_SSSE3 | 126 #define HAS_MIRRORUVROW_SSSE3 |
| 128 #define HAS_NV12TOARGBROW_SSSE3 | 127 #define HAS_NV12TOARGBROW_SSSE3 |
| 129 #define HAS_NV12TORGB565ROW_SSSE3 | 128 #define HAS_NV12TORGB565ROW_SSSE3 |
| 130 #define HAS_RAWTOARGBROW_SSSE3 | 129 #define HAS_RAWTOARGBROW_SSSE3 |
| 131 #define HAS_RAWTOYROW_SSSE3 | 130 #define HAS_RAWTOYROW_SSSE3 |
| 132 #define HAS_RGB24TOARGBROW_SSSE3 | 131 #define HAS_RGB24TOARGBROW_SSSE3 |
| 133 #define HAS_RGB24TOYROW_SSSE3 | 132 #define HAS_RGB24TOYROW_SSSE3 |
| 134 #define HAS_RGB565TOARGBROW_SSE2 | 133 #define HAS_RGB565TOARGBROW_SSE2 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 #define HAS_INTERPOLATEROW_SSE2 | 173 #define HAS_INTERPOLATEROW_SSE2 |
| 175 #define HAS_INTERPOLATEROW_SSSE3 | 174 #define HAS_INTERPOLATEROW_SSSE3 |
| 176 #define HAS_RGBCOLORTABLEROW_X86 | 175 #define HAS_RGBCOLORTABLEROW_X86 |
| 177 #define HAS_SOBELROW_SSE2 | 176 #define HAS_SOBELROW_SSE2 |
| 178 #define HAS_SOBELTOPLANEROW_SSE2 | 177 #define HAS_SOBELTOPLANEROW_SSE2 |
| 179 #define HAS_SOBELXROW_SSE2 | 178 #define HAS_SOBELXROW_SSE2 |
| 180 #define HAS_SOBELXYROW_SSE2 | 179 #define HAS_SOBELXYROW_SSE2 |
| 181 #define HAS_SOBELYROW_SSE2 | 180 #define HAS_SOBELYROW_SSE2 |
| 182 #endif | 181 #endif |
| 183 | 182 |
| 184 // The following are available on x64 Visual C and clangcl. | 183 // The following are also available on x64 Visual C. |
| 185 // TODO(fbarchard): Port to gcc. | |
| 186 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ | 184 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ |
| 187 (!defined(__clang__) || defined(__SSSE3__)) | 185 (!defined(__clang__) || defined(__SSSE3__)) |
| 188 #define HAS_I422TOARGBROW_SSSE3 | 186 #define HAS_I422TOARGBROW_SSSE3 |
| 189 #define HAS_I422TOABGRROW_SSSE3 | 187 #define HAS_I422TOABGRROW_SSSE3 |
| 190 #define HAS_I422ALPHATOARGBROW_SSSE3 | 188 #define HAS_I422ALPHATOARGBROW_SSSE3 |
| 191 #define HAS_I422ALPHATOABGRROW_SSSE3 | 189 #define HAS_I422ALPHATOABGRROW_SSSE3 |
| 192 #endif | 190 #endif |
| 193 | 191 |
| 194 // The following are available for AVX2 Visual C and clangcl 32 bit: | 192 // The following are available for AVX2 Visual C and clangcl 32 bit: |
| 195 // TODO(fbarchard): Port to gcc. | 193 // TODO(fbarchard): Port to gcc. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 #define HAS_I422ALPHATOABGRROW_AVX2 | 253 #define HAS_I422ALPHATOABGRROW_AVX2 |
| 256 | 254 |
| 257 // Effects: | 255 // Effects: |
| 258 #define HAS_ARGBADDROW_AVX2 | 256 #define HAS_ARGBADDROW_AVX2 |
| 259 #define HAS_ARGBATTENUATEROW_AVX2 | 257 #define HAS_ARGBATTENUATEROW_AVX2 |
| 260 #define HAS_ARGBMULTIPLYROW_AVX2 | 258 #define HAS_ARGBMULTIPLYROW_AVX2 |
| 261 #define HAS_ARGBSUBTRACTROW_AVX2 | 259 #define HAS_ARGBSUBTRACTROW_AVX2 |
| 262 #define HAS_ARGBUNATTENUATEROW_AVX2 | 260 #define HAS_ARGBUNATTENUATEROW_AVX2 |
| 263 #endif | 261 #endif |
| 264 | 262 |
| 265 // The following are disabled when SSSE3 is available: | |
| 266 // TODO(fbarchard): remove sse2. ssse3 is faster and well supported. | |
| 267 #if !defined(LIBYUV_DISABLE_X86) && \ | |
| 268 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \ | |
| 269 !defined(LIBYUV_SSSE3_ONLY) | |
| 270 #define HAS_ARGBATTENUATEROW_SSE2 | |
| 271 #define HAS_ARGBBLENDROW_SSE2 | |
| 272 #define HAS_MIRRORROW_SSE2 | |
| 273 #endif | |
| 274 | |
| 275 // The following are available on Neon platforms: | 263 // The following are available on Neon platforms: |
| 276 #if !defined(LIBYUV_DISABLE_NEON) && \ | 264 #if !defined(LIBYUV_DISABLE_NEON) && \ |
| 277 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) | 265 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) |
| 278 #define HAS_ABGRTOUVROW_NEON | 266 #define HAS_ABGRTOUVROW_NEON |
| 279 #define HAS_ABGRTOYROW_NEON | 267 #define HAS_ABGRTOYROW_NEON |
| 280 #define HAS_ARGB1555TOARGBROW_NEON | 268 #define HAS_ARGB1555TOARGBROW_NEON |
| 281 #define HAS_ARGB1555TOUVROW_NEON | 269 #define HAS_ARGB1555TOUVROW_NEON |
| 282 #define HAS_ARGB1555TOYROW_NEON | 270 #define HAS_ARGB1555TOYROW_NEON |
| 283 #define HAS_ARGB4444TOARGBROW_NEON | 271 #define HAS_ARGB4444TOARGBROW_NEON |
| 284 #define HAS_ARGB4444TOUVROW_NEON | 272 #define HAS_ARGB4444TOUVROW_NEON |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 815 uint8* dst_u, uint8* dst_v, int width); | 803 uint8* dst_u, uint8* dst_v, int width); |
| 816 void ARGBToUV422Row_C(const uint8* src_argb, | 804 void ARGBToUV422Row_C(const uint8* src_argb, |
| 817 uint8* dst_u, uint8* dst_v, int width); | 805 uint8* dst_u, uint8* dst_v, int width); |
| 818 void ARGBToUV411Row_C(const uint8* src_argb, | 806 void ARGBToUV411Row_C(const uint8* src_argb, |
| 819 uint8* dst_u, uint8* dst_v, int width); | 807 uint8* dst_u, uint8* dst_v, int width); |
| 820 void ARGBToUVJ422Row_C(const uint8* src_argb, | 808 void ARGBToUVJ422Row_C(const uint8* src_argb, |
| 821 uint8* dst_u, uint8* dst_v, int width); | 809 uint8* dst_u, uint8* dst_v, int width); |
| 822 | 810 |
| 823 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); | 811 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); |
| 824 void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width); | 812 void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width); |
| 825 void MirrorRow_SSE2(const uint8* src, uint8* dst, int width); | |
| 826 void MirrorRow_NEON(const uint8* src, uint8* dst, int width); | 813 void MirrorRow_NEON(const uint8* src, uint8* dst, int width); |
| 827 void MirrorRow_MIPS_DSPR2(const uint8* src, uint8* dst, int width); | 814 void MirrorRow_MIPS_DSPR2(const uint8* src, uint8* dst, int width); |
| 828 void MirrorRow_C(const uint8* src, uint8* dst, int width); | 815 void MirrorRow_C(const uint8* src, uint8* dst, int width); |
| 829 void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); | 816 void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); |
| 830 void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width); | 817 void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width); |
| 831 void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); | 818 void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); |
| 832 void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); | 819 void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); |
| 833 | 820 |
| 834 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v, | 821 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v, |
| 835 int width); | 822 int width); |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1613 void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); | 1600 void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); |
| 1614 void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); | 1601 void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); |
| 1615 void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); | 1602 void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); |
| 1616 void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); | 1603 void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); |
| 1617 void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); | 1604 void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); |
| 1618 void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); | 1605 void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); |
| 1619 | 1606 |
| 1620 // ARGB preattenuated alpha blend. | 1607 // ARGB preattenuated alpha blend. |
| 1621 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1, | 1608 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1, |
| 1622 uint8* dst_argb, int width); | 1609 uint8* dst_argb, int width); |
| 1623 void ARGBBlendRow_SSE2(const uint8* src_argb, const uint8* src_argb1, | |
| 1624 uint8* dst_argb, int width); | |
| 1625 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1, | 1610 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1, |
| 1626 uint8* dst_argb, int width); | 1611 uint8* dst_argb, int width); |
| 1627 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1, | 1612 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1, |
| 1628 uint8* dst_argb, int width); | 1613 uint8* dst_argb, int width); |
| 1629 | 1614 |
| 1630 // ARGB multiply images. Same API as Blend, but these require | 1615 // ARGB multiply images. Same API as Blend, but these require |
| 1631 // pointer and width alignment for SSE2. | 1616 // pointer and width alignment for SSE2. |
| 1632 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1, | 1617 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1, |
| 1633 uint8* dst_argb, int width); | 1618 uint8* dst_argb, int width); |
| 1634 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1, | 1619 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1, |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1934 const uint8* src_u, | 1919 const uint8* src_u, |
| 1935 const uint8* src_v, | 1920 const uint8* src_v, |
| 1936 uint8* dst_yuy2, int width); | 1921 uint8* dst_yuy2, int width); |
| 1937 void I422ToUYVYRow_Any_NEON(const uint8* src_y, | 1922 void I422ToUYVYRow_Any_NEON(const uint8* src_y, |
| 1938 const uint8* src_u, | 1923 const uint8* src_u, |
| 1939 const uint8* src_v, | 1924 const uint8* src_v, |
| 1940 uint8* dst_uyvy, int width); | 1925 uint8* dst_uyvy, int width); |
| 1941 | 1926 |
| 1942 // Effects related row functions. | 1927 // Effects related row functions. |
| 1943 void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); | 1928 void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); |
| 1944 void ARGBAttenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); | |
| 1945 void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); | 1929 void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); |
| 1946 void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); | 1930 void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); |
| 1947 void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); | 1931 void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); |
| 1948 void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, | 1932 void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, |
| 1949 int width); | 1933 int width); |
| 1950 void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, | 1934 void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, |
| 1951 int width); | 1935 int width); |
| 1952 void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, | 1936 void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, |
| 1953 int width); | 1937 int width); |
| 1954 void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, | 1938 void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2115 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, | 2099 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, |
| 2116 int width, | 2100 int width, |
| 2117 const uint8* luma, uint32 lumacoeff); | 2101 const uint8* luma, uint32 lumacoeff); |
| 2118 | 2102 |
| 2119 #ifdef __cplusplus | 2103 #ifdef __cplusplus |
| 2120 } // extern "C" | 2104 } // extern "C" |
| 2121 } // namespace libyuv | 2105 } // namespace libyuv |
| 2122 #endif | 2106 #endif |
| 2123 | 2107 |
| 2124 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT | 2108 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT |
| OLD | NEW |