Changeset 5633
- Timestamp:
- Jul 28, 2017 2:51:44 AM (6 years ago)
- Location:
- pjproject/trunk/third_party
- Files:
-
- 7 added
- 3 deleted
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/build/yuv/Makefile
r5424 r5633 49 49 rotate_common.o \ 50 50 rotate_gcc.o \ 51 rotate_ mips.o\51 rotate_dspr2.o \ 52 52 rotate_neon64.o \ 53 53 rotate_neon.o \ … … 56 56 row_common.o \ 57 57 row_gcc.o \ 58 row_ mips.o\58 row_dspr2.o \ 59 59 row_neon64.o \ 60 60 row_neon.o \ … … 65 65 scale_common.o \ 66 66 scale_gcc.o \ 67 scale_ mips.o\67 scale_dspr2.o \ 68 68 scale_neon64.o \ 69 69 scale_neon.o \ -
pjproject/trunk/third_party/build/yuv/Notes.txt
r5358 r5633 1 1 Notes: 2 * Source code for libyuv from https://chromium.googlesource.com/libyuv/libyuv/ dated 23 June 2016. 2 3 * Source code for libyuv from https://chromium.googlesource.com/libyuv/libyuv/ dated 27 July 2017. 4 3 5 * All code is compilable, except for compare_win.cc 4 6 - Use older version (https://chromium.googlesource.com/libyuv/libyuv/+/baf6a3c1bd385e7ffe6b7634560e71fb49e4f589%5E%21/) … … 16 18 __declspec(naked) 17 19 -------------------------------------------------------------------------------------- 18 * Disable some compiler warning which apear alot: 19 - warning C4100: unreferenced formal parameter 20 - warning C4127: conditional expression is constant 21 - warning C4244: '=' : conversion from 'uint32' to 'uint8', possible loss of data 20 21 * Added these lines to file include/libyuv/basic_types.h: 22 -- 23 #if _MSC_VER==1400 24 # include <stdint.h> // for uint8_t 25 #endif 26 ... 27 #if defined(_MSC_VER) 28 # pragma warning(disable:4996) // This function or variable may be unsafe. 29 #endif 30 -- -
pjproject/trunk/third_party/yuv/include/libyuv.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_H_ 12 12 #define INCLUDE_LIBYUV_H_ 13 13 … … 30 30 #include "libyuv/video_common.h" 31 31 32 #endif // INCLUDE_LIBYUV_H_ NOLINT32 #endif // INCLUDE_LIBYUV_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/basic_types.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ 12 12 #define INCLUDE_LIBYUV_BASIC_TYPES_H_ 13 13 14 14 #include <stddef.h> // for NULL, size_t 15 15 16 #if defined(__ANDROID__) || (defined(_MSC_VER) && (_MSC_VER < 1600)) 16 #if defined(_MSC_VER) && (_MSC_VER < 1600) 17 #if _MSC_VER==1400 18 # include <stdint.h> // for uint8_t 19 #endif 17 20 #include <sys/types.h> // for uintptr_t on x86 18 21 #else 19 22 #include <stdint.h> // for uintptr_t 23 #endif 24 25 #if defined(_MSC_VER) 26 # pragma warning(disable:4996) // This function or variable may be unsafe. 20 27 #endif 21 28 … … 27 34 typedef __int64 int64; 28 35 #ifndef INT64_C 29 #define INT64_C(x) x ##I6436 #define INT64_C(x) x##I64 30 37 #endif 31 38 #ifndef UINT64_C 32 #define UINT64_C(x) x ##UI6439 #define UINT64_C(x) x##UI64 33 40 #endif 34 41 #define INT64_F "I64" … … 36 43 #if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) 37 44 typedef unsigned long uint64; // NOLINT 38 typedef long int64; // NOLINT45 typedef long int64; // NOLINT 39 46 #ifndef INT64_C 40 #define INT64_C(x) x ##L47 #define INT64_C(x) x##L 41 48 #endif 42 49 #ifndef UINT64_C 43 #define UINT64_C(x) x ##UL50 #define UINT64_C(x) x##UL 44 51 #endif 45 52 #define INT64_F "l" 46 53 #else // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) 47 54 typedef unsigned long long uint64; // NOLINT 48 typedef long long int64; // NOLINT55 typedef long long int64; // NOLINT 49 56 #ifndef INT64_C 50 #define INT64_C(x) x ##LL57 #define INT64_C(x) x##LL 51 58 #endif 52 59 #ifndef UINT64_C 53 #define UINT64_C(x) x ##ULL60 #define UINT64_C(x) x##ULL 54 61 #endif 55 62 #define INT64_F "ll" … … 59 66 typedef int int32; 60 67 typedef unsigned short uint16; // NOLINT 61 typedef short int16; // NOLINT68 typedef short int16; // NOLINT 62 69 typedef unsigned char uint8; 63 70 typedef signed char int8; … … 66 73 67 74 // Detect compiler is for x86 or x64. 68 #if defined(__x86_64__) || defined(_M_X64) || \69 defined(_ _i386__) || defined(_M_IX86)75 #if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ 76 defined(_M_IX86) 70 77 #define CPU_X86 1 71 78 #endif … … 77 84 #ifndef ALIGNP 78 85 #ifdef __cplusplus 79 #define ALIGNP(p, t) \80 (reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) +\81 ((t) - 1)) & ~((t) - 1))))86 #define ALIGNP(p, t) \ 87 reinterpret_cast<uint8*>( \ 88 ((reinterpret_cast<uintptr_t>(p) + ((t)-1)) & ~((t)-1))) 82 89 #else 83 90 #define ALIGNP(p, t) \ 84 ((uint8*)((((uintptr_t)(p) + ((t) - 1)) & ~((t) - 1))))/* NOLINT */91 (uint8*)((((uintptr_t)(p) + ((t)-1)) & ~((t)-1))) /* NOLINT */ 85 92 #endif 86 93 #endif … … 96 103 #endif // LIBYUV_BUILDING_SHARED_LIBRARY 97 104 #elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \ 98 (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \99 defined(LIBYUV_USING_SHARED_LIBRARY))100 #define LIBYUV_API __attribute__ ((visibility("default")))105 (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ 106 defined(LIBYUV_USING_SHARED_LIBRARY)) 107 #define LIBYUV_API __attribute__((visibility("default"))) 101 108 #else 102 109 #define LIBYUV_API … … 109 116 110 117 // Visual C x86 or GCC little endian. 111 #if defined(__x86_64__) || defined(_M_X64) || \ 112 defined(__i386__) || defined(_M_IX86) || \ 113 defined(__arm__) || defined(_M_ARM) || \ 114 (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) 118 #if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ 119 defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) || \ 120 (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) 115 121 #define LIBYUV_LITTLE_ENDIAN 116 122 #endif 117 123 118 #endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ NOLINT124 #endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/compare.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_COMPARE_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_COMPARE_H_ 12 12 #define INCLUDE_LIBYUV_COMPARE_H_ 13 13 … … 23 23 uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); 24 24 25 // Hamming Distance 26 LIBYUV_API 27 uint64 ComputeHammingDistance(const uint8* src_a, 28 const uint8* src_b, 29 int count); 30 25 31 // Scan an opaque argb image and return fourcc based on alpha offset. 26 32 // Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. … … 30 36 // Sum Square Error - used to compute Mean Square Error or PSNR. 31 37 LIBYUV_API 32 uint64 ComputeSumSquareError(const uint8* src_a, 33 const uint8* src_b, int count); 38 uint64 ComputeSumSquareError(const uint8* src_a, const uint8* src_b, int count); 34 39 35 40 LIBYUV_API 36 uint64 ComputeSumSquareErrorPlane(const uint8* src_a, int stride_a, 37 const uint8* src_b, int stride_b, 38 int width, int height); 41 uint64 ComputeSumSquareErrorPlane(const uint8* src_a, 42 int stride_a, 43 const uint8* src_b, 44 int stride_b, 45 int width, 46 int height); 39 47 40 48 static const int kMaxPsnr = 128; … … 44 52 45 53 LIBYUV_API 46 double CalcFramePsnr(const uint8* src_a, int stride_a, 47 const uint8* src_b, int stride_b, 48 int width, int height); 54 double CalcFramePsnr(const uint8* src_a, 55 int stride_a, 56 const uint8* src_b, 57 int stride_b, 58 int width, 59 int height); 49 60 50 61 LIBYUV_API 51 double I420Psnr(const uint8* src_y_a, int stride_y_a, 52 const uint8* src_u_a, int stride_u_a, 53 const uint8* src_v_a, int stride_v_a, 54 const uint8* src_y_b, int stride_y_b, 55 const uint8* src_u_b, int stride_u_b, 56 const uint8* src_v_b, int stride_v_b, 57 int width, int height); 62 double I420Psnr(const uint8* src_y_a, 63 int stride_y_a, 64 const uint8* src_u_a, 65 int stride_u_a, 66 const uint8* src_v_a, 67 int stride_v_a, 68 const uint8* src_y_b, 69 int stride_y_b, 70 const uint8* src_u_b, 71 int stride_u_b, 72 const uint8* src_v_b, 73 int stride_v_b, 74 int width, 75 int height); 58 76 59 77 LIBYUV_API 60 double CalcFrameSsim(const uint8* src_a, int stride_a, 61 const uint8* src_b, int stride_b, 62 int width, int height); 78 double CalcFrameSsim(const uint8* src_a, 79 int stride_a, 80 const uint8* src_b, 81 int stride_b, 82 int width, 83 int height); 63 84 64 85 LIBYUV_API 65 double I420Ssim(const uint8* src_y_a, int stride_y_a, 66 const uint8* src_u_a, int stride_u_a, 67 const uint8* src_v_a, int stride_v_a, 68 const uint8* src_y_b, int stride_y_b, 69 const uint8* src_u_b, int stride_u_b, 70 const uint8* src_v_b, int stride_v_b, 71 int width, int height); 86 double I420Ssim(const uint8* src_y_a, 87 int stride_y_a, 88 const uint8* src_u_a, 89 int stride_u_a, 90 const uint8* src_v_a, 91 int stride_v_a, 92 const uint8* src_y_b, 93 int stride_y_b, 94 const uint8* src_u_b, 95 int stride_u_b, 96 const uint8* src_v_b, 97 int stride_v_b, 98 int width, 99 int height); 72 100 73 101 #ifdef __cplusplus … … 76 104 #endif 77 105 78 #endif // INCLUDE_LIBYUV_COMPARE_H_ NOLINT106 #endif // INCLUDE_LIBYUV_COMPARE_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/compare_row.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_ 12 12 #define INCLUDE_LIBYUV_COMPARE_ROW_H_ 13 13 … … 31 31 32 32 // Visual C 2012 required for AVX2. 33 #if defined(_M_IX86) && !defined(__clang__) && \34 defined(_MSC_VER) &&_MSC_VER >= 170033 #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ 34 _MSC_VER >= 1700 35 35 #define VISUALC_HAS_AVX2 1 36 36 #endif // VisualStudio >= 2012 … … 43 43 #endif // __clang__ 44 44 45 #if !defined(LIBYUV_DISABLE_X86) && \46 defined(_M_IX86) &&(defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))45 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ 46 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 47 47 #define HAS_HASHDJB2_AVX2 48 48 #endif … … 50 50 // The following are available for Visual C and GCC: 51 51 #if !defined(LIBYUV_DISABLE_X86) && \ 52 (defined(__x86_64__) || (defined(__i386__) || defined(_M_IX86)))52 (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86)) 53 53 #define HAS_HASHDJB2_SSE41 54 54 #define HAS_SUMSQUAREERROR_SSE2 55 #define HAS_HAMMINGDISTANCE_X86 55 56 #endif 56 57 … … 66 67 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) 67 68 #define HAS_SUMSQUAREERROR_NEON 69 #define HAS_HAMMINGDISTANCE_NEON 68 70 #endif 71 72 uint32 HammingDistance_C(const uint8* src_a, const uint8* src_b, int count); 73 uint32 HammingDistance_X86(const uint8* src_a, const uint8* src_b, int count); 74 uint32 HammingDistance_NEON(const uint8* src_a, const uint8* src_b, int count); 69 75 70 76 uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); … … 82 88 #endif 83 89 84 #endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ NOLINT90 #endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/convert.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_CONVERT_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_CONVERT_H_ 12 12 #define INCLUDE_LIBYUV_CONVERT_H_ 13 13 … … 15 15 16 16 #include "libyuv/rotate.h" // For enum RotationMode. 17 18 // TODO(fbarchard): fix WebRTC source to include following libyuv headers: 19 #include "libyuv/convert_argb.h" // For WebRTC I420ToARGB. b/620 20 #include "libyuv/convert_from.h" // For WebRTC ConvertFromI420. b/620 21 #include "libyuv/planar_functions.h" // For WebRTC I420Rect, CopyPlane. b/618 17 22 18 23 #ifdef __cplusplus … … 23 28 // Convert I444 to I420. 24 29 LIBYUV_API 25 int I444ToI420(const uint8* src_y, int src_stride_y, 26 const uint8* src_u, int src_stride_u, 27 const uint8* src_v, int src_stride_v, 28 uint8* dst_y, int dst_stride_y, 29 uint8* dst_u, int dst_stride_u, 30 uint8* dst_v, int dst_stride_v, 31 int width, int height); 30 int I444ToI420(const uint8* src_y, 31 int src_stride_y, 32 const uint8* src_u, 33 int src_stride_u, 34 const uint8* src_v, 35 int src_stride_v, 36 uint8* dst_y, 37 int dst_stride_y, 38 uint8* dst_u, 39 int dst_stride_u, 40 uint8* dst_v, 41 int dst_stride_v, 42 int width, 43 int height); 32 44 33 45 // Convert I422 to I420. 34 46 LIBYUV_API 35 int I422ToI420(const uint8* src_y, int src_stride_y, 36 const uint8* src_u, int src_stride_u, 37 const uint8* src_v, int src_stride_v, 38 uint8* dst_y, int dst_stride_y, 39 uint8* dst_u, int dst_stride_u, 40 uint8* dst_v, int dst_stride_v, 41 int width, int height); 42 43 // Convert I411 to I420. 44 LIBYUV_API 45 int I411ToI420(const uint8* src_y, int src_stride_y, 46 const uint8* src_u, int src_stride_u, 47 const uint8* src_v, int src_stride_v, 48 uint8* dst_y, int dst_stride_y, 49 uint8* dst_u, int dst_stride_u, 50 uint8* dst_v, int dst_stride_v, 51 int width, int height); 47 int I422ToI420(const uint8* src_y, 48 int src_stride_y, 49 const uint8* src_u, 50 int src_stride_u, 51 const uint8* src_v, 52 int src_stride_v, 53 uint8* dst_y, 54 int dst_stride_y, 55 uint8* dst_u, 56 int dst_stride_u, 57 uint8* dst_v, 58 int dst_stride_v, 59 int width, 60 int height); 52 61 53 62 // Copy I420 to I420. 54 63 #define I420ToI420 I420Copy 55 64 LIBYUV_API 56 int I420Copy(const uint8* src_y, int src_stride_y, 57 const uint8* src_u, int src_stride_u, 58 const uint8* src_v, int src_stride_v, 59 uint8* dst_y, int dst_stride_y, 60 uint8* dst_u, int dst_stride_u, 61 uint8* dst_v, int dst_stride_v, 62 int width, int height); 65 int I420Copy(const uint8* src_y, 66 int src_stride_y, 67 const uint8* src_u, 68 int src_stride_u, 69 const uint8* src_v, 70 int src_stride_v, 71 uint8* dst_y, 72 int dst_stride_y, 73 uint8* dst_u, 74 int dst_stride_u, 75 uint8* dst_v, 76 int dst_stride_v, 77 int width, 78 int height); 63 79 64 80 // Convert I400 (grey) to I420. 65 81 LIBYUV_API 66 int I400ToI420(const uint8* src_y, int src_stride_y, 67 uint8* dst_y, int dst_stride_y, 68 uint8* dst_u, int dst_stride_u, 69 uint8* dst_v, int dst_stride_v, 70 int width, int height); 82 int I400ToI420(const uint8* src_y, 83 int src_stride_y, 84 uint8* dst_y, 85 int dst_stride_y, 86 uint8* dst_u, 87 int dst_stride_u, 88 uint8* dst_v, 89 int dst_stride_v, 90 int width, 91 int height); 71 92 72 93 #define J400ToJ420 I400ToI420 … … 74 95 // Convert NV12 to I420. 75 96 LIBYUV_API 76 int NV12ToI420(const uint8* src_y, int src_stride_y, 77 const uint8* src_uv, int src_stride_uv, 78 uint8* dst_y, int dst_stride_y, 79 uint8* dst_u, int dst_stride_u, 80 uint8* dst_v, int dst_stride_v, 81 int width, int height); 97 int NV12ToI420(const uint8* src_y, 98 int src_stride_y, 99 const uint8* src_uv, 100 int src_stride_uv, 101 uint8* dst_y, 102 int dst_stride_y, 103 uint8* dst_u, 104 int dst_stride_u, 105 uint8* dst_v, 106 int dst_stride_v, 107 int width, 108 int height); 82 109 83 110 // Convert NV21 to I420. 84 111 LIBYUV_API 85 int NV21ToI420(const uint8* src_y, int src_stride_y, 86 const uint8* src_vu, int src_stride_vu, 87 uint8* dst_y, int dst_stride_y, 88 uint8* dst_u, int dst_stride_u, 89 uint8* dst_v, int dst_stride_v, 90 int width, int height); 112 int NV21ToI420(const uint8* src_y, 113 int src_stride_y, 114 const uint8* src_vu, 115 int src_stride_vu, 116 uint8* dst_y, 117 int dst_stride_y, 118 uint8* dst_u, 119 int dst_stride_u, 120 uint8* dst_v, 121 int dst_stride_v, 122 int width, 123 int height); 91 124 92 125 // Convert YUY2 to I420. 93 126 LIBYUV_API 94 int YUY2ToI420(const uint8* src_yuy2, int src_stride_yuy2, 95 uint8* dst_y, int dst_stride_y, 96 uint8* dst_u, int dst_stride_u, 97 uint8* dst_v, int dst_stride_v, 98 int width, int height); 127 int YUY2ToI420(const uint8* src_yuy2, 128 int src_stride_yuy2, 129 uint8* dst_y, 130 int dst_stride_y, 131 uint8* dst_u, 132 int dst_stride_u, 133 uint8* dst_v, 134 int dst_stride_v, 135 int width, 136 int height); 99 137 100 138 // Convert UYVY to I420. 101 139 LIBYUV_API 102 int UYVYToI420(const uint8* src_uyvy, int src_stride_uyvy, 103 uint8* dst_y, int dst_stride_y, 104 uint8* dst_u, int dst_stride_u, 105 uint8* dst_v, int dst_stride_v, 106 int width, int height); 140 int UYVYToI420(const uint8* src_uyvy, 141 int src_stride_uyvy, 142 uint8* dst_y, 143 int dst_stride_y, 144 uint8* dst_u, 145 int dst_stride_u, 146 uint8* dst_v, 147 int dst_stride_v, 148 int width, 149 int height); 107 150 108 151 // Convert M420 to I420. 109 152 LIBYUV_API 110 int M420ToI420(const uint8* src_m420, int src_stride_m420, 111 uint8* dst_y, int dst_stride_y, 112 uint8* dst_u, int dst_stride_u, 113 uint8* dst_v, int dst_stride_v, 114 int width, int height); 153 int M420ToI420(const uint8* src_m420, 154 int src_stride_m420, 155 uint8* dst_y, 156 int dst_stride_y, 157 uint8* dst_u, 158 int dst_stride_u, 159 uint8* dst_v, 160 int dst_stride_v, 161 int width, 162 int height); 163 164 // Convert Android420 to I420. 165 LIBYUV_API 166 int Android420ToI420(const uint8* src_y, 167 int src_stride_y, 168 const uint8* src_u, 169 int src_stride_u, 170 const uint8* src_v, 171 int src_stride_v, 172 int pixel_stride_uv, 173 uint8* dst_y, 174 int dst_stride_y, 175 uint8* dst_u, 176 int dst_stride_u, 177 uint8* dst_v, 178 int dst_stride_v, 179 int width, 180 int height); 115 181 116 182 // ARGB little endian (bgra in memory) to I420. 117 183 LIBYUV_API 118 int ARGBToI420(const uint8* src_frame, int src_stride_frame, 119 uint8* dst_y, int dst_stride_y, 120 uint8* dst_u, int dst_stride_u, 121 uint8* dst_v, int dst_stride_v, 122 int width, int height); 184 int ARGBToI420(const uint8* src_frame, 185 int src_stride_frame, 186 uint8* dst_y, 187 int dst_stride_y, 188 uint8* dst_u, 189 int dst_stride_u, 190 uint8* dst_v, 191 int dst_stride_v, 192 int width, 193 int height); 123 194 124 195 // BGRA little endian (argb in memory) to I420. 125 196 LIBYUV_API 126 int BGRAToI420(const uint8* src_frame, int src_stride_frame, 127 uint8* dst_y, int dst_stride_y, 128 uint8* dst_u, int dst_stride_u, 129 uint8* dst_v, int dst_stride_v, 130 int width, int height); 197 int BGRAToI420(const uint8* src_frame, 198 int src_stride_frame, 199 uint8* dst_y, 200 int dst_stride_y, 201 uint8* dst_u, 202 int dst_stride_u, 203 uint8* dst_v, 204 int dst_stride_v, 205 int width, 206 int height); 131 207 132 208 // ABGR little endian (rgba in memory) to I420. 133 209 LIBYUV_API 134 int ABGRToI420(const uint8* src_frame, int src_stride_frame, 135 uint8* dst_y, int dst_stride_y, 136 uint8* dst_u, int dst_stride_u, 137 uint8* dst_v, int dst_stride_v, 138 int width, int height); 210 int ABGRToI420(const uint8* src_frame, 211 int src_stride_frame, 212 uint8* dst_y, 213 int dst_stride_y, 214 uint8* dst_u, 215 int dst_stride_u, 216 uint8* dst_v, 217 int dst_stride_v, 218 int width, 219 int height); 139 220 140 221 // RGBA little endian (abgr in memory) to I420. 141 222 LIBYUV_API 142 int RGBAToI420(const uint8* src_frame, int src_stride_frame, 143 uint8* dst_y, int dst_stride_y, 144 uint8* dst_u, int dst_stride_u, 145 uint8* dst_v, int dst_stride_v, 146 int width, int height); 223 int RGBAToI420(const uint8* src_frame, 224 int src_stride_frame, 225 uint8* dst_y, 226 int dst_stride_y, 227 uint8* dst_u, 228 int dst_stride_u, 229 uint8* dst_v, 230 int dst_stride_v, 231 int width, 232 int height); 147 233 148 234 // RGB little endian (bgr in memory) to I420. 149 235 LIBYUV_API 150 int RGB24ToI420(const uint8* src_frame, int src_stride_frame, 151 uint8* dst_y, int dst_stride_y, 152 uint8* dst_u, int dst_stride_u, 153 uint8* dst_v, int dst_stride_v, 154 int width, int height); 236 int RGB24ToI420(const uint8* src_frame, 237 int src_stride_frame, 238 uint8* dst_y, 239 int dst_stride_y, 240 uint8* dst_u, 241 int dst_stride_u, 242 uint8* dst_v, 243 int dst_stride_v, 244 int width, 245 int height); 155 246 156 247 // RGB big endian (rgb in memory) to I420. 157 248 LIBYUV_API 158 int RAWToI420(const uint8* src_frame, int src_stride_frame, 159 uint8* dst_y, int dst_stride_y, 160 uint8* dst_u, int dst_stride_u, 161 uint8* dst_v, int dst_stride_v, 162 int width, int height); 249 int RAWToI420(const uint8* src_frame, 250 int src_stride_frame, 251 uint8* dst_y, 252 int dst_stride_y, 253 uint8* dst_u, 254 int dst_stride_u, 255 uint8* dst_v, 256 int dst_stride_v, 257 int width, 258 int height); 163 259 164 260 // RGB16 (RGBP fourcc) little endian to I420. 165 261 LIBYUV_API 166 int RGB565ToI420(const uint8* src_frame, int src_stride_frame, 167 uint8* dst_y, int dst_stride_y, 168 uint8* dst_u, int dst_stride_u, 169 uint8* dst_v, int dst_stride_v, 170 int width, int height); 262 int RGB565ToI420(const uint8* src_frame, 263 int src_stride_frame, 264 uint8* dst_y, 265 int dst_stride_y, 266 uint8* dst_u, 267 int dst_stride_u, 268 uint8* dst_v, 269 int dst_stride_v, 270 int width, 271 int height); 171 272 172 273 // RGB15 (RGBO fourcc) little endian to I420. 173 274 LIBYUV_API 174 int ARGB1555ToI420(const uint8* src_frame, int src_stride_frame, 175 uint8* dst_y, int dst_stride_y, 176 uint8* dst_u, int dst_stride_u, 177 uint8* dst_v, int dst_stride_v, 178 int width, int height); 275 int ARGB1555ToI420(const uint8* src_frame, 276 int src_stride_frame, 277 uint8* dst_y, 278 int dst_stride_y, 279 uint8* dst_u, 280 int dst_stride_u, 281 uint8* dst_v, 282 int dst_stride_v, 283 int width, 284 int height); 179 285 180 286 // RGB12 (R444 fourcc) little endian to I420. 181 287 LIBYUV_API 182 int ARGB4444ToI420(const uint8* src_frame, int src_stride_frame, 183 uint8* dst_y, int dst_stride_y, 184 uint8* dst_u, int dst_stride_u, 185 uint8* dst_v, int dst_stride_v, 186 int width, int height); 288 int ARGB4444ToI420(const uint8* src_frame, 289 int src_stride_frame, 290 uint8* dst_y, 291 int dst_stride_y, 292 uint8* dst_u, 293 int dst_stride_u, 294 uint8* dst_v, 295 int dst_stride_v, 296 int width, 297 int height); 187 298 188 299 #ifdef HAVE_JPEG … … 190 301 // dst_width/height for clipping determine final size. 191 302 LIBYUV_API 192 int MJPGToI420(const uint8* sample, size_t sample_size, 193 uint8* dst_y, int dst_stride_y, 194 uint8* dst_u, int dst_stride_u, 195 uint8* dst_v, int dst_stride_v, 196 int src_width, int src_height, 197 int dst_width, int dst_height); 303 int MJPGToI420(const uint8* sample, 304 size_t sample_size, 305 uint8* dst_y, 306 int dst_stride_y, 307 uint8* dst_u, 308 int dst_stride_u, 309 uint8* dst_v, 310 int dst_stride_v, 311 int src_width, 312 int src_height, 313 int dst_width, 314 int dst_height); 198 315 199 316 // Query size of MJPG in pixels. 200 317 LIBYUV_API 201 int MJPGSize(const uint8* sample, size_t sample_size, 202 int* width, int* height); 318 int MJPGSize(const uint8* sample, size_t sample_size, int* width, int* height); 203 319 #endif 204 320 … … 226 342 // Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. 227 343 LIBYUV_API 228 int ConvertToI420(const uint8* src_frame, size_t src_size, 229 uint8* dst_y, int dst_stride_y, 230 uint8* dst_u, int dst_stride_u, 231 uint8* dst_v, int dst_stride_v, 232 int crop_x, int crop_y, 233 int src_width, int src_height, 234 int crop_width, int crop_height, 344 int ConvertToI420(const uint8* src_frame, 345 size_t src_size, 346 uint8* dst_y, 347 int dst_stride_y, 348 uint8* dst_u, 349 int dst_stride_u, 350 uint8* dst_v, 351 int dst_stride_v, 352 int crop_x, 353 int crop_y, 354 int src_width, 355 int src_height, 356 int crop_width, 357 int crop_height, 235 358 enum RotationMode rotation, 236 359 uint32 format); … … 241 364 #endif 242 365 243 #endif // INCLUDE_LIBYUV_CONVERT_H_ NOLINT366 #endif // INCLUDE_LIBYUV_CONVERT_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/convert_argb.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ 12 12 #define INCLUDE_LIBYUV_CONVERT_ARGB_H_ 13 13 … … 31 31 // Copy ARGB to ARGB. 32 32 LIBYUV_API 33 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 34 uint8* dst_argb, int dst_stride_argb, 35 int width, int height); 33 int ARGBCopy(const uint8* src_argb, 34 int src_stride_argb, 35 uint8* dst_argb, 36 int dst_stride_argb, 37 int width, 38 int height); 36 39 37 40 // Convert I420 to ARGB. 38 41 LIBYUV_API 39 int I420ToARGB(const uint8* src_y, int src_stride_y, 40 const uint8* src_u, int src_stride_u, 41 const uint8* src_v, int src_stride_v, 42 uint8* dst_argb, int dst_stride_argb, 43 int width, int height); 42 int I420ToARGB(const uint8* src_y, 43 int src_stride_y, 44 const uint8* src_u, 45 int src_stride_u, 46 const uint8* src_v, 47 int src_stride_v, 48 uint8* dst_argb, 49 int dst_stride_argb, 50 int width, 51 int height); 52 53 // Duplicate prototype for function in convert_from.h for remoting. 54 LIBYUV_API 55 int I420ToABGR(const uint8* src_y, 56 int src_stride_y, 57 const uint8* src_u, 58 int src_stride_u, 59 const uint8* src_v, 60 int src_stride_v, 61 uint8* dst_argb, 62 int dst_stride_argb, 63 int width, 64 int height); 44 65 45 66 // Convert I422 to ARGB. 46 67 LIBYUV_API 47 int I422ToARGB(const uint8* src_y, int src_stride_y, 48 const uint8* src_u, int src_stride_u, 49 const uint8* src_v, int src_stride_v, 50 uint8* dst_argb, int dst_stride_argb, 51 int width, int height); 68 int I422ToARGB(const uint8* src_y, 69 int src_stride_y, 70 const uint8* src_u, 71 int src_stride_u, 72 const uint8* src_v, 73 int src_stride_v, 74 uint8* dst_argb, 75 int dst_stride_argb, 76 int width, 77 int height); 52 78 53 79 // Convert I444 to ARGB. 54 80 LIBYUV_API 55 int I444ToARGB(const uint8* src_y, int src_stride_y, 56 const uint8* src_u, int src_stride_u, 57 const uint8* src_v, int src_stride_v, 58 uint8* dst_argb, int dst_stride_argb, 59 int width, int height); 81 int I444ToARGB(const uint8* src_y, 82 int src_stride_y, 83 const uint8* src_u, 84 int src_stride_u, 85 const uint8* src_v, 86 int src_stride_v, 87 uint8* dst_argb, 88 int dst_stride_argb, 89 int width, 90 int height); 60 91 61 92 // Convert J444 to ARGB. 62 93 LIBYUV_API 63 int J444ToARGB(const uint8* src_y, int src_stride_y, 64 const uint8* src_u, int src_stride_u, 65 const uint8* src_v, int src_stride_v, 66 uint8* dst_argb, int dst_stride_argb, 67 int width, int height); 94 int J444ToARGB(const uint8* src_y, 95 int src_stride_y, 96 const uint8* src_u, 97 int src_stride_u, 98 const uint8* src_v, 99 int src_stride_v, 100 uint8* dst_argb, 101 int dst_stride_argb, 102 int width, 103 int height); 68 104 69 105 // Convert I444 to ABGR. 70 106 LIBYUV_API 71 int I444ToABGR(const uint8* src_y, int src_stride_y, 72 const uint8* src_u, int src_stride_u, 73 const uint8* src_v, int src_stride_v, 74 uint8* dst_abgr, int dst_stride_abgr, 75 int width, int height); 76 77 // Convert I411 to ARGB. 78 LIBYUV_API 79 int I411ToARGB(const uint8* src_y, int src_stride_y, 80 const uint8* src_u, int src_stride_u, 81 const uint8* src_v, int src_stride_v, 82 uint8* dst_argb, int dst_stride_argb, 83 int width, int height); 107 int I444ToABGR(const uint8* src_y, 108 int src_stride_y, 109 const uint8* src_u, 110 int src_stride_u, 111 const uint8* src_v, 112 int src_stride_v, 113 uint8* dst_abgr, 114 int dst_stride_abgr, 115 int width, 116 int height); 84 117 85 118 // Convert I420 with Alpha to preattenuated ARGB. 86 119 LIBYUV_API 87 int I420AlphaToARGB(const uint8* src_y, int src_stride_y, 88 const uint8* src_u, int src_stride_u, 89 const uint8* src_v, int src_stride_v, 90 const uint8* src_a, int src_stride_a, 91 uint8* dst_argb, int dst_stride_argb, 92 int width, int height, int attenuate); 120 int I420AlphaToARGB(const uint8* src_y, 121 int src_stride_y, 122 const uint8* src_u, 123 int src_stride_u, 124 const uint8* src_v, 125 int src_stride_v, 126 const uint8* src_a, 127 int src_stride_a, 128 uint8* dst_argb, 129 int dst_stride_argb, 130 int width, 131 int height, 132 int attenuate); 93 133 94 134 // Convert I420 with Alpha to preattenuated ABGR. 95 135 LIBYUV_API 96 int I420AlphaToABGR(const uint8* src_y, int src_stride_y, 97 const uint8* src_u, int src_stride_u, 98 const uint8* src_v, int src_stride_v, 99 const uint8* src_a, int src_stride_a, 100 uint8* dst_abgr, int dst_stride_abgr, 101 int width, int height, int attenuate); 136 int I420AlphaToABGR(const uint8* src_y, 137 int src_stride_y, 138 const uint8* src_u, 139 int src_stride_u, 140 const uint8* src_v, 141 int src_stride_v, 142 const uint8* src_a, 143 int src_stride_a, 144 uint8* dst_abgr, 145 int dst_stride_abgr, 146 int width, 147 int height, 148 int attenuate); 102 149 103 150 // Convert I400 (grey) to ARGB. Reverse of ARGBToI400. 104 151 LIBYUV_API 105 int I400ToARGB(const uint8* src_y, int src_stride_y, 106 uint8* dst_argb, int dst_stride_argb, 107 int width, int height); 152 int I400ToARGB(const uint8* src_y, 153 int src_stride_y, 154 uint8* dst_argb, 155 int dst_stride_argb, 156 int width, 157 int height); 108 158 109 159 // Convert J400 (jpeg grey) to ARGB. 110 160 LIBYUV_API 111 int J400ToARGB(const uint8* src_y, int src_stride_y, 112 uint8* dst_argb, int dst_stride_argb, 113 int width, int height); 161 int J400ToARGB(const uint8* src_y, 162 int src_stride_y, 163 uint8* dst_argb, 164 int dst_stride_argb, 165 int width, 166 int height); 114 167 115 168 // Alias. … … 118 171 // Convert NV12 to ARGB. 119 172 LIBYUV_API 120 int NV12ToARGB(const uint8* src_y, int src_stride_y, 121 const uint8* src_uv, int src_stride_uv, 122 uint8* dst_argb, int dst_stride_argb, 123 int width, int height); 173 int NV12ToARGB(const uint8* src_y, 174 int src_stride_y, 175 const uint8* src_uv, 176 int src_stride_uv, 177 uint8* dst_argb, 178 int dst_stride_argb, 179 int width, 180 int height); 124 181 125 182 // Convert NV21 to ARGB. 126 183 LIBYUV_API 127 int NV21ToARGB(const uint8* src_y, int src_stride_y, 128 const uint8* src_vu, int src_stride_vu, 129 uint8* dst_argb, int dst_stride_argb, 130 int width, int height); 184 int NV21ToARGB(const uint8* src_y, 185 int src_stride_y, 186 const uint8* src_vu, 187 int src_stride_vu, 188 uint8* dst_argb, 189 int dst_stride_argb, 190 int width, 191 int height); 131 192 132 193 // Convert M420 to ARGB. 133 194 LIBYUV_API 134 int M420ToARGB(const uint8* src_m420, int src_stride_m420, 135 uint8* dst_argb, int dst_stride_argb, 136 int width, int height); 195 int M420ToARGB(const uint8* src_m420, 196 int src_stride_m420, 197 uint8* dst_argb, 198 int dst_stride_argb, 199 int width, 200 int height); 137 201 138 202 // Convert YUY2 to ARGB. 139 203 LIBYUV_API 140 int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2, 141 uint8* dst_argb, int dst_stride_argb, 142 int width, int height); 204 int YUY2ToARGB(const uint8* src_yuy2, 205 int src_stride_yuy2, 206 uint8* dst_argb, 207 int dst_stride_argb, 208 int width, 209 int height); 143 210 144 211 // Convert UYVY to ARGB. 145 212 LIBYUV_API 146 int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy, 147 uint8* dst_argb, int dst_stride_argb, 148 int width, int height); 213 int UYVYToARGB(const uint8* src_uyvy, 214 int src_stride_uyvy, 215 uint8* dst_argb, 216 int dst_stride_argb, 217 int width, 218 int height); 149 219 150 220 // Convert J420 to ARGB. 151 221 LIBYUV_API 152 int J420ToARGB(const uint8* src_y, int src_stride_y, 153 const uint8* src_u, int src_stride_u, 154 const uint8* src_v, int src_stride_v, 155 uint8* dst_argb, int dst_stride_argb, 156 int width, int height); 222 int J420ToARGB(const uint8* src_y, 223 int src_stride_y, 224 const uint8* src_u, 225 int src_stride_u, 226 const uint8* src_v, 227 int src_stride_v, 228 uint8* dst_argb, 229 int dst_stride_argb, 230 int width, 231 int height); 157 232 158 233 // Convert J422 to ARGB. 159 234 LIBYUV_API 160 int J422ToARGB(const uint8* src_y, int src_stride_y, 161 const uint8* src_u, int src_stride_u, 162 const uint8* src_v, int src_stride_v, 163 uint8* dst_argb, int dst_stride_argb, 164 int width, int height); 235 int J422ToARGB(const uint8* src_y, 236 int src_stride_y, 237 const uint8* src_u, 238 int src_stride_u, 239 const uint8* src_v, 240 int src_stride_v, 241 uint8* dst_argb, 242 int dst_stride_argb, 243 int width, 244 int height); 165 245 166 246 // Convert J420 to ABGR. 167 247 LIBYUV_API 168 int J420ToABGR(const uint8* src_y, int src_stride_y, 169 const uint8* src_u, int src_stride_u, 170 const uint8* src_v, int src_stride_v, 171 uint8* dst_abgr, int dst_stride_abgr, 172 int width, int height); 248 int J420ToABGR(const uint8* src_y, 249 int src_stride_y, 250 const uint8* src_u, 251 int src_stride_u, 252 const uint8* src_v, 253 int src_stride_v, 254 uint8* dst_abgr, 255 int dst_stride_abgr, 256 int width, 257 int height); 173 258 174 259 // Convert J422 to ABGR. 175 260 LIBYUV_API 176 int J422ToABGR(const uint8* src_y, int src_stride_y, 177 const uint8* src_u, int src_stride_u, 178 const uint8* src_v, int src_stride_v, 179 uint8* dst_abgr, int dst_stride_abgr, 180 int width, int height); 261 int J422ToABGR(const uint8* src_y, 262 int src_stride_y, 263 const uint8* src_u, 264 int src_stride_u, 265 const uint8* src_v, 266 int src_stride_v, 267 uint8* dst_abgr, 268 int dst_stride_abgr, 269 int width, 270 int height); 181 271 182 272 // Convert H420 to ARGB. 183 273 LIBYUV_API 184 int H420ToARGB(const uint8* src_y, int src_stride_y, 185 const uint8* src_u, int src_stride_u, 186 const uint8* src_v, int src_stride_v, 187 uint8* dst_argb, int dst_stride_argb, 188 int width, int height); 274 int H420ToARGB(const uint8* src_y, 275 int src_stride_y, 276 const uint8* src_u, 277 int src_stride_u, 278 const uint8* src_v, 279 int src_stride_v, 280 uint8* dst_argb, 281 int dst_stride_argb, 282 int width, 283 int height); 189 284 190 285 // Convert H422 to ARGB. 191 286 LIBYUV_API 192 int H422ToARGB(const uint8* src_y, int src_stride_y, 193 const uint8* src_u, int src_stride_u, 194 const uint8* src_v, int src_stride_v, 195 uint8* dst_argb, int dst_stride_argb, 196 int width, int height); 287 int H422ToARGB(const uint8* src_y, 288 int src_stride_y, 289 const uint8* src_u, 290 int src_stride_u, 291 const uint8* src_v, 292 int src_stride_v, 293 uint8* dst_argb, 294 int dst_stride_argb, 295 int width, 296 int height); 197 297 198 298 // Convert H420 to ABGR. 199 299 LIBYUV_API 200 int H420ToABGR(const uint8* src_y, int src_stride_y, 201 const uint8* src_u, int src_stride_u, 202 const uint8* src_v, int src_stride_v, 203 uint8* dst_abgr, int dst_stride_abgr, 204 int width, int height); 300 int H420ToABGR(const uint8* src_y, 301 int src_stride_y, 302 const uint8* src_u, 303 int src_stride_u, 304 const uint8* src_v, 305 int src_stride_v, 306 uint8* dst_abgr, 307 int dst_stride_abgr, 308 int width, 309 int height); 205 310 206 311 // Convert H422 to ABGR. 207 312 LIBYUV_API 208 int H422ToABGR(const uint8* src_y, int src_stride_y, 209 const uint8* src_u, int src_stride_u, 210 const uint8* src_v, int src_stride_v, 211 uint8* dst_abgr, int dst_stride_abgr, 212 int width, int height); 313 int H422ToABGR(const uint8* src_y, 314 int src_stride_y, 315 const uint8* src_u, 316 int src_stride_u, 317 const uint8* src_v, 318 int src_stride_v, 319 uint8* dst_abgr, 320 int dst_stride_abgr, 321 int width, 322 int height); 213 323 214 324 // BGRA little endian (argb in memory) to ARGB. 215 325 LIBYUV_API 216 int BGRAToARGB(const uint8* src_frame, int src_stride_frame, 217 uint8* dst_argb, int dst_stride_argb, 218 int width, int height); 326 int BGRAToARGB(const uint8* src_frame, 327 int src_stride_frame, 328 uint8* dst_argb, 329 int dst_stride_argb, 330 int width, 331 int height); 219 332 220 333 // ABGR little endian (rgba in memory) to ARGB. 221 334 LIBYUV_API 222 int ABGRToARGB(const uint8* src_frame, int src_stride_frame, 223 uint8* dst_argb, int dst_stride_argb, 224 int width, int height); 335 int ABGRToARGB(const uint8* src_frame, 336 int src_stride_frame, 337 uint8* dst_argb, 338 int dst_stride_argb, 339 int width, 340 int height); 225 341 226 342 // RGBA little endian (abgr in memory) to ARGB. 227 343 LIBYUV_API 228 int RGBAToARGB(const uint8* src_frame, int src_stride_frame, 229 uint8* dst_argb, int dst_stride_argb, 230 int width, int height); 344 int RGBAToARGB(const uint8* src_frame, 345 int src_stride_frame, 346 uint8* dst_argb, 347 int dst_stride_argb, 348 int width, 349 int height); 231 350 232 351 // Deprecated function name. … … 235 354 // RGB little endian (bgr in memory) to ARGB. 236 355 LIBYUV_API 237 int RGB24ToARGB(const uint8* src_frame, int src_stride_frame, 238 uint8* dst_argb, int dst_stride_argb, 239 int width, int height); 356 int RGB24ToARGB(const uint8* src_frame, 357 int src_stride_frame, 358 uint8* dst_argb, 359 int dst_stride_argb, 360 int width, 361 int height); 240 362 241 363 // RGB big endian (rgb in memory) to ARGB. 242 364 LIBYUV_API 243 int RAWToARGB(const uint8* src_frame, int src_stride_frame, 244 uint8* dst_argb, int dst_stride_argb, 245 int width, int height); 365 int RAWToARGB(const uint8* src_frame, 366 int src_stride_frame, 367 uint8* dst_argb, 368 int dst_stride_argb, 369 int width, 370 int height); 246 371 247 372 // RGB16 (RGBP fourcc) little endian to ARGB. 248 373 LIBYUV_API 249 int RGB565ToARGB(const uint8* src_frame, int src_stride_frame, 250 uint8* dst_argb, int dst_stride_argb, 251 int width, int height); 374 int RGB565ToARGB(const uint8* src_frame, 375 int src_stride_frame, 376 uint8* dst_argb, 377 int dst_stride_argb, 378 int width, 379 int height); 252 380 253 381 // RGB15 (RGBO fourcc) little endian to ARGB. 254 382 LIBYUV_API 255 int ARGB1555ToARGB(const uint8* src_frame, int src_stride_frame, 256 uint8* dst_argb, int dst_stride_argb, 257 int width, int height); 383 int ARGB1555ToARGB(const uint8* src_frame, 384 int src_stride_frame, 385 uint8* dst_argb, 386 int dst_stride_argb, 387 int width, 388 int height); 258 389 259 390 // RGB12 (R444 fourcc) little endian to ARGB. 260 391 LIBYUV_API 261 int ARGB4444ToARGB(const uint8* src_frame, int src_stride_frame, 262 uint8* dst_argb, int dst_stride_argb, 263 int width, int height); 392 int ARGB4444ToARGB(const uint8* src_frame, 393 int src_stride_frame, 394 uint8* dst_argb, 395 int dst_stride_argb, 396 int width, 397 int height); 264 398 265 399 #ifdef HAVE_JPEG … … 267 401 // dst_width/height for clipping determine final size. 268 402 LIBYUV_API 269 int MJPGToARGB(const uint8* sample, size_t sample_size, 270 uint8* dst_argb, int dst_stride_argb, 271 int src_width, int src_height, 272 int dst_width, int dst_height); 403 int MJPGToARGB(const uint8* sample, 404 size_t sample_size, 405 uint8* dst_argb, 406 int dst_stride_argb, 407 int src_width, 408 int src_height, 409 int dst_width, 410 int dst_height); 273 411 #endif 274 412 … … 296 434 // Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. 297 435 LIBYUV_API 298 int ConvertToARGB(const uint8* src_frame, size_t src_size, 299 uint8* dst_argb, int dst_stride_argb, 300 int crop_x, int crop_y, 301 int src_width, int src_height, 302 int crop_width, int crop_height, 436 int ConvertToARGB(const uint8* src_frame, 437 size_t src_size, 438 uint8* dst_argb, 439 int dst_stride_argb, 440 int crop_x, 441 int crop_y, 442 int src_width, 443 int src_height, 444 int crop_width, 445 int crop_height, 303 446 enum RotationMode rotation, 304 447 uint32 format); … … 309 452 #endif 310 453 311 #endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ NOLINT454 #endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/convert_from.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ 12 12 #define INCLUDE_LIBYUV_CONVERT_FROM_H_ 13 13 … … 25 25 26 26 LIBYUV_API 27 int I420ToI422(const uint8* src_y, int src_stride_y, 28 const uint8* src_u, int src_stride_u, 29 const uint8* src_v, int src_stride_v, 30 uint8* dst_y, int dst_stride_y, 31 uint8* dst_u, int dst_stride_u, 32 uint8* dst_v, int dst_stride_v, 33 int width, int height); 34 35 LIBYUV_API 36 int I420ToI444(const uint8* src_y, int src_stride_y, 37 const uint8* src_u, int src_stride_u, 38 const uint8* src_v, int src_stride_v, 39 uint8* dst_y, int dst_stride_y, 40 uint8* dst_u, int dst_stride_u, 41 uint8* dst_v, int dst_stride_v, 42 int width, int height); 43 44 LIBYUV_API 45 int I420ToI411(const uint8* src_y, int src_stride_y, 46 const uint8* src_u, int src_stride_u, 47 const uint8* src_v, int src_stride_v, 48 uint8* dst_y, int dst_stride_y, 49 uint8* dst_u, int dst_stride_u, 50 uint8* dst_v, int dst_stride_v, 51 int width, int height); 27 int I420ToI422(const uint8* src_y, 28 int src_stride_y, 29 const uint8* src_u, 30 int src_stride_u, 31 const uint8* src_v, 32 int src_stride_v, 33 uint8* dst_y, 34 int dst_stride_y, 35 uint8* dst_u, 36 int dst_stride_u, 37 uint8* dst_v, 38 int dst_stride_v, 39 int width, 40 int height); 41 42 LIBYUV_API 43 int I420ToI444(const uint8* src_y, 44 int src_stride_y, 45 const uint8* src_u, 46 int src_stride_u, 47 const uint8* src_v, 48 int src_stride_v, 49 uint8* dst_y, 50 int dst_stride_y, 51 uint8* dst_u, 52 int dst_stride_u, 53 uint8* dst_v, 54 int dst_stride_v, 55 int width, 56 int height); 52 57 53 58 // Copy to I400. Source can be I420, I422, I444, I400, NV12 or NV21. 54 59 LIBYUV_API 55 int I400Copy(const uint8* src_y, int src_stride_y, 56 uint8* dst_y, int dst_stride_y, 57 int width, int height); 58 59 LIBYUV_API 60 int I420ToNV12(const uint8* src_y, int src_stride_y, 61 const uint8* src_u, int src_stride_u, 62 const uint8* src_v, int src_stride_v, 63 uint8* dst_y, int dst_stride_y, 64 uint8* dst_uv, int dst_stride_uv, 65 int width, int height); 66 67 LIBYUV_API 68 int I420ToNV21(const uint8* src_y, int src_stride_y, 69 const uint8* src_u, int src_stride_u, 70 const uint8* src_v, int src_stride_v, 71 uint8* dst_y, int dst_stride_y, 72 uint8* dst_vu, int dst_stride_vu, 73 int width, int height); 74 75 LIBYUV_API 76 int I420ToYUY2(const uint8* src_y, int src_stride_y, 77 const uint8* src_u, int src_stride_u, 78 const uint8* src_v, int src_stride_v, 79 uint8* dst_frame, int dst_stride_frame, 80 int width, int height); 81 82 LIBYUV_API 83 int I420ToUYVY(const uint8* src_y, int src_stride_y, 84 const uint8* src_u, int src_stride_u, 85 const uint8* src_v, int src_stride_v, 86 uint8* dst_frame, int dst_stride_frame, 87 int width, int height); 88 89 LIBYUV_API 90 int I420ToARGB(const uint8* src_y, int src_stride_y, 91 const uint8* src_u, int src_stride_u, 92 const uint8* src_v, int src_stride_v, 93 uint8* dst_argb, int dst_stride_argb, 94 int width, int height); 95 96 LIBYUV_API 97 int I420ToBGRA(const uint8* src_y, int src_stride_y, 98 const uint8* src_u, int src_stride_u, 99 const uint8* src_v, int src_stride_v, 100 uint8* dst_argb, int dst_stride_argb, 101 int width, int height); 102 103 LIBYUV_API 104 int I420ToABGR(const uint8* src_y, int src_stride_y, 105 const uint8* src_u, int src_stride_u, 106 const uint8* src_v, int src_stride_v, 107 uint8* dst_argb, int dst_stride_argb, 108 int width, int height); 109 110 LIBYUV_API 111 int I420ToRGBA(const uint8* src_y, int src_stride_y, 112 const uint8* src_u, int src_stride_u, 113 const uint8* src_v, int src_stride_v, 114 uint8* dst_rgba, int dst_stride_rgba, 115 int width, int height); 116 117 LIBYUV_API 118 int I420ToRGB24(const uint8* src_y, int src_stride_y, 119 const uint8* src_u, int src_stride_u, 120 const uint8* src_v, int src_stride_v, 121 uint8* dst_frame, int dst_stride_frame, 122 int width, int height); 123 124 LIBYUV_API 125 int I420ToRAW(const uint8* src_y, int src_stride_y, 126 const uint8* src_u, int src_stride_u, 127 const uint8* src_v, int src_stride_v, 128 uint8* dst_frame, int dst_stride_frame, 129 int width, int height); 130 131 LIBYUV_API 132 int I420ToRGB565(const uint8* src_y, int src_stride_y, 133 const uint8* src_u, int src_stride_u, 134 const uint8* src_v, int src_stride_v, 135 uint8* dst_frame, int dst_stride_frame, 136 int width, int height); 60 int I400Copy(const uint8* src_y, 61 int src_stride_y, 62 uint8* dst_y, 63 int dst_stride_y, 64 int width, 65 int height); 66 67 LIBYUV_API 68 int I420ToNV12(const uint8* src_y, 69 int src_stride_y, 70 const uint8* src_u, 71 int src_stride_u, 72 const uint8* src_v, 73 int src_stride_v, 74 uint8* dst_y, 75 int dst_stride_y, 76 uint8* dst_uv, 77 int dst_stride_uv, 78 int width, 79 int height); 80 81 LIBYUV_API 82 int I420ToNV21(const uint8* src_y, 83 int src_stride_y, 84 const uint8* src_u, 85 int src_stride_u, 86 const uint8* src_v, 87 int src_stride_v, 88 uint8* dst_y, 89 int dst_stride_y, 90 uint8* dst_vu, 91 int dst_stride_vu, 92 int width, 93 int height); 94 95 LIBYUV_API 96 int I420ToYUY2(const uint8* src_y, 97 int src_stride_y, 98 const uint8* src_u, 99 int src_stride_u, 100 const uint8* src_v, 101 int src_stride_v, 102 uint8* dst_frame, 103 int dst_stride_frame, 104 int width, 105 int height); 106 107 LIBYUV_API 108 int I420ToUYVY(const uint8* src_y, 109 int src_stride_y, 110 const uint8* src_u, 111 int src_stride_u, 112 const uint8* src_v, 113 int src_stride_v, 114 uint8* dst_frame, 115 int dst_stride_frame, 116 int width, 117 int height); 118 119 LIBYUV_API 120 int I420ToARGB(const uint8* src_y, 121 int src_stride_y, 122 const uint8* src_u, 123 int src_stride_u, 124 const uint8* src_v, 125 int src_stride_v, 126 uint8* dst_argb, 127 int dst_stride_argb, 128 int width, 129 int height); 130 131 LIBYUV_API 132 int I420ToBGRA(const uint8* src_y, 133 int src_stride_y, 134 const uint8* src_u, 135 int src_stride_u, 136 const uint8* src_v, 137 int src_stride_v, 138 uint8* dst_argb, 139 int dst_stride_argb, 140 int width, 141 int height); 142 143 LIBYUV_API 144 int I420ToABGR(const uint8* src_y, 145 int src_stride_y, 146 const uint8* src_u, 147 int src_stride_u, 148 const uint8* src_v, 149 int src_stride_v, 150 uint8* dst_argb, 151 int dst_stride_argb, 152 int width, 153 int height); 154 155 LIBYUV_API 156 int I420ToRGBA(const uint8* src_y, 157 int src_stride_y, 158 const uint8* src_u, 159 int src_stride_u, 160 const uint8* src_v, 161 int src_stride_v, 162 uint8* dst_rgba, 163 int dst_stride_rgba, 164 int width, 165 int height); 166 167 LIBYUV_API 168 int I420ToRGB24(const uint8* src_y, 169 int src_stride_y, 170 const uint8* src_u, 171 int src_stride_u, 172 const uint8* src_v, 173 int src_stride_v, 174 uint8* dst_frame, 175 int dst_stride_frame, 176 int width, 177 int height); 178 179 LIBYUV_API 180 int I420ToRAW(const uint8* src_y, 181 int src_stride_y, 182 const uint8* src_u, 183 int src_stride_u, 184 const uint8* src_v, 185 int src_stride_v, 186 uint8* dst_frame, 187 int dst_stride_frame, 188 int width, 189 int height); 190 191 LIBYUV_API 192 int I420ToRGB565(const uint8* src_y, 193 int src_stride_y, 194 const uint8* src_u, 195 int src_stride_u, 196 const uint8* src_v, 197 int src_stride_v, 198 uint8* dst_frame, 199 int dst_stride_frame, 200 int width, 201 int height); 202 203 LIBYUV_API 204 int I422ToRGB565(const uint8* src_y, 205 int src_stride_y, 206 const uint8* src_u, 207 int src_stride_u, 208 const uint8* src_v, 209 int src_stride_v, 210 uint8* dst_frame, 211 int dst_stride_frame, 212 int width, 213 int height); 137 214 138 215 // Convert I420 To RGB565 with 4x4 dither matrix (16 bytes). … … 141 218 142 219 LIBYUV_API 143 int I420ToRGB565Dither(const uint8* src_y, int src_stride_y, 144 const uint8* src_u, int src_stride_u, 145 const uint8* src_v, int src_stride_v, 146 uint8* dst_frame, int dst_stride_frame, 147 const uint8* dither4x4, int width, int height); 148 149 LIBYUV_API 150 int I420ToARGB1555(const uint8* src_y, int src_stride_y, 151 const uint8* src_u, int src_stride_u, 152 const uint8* src_v, int src_stride_v, 153 uint8* dst_frame, int dst_stride_frame, 154 int width, int height); 155 156 LIBYUV_API 157 int I420ToARGB4444(const uint8* src_y, int src_stride_y, 158 const uint8* src_u, int src_stride_u, 159 const uint8* src_v, int src_stride_v, 160 uint8* dst_frame, int dst_stride_frame, 161 int width, int height); 220 int I420ToRGB565Dither(const uint8* src_y, 221 int src_stride_y, 222 const uint8* src_u, 223 int src_stride_u, 224 const uint8* src_v, 225 int src_stride_v, 226 uint8* dst_frame, 227 int dst_stride_frame, 228 const uint8* dither4x4, 229 int width, 230 int height); 231 232 LIBYUV_API 233 int I420ToARGB1555(const uint8* src_y, 234 int src_stride_y, 235 const uint8* src_u, 236 int src_stride_u, 237 const uint8* src_v, 238 int src_stride_v, 239 uint8* dst_frame, 240 int dst_stride_frame, 241 int width, 242 int height); 243 244 LIBYUV_API 245 int I420ToARGB4444(const uint8* src_y, 246 int src_stride_y, 247 const uint8* src_u, 248 int src_stride_u, 249 const uint8* src_v, 250 int src_stride_v, 251 uint8* dst_frame, 252 int dst_stride_frame, 253 int width, 254 int height); 162 255 163 256 // Convert I420 to specified format. … … 165 258 // buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. 166 259 LIBYUV_API 167 int ConvertFromI420(const uint8* y, int y_stride, 168 const uint8* u, int u_stride, 169 const uint8* v, int v_stride, 170 uint8* dst_sample, int dst_sample_stride, 171 int width, int height, 260 int ConvertFromI420(const uint8* y, 261 int y_stride, 262 const uint8* u, 263 int u_stride, 264 const uint8* v, 265 int v_stride, 266 uint8* dst_sample, 267 int dst_sample_stride, 268 int width, 269 int height, 172 270 uint32 format); 173 271 … … 177 275 #endif 178 276 179 #endif // INCLUDE_LIBYUV_CONVERT_FROM_H_ NOLINT277 #endif // INCLUDE_LIBYUV_CONVERT_FROM_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/convert_from_argb.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 12 12 #define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 13 13 … … 22 22 #define ARGBToARGB ARGBCopy 23 23 LIBYUV_API 24 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 25 uint8* dst_argb, int dst_stride_argb, 26 int width, int height); 24 int ARGBCopy(const uint8* src_argb, 25 int src_stride_argb, 26 uint8* dst_argb, 27 int dst_stride_argb, 28 int width, 29 int height); 27 30 28 31 // Convert ARGB To BGRA. 29 32 LIBYUV_API 30 int ARGBToBGRA(const uint8* src_argb, int src_stride_argb, 31 uint8* dst_bgra, int dst_stride_bgra, 32 int width, int height); 33 int ARGBToBGRA(const uint8* src_argb, 34 int src_stride_argb, 35 uint8* dst_bgra, 36 int dst_stride_bgra, 37 int width, 38 int height); 33 39 34 40 // Convert ARGB To ABGR. 35 41 LIBYUV_API 36 int ARGBToABGR(const uint8* src_argb, int src_stride_argb, 37 uint8* dst_abgr, int dst_stride_abgr, 38 int width, int height); 42 int ARGBToABGR(const uint8* src_argb, 43 int src_stride_argb, 44 uint8* dst_abgr, 45 int dst_stride_abgr, 46 int width, 47 int height); 39 48 40 49 // Convert ARGB To RGBA. 41 50 LIBYUV_API 42 int ARGBToRGBA(const uint8* src_argb, int src_stride_argb, 43 uint8* dst_rgba, int dst_stride_rgba, 44 int width, int height); 51 int ARGBToRGBA(const uint8* src_argb, 52 int src_stride_argb, 53 uint8* dst_rgba, 54 int dst_stride_rgba, 55 int width, 56 int height); 45 57 46 58 // Convert ARGB To RGB24. 47 59 LIBYUV_API 48 int ARGBToRGB24(const uint8* src_argb, int src_stride_argb, 49 uint8* dst_rgb24, int dst_stride_rgb24, 50 int width, int height); 60 int ARGBToRGB24(const uint8* src_argb, 61 int src_stride_argb, 62 uint8* dst_rgb24, 63 int dst_stride_rgb24, 64 int width, 65 int height); 51 66 52 67 // Convert ARGB To RAW. 53 68 LIBYUV_API 54 int ARGBToRAW(const uint8* src_argb, int src_stride_argb, 55 uint8* dst_rgb, int dst_stride_rgb, 56 int width, int height); 69 int ARGBToRAW(const uint8* src_argb, 70 int src_stride_argb, 71 uint8* dst_rgb, 72 int dst_stride_rgb, 73 int width, 74 int height); 57 75 58 76 // Convert ARGB To RGB565. 59 77 LIBYUV_API 60 int ARGBToRGB565(const uint8* src_argb, int src_stride_argb, 61 uint8* dst_rgb565, int dst_stride_rgb565, 62 int width, int height); 78 int ARGBToRGB565(const uint8* src_argb, 79 int src_stride_argb, 80 uint8* dst_rgb565, 81 int dst_stride_rgb565, 82 int width, 83 int height); 63 84 64 85 // Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes). … … 68 89 // const uint8(*dither)[4][4]; 69 90 LIBYUV_API 70 int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb, 71 uint8* dst_rgb565, int dst_stride_rgb565, 72 const uint8* dither4x4, int width, int height); 91 int ARGBToRGB565Dither(const uint8* src_argb, 92 int src_stride_argb, 93 uint8* dst_rgb565, 94 int dst_stride_rgb565, 95 const uint8* dither4x4, 96 int width, 97 int height); 73 98 74 99 // Convert ARGB To ARGB1555. 75 100 LIBYUV_API 76 int ARGBToARGB1555(const uint8* src_argb, int src_stride_argb, 77 uint8* dst_argb1555, int dst_stride_argb1555, 78 int width, int height); 101 int ARGBToARGB1555(const uint8* src_argb, 102 int src_stride_argb, 103 uint8* dst_argb1555, 104 int dst_stride_argb1555, 105 int width, 106 int height); 79 107 80 108 // Convert ARGB To ARGB4444. 81 109 LIBYUV_API 82 int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb, 83 uint8* dst_argb4444, int dst_stride_argb4444, 84 int width, int height); 110 int ARGBToARGB4444(const uint8* src_argb, 111 int src_stride_argb, 112 uint8* dst_argb4444, 113 int dst_stride_argb4444, 114 int width, 115 int height); 85 116 86 117 // Convert ARGB To I444. 87 118 LIBYUV_API 88 int ARGBToI444(const uint8* src_argb, int src_stride_argb, 89 uint8* dst_y, int dst_stride_y, 90 uint8* dst_u, int dst_stride_u, 91 uint8* dst_v, int dst_stride_v, 92 int width, int height); 119 int ARGBToI444(const uint8* src_argb, 120 int src_stride_argb, 121 uint8* dst_y, 122 int dst_stride_y, 123 uint8* dst_u, 124 int dst_stride_u, 125 uint8* dst_v, 126 int dst_stride_v, 127 int width, 128 int height); 93 129 94 130 // Convert ARGB To I422. 95 131 LIBYUV_API 96 int ARGBToI422(const uint8* src_argb, int src_stride_argb, 97 uint8* dst_y, int dst_stride_y, 98 uint8* dst_u, int dst_stride_u, 99 uint8* dst_v, int dst_stride_v, 100 int width, int height); 132 int ARGBToI422(const uint8* src_argb, 133 int src_stride_argb, 134 uint8* dst_y, 135 int dst_stride_y, 136 uint8* dst_u, 137 int dst_stride_u, 138 uint8* dst_v, 139 int dst_stride_v, 140 int width, 141 int height); 101 142 102 143 // Convert ARGB To I420. (also in convert.h) 103 144 LIBYUV_API 104 int ARGBToI420(const uint8* src_argb, int src_stride_argb, 105 uint8* dst_y, int dst_stride_y, 106 uint8* dst_u, int dst_stride_u, 107 uint8* dst_v, int dst_stride_v, 108 int width, int height); 145 int ARGBToI420(const uint8* src_argb, 146 int src_stride_argb, 147 uint8* dst_y, 148 int dst_stride_y, 149 uint8* dst_u, 150 int dst_stride_u, 151 uint8* dst_v, 152 int dst_stride_v, 153 int width, 154 int height); 109 155 110 156 // Convert ARGB to J420. (JPeg full range I420). 111 157 LIBYUV_API 112 int ARGBToJ420(const uint8* src_argb, int src_stride_argb, 113 uint8* dst_yj, int dst_stride_yj, 114 uint8* dst_u, int dst_stride_u, 115 uint8* dst_v, int dst_stride_v, 116 int width, int height); 158 int ARGBToJ420(const uint8* src_argb, 159 int src_stride_argb, 160 uint8* dst_yj, 161 int dst_stride_yj, 162 uint8* dst_u, 163 int dst_stride_u, 164 uint8* dst_v, 165 int dst_stride_v, 166 int width, 167 int height); 117 168 118 169 // Convert ARGB to J422. 119 170 LIBYUV_API 120 int ARGBToJ422(const uint8* src_argb, int src_stride_argb, 121 uint8* dst_yj, int dst_stride_yj, 122 uint8* dst_u, int dst_stride_u, 123 uint8* dst_v, int dst_stride_v, 124 int width, int height); 125 126 // Convert ARGB To I411. 127 LIBYUV_API 128 int ARGBToI411(const uint8* src_argb, int src_stride_argb, 129 uint8* dst_y, int dst_stride_y, 130 uint8* dst_u, int dst_stride_u, 131 uint8* dst_v, int dst_stride_v, 132 int width, int height); 171 int ARGBToJ422(const uint8* src_argb, 172 int src_stride_argb, 173 uint8* dst_yj, 174 int dst_stride_yj, 175 uint8* dst_u, 176 int dst_stride_u, 177 uint8* dst_v, 178 int dst_stride_v, 179 int width, 180 int height); 133 181 134 182 // Convert ARGB to J400. (JPeg full range). 135 183 LIBYUV_API 136 int ARGBToJ400(const uint8* src_argb, int src_stride_argb, 137 uint8* dst_yj, int dst_stride_yj, 138 int width, int height); 184 int ARGBToJ400(const uint8* src_argb, 185 int src_stride_argb, 186 uint8* dst_yj, 187 int dst_stride_yj, 188 int width, 189 int height); 139 190 140 191 // Convert ARGB to I400. 141 192 LIBYUV_API 142 int ARGBToI400(const uint8* src_argb, int src_stride_argb, 143 uint8* dst_y, int dst_stride_y, 144 int width, int height); 193 int ARGBToI400(const uint8* src_argb, 194 int src_stride_argb, 195 uint8* dst_y, 196 int dst_stride_y, 197 int width, 198 int height); 145 199 146 200 // Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) 147 201 LIBYUV_API 148 int ARGBToG(const uint8* src_argb, int src_stride_argb, 149 uint8* dst_g, int dst_stride_g, 150 int width, int height); 202 int ARGBToG(const uint8* src_argb, 203 int src_stride_argb, 204 uint8* dst_g, 205 int dst_stride_g, 206 int width, 207 int height); 151 208 152 209 // Convert ARGB To NV12. 153 210 LIBYUV_API 154 int ARGBToNV12(const uint8* src_argb, int src_stride_argb, 155 uint8* dst_y, int dst_stride_y, 156 uint8* dst_uv, int dst_stride_uv, 157 int width, int height); 211 int ARGBToNV12(const uint8* src_argb, 212 int src_stride_argb, 213 uint8* dst_y, 214 int dst_stride_y, 215 uint8* dst_uv, 216 int dst_stride_uv, 217 int width, 218 int height); 158 219 159 220 // Convert ARGB To NV21. 160 221 LIBYUV_API 161 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 162 uint8* dst_y, int dst_stride_y, 163 uint8* dst_vu, int dst_stride_vu, 164 int width, int height); 222 int ARGBToNV21(const uint8* src_argb, 223 int src_stride_argb, 224 uint8* dst_y, 225 int dst_stride_y, 226 uint8* dst_vu, 227 int dst_stride_vu, 228 int width, 229 int height); 165 230 166 231 // Convert ARGB To NV21. 167 232 LIBYUV_API 168 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 169 uint8* dst_y, int dst_stride_y, 170 uint8* dst_vu, int dst_stride_vu, 171 int width, int height); 233 int ARGBToNV21(const uint8* src_argb, 234 int src_stride_argb, 235 uint8* dst_y, 236 int dst_stride_y, 237 uint8* dst_vu, 238 int dst_stride_vu, 239 int width, 240 int height); 172 241 173 242 // Convert ARGB To YUY2. 174 243 LIBYUV_API 175 int ARGBToYUY2(const uint8* src_argb, int src_stride_argb, 176 uint8* dst_yuy2, int dst_stride_yuy2, 177 int width, int height); 244 int ARGBToYUY2(const uint8* src_argb, 245 int src_stride_argb, 246 uint8* dst_yuy2, 247 int dst_stride_yuy2, 248 int width, 249 int height); 178 250 179 251 // Convert ARGB To UYVY. 180 252 LIBYUV_API 181 int ARGBToUYVY(const uint8* src_argb, int src_stride_argb, 182 uint8* dst_uyvy, int dst_stride_uyvy, 183 int width, int height); 253 int ARGBToUYVY(const uint8* src_argb, 254 int src_stride_argb, 255 uint8* dst_uyvy, 256 int dst_stride_uyvy, 257 int width, 258 int height); 184 259 185 260 #ifdef __cplusplus … … 188 263 #endif 189 264 190 #endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ NOLINT265 #endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/cpu_id.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_CPU_ID_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_CPU_ID_H_ 12 12 #define INCLUDE_LIBYUV_CPU_ID_H_ 13 13 … … 32 32 static const int kCpuHasSSSE3 = 0x40; 33 33 static const int kCpuHasSSE41 = 0x80; 34 static const int kCpuHasSSE42 = 0x100; 34 static const int kCpuHasSSE42 = 0x100; // unused at this time. 35 35 static const int kCpuHasAVX = 0x200; 36 36 static const int kCpuHasAVX2 = 0x400; … … 38 38 static const int kCpuHasFMA3 = 0x1000; 39 39 static const int kCpuHasAVX3 = 0x2000; 40 // 0x2000, 0x4000, 0x8000 reserved for future X86 flags. 40 static const int kCpuHasF16C = 0x4000; 41 42 // 0x8000 reserved for future X86 flags. 41 43 42 44 // These flags are only valid on MIPS processors. 43 45 static const int kCpuHasMIPS = 0x10000; 44 46 static const int kCpuHasDSPR2 = 0x20000; 47 static const int kCpuHasMSA = 0x40000; 45 48 46 // Internal function used to auto-init. 49 // Optional init function. TestCpuFlag does an auto-init. 50 // Returns cpu_info flags. 47 51 LIBYUV_API 48 52 int InitCpuFlags(void); 53 54 // Detect CPU has SSE2 etc. 55 // Test_flag parameter should be one of kCpuHas constants above. 56 // Returns non-zero if instruction set is detected 57 static __inline int TestCpuFlag(int test_flag) { 58 LIBYUV_API extern int cpu_info_; 59 #ifdef __ATOMIC_RELAXED 60 int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED); 61 #else 62 int cpu_info = cpu_info_; 63 #endif 64 return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag; 65 } 49 66 50 67 // Internal function for parsing /proc/cpuinfo. … … 52 69 int ArmCpuCaps(const char* cpuinfo_name); 53 70 54 // Detect CPU has SSE2 etc.55 // Test_flag parameter should be one of kCpuHas constants above.56 // returns non-zero if instruction set is detected57 static __inline int TestCpuFlag(int test_flag) {58 LIBYUV_API extern int cpu_info_;59 return (!cpu_info_ ? InitCpuFlags() : cpu_info_) & test_flag;60 }61 62 71 // For testing, allow CPU flags to be disabled. 63 72 // ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. 64 73 // MaskCpuFlags(-1) to enable all cpu specific optimizations. 65 74 // MaskCpuFlags(1) to disable all cpu specific optimizations. 75 // MaskCpuFlags(0) to reset state so next call will auto init. 76 // Returns cpu_info flags. 66 77 LIBYUV_API 67 voidMaskCpuFlags(int enable_flags);78 int MaskCpuFlags(int enable_flags); 68 79 69 80 // Low level cpuid for X86. Returns zeros on other CPUs. … … 71 82 // ecx is typically the cpu number, and should normally be zero. 72 83 LIBYUV_API 73 void CpuId( uint32 eax, uint32 ecx, uint32* cpu_info);84 void CpuId(int eax, int ecx, int* cpu_info); 74 85 75 86 #ifdef __cplusplus … … 78 89 #endif 79 90 80 #endif // INCLUDE_LIBYUV_CPU_ID_H_ NOLINT91 #endif // INCLUDE_LIBYUV_CPU_ID_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/mjpeg_decoder.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ 12 12 #define INCLUDE_LIBYUV_MJPEG_DECODER_H_ 13 13 … … 38 38 kJpegYuv420, 39 39 kJpegYuv422, 40 kJpegYuv411,41 40 kJpegYuv444, 42 41 kJpegYuv400, … … 146 145 // image scanlines. 147 146 // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. 148 LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, void* opaque, 149 int dst_width, int dst_height); 147 LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, 148 void* opaque, 149 int dst_width, 150 int dst_height); 150 151 151 152 // The helper function which recognizes the jpeg sub-sampling type. 152 153 static JpegSubsamplingType JpegSubsamplingTypeHelper( 153 int* subsample_x, int* subsample_y, int number_of_components); 154 int* subsample_x, 155 int* subsample_y, 156 int number_of_components); 154 157 155 158 private: … … 190 193 191 194 #endif // __cplusplus 192 #endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ NOLINT195 #endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/planar_functions.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 12 12 #define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 13 13 … … 25 25 // Copy a plane of data. 26 26 LIBYUV_API 27 void CopyPlane(const uint8* src_y, int src_stride_y, 28 uint8* dst_y, int dst_stride_y, 29 int width, int height); 30 31 LIBYUV_API 32 void CopyPlane_16(const uint16* src_y, int src_stride_y, 33 uint16* dst_y, int dst_stride_y, 34 int width, int height); 27 void CopyPlane(const uint8* src_y, 28 int src_stride_y, 29 uint8* dst_y, 30 int dst_stride_y, 31 int width, 32 int height); 33 34 LIBYUV_API 35 void CopyPlane_16(const uint16* src_y, 36 int src_stride_y, 37 uint16* dst_y, 38 int dst_stride_y, 39 int width, 40 int height); 35 41 36 42 // Set a plane of data to a 32 bit value. 37 43 LIBYUV_API 38 void SetPlane(uint8* dst_y, int dst_stride_y, 39 int width, int height, 44 void SetPlane(uint8* dst_y, 45 int dst_stride_y, 46 int width, 47 int height, 40 48 uint32 value); 41 49 50 // Split interleaved UV plane into separate U and V planes. 51 LIBYUV_API 52 void SplitUVPlane(const uint8* src_uv, 53 int src_stride_uv, 54 uint8* dst_u, 55 int dst_stride_u, 56 uint8* dst_v, 57 int dst_stride_v, 58 int width, 59 int height); 60 61 // Merge separate U and V planes into one interleaved UV plane. 62 LIBYUV_API 63 void MergeUVPlane(const uint8* src_u, 64 int src_stride_u, 65 const uint8* src_v, 66 int src_stride_v, 67 uint8* dst_uv, 68 int dst_stride_uv, 69 int width, 70 int height); 71 42 72 // Copy I400. Supports inverting. 43 73 LIBYUV_API 44 int I400ToI400(const uint8* src_y, int src_stride_y, 45 uint8* dst_y, int dst_stride_y, 46 int width, int height); 74 int I400ToI400(const uint8* src_y, 75 int src_stride_y, 76 uint8* dst_y, 77 int dst_stride_y, 78 int width, 79 int height); 47 80 48 81 #define J400ToJ400 I400ToI400 … … 51 84 #define I422ToI422 I422Copy 52 85 LIBYUV_API 53 int I422Copy(const uint8* src_y, int src_stride_y, 54 const uint8* src_u, int src_stride_u, 55 const uint8* src_v, int src_stride_v, 56 uint8* dst_y, int dst_stride_y, 57 uint8* dst_u, int dst_stride_u, 58 uint8* dst_v, int dst_stride_v, 59 int width, int height); 86 int I422Copy(const uint8* src_y, 87 int src_stride_y, 88 const uint8* src_u, 89 int src_stride_u, 90 const uint8* src_v, 91 int src_stride_v, 92 uint8* dst_y, 93 int dst_stride_y, 94 uint8* dst_u, 95 int dst_stride_u, 96 uint8* dst_v, 97 int dst_stride_v, 98 int width, 99 int height); 60 100 61 101 // Copy I444 to I444. 62 102 #define I444ToI444 I444Copy 63 103 LIBYUV_API 64 int I444Copy(const uint8* src_y, int src_stride_y, 65 const uint8* src_u, int src_stride_u, 66 const uint8* src_v, int src_stride_v, 67 uint8* dst_y, int dst_stride_y, 68 uint8* dst_u, int dst_stride_u, 69 uint8* dst_v, int dst_stride_v, 70 int width, int height); 104 int I444Copy(const uint8* src_y, 105 int src_stride_y, 106 const uint8* src_u, 107 int src_stride_u, 108 const uint8* src_v, 109 int src_stride_v, 110 uint8* dst_y, 111 int dst_stride_y, 112 uint8* dst_u, 113 int dst_stride_u, 114 uint8* dst_v, 115 int dst_stride_v, 116 int width, 117 int height); 71 118 72 119 // Convert YUY2 to I422. 73 120 LIBYUV_API 74 int YUY2ToI422(const uint8* src_yuy2, int src_stride_yuy2, 75 uint8* dst_y, int dst_stride_y, 76 uint8* dst_u, int dst_stride_u, 77 uint8* dst_v, int dst_stride_v, 78 int width, int height); 121 int YUY2ToI422(const uint8* src_yuy2, 122 int src_stride_yuy2, 123 uint8* dst_y, 124 int dst_stride_y, 125 uint8* dst_u, 126 int dst_stride_u, 127 uint8* dst_v, 128 int dst_stride_v, 129 int width, 130 int height); 79 131 80 132 // Convert UYVY to I422. 81 133 LIBYUV_API 82 int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, 83 uint8* dst_y, int dst_stride_y, 84 uint8* dst_u, int dst_stride_u, 85 uint8* dst_v, int dst_stride_v, 86 int width, int height); 87 88 LIBYUV_API 89 int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2, 90 uint8* dst_y, int dst_stride_y, 91 uint8* dst_uv, int dst_stride_uv, 92 int width, int height); 93 94 LIBYUV_API 95 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy, 96 uint8* dst_y, int dst_stride_y, 97 uint8* dst_uv, int dst_stride_uv, 98 int width, int height); 134 int UYVYToI422(const uint8* src_uyvy, 135 int src_stride_uyvy, 136 uint8* dst_y, 137 int dst_stride_y, 138 uint8* dst_u, 139 int dst_stride_u, 140 uint8* dst_v, 141 int dst_stride_v, 142 int width, 143 int height); 144 145 LIBYUV_API 146 int YUY2ToNV12(const uint8* src_yuy2, 147 int src_stride_yuy2, 148 uint8* dst_y, 149 int dst_stride_y, 150 uint8* dst_uv, 151 int dst_stride_uv, 152 int width, 153 int height); 154 155 LIBYUV_API 156 int UYVYToNV12(const uint8* src_uyvy, 157 int src_stride_uyvy, 158 uint8* dst_y, 159 int dst_stride_y, 160 uint8* dst_uv, 161 int dst_stride_uv, 162 int width, 163 int height); 164 165 LIBYUV_API 166 int YUY2ToY(const uint8* src_yuy2, 167 int src_stride_yuy2, 168 uint8* dst_y, 169 int dst_stride_y, 170 int width, 171 int height); 99 172 100 173 // Convert I420 to I400. (calls CopyPlane ignoring u/v). 101 174 LIBYUV_API 102 int I420ToI400(const uint8* src_y, int src_stride_y, 103 const uint8* src_u, int src_stride_u, 104 const uint8* src_v, int src_stride_v, 105 uint8* dst_y, int dst_stride_y, 106 int width, int height); 175 int I420ToI400(const uint8* src_y, 176 int src_stride_y, 177 const uint8* src_u, 178 int src_stride_u, 179 const uint8* src_v, 180 int src_stride_v, 181 uint8* dst_y, 182 int dst_stride_y, 183 int width, 184 int height); 107 185 108 186 // Alias … … 112 190 // I420 mirror. 113 191 LIBYUV_API 114 int I420Mirror(const uint8* src_y, int src_stride_y, 115 const uint8* src_u, int src_stride_u, 116 const uint8* src_v, int src_stride_v, 117 uint8* dst_y, int dst_stride_y, 118 uint8* dst_u, int dst_stride_u, 119 uint8* dst_v, int dst_stride_v, 120 int width, int height); 192 int I420Mirror(const uint8* src_y, 193 int src_stride_y, 194 const uint8* src_u, 195 int src_stride_u, 196 const uint8* src_v, 197 int src_stride_v, 198 uint8* dst_y, 199 int dst_stride_y, 200 uint8* dst_u, 201 int dst_stride_u, 202 uint8* dst_v, 203 int dst_stride_v, 204 int width, 205 int height); 121 206 122 207 // Alias … … 126 211 // Pass negative height to achieve 180 degree rotation. 127 212 LIBYUV_API 128 int I400Mirror(const uint8* src_y, int src_stride_y, 129 uint8* dst_y, int dst_stride_y, 130 int width, int height); 213 int I400Mirror(const uint8* src_y, 214 int src_stride_y, 215 uint8* dst_y, 216 int dst_stride_y, 217 int width, 218 int height); 131 219 132 220 // Alias … … 135 223 // ARGB mirror. 136 224 LIBYUV_API 137 int ARGBMirror(const uint8* src_argb, int src_stride_argb, 138 uint8* dst_argb, int dst_stride_argb, 139 int width, int height); 225 int ARGBMirror(const uint8* src_argb, 226 int src_stride_argb, 227 uint8* dst_argb, 228 int dst_stride_argb, 229 int width, 230 int height); 140 231 141 232 // Convert NV12 to RGB565. 142 233 LIBYUV_API 143 int NV12ToRGB565(const uint8* src_y, int src_stride_y, 144 const uint8* src_uv, int src_stride_uv, 145 uint8* dst_rgb565, int dst_stride_rgb565, 146 int width, int height); 234 int NV12ToRGB565(const uint8* src_y, 235 int src_stride_y, 236 const uint8* src_uv, 237 int src_stride_uv, 238 uint8* dst_rgb565, 239 int dst_stride_rgb565, 240 int width, 241 int height); 147 242 148 243 // I422ToARGB is in convert_argb.h 149 244 // Convert I422 to BGRA. 150 245 LIBYUV_API 151 int I422ToBGRA(const uint8* src_y, int src_stride_y, 152 const uint8* src_u, int src_stride_u, 153 const uint8* src_v, int src_stride_v, 154 uint8* dst_bgra, int dst_stride_bgra, 155 int width, int height); 246 int I422ToBGRA(const uint8* src_y, 247 int src_stride_y, 248 const uint8* src_u, 249 int src_stride_u, 250 const uint8* src_v, 251 int src_stride_v, 252 uint8* dst_bgra, 253 int dst_stride_bgra, 254 int width, 255 int height); 156 256 157 257 // Convert I422 to ABGR. 158 258 LIBYUV_API 159 int I422ToABGR(const uint8* src_y, int src_stride_y, 160 const uint8* src_u, int src_stride_u, 161 const uint8* src_v, int src_stride_v, 162 uint8* dst_abgr, int dst_stride_abgr, 163 int width, int height); 259 int I422ToABGR(const uint8* src_y, 260 int src_stride_y, 261 const uint8* src_u, 262 int src_stride_u, 263 const uint8* src_v, 264 int src_stride_v, 265 uint8* dst_abgr, 266 int dst_stride_abgr, 267 int width, 268 int height); 164 269 165 270 // Convert I422 to RGBA. 166 271 LIBYUV_API 167 int I422ToRGBA(const uint8* src_y, int src_stride_y, 168 const uint8* src_u, int src_stride_u, 169 const uint8* src_v, int src_stride_v, 170 uint8* dst_rgba, int dst_stride_rgba, 171 int width, int height); 272 int I422ToRGBA(const uint8* src_y, 273 int src_stride_y, 274 const uint8* src_u, 275 int src_stride_u, 276 const uint8* src_v, 277 int src_stride_v, 278 uint8* dst_rgba, 279 int dst_stride_rgba, 280 int width, 281 int height); 172 282 173 283 // Alias … … 175 285 176 286 LIBYUV_API 177 int RAWToRGB24(const uint8* src_raw, int src_stride_raw, 178 uint8* dst_rgb24, int dst_stride_rgb24, 179 int width, int height); 287 int RAWToRGB24(const uint8* src_raw, 288 int src_stride_raw, 289 uint8* dst_rgb24, 290 int dst_stride_rgb24, 291 int width, 292 int height); 180 293 181 294 // Draw a rectangle into I420. 182 295 LIBYUV_API 183 int I420Rect(uint8* dst_y, int dst_stride_y, 184 uint8* dst_u, int dst_stride_u, 185 uint8* dst_v, int dst_stride_v, 186 int x, int y, int width, int height, 187 int value_y, int value_u, int value_v); 296 int I420Rect(uint8* dst_y, 297 int dst_stride_y, 298 uint8* dst_u, 299 int dst_stride_u, 300 uint8* dst_v, 301 int dst_stride_v, 302 int x, 303 int y, 304 int width, 305 int height, 306 int value_y, 307 int value_u, 308 int value_v); 188 309 189 310 // Draw a rectangle into ARGB. 190 311 LIBYUV_API 191 int ARGBRect(uint8* dst_argb, int dst_stride_argb, 192 int x, int y, int width, int height, uint32 value); 312 int ARGBRect(uint8* dst_argb, 313 int dst_stride_argb, 314 int x, 315 int y, 316 int width, 317 int height, 318 uint32 value); 193 319 194 320 // Convert ARGB to gray scale ARGB. 195 321 LIBYUV_API 196 int ARGBGrayTo(const uint8* src_argb, int src_stride_argb, 197 uint8* dst_argb, int dst_stride_argb, 198 int width, int height); 322 int ARGBGrayTo(const uint8* src_argb, 323 int src_stride_argb, 324 uint8* dst_argb, 325 int dst_stride_argb, 326 int width, 327 int height); 199 328 200 329 // Make a rectangle of ARGB gray scale. 201 330 LIBYUV_API 202 int ARGBGray(uint8* dst_argb, int dst_stride_argb, 203 int x, int y, int width, int height); 331 int ARGBGray(uint8* dst_argb, 332 int dst_stride_argb, 333 int x, 334 int y, 335 int width, 336 int height); 204 337 205 338 // Make a rectangle of ARGB Sepia tone. 206 339 LIBYUV_API 207 int ARGBSepia(uint8* dst_argb, int dst_stride_argb, 208 int x, int y, int width, int height); 340 int ARGBSepia(uint8* dst_argb, 341 int dst_stride_argb, 342 int x, 343 int y, 344 int width, 345 int height); 209 346 210 347 // Apply a matrix rotation to each ARGB pixel. … … 215 352 // The last 4 coefficients apply to B, G, R, A and produce A of the output. 216 353 LIBYUV_API 217 int ARGBColorMatrix(const uint8* src_argb, int src_stride_argb, 218 uint8* dst_argb, int dst_stride_argb, 354 int ARGBColorMatrix(const uint8* src_argb, 355 int src_stride_argb, 356 uint8* dst_argb, 357 int dst_stride_argb, 219 358 const int8* matrix_argb, 220 int width, int height); 359 int width, 360 int height); 221 361 222 362 // Deprecated. Use ARGBColorMatrix instead. … … 227 367 // The last 4 coefficients apply to B, G, R, A and produce R of the output. 228 368 LIBYUV_API 229 int RGBColorMatrix(uint8* dst_argb, int dst_stride_argb, 369 int RGBColorMatrix(uint8* dst_argb, 370 int dst_stride_argb, 230 371 const int8* matrix_rgb, 231 int x, int y, int width, int height); 372 int x, 373 int y, 374 int width, 375 int height); 232 376 233 377 // Apply a color table each ARGB pixel. 234 378 // Table contains 256 ARGB values. 235 379 LIBYUV_API 236 int ARGBColorTable(uint8* dst_argb, int dst_stride_argb, 380 int ARGBColorTable(uint8* dst_argb, 381 int dst_stride_argb, 237 382 const uint8* table_argb, 238 int x, int y, int width, int height); 383 int x, 384 int y, 385 int width, 386 int height); 239 387 240 388 // Apply a color table each ARGB pixel but preserve destination alpha. 241 389 // Table contains 256 ARGB values. 242 390 LIBYUV_API 243 int RGBColorTable(uint8* dst_argb, int dst_stride_argb, 391 int RGBColorTable(uint8* dst_argb, 392 int dst_stride_argb, 244 393 const uint8* table_argb, 245 int x, int y, int width, int height); 394 int x, 395 int y, 396 int width, 397 int height); 246 398 247 399 // Apply a luma/color table each ARGB pixel but preserve destination alpha. … … 249 401 // RGB (YJ style) and C is an 8 bit color component (R, G or B). 250 402 LIBYUV_API 251 int ARGBLumaColorTable(const uint8* src_argb, int src_stride_argb, 252 uint8* dst_argb, int dst_stride_argb, 403 int ARGBLumaColorTable(const uint8* src_argb, 404 int src_stride_argb, 405 uint8* dst_argb, 406 int dst_stride_argb, 253 407 const uint8* luma_rgb_table, 254 int width, int height); 408 int width, 409 int height); 255 410 256 411 // Apply a 3 term polynomial to ARGB values. … … 263 418 264 419 LIBYUV_API 265 int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, 266 uint8* dst_argb, int dst_stride_argb, 420 int ARGBPolynomial(const uint8* src_argb, 421 int src_stride_argb, 422 uint8* dst_argb, 423 int dst_stride_argb, 267 424 const float* poly, 268 int width, int height); 425 int width, 426 int height); 427 428 // Convert plane of 16 bit shorts to half floats. 429 // Source values are multiplied by scale before storing as half float. 430 LIBYUV_API 431 int HalfFloatPlane(const uint16* src_y, 432 int src_stride_y, 433 uint16* dst_y, 434 int dst_stride_y, 435 float scale, 436 int width, 437 int height); 269 438 270 439 // Quantize a rectangle of ARGB. Alpha unaffected. … … 273 442 // interval_offset should be a value between 0 and 255. 274 443 LIBYUV_API 275 int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, 276 int scale, int interval_size, int interval_offset, 277 int x, int y, int width, int height); 444 int ARGBQuantize(uint8* dst_argb, 445 int dst_stride_argb, 446 int scale, 447 int interval_size, 448 int interval_offset, 449 int x, 450 int y, 451 int width, 452 int height); 278 453 279 454 // Copy ARGB to ARGB. 280 455 LIBYUV_API 281 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 282 uint8* dst_argb, int dst_stride_argb, 283 int width, int height); 456 int ARGBCopy(const uint8* src_argb, 457 int src_stride_argb, 458 uint8* dst_argb, 459 int dst_stride_argb, 460 int width, 461 int height); 284 462 285 463 // Copy Alpha channel of ARGB to alpha of ARGB. 286 464 LIBYUV_API 287 int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb, 288 uint8* dst_argb, int dst_stride_argb, 289 int width, int height); 465 int ARGBCopyAlpha(const uint8* src_argb, 466 int src_stride_argb, 467 uint8* dst_argb, 468 int dst_stride_argb, 469 int width, 470 int height); 290 471 291 472 // Extract the alpha channel from ARGB. 292 473 LIBYUV_API 293 int ARGBExtractAlpha(const uint8* src_argb, int src_stride_argb, 294 uint8* dst_a, int dst_stride_a, 295 int width, int height); 474 int ARGBExtractAlpha(const uint8* src_argb, 475 int src_stride_argb, 476 uint8* dst_a, 477 int dst_stride_a, 478 int width, 479 int height); 296 480 297 481 // Copy Y channel to Alpha of ARGB. 298 482 LIBYUV_API 299 int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y, 300 uint8* dst_argb, int dst_stride_argb, 301 int width, int height); 302 303 typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, 304 uint8* dst_argb, int width); 483 int ARGBCopyYToAlpha(const uint8* src_y, 484 int src_stride_y, 485 uint8* dst_argb, 486 int dst_stride_argb, 487 int width, 488 int height); 489 490 typedef void (*ARGBBlendRow)(const uint8* src_argb0, 491 const uint8* src_argb1, 492 uint8* dst_argb, 493 int width); 305 494 306 495 // Get function to Alpha Blend ARGB pixels and store to destination. … … 312 501 // Alpha of destination is set to 255. 313 502 LIBYUV_API 314 int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, 315 const uint8* src_argb1, int src_stride_argb1, 316 uint8* dst_argb, int dst_stride_argb, 317 int width, int height); 503 int ARGBBlend(const uint8* src_argb0, 504 int src_stride_argb0, 505 const uint8* src_argb1, 506 int src_stride_argb1, 507 uint8* dst_argb, 508 int dst_stride_argb, 509 int width, 510 int height); 318 511 319 512 // Alpha Blend plane and store to destination. 320 513 // Source is not pre-multiplied by alpha. 321 514 LIBYUV_API 322 int BlendPlane(const uint8* src_y0, int src_stride_y0, 323 const uint8* src_y1, int src_stride_y1, 324 const uint8* alpha, int alpha_stride, 325 uint8* dst_y, int dst_stride_y, 326 int width, int height); 515 int BlendPlane(const uint8* src_y0, 516 int src_stride_y0, 517 const uint8* src_y1, 518 int src_stride_y1, 519 const uint8* alpha, 520 int alpha_stride, 521 uint8* dst_y, 522 int dst_stride_y, 523 int width, 524 int height); 327 525 328 526 // Alpha Blend YUV images and store to destination. … … 330 528 // Alpha is full width x height and subsampled to half size to apply to UV. 331 529 LIBYUV_API 332 int I420Blend(const uint8* src_y0, int src_stride_y0, 333 const uint8* src_u0, int src_stride_u0, 334 const uint8* src_v0, int src_stride_v0, 335 const uint8* src_y1, int src_stride_y1, 336 const uint8* src_u1, int src_stride_u1, 337 const uint8* src_v1, int src_stride_v1, 338 const uint8* alpha, int alpha_stride, 339 uint8* dst_y, int dst_stride_y, 340 uint8* dst_u, int dst_stride_u, 341 uint8* dst_v, int dst_stride_v, 342 int width, int height); 530 int I420Blend(const uint8* src_y0, 531 int src_stride_y0, 532 const uint8* src_u0, 533 int src_stride_u0, 534 const uint8* src_v0, 535 int src_stride_v0, 536 const uint8* src_y1, 537 int src_stride_y1, 538 const uint8* src_u1, 539 int src_stride_u1, 540 const uint8* src_v1, 541 int src_stride_v1, 542 const uint8* alpha, 543 int alpha_stride, 544 uint8* dst_y, 545 int dst_stride_y, 546 uint8* dst_u, 547 int dst_stride_u, 548 uint8* dst_v, 549 int dst_stride_v, 550 int width, 551 int height); 343 552 344 553 // Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. 345 554 LIBYUV_API 346 int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, 347 const uint8* src_argb1, int src_stride_argb1, 348 uint8* dst_argb, int dst_stride_argb, 349 int width, int height); 555 int ARGBMultiply(const uint8* src_argb0, 556 int src_stride_argb0, 557 const uint8* src_argb1, 558 int src_stride_argb1, 559 uint8* dst_argb, 560 int dst_stride_argb, 561 int width, 562 int height); 350 563 351 564 // Add ARGB image with ARGB image. Saturates to 255. 352 565 LIBYUV_API 353 int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, 354 const uint8* src_argb1, int src_stride_argb1, 355 uint8* dst_argb, int dst_stride_argb, 356 int width, int height); 566 int ARGBAdd(const uint8* src_argb0, 567 int src_stride_argb0, 568 const uint8* src_argb1, 569 int src_stride_argb1, 570 uint8* dst_argb, 571 int dst_stride_argb, 572 int width, 573 int height); 357 574 358 575 // Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. 359 576 LIBYUV_API 360 int ARGBSubtract(const uint8* src_argb0, int src_stride_argb0, 361 const uint8* src_argb1, int src_stride_argb1, 362 uint8* dst_argb, int dst_stride_argb, 363 int width, int height); 577 int ARGBSubtract(const uint8* src_argb0, 578 int src_stride_argb0, 579 const uint8* src_argb1, 580 int src_stride_argb1, 581 uint8* dst_argb, 582 int dst_stride_argb, 583 int width, 584 int height); 364 585 365 586 // Convert I422 to YUY2. 366 587 LIBYUV_API 367 int I422ToYUY2(const uint8* src_y, int src_stride_y, 368 const uint8* src_u, int src_stride_u, 369 const uint8* src_v, int src_stride_v, 370 uint8* dst_frame, int dst_stride_frame, 371 int width, int height); 588 int I422ToYUY2(const uint8* src_y, 589 int src_stride_y, 590 const uint8* src_u, 591 int src_stride_u, 592 const uint8* src_v, 593 int src_stride_v, 594 uint8* dst_frame, 595 int dst_stride_frame, 596 int width, 597 int height); 372 598 373 599 // Convert I422 to UYVY. 374 600 LIBYUV_API 375 int I422ToUYVY(const uint8* src_y, int src_stride_y, 376 const uint8* src_u, int src_stride_u, 377 const uint8* src_v, int src_stride_v, 378 uint8* dst_frame, int dst_stride_frame, 379 int width, int height); 601 int I422ToUYVY(const uint8* src_y, 602 int src_stride_y, 603 const uint8* src_u, 604 int src_stride_u, 605 const uint8* src_v, 606 int src_stride_v, 607 uint8* dst_frame, 608 int dst_stride_frame, 609 int width, 610 int height); 380 611 381 612 // Convert unattentuated ARGB to preattenuated ARGB. 382 613 LIBYUV_API 383 int ARGBAttenuate(const uint8* src_argb, int src_stride_argb, 384 uint8* dst_argb, int dst_stride_argb, 385 int width, int height); 614 int ARGBAttenuate(const uint8* src_argb, 615 int src_stride_argb, 616 uint8* dst_argb, 617 int dst_stride_argb, 618 int width, 619 int height); 386 620 387 621 // Convert preattentuated ARGB to unattenuated ARGB. 388 622 LIBYUV_API 389 int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb, 390 uint8* dst_argb, int dst_stride_argb, 391 int width, int height); 623 int ARGBUnattenuate(const uint8* src_argb, 624 int src_stride_argb, 625 uint8* dst_argb, 626 int dst_stride_argb, 627 int width, 628 int height); 392 629 393 630 // Internal function - do not call directly. … … 395 632 // of all values above and to the left of the entry. Used by ARGBBlur. 396 633 LIBYUV_API 397 int ARGBComputeCumulativeSum(const uint8* src_argb, int src_stride_argb, 398 int32* dst_cumsum, int dst_stride32_cumsum, 399 int width, int height); 634 int ARGBComputeCumulativeSum(const uint8* src_argb, 635 int src_stride_argb, 636 int32* dst_cumsum, 637 int dst_stride32_cumsum, 638 int width, 639 int height); 400 640 401 641 // Blur ARGB image. … … 406 646 // Blur is optimized for radius of 5 (11x11) or less. 407 647 LIBYUV_API 408 int ARGBBlur(const uint8* src_argb, int src_stride_argb, 409 uint8* dst_argb, int dst_stride_argb, 410 int32* dst_cumsum, int dst_stride32_cumsum, 411 int width, int height, int radius); 648 int ARGBBlur(const uint8* src_argb, 649 int src_stride_argb, 650 uint8* dst_argb, 651 int dst_stride_argb, 652 int32* dst_cumsum, 653 int dst_stride32_cumsum, 654 int width, 655 int height, 656 int radius); 412 657 413 658 // Multiply ARGB image by ARGB value. 414 659 LIBYUV_API 415 int ARGBShade(const uint8* src_argb, int src_stride_argb, 416 uint8* dst_argb, int dst_stride_argb, 417 int width, int height, uint32 value); 660 int ARGBShade(const uint8* src_argb, 661 int src_stride_argb, 662 uint8* dst_argb, 663 int dst_stride_argb, 664 int width, 665 int height, 666 uint32 value); 418 667 419 668 // Interpolate between two images using specified amount of interpolation … … 422 671 // and 255 means 1% src0 and 99% src1. 423 672 LIBYUV_API 424 int InterpolatePlane(const uint8* src0, int src_stride0, 425 const uint8* src1, int src_stride1, 426 uint8* dst, int dst_stride, 427 int width, int height, int interpolation); 673 int InterpolatePlane(const uint8* src0, 674 int src_stride0, 675 const uint8* src1, 676 int src_stride1, 677 uint8* dst, 678 int dst_stride, 679 int width, 680 int height, 681 int interpolation); 428 682 429 683 // Interpolate between two ARGB images using specified amount of interpolation 430 684 // Internally calls InterpolatePlane with width * 4 (bpp). 431 685 LIBYUV_API 432 int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, 433 const uint8* src_argb1, int src_stride_argb1, 434 uint8* dst_argb, int dst_stride_argb, 435 int width, int height, int interpolation); 686 int ARGBInterpolate(const uint8* src_argb0, 687 int src_stride_argb0, 688 const uint8* src_argb1, 689 int src_stride_argb1, 690 uint8* dst_argb, 691 int dst_stride_argb, 692 int width, 693 int height, 694 int interpolation); 436 695 437 696 // Interpolate between two YUV images using specified amount of interpolation … … 439 698 // are half width and half height. 440 699 LIBYUV_API 441 int I420Interpolate(const uint8* src0_y, int src0_stride_y, 442 const uint8* src0_u, int src0_stride_u, 443 const uint8* src0_v, int src0_stride_v, 444 const uint8* src1_y, int src1_stride_y, 445 const uint8* src1_u, int src1_stride_u, 446 const uint8* src1_v, int src1_stride_v, 447 uint8* dst_y, int dst_stride_y, 448 uint8* dst_u, int dst_stride_u, 449 uint8* dst_v, int dst_stride_v, 450 int width, int height, int interpolation); 700 int I420Interpolate(const uint8* src0_y, 701 int src0_stride_y, 702 const uint8* src0_u, 703 int src0_stride_u, 704 const uint8* src0_v, 705 int src0_stride_v, 706 const uint8* src1_y, 707 int src1_stride_y, 708 const uint8* src1_u, 709 int src1_stride_u, 710 const uint8* src1_v, 711 int src1_stride_v, 712 uint8* dst_y, 713 int dst_stride_y, 714 uint8* dst_u, 715 int dst_stride_u, 716 uint8* dst_v, 717 int dst_stride_v, 718 int width, 719 int height, 720 int interpolation); 451 721 452 722 #if defined(__pnacl__) || defined(__CLR_VER) || \ … … 469 739 // of destination. Useful for scaling, rotation, mirror, texture mapping. 470 740 LIBYUV_API 471 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, 472 uint8* dst_argb, const float* uv_dudv, int width); 473 LIBYUV_API 474 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, 475 uint8* dst_argb, const float* uv_dudv, int width); 741 void ARGBAffineRow_C(const uint8* src_argb, 742 int src_argb_stride, 743 uint8* dst_argb, 744 const float* uv_dudv, 745 int width); 746 LIBYUV_API 747 void ARGBAffineRow_SSE2(const uint8* src_argb, 748 int src_argb_stride, 749 uint8* dst_argb, 750 const float* uv_dudv, 751 int width); 476 752 477 753 // Shuffle ARGB channel order. e.g. BGRA to ARGB. 478 754 // shuffler is 16 bytes and must be aligned. 479 755 LIBYUV_API 480 int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra, 481 uint8* dst_argb, int dst_stride_argb, 482 const uint8* shuffler, int width, int height); 756 int ARGBShuffle(const uint8* src_bgra, 757 int src_stride_bgra, 758 uint8* dst_argb, 759 int dst_stride_argb, 760 const uint8* shuffler, 761 int width, 762 int height); 483 763 484 764 // Sobel ARGB effect with planar output. 485 765 LIBYUV_API 486 int ARGBSobelToPlane(const uint8* src_argb, int src_stride_argb, 487 uint8* dst_y, int dst_stride_y, 488 int width, int height); 766 int ARGBSobelToPlane(const uint8* src_argb, 767 int src_stride_argb, 768 uint8* dst_y, 769 int dst_stride_y, 770 int width, 771 int height); 489 772 490 773 // Sobel ARGB effect. 491 774 LIBYUV_API 492 int ARGBSobel(const uint8* src_argb, int src_stride_argb, 493 uint8* dst_argb, int dst_stride_argb, 494 int width, int height); 775 int ARGBSobel(const uint8* src_argb, 776 int src_stride_argb, 777 uint8* dst_argb, 778 int dst_stride_argb, 779 int width, 780 int height); 495 781 496 782 // Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. 497 783 LIBYUV_API 498 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, 499 uint8* dst_argb, int dst_stride_argb, 500 int width, int height); 784 int ARGBSobelXY(const uint8* src_argb, 785 int src_stride_argb, 786 uint8* dst_argb, 787 int dst_stride_argb, 788 int width, 789 int height); 501 790 502 791 #ifdef __cplusplus … … 505 794 #endif 506 795 507 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT796 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/rotate.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_ROTATE_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_ROTATE_H_ 12 12 #define INCLUDE_LIBYUV_ROTATE_H_ 13 13 … … 21 21 // Supported rotation. 22 22 typedef enum RotationMode { 23 kRotate0 = 0, // No rotation.24 kRotate90 = 90, // Rotate 90 degrees clockwise.23 kRotate0 = 0, // No rotation. 24 kRotate90 = 90, // Rotate 90 degrees clockwise. 25 25 kRotate180 = 180, // Rotate 180 degrees. 26 26 kRotate270 = 270, // Rotate 270 degrees clockwise. … … 34 34 // Rotate I420 frame. 35 35 LIBYUV_API 36 int I420Rotate(const uint8* src_y, int src_stride_y, 37 const uint8* src_u, int src_stride_u, 38 const uint8* src_v, int src_stride_v, 39 uint8* dst_y, int dst_stride_y, 40 uint8* dst_u, int dst_stride_u, 41 uint8* dst_v, int dst_stride_v, 42 int src_width, int src_height, enum RotationMode mode); 36 int I420Rotate(const uint8* src_y, 37 int src_stride_y, 38 const uint8* src_u, 39 int src_stride_u, 40 const uint8* src_v, 41 int src_stride_v, 42 uint8* dst_y, 43 int dst_stride_y, 44 uint8* dst_u, 45 int dst_stride_u, 46 uint8* dst_v, 47 int dst_stride_v, 48 int src_width, 49 int src_height, 50 enum RotationMode mode); 43 51 44 52 // Rotate NV12 input and store in I420. 45 53 LIBYUV_API 46 int NV12ToI420Rotate(const uint8* src_y, int src_stride_y, 47 const uint8* src_uv, int src_stride_uv, 48 uint8* dst_y, int dst_stride_y, 49 uint8* dst_u, int dst_stride_u, 50 uint8* dst_v, int dst_stride_v, 51 int src_width, int src_height, enum RotationMode mode); 54 int NV12ToI420Rotate(const uint8* src_y, 55 int src_stride_y, 56 const uint8* src_uv, 57 int src_stride_uv, 58 uint8* dst_y, 59 int dst_stride_y, 60 uint8* dst_u, 61 int dst_stride_u, 62 uint8* dst_v, 63 int dst_stride_v, 64 int src_width, 65 int src_height, 66 enum RotationMode mode); 52 67 53 68 // Rotate a plane by 0, 90, 180, or 270. 54 69 LIBYUV_API 55 int RotatePlane(const uint8* src, int src_stride, 56 uint8* dst, int dst_stride, 57 int src_width, int src_height, enum RotationMode mode); 70 int RotatePlane(const uint8* src, 71 int src_stride, 72 uint8* dst, 73 int dst_stride, 74 int src_width, 75 int src_height, 76 enum RotationMode mode); 58 77 59 78 // Rotate planes by 90, 180, 270. Deprecated. 60 79 LIBYUV_API 61 void RotatePlane90(const uint8* src, int src_stride, 62 uint8* dst, int dst_stride, 63 int width, int height); 80 void RotatePlane90(const uint8* src, 81 int src_stride, 82 uint8* dst, 83 int dst_stride, 84 int width, 85 int height); 64 86 65 87 LIBYUV_API 66 void RotatePlane180(const uint8* src, int src_stride, 67 uint8* dst, int dst_stride, 68 int width, int height); 88 void RotatePlane180(const uint8* src, 89 int src_stride, 90 uint8* dst, 91 int dst_stride, 92 int width, 93 int height); 69 94 70 95 LIBYUV_API 71 void RotatePlane270(const uint8* src, int src_stride, 72 uint8* dst, int dst_stride, 73 int width, int height); 96 void RotatePlane270(const uint8* src, 97 int src_stride, 98 uint8* dst, 99 int dst_stride, 100 int width, 101 int height); 74 102 75 103 LIBYUV_API 76 void RotateUV90(const uint8* src, int src_stride, 77 uint8* dst_a, int dst_stride_a, 78 uint8* dst_b, int dst_stride_b, 79 int width, int height); 104 void RotateUV90(const uint8* src, 105 int src_stride, 106 uint8* dst_a, 107 int dst_stride_a, 108 uint8* dst_b, 109 int dst_stride_b, 110 int width, 111 int height); 80 112 81 113 // Rotations for when U and V are interleaved. … … 84 116 // rotating them. Deprecated. 85 117 LIBYUV_API 86 void RotateUV180(const uint8* src, int src_stride, 87 uint8* dst_a, int dst_stride_a, 88 uint8* dst_b, int dst_stride_b, 89 int width, int height); 118 void RotateUV180(const uint8* src, 119 int src_stride, 120 uint8* dst_a, 121 int dst_stride_a, 122 uint8* dst_b, 123 int dst_stride_b, 124 int width, 125 int height); 90 126 91 127 LIBYUV_API 92 void RotateUV270(const uint8* src, int src_stride, 93 uint8* dst_a, int dst_stride_a, 94 uint8* dst_b, int dst_stride_b, 95 int width, int height); 128 void RotateUV270(const uint8* src, 129 int src_stride, 130 uint8* dst_a, 131 int dst_stride_a, 132 uint8* dst_b, 133 int dst_stride_b, 134 int width, 135 int height); 96 136 97 137 // The 90 and 270 functions are based on transposes. … … 100 140 // Deprecated. 101 141 LIBYUV_API 102 void TransposePlane(const uint8* src, int src_stride, 103 uint8* dst, int dst_stride, 104 int width, int height); 142 void TransposePlane(const uint8* src, 143 int src_stride, 144 uint8* dst, 145 int dst_stride, 146 int width, 147 int height); 105 148 106 149 LIBYUV_API 107 void TransposeUV(const uint8* src, int src_stride, 108 uint8* dst_a, int dst_stride_a, 109 uint8* dst_b, int dst_stride_b, 110 int width, int height); 150 void TransposeUV(const uint8* src, 151 int src_stride, 152 uint8* dst_a, 153 int dst_stride_a, 154 uint8* dst_b, 155 int dst_stride_b, 156 int width, 157 int height); 111 158 112 159 #ifdef __cplusplus … … 115 162 #endif 116 163 117 #endif // INCLUDE_LIBYUV_ROTATE_H_ NOLINT164 #endif // INCLUDE_LIBYUV_ROTATE_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/rotate_argb.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ 12 12 #define INCLUDE_LIBYUV_ROTATE_ARGB_H_ 13 13 … … 22 22 // Rotate ARGB frame 23 23 LIBYUV_API 24 int ARGBRotate(const uint8* src_argb, int src_stride_argb, 25 uint8* dst_argb, int dst_stride_argb, 26 int src_width, int src_height, enum RotationMode mode); 24 int ARGBRotate(const uint8* src_argb, 25 int src_stride_argb, 26 uint8* dst_argb, 27 int dst_stride_argb, 28 int src_width, 29 int src_height, 30 enum RotationMode mode); 27 31 28 32 #ifdef __cplusplus … … 31 35 #endif 32 36 33 #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT37 #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/rotate_row.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ 12 12 #define INCLUDE_LIBYUV_ROTATE_ROW_H_ 13 13 … … 37 37 // The following are available for GCC 32 or 64 bit but not NaCL for 64 bit: 38 38 #if !defined(LIBYUV_DISABLE_X86) && \ 39 (defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__))) 39 (defined(__i386__) || \ 40 (defined(__x86_64__) && !defined(__native_client__))) 40 41 #define HAS_TRANSPOSEWX8_SSSE3 41 42 #endif … … 54 55 #endif 55 56 56 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ 57 defined(__mips__) && \ 58 defined(__mips_dsp) && (__mips_dsp_rev >= 2) 57 #if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ 58 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) 59 59 #define HAS_TRANSPOSEWX8_DSPR2 60 60 #define HAS_TRANSPOSEUVWX8_DSPR2 61 61 #endif // defined(__mips__) 62 62 63 void TransposeWxH_C(const uint8* src, int src_stride, 64 uint8* dst, int dst_stride, int width, int height); 65 66 void TransposeWx8_C(const uint8* src, int src_stride, 67 uint8* dst, int dst_stride, int width); 68 void TransposeWx8_NEON(const uint8* src, int src_stride, 69 uint8* dst, int dst_stride, int width); 70 void TransposeWx8_SSSE3(const uint8* src, int src_stride, 71 uint8* dst, int dst_stride, int width); 72 void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride, 73 uint8* dst, int dst_stride, int width); 74 void TransposeWx8_DSPR2(const uint8* src, int src_stride, 75 uint8* dst, int dst_stride, int width); 76 void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride, 77 uint8* dst, int dst_stride, int width); 78 79 void TransposeWx8_Any_NEON(const uint8* src, int src_stride, 80 uint8* dst, int dst_stride, int width); 81 void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride, 82 uint8* dst, int dst_stride, int width); 83 void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride, 84 uint8* dst, int dst_stride, int width); 85 void TransposeWx8_Any_DSPR2(const uint8* src, int src_stride, 86 uint8* dst, int dst_stride, int width); 87 88 void TransposeUVWxH_C(const uint8* src, int src_stride, 89 uint8* dst_a, int dst_stride_a, 90 uint8* dst_b, int dst_stride_b, 91 int width, int height); 92 93 void TransposeUVWx8_C(const uint8* src, int src_stride, 94 uint8* dst_a, int dst_stride_a, 95 uint8* dst_b, int dst_stride_b, int width); 96 void TransposeUVWx8_SSE2(const uint8* src, int src_stride, 97 uint8* dst_a, int dst_stride_a, 98 uint8* dst_b, int dst_stride_b, int width); 99 void TransposeUVWx8_NEON(const uint8* src, int src_stride, 100 uint8* dst_a, int dst_stride_a, 101 uint8* dst_b, int dst_stride_b, int width); 102 void TransposeUVWx8_DSPR2(const uint8* src, int src_stride, 103 uint8* dst_a, int dst_stride_a, 104 uint8* dst_b, int dst_stride_b, int width); 105 106 void TransposeUVWx8_Any_SSE2(const uint8* src, int src_stride, 107 uint8* dst_a, int dst_stride_a, 108 uint8* dst_b, int dst_stride_b, int width); 109 void TransposeUVWx8_Any_NEON(const uint8* src, int src_stride, 110 uint8* dst_a, int dst_stride_a, 111 uint8* dst_b, int dst_stride_b, int width); 112 void TransposeUVWx8_Any_DSPR2(const uint8* src, int src_stride, 113 uint8* dst_a, int dst_stride_a, 114 uint8* dst_b, int dst_stride_b, int width); 63 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 64 #define HAS_TRANSPOSEWX16_MSA 65 #define HAS_TRANSPOSEUVWX16_MSA 66 #endif 67 68 void TransposeWxH_C(const uint8* src, 69 int src_stride, 70 uint8* dst, 71 int dst_stride, 72 int width, 73 int height); 74 75 void TransposeWx8_C(const uint8* src, 76 int src_stride, 77 uint8* dst, 78 int dst_stride, 79 int width); 80 void TransposeWx16_C(const uint8* src, 81 int src_stride, 82 uint8* dst, 83 int dst_stride, 84 int width); 85 void TransposeWx8_NEON(const uint8* src, 86 int src_stride, 87 uint8* dst, 88 int dst_stride, 89 int width); 90 void TransposeWx8_SSSE3(const uint8* src, 91 int src_stride, 92 uint8* dst, 93 int dst_stride, 94 int width); 95 void TransposeWx8_Fast_SSSE3(const uint8* src, 96 int src_stride, 97 uint8* dst, 98 int dst_stride, 99 int width); 100 void TransposeWx8_DSPR2(const uint8* src, 101 int src_stride, 102 uint8* dst, 103 int dst_stride, 104 int width); 105 void TransposeWx8_Fast_DSPR2(const uint8* src, 106 int src_stride, 107 uint8* dst, 108 int dst_stride, 109 int width); 110 void TransposeWx16_MSA(const uint8* src, 111 int src_stride, 112 uint8* dst, 113 int dst_stride, 114 int width); 115 116 void TransposeWx8_Any_NEON(const uint8* src, 117 int src_stride, 118 uint8* dst, 119 int dst_stride, 120 int width); 121 void TransposeWx8_Any_SSSE3(const uint8* src, 122 int src_stride, 123 uint8* dst, 124 int dst_stride, 125 int width); 126 void TransposeWx8_Fast_Any_SSSE3(const uint8* src, 127 int src_stride, 128 uint8* dst, 129 int dst_stride, 130 int width); 131 void TransposeWx8_Any_DSPR2(const uint8* src, 132 int src_stride, 133 uint8* dst, 134 int dst_stride, 135 int width); 136 void TransposeWx16_Any_MSA(const uint8* src, 137 int src_stride, 138 uint8* dst, 139 int dst_stride, 140 int width); 141 142 void TransposeUVWxH_C(const uint8* src, 143 int src_stride, 144 uint8* dst_a, 145 int dst_stride_a, 146 uint8* dst_b, 147 int dst_stride_b, 148 int width, 149 int height); 150 151 void TransposeUVWx8_C(const uint8* src, 152 int src_stride, 153 uint8* dst_a, 154 int dst_stride_a, 155 uint8* dst_b, 156 int dst_stride_b, 157 int width); 158 void TransposeUVWx16_C(const uint8* src, 159 int src_stride, 160 uint8* dst_a, 161 int dst_stride_a, 162 uint8* dst_b, 163 int dst_stride_b, 164 int width); 165 void TransposeUVWx8_SSE2(const uint8* src, 166 int src_stride, 167 uint8* dst_a, 168 int dst_stride_a, 169 uint8* dst_b, 170 int dst_stride_b, 171 int width); 172 void TransposeUVWx8_NEON(const uint8* src, 173 int src_stride, 174 uint8* dst_a, 175 int dst_stride_a, 176 uint8* dst_b, 177 int dst_stride_b, 178 int width); 179 void TransposeUVWx8_DSPR2(const uint8* src, 180 int src_stride, 181 uint8* dst_a, 182 int dst_stride_a, 183 uint8* dst_b, 184 int dst_stride_b, 185 int width); 186 void TransposeUVWx16_MSA(const uint8* src, 187 int src_stride, 188 uint8* dst_a, 189 int dst_stride_a, 190 uint8* dst_b, 191 int dst_stride_b, 192 int width); 193 194 void TransposeUVWx8_Any_SSE2(const uint8* src, 195 int src_stride, 196 uint8* dst_a, 197 int dst_stride_a, 198 uint8* dst_b, 199 int dst_stride_b, 200 int width); 201 void TransposeUVWx8_Any_NEON(const uint8* src, 202 int src_stride, 203 uint8* dst_a, 204 int dst_stride_a, 205 uint8* dst_b, 206 int dst_stride_b, 207 int width); 208 void TransposeUVWx8_Any_DSPR2(const uint8* src, 209 int src_stride, 210 uint8* dst_a, 211 int dst_stride_a, 212 uint8* dst_b, 213 int dst_stride_b, 214 int width); 215 void TransposeUVWx16_Any_MSA(const uint8* src, 216 int src_stride, 217 uint8* dst_a, 218 int dst_stride_a, 219 uint8* dst_b, 220 int dst_stride_b, 221 int width); 115 222 116 223 #ifdef __cplusplus … … 119 226 #endif 120 227 121 #endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ NOLINT228 #endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ -
pjproject/trunk/third_party/yuv/include/libyuv/row.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_ROW_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_ROW_H_ 12 12 #define INCLUDE_LIBYUV_ROW_H_ 13 13 … … 21 21 #endif 22 22 23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) 24 25 #ifdef __cplusplus 26 #define align_buffer_64(var, size) \ 27 uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63)); \ 28 uint8* var = reinterpret_cast<uint8*> \ 29 ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63) 30 #else 31 #define align_buffer_64(var, size) \ 32 uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ 33 uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ 34 #endif 23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1))) 24 25 #define align_buffer_64(var, size) \ 26 uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ 27 uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ 35 28 36 29 #define free_aligned_buffer_64(var) \ 37 free(var##_mem); \30 free(var##_mem); \ 38 31 var = 0 39 32 … … 78 71 79 72 // Visual C 2012 required for AVX2. 80 #if defined(_M_IX86) && !defined(__clang__) && \81 defined(_MSC_VER) &&_MSC_VER >= 170073 #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ 74 _MSC_VER >= 1700 82 75 #define VISUALC_HAS_AVX2 1 83 76 #endif // VisualStudio >= 2012 … … 91 84 #define HAS_ARGB1555TOARGBROW_SSE2 92 85 #define HAS_ARGB4444TOARGBROW_SSE2 86 #define HAS_ARGBEXTRACTALPHAROW_SSE2 93 87 #define HAS_ARGBSETROW_X86 94 88 #define HAS_ARGBSHUFFLEROW_SSE2 … … 105 99 #define HAS_ARGBTOYJROW_SSSE3 106 100 #define HAS_ARGBTOYROW_SSSE3 107 #define HAS_ARGBEXTRACTALPHAROW_SSE2108 101 #define HAS_BGRATOUVROW_SSSE3 109 102 #define HAS_BGRATOYROW_SSSE3 … … 111 104 #define HAS_COPYROW_SSE2 112 105 #define HAS_H422TOARGBROW_SSSE3 106 #define HAS_HALFFLOATROW_SSE2 113 107 #define HAS_I400TOARGBROW_SSE2 114 108 #define HAS_I422TOARGB1555ROW_SSSE3 … … 181 175 // The following functions fail on gcc/clang 32 bit with fpic and framepointer. 182 176 // caveat: clangcl uses row_win.cc which works. 183 #if defined(NDEBUG) || !(defined(_DEBUG) && defined(__i386__)) || \ 184 !defined(__i386__) || defined(_MSC_VER) 185 // TODO(fbarchard): fix build error on x86 debug 186 // https://code.google.com/p/libyuv/issues/detail?id=524 187 #define HAS_I411TOARGBROW_SSSE3 177 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ 178 defined(_MSC_VER) 188 179 // TODO(fbarchard): fix build error on android_full_debug=1 189 180 // https://code.google.com/p/libyuv/issues/detail?id=517 … … 195 186 // require VS2012, clang 3.4 or gcc 4.7. 196 187 // The code supports NaCL but requires a new compiler and validator. 197 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ 198 defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) 188 #if !defined(LIBYUV_DISABLE_X86) && \ 189 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ 190 defined(GCC_HAS_AVX2)) 199 191 #define HAS_ARGBCOPYALPHAROW_AVX2 200 192 #define HAS_ARGBCOPYYTOALPHAROW_AVX2 193 #define HAS_ARGBEXTRACTALPHAROW_AVX2 201 194 #define HAS_ARGBMIRRORROW_AVX2 202 195 #define HAS_ARGBPOLYNOMIALROW_AVX2 … … 209 202 #define HAS_COPYROW_AVX 210 203 #define HAS_H422TOARGBROW_AVX2 204 #define HAS_HALFFLOATROW_AVX2 205 // #define HAS_HALFFLOATROW_F16C // Enable to test halffloat cast 211 206 #define HAS_I400TOARGBROW_AVX2 212 #if !(defined(_DEBUG) && defined(__i386__))213 // TODO(fbarchard): fix build error on android_full_debug=1214 // https://code.google.com/p/libyuv/issues/detail?id=517215 #define HAS_I422ALPHATOARGBROW_AVX2216 #endif217 #define HAS_I411TOARGBROW_AVX2218 207 #define HAS_I422TOARGB1555ROW_AVX2 219 208 #define HAS_I422TOARGB4444ROW_AVX2 … … 247 236 #define HAS_ARGBUNATTENUATEROW_AVX2 248 237 #define HAS_BLENDPLANEROW_AVX2 238 239 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ 240 defined(_MSC_VER) 241 // TODO(fbarchard): fix build error on android_full_debug=1 242 // https://code.google.com/p/libyuv/issues/detail?id=517 243 #define HAS_I422ALPHATOARGBROW_AVX2 244 #endif 249 245 #endif 250 246 … … 263 259 264 260 // The following are also available on x64 Visual C. 265 #if !defined(LIBYUV_DISABLE_X86) && defined 261 #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \ 266 262 (!defined(__clang__) || defined(__SSSE3__)) 267 263 #define HAS_I422ALPHATOARGBROW_SSSE3 … … 280 276 #define HAS_ARGB4444TOUVROW_NEON 281 277 #define HAS_ARGB4444TOYROW_NEON 278 #define HAS_ARGBEXTRACTALPHAROW_NEON 282 279 #define HAS_ARGBSETROW_NEON 283 280 #define HAS_ARGBTOARGB1555ROW_NEON … … 287 284 #define HAS_ARGBTORGB565DITHERROW_NEON 288 285 #define HAS_ARGBTORGB565ROW_NEON 289 #define HAS_ARGBTOUV411ROW_NEON290 286 #define HAS_ARGBTOUV444ROW_NEON 291 287 #define HAS_ARGBTOUVJROW_NEON … … 293 289 #define HAS_ARGBTOYJROW_NEON 294 290 #define HAS_ARGBTOYROW_NEON 295 #define HAS_ARGBEXTRACTALPHAROW_NEON296 291 #define HAS_BGRATOUVROW_NEON 297 292 #define HAS_BGRATOYROW_NEON 298 293 #define HAS_COPYROW_NEON 294 #define HAS_HALFFLOATROW_NEON 299 295 #define HAS_I400TOARGBROW_NEON 300 #define HAS_I411TOARGBROW_NEON301 296 #define HAS_I422ALPHATOARGBROW_NEON 302 297 #define HAS_I422TOARGB1555ROW_NEON … … 361 356 362 357 // The following are available on Mips platforms: 363 #if !defined(LIBYUV_DISABLE_ MIPS) && defined(__mips__) && \358 #if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \ 364 359 (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) 365 360 #define HAS_COPYROW_MIPS … … 370 365 #define HAS_MIRRORUVROW_DSPR2 371 366 #define HAS_SPLITUVROW_DSPR2 367 #define HAS_RGB24TOARGBROW_DSPR2 368 #define HAS_RAWTOARGBROW_DSPR2 369 #define HAS_RGB565TOARGBROW_DSPR2 370 #define HAS_ARGB1555TOARGBROW_DSPR2 371 #define HAS_ARGB4444TOARGBROW_DSPR2 372 #define HAS_I444TOARGBROW_DSPR2 373 #define HAS_I422TOARGB4444ROW_DSPR2 374 #define HAS_I422TOARGB1555ROW_DSPR2 375 #define HAS_NV12TOARGBROW_DSPR2 376 #define HAS_BGRATOUVROW_DSPR2 377 #define HAS_BGRATOYROW_DSPR2 378 #define HAS_ABGRTOUVROW_DSPR2 379 #define HAS_ARGBTOYROW_DSPR2 380 #define HAS_ABGRTOYROW_DSPR2 381 #define HAS_RGBATOUVROW_DSPR2 382 #define HAS_RGBATOYROW_DSPR2 383 #define HAS_ARGBTOUVROW_DSPR2 372 384 #endif 373 385 #endif 374 386 375 #if defined(_MSC_VER) && !defined(__CLR_VER) 387 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 388 #define HAS_ARGBMIRRORROW_MSA 389 #define HAS_I422TOUYVYROW_MSA 390 #define HAS_I422TOYUY2ROW_MSA 391 #define HAS_MIRRORROW_MSA 392 #define HAS_UYVYTOUVROW_MSA 393 #define HAS_UYVYTOYROW_MSA 394 #define HAS_YUY2TOUV422ROW_MSA 395 #define HAS_YUY2TOUVROW_MSA 396 #define HAS_YUY2TOYROW_MSA 397 #define HAS_ARGB4444TOARGBROW_MSA 398 #define HAS_ARGBTOYROW_MSA 399 #define HAS_ARGBTOUVROW_MSA 400 #define HAS_I422TOARGBROW_MSA 401 #define HAS_I422TORGBAROW_MSA 402 #define HAS_I422ALPHATOARGBROW_MSA 403 #define HAS_I422TORGB24ROW_MSA 404 #define HAS_ARGBTORGB24ROW_MSA 405 #define HAS_ARGBTORAWROW_MSA 406 #define HAS_ARGBTORGB565ROW_MSA 407 #define HAS_ARGBTOARGB1555ROW_MSA 408 #define HAS_ARGBTOARGB4444ROW_MSA 409 #define HAS_ARGBTOUV444ROW_MSA 410 #define HAS_ARGBMULTIPLYROW_MSA 411 #define HAS_ARGBADDROW_MSA 412 #define HAS_ARGBSUBTRACTROW_MSA 413 #define HAS_ARGBATTENUATEROW_MSA 414 #define HAS_ARGBTORGB565DITHERROW_MSA 415 #define HAS_ARGBSHUFFLEROW_MSA 416 #define HAS_ARGBSHADEROW_MSA 417 #define HAS_ARGBGRAYROW_MSA 418 #define HAS_ARGBSEPIAROW_MSA 419 #define HAS_ARGB1555TOARGBROW_MSA 420 #define HAS_RGB565TOARGBROW_MSA 421 #define HAS_RGB24TOARGBROW_MSA 422 #define HAS_RAWTOARGBROW_MSA 423 #define HAS_ARGB1555TOYROW_MSA 424 #define HAS_RGB565TOYROW_MSA 425 #define HAS_RGB24TOYROW_MSA 426 #define HAS_RAWTOYROW_MSA 427 #define HAS_ARGB1555TOUVROW_MSA 428 #define HAS_RGB565TOUVROW_MSA 429 #define HAS_RGB24TOUVROW_MSA 430 #define HAS_RAWTOUVROW_MSA 431 #define HAS_NV12TOARGBROW_MSA 432 #define HAS_NV12TORGB565ROW_MSA 433 #define HAS_NV21TOARGBROW_MSA 434 #define HAS_SOBELROW_MSA 435 #define HAS_SOBELTOPLANEROW_MSA 436 #define HAS_SOBELXYROW_MSA 437 #define HAS_ARGBTOYJROW_MSA 438 #define HAS_BGRATOYROW_MSA 439 #define HAS_ABGRTOYROW_MSA 440 #define HAS_RGBATOYROW_MSA 441 #define HAS_ARGBTOUVJROW_MSA 442 #define HAS_BGRATOUVROW_MSA 443 #define HAS_ABGRTOUVROW_MSA 444 #define HAS_RGBATOUVROW_MSA 445 #define HAS_I444TOARGBROW_MSA 446 #define HAS_I400TOARGBROW_MSA 447 #define HAS_J400TOARGBROW_MSA 448 #define HAS_YUY2TOARGBROW_MSA 449 #define HAS_UYVYTOARGBROW_MSA 450 #define HAS_INTERPOLATEROW_MSA 451 #define HAS_ARGBSETROW_MSA 452 #define HAS_RAWTORGB24ROW_MSA 453 #define HAS_MERGEUVROW_MSA 454 #endif 455 456 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) 457 #if defined(VISUALC_HAS_AVX2) 458 #define SIMD_ALIGNED(var) __declspec(align(32)) var 459 #else 376 460 #define SIMD_ALIGNED(var) __declspec(align(16)) var 377 # define SIMD_ALIGNED32(var) __declspec(align(64)) var461 #endif 378 462 typedef __declspec(align(16)) int16 vec16[8]; 379 463 typedef __declspec(align(16)) int32 vec32[4]; … … 388 472 typedef __declspec(align(32)) uint32 ulvec32[8]; 389 473 typedef __declspec(align(32)) uint8 ulvec8[32]; 390 #elif defined(__GNUC__) && !defined(__pnacl__)474 #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__)) 391 475 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const. 476 #if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2) 477 #define SIMD_ALIGNED(var) var __attribute__((aligned(32))) 478 #else 392 479 #define SIMD_ALIGNED(var) var __attribute__((aligned(16))) 393 # define SIMD_ALIGNED32(var) var __attribute__((aligned(64)))480 #endif 394 481 typedef int16 __attribute__((vector_size(16))) vec16; 395 482 typedef int32 __attribute__((vector_size(16))) vec32; … … 406 493 #else 407 494 #define SIMD_ALIGNED(var) var 408 #define SIMD_ALIGNED32(var) var409 495 typedef int16 vec16[8]; 410 496 typedef int32 vec32[4]; … … 442 528 // This struct is for Intel color conversion. 443 529 struct YuvConstants { 444 lvec8 kUVToB;445 lvec8 kUVToG;446 lvec8 kUVToR;447 lvec16 kUVBiasB;448 lvec16 kUVBiasG;449 lvec16 kUVBiasR;450 lvec16 kYToRgb;530 int8 kUVToB[32]; 531 int8 kUVToG[32]; 532 int8 kUVToR[32]; 533 int16 kUVBiasB[16]; 534 int16 kUVBiasG[16]; 535 int16 kUVBiasR[16]; 536 int16 kYToRgb[16]; 451 537 }; 452 538 453 539 // Offsets into YuvConstants structure 454 #define KUVTOB 455 #define KUVTOG 456 #define KUVTOR 540 #define KUVTOB 0 541 #define KUVTOG 32 542 #define KUVTOR 64 457 543 #define KUVBIASB 96 458 544 #define KUVBIASG 128 459 545 #define KUVBIASR 160 460 #define KYTORGB 546 #define KYTORGB 192 461 547 #endif 462 548 463 549 // Conversion matrix for YUV to RGB 464 extern const struct YuvConstants kYuvI601Constants; // BT.601465 extern const struct YuvConstants kYuvJPEGConstants; // JPeg color space466 extern const struct YuvConstants kYuvH709Constants; // BT.709550 extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants); // BT.601 551 extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants); // JPeg 552 extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 467 553 468 554 // Conversion matrix for YVU to BGR 469 extern const struct YuvConstants kYvuI601Constants; // BT.601470 extern const struct YuvConstants kYvuJPEGConstants; // JPeg color space471 extern const struct YuvConstants kYvuH709Constants; // BT.709555 extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 556 extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg 557 extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 472 558 473 559 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) … … 491 577 #define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")" 492 578 #define MEMLEA(offset, base) #offset "(%q" #base ")" 493 #define MEMLEA3(offset, index, scale) \ 494 #offset "(,%q" #index "," #scale ")" 579 #define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")" 495 580 #define MEMLEA4(offset, base, index, scale) \ 496 581 #offset "(%q" #base ",%q" #index "," #scale ")" 497 582 #define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15" 498 583 #define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15" 499 #define MEMOPREG(opcode, offset, base, index, scale, reg) \ 500 BUNDLELOCK \ 501 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 502 #opcode " (%%r15,%%r14),%%" #reg "\n" \ 503 BUNDLEUNLOCK 504 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \ 505 BUNDLELOCK \ 506 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 507 #opcode " %%" #reg ",(%%r15,%%r14)\n" \ 508 BUNDLEUNLOCK 509 #define MEMOPARG(opcode, offset, base, index, scale, arg) \ 510 BUNDLELOCK \ 511 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 512 #opcode " (%%r15,%%r14),%" #arg "\n" \ 513 BUNDLEUNLOCK 514 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ 515 BUNDLELOCK \ 516 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 517 #opcode " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" \ 518 BUNDLEUNLOCK 519 #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ 520 BUNDLELOCK \ 521 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 522 #op " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" \ 523 BUNDLEUNLOCK 584 #define MEMOPREG(opcode, offset, base, index, scale, reg) \ 585 BUNDLELOCK \ 586 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 587 " (%%r15,%%r14),%%" #reg "\n" BUNDLEUNLOCK 588 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \ 589 BUNDLELOCK \ 590 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 591 " %%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK 592 #define MEMOPARG(opcode, offset, base, index, scale, arg) \ 593 BUNDLELOCK \ 594 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 595 " (%%r15,%%r14),%" #arg "\n" BUNDLEUNLOCK 596 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ 597 BUNDLELOCK \ 598 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 599 " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" BUNDLEUNLOCK 600 #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ 601 BUNDLELOCK \ 602 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #op \ 603 " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK 524 604 #else // defined(__native_client__) && defined(__x86_64__) 525 605 #define NACL_R14 … … 528 608 #define MEMACCESS2(offset, base) #offset "(%" #base ")" 529 609 #define MEMLEA(offset, base) #offset "(%" #base ")" 530 #define MEMLEA3(offset, index, scale) \ 531 #offset "(,%" #index "," #scale ")" 610 #define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")" 532 611 #define MEMLEA4(offset, base, index, scale) \ 533 612 #offset "(%" #base ",%" #index "," #scale ")" 534 613 #define MEMMOVESTRING(s, d) 535 614 #define MEMSTORESTRING(reg, d) 536 615 #define MEMOPREG(opcode, offset, base, index, scale, reg) \ 537 616 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" 538 617 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \ 539 #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"618 #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" 540 619 #define MEMOPARG(opcode, offset, base, index, scale, arg) \ 541 542 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \543 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 ",%%"\544 #reg2 "\n"620 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" 621 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ 622 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 \ 623 ",%%" #reg2 "\n" 545 624 #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ 546 #op " $" #sel ",%%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"625 #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" 547 626 #endif // defined(__native_client__) && defined(__x86_64__) 548 627 549 #if defined(__arm__) || defined(__aarch64__) 550 #undef MEMACCESS 551 #if defined(__native_client__) 552 #define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n" 553 #else 554 #define MEMACCESS(base) 628 // Intel Code Analizer markers. Insert IACA_START IACA_END around code to be 629 // measured and then run with iaca -64 libyuv_unittest. 630 // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within 631 // inline assembly blocks. 632 // example of iaca: 633 // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest 634 635 #if defined(__x86_64__) || defined(__i386__) 636 637 #define IACA_ASM_START \ 638 ".byte 0x0F, 0x0B\n" \ 639 " movl $111, %%ebx\n" \ 640 ".byte 0x64, 0x67, 0x90\n" 641 642 #define IACA_ASM_END \ 643 " movl $222, %%ebx\n" \ 644 ".byte 0x64, 0x67, 0x90\n" \ 645 ".byte 0x0F, 0x0B\n" 646 647 #define IACA_SSC_MARK(MARK_ID) \ 648 __asm__ __volatile__("\n\t movl $" #MARK_ID \ 649 ", %%ebx" \ 650 "\n\t .byte 0x64, 0x67, 0x90" \ 651 : \ 652 : \ 653 : "memory"); 654 655 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B"); 656 657 #else /* Visual C */ 658 #define IACA_UD_BYTES \ 659 { __asm _emit 0x0F __asm _emit 0x0B } 660 661 #define IACA_SSC_MARK(x) \ 662 { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 } 663 664 #define IACA_VC64_START __writegsbyte(111, 111); 665 #define IACA_VC64_END __writegsbyte(222, 222); 555 666 #endif 556 #endif 667 668 #define IACA_START \ 669 { \ 670 IACA_UD_BYTES \ 671 IACA_SSC_MARK(111) \ 672 } 673 #define IACA_END \ 674 { \ 675 IACA_SSC_MARK(222) \ 676 IACA_UD_BYTES \ 677 } 557 678 558 679 void I444ToARGBRow_NEON(const uint8* src_y, … … 581 702 const struct YuvConstants* yuvconstants, 582 703 int width); 583 void I411ToARGBRow_NEON(const uint8* src_y,584 const uint8* src_u,585 const uint8* src_v,586 uint8* dst_argb,587 const struct YuvConstants* yuvconstants,588 int width);589 704 void I422ToRGBARow_NEON(const uint8* src_y, 590 705 const uint8* src_u, … … 640 755 const struct YuvConstants* yuvconstants, 641 756 int width); 757 void I444ToARGBRow_MSA(const uint8* src_y, 758 const uint8* src_u, 759 const uint8* src_v, 760 uint8* dst_argb, 761 const struct YuvConstants* yuvconstants, 762 int width); 763 void I444ToARGBRow_DSPR2(const uint8* src_y, 764 const uint8* src_u, 765 const uint8* src_v, 766 uint8* dst_argb, 767 const struct YuvConstants* yuvconstants, 768 int width); 769 void I422ToARGB4444Row_DSPR2(const uint8* src_y, 770 const uint8* src_u, 771 const uint8* src_v, 772 uint8* dst_argb4444, 773 const struct YuvConstants* yuvconstants, 774 int width); 775 void I422ToARGB1555Row_DSPR2(const uint8* src_y, 776 const uint8* src_u, 777 const uint8* src_v, 778 uint8* dst_argb1555, 779 const struct YuvConstants* yuvconstants, 780 int width); 781 void NV12ToARGBRow_DSPR2(const uint8* src_y, 782 const uint8* src_uv, 783 uint8* dst_argb, 784 const struct YuvConstants* yuvconstants, 785 int width); 786 787 void I422ToARGBRow_MSA(const uint8* src_y, 788 const uint8* src_u, 789 const uint8* src_v, 790 uint8* dst_argb, 791 const struct YuvConstants* yuvconstants, 792 int width); 793 void I422ToRGBARow_MSA(const uint8* src_y, 794 const uint8* src_u, 795 const uint8* src_v, 796 uint8* dst_rgba, 797 const struct YuvConstants* yuvconstants, 798 int width); 799 void I422AlphaToARGBRow_MSA(const uint8* y_buf, 800 const uint8* u_buf, 801 const uint8* v_buf, 802 const uint8* a_buf, 803 uint8* dst_argb, 804 const struct YuvConstants* yuvconstants, 805 int width); 806 void I422ToRGB24Row_MSA(const uint8* src_y, 807 const uint8* src_u, 808 const uint8* src_v, 809 uint8* dst_rgb24, 810 const struct YuvConstants* yuvconstants, 811 int width); 812 void I422ToRGB565Row_MSA(const uint8* src_y, 813 const uint8* src_u, 814 const uint8* src_v, 815 uint8* dst_rgb565, 816 const struct YuvConstants* yuvconstants, 817 int width); 818 void I422ToARGB4444Row_MSA(const uint8* src_y, 819 const uint8* src_u, 820 const uint8* src_v, 821 uint8* dst_argb4444, 822 const struct YuvConstants* yuvconstants, 823 int width); 824 void I422ToARGB1555Row_MSA(const uint8* src_y, 825 const uint8* src_u, 826 const uint8* src_v, 827 uint8* dst_argb1555, 828 const struct YuvConstants* yuvconstants, 829 int width); 830 void NV12ToARGBRow_MSA(const uint8* src_y, 831 const uint8* src_uv, 832 uint8* dst_argb, 833 const struct YuvConstants* yuvconstants, 834 int width); 835 void NV12ToRGB565Row_MSA(const uint8* src_y, 836 const uint8* src_uv, 837 uint8* dst_rgb565, 838 const struct YuvConstants* yuvconstants, 839 int width); 840 void NV21ToARGBRow_MSA(const uint8* src_y, 841 const uint8* src_vu, 842 uint8* dst_argb, 843 const struct YuvConstants* yuvconstants, 844 int width); 845 void YUY2ToARGBRow_MSA(const uint8* src_yuy2, 846 uint8* dst_argb, 847 const struct YuvConstants* yuvconstants, 848 int width); 849 void UYVYToARGBRow_MSA(const uint8* src_uyvy, 850 uint8* dst_argb, 851 const struct YuvConstants* yuvconstants, 852 int width); 642 853 643 854 void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); … … 654 865 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 655 866 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 656 void ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 657 int width); 658 void ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 659 int width); 660 void ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb, 661 uint8* dst_u, uint8* dst_v, int width); 662 void ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb, 663 uint8* dst_u, uint8* dst_v, int width); 664 void BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra, 665 uint8* dst_u, uint8* dst_v, int width); 666 void ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr, 667 uint8* dst_u, uint8* dst_v, int width); 668 void RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba, 669 uint8* dst_u, uint8* dst_v, int width); 670 void RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24, 671 uint8* dst_u, uint8* dst_v, int width); 672 void RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw, 673 uint8* dst_u, uint8* dst_v, int width); 674 void RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565, 675 uint8* dst_u, uint8* dst_v, int width); 676 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555, 677 uint8* dst_u, uint8* dst_v, int width); 678 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444, 679 uint8* dst_u, uint8* dst_v, int width); 867 void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width); 868 void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width); 869 void ARGBToUV444Row_NEON(const uint8* src_argb, 870 uint8* dst_u, 871 uint8* dst_v, 872 int width); 873 void ARGBToUVRow_NEON(const uint8* src_argb, 874 int src_stride_argb, 875 uint8* dst_u, 876 uint8* dst_v, 877 int width); 878 void ARGBToUV444Row_MSA(const uint8* src_argb, 879 uint8* dst_u, 880 uint8* dst_v, 881 int width); 882 void ARGBToUVRow_MSA(const uint8* src_argb, 883 int src_stride_argb, 884 uint8* dst_u, 885 uint8* dst_v, 886 int width); 887 void ARGBToUVJRow_NEON(const uint8* src_argb, 888 int src_stride_argb, 889 uint8* dst_u, 890 uint8* dst_v, 891 int width); 892 void BGRAToUVRow_NEON(const uint8* src_bgra, 893 int src_stride_bgra, 894 uint8* dst_u, 895 uint8* dst_v, 896 int width); 897 void ABGRToUVRow_NEON(const uint8* src_abgr, 898 int src_stride_abgr, 899 uint8* dst_u, 900 uint8* dst_v, 901 int width); 902 void RGBAToUVRow_NEON(const uint8* src_rgba, 903 int src_stride_rgba, 904 uint8* dst_u, 905 uint8* dst_v, 906 int width); 907 void RGB24ToUVRow_NEON(const uint8* src_rgb24, 908 int src_stride_rgb24, 909 uint8* dst_u, 910 uint8* dst_v, 911 int width); 912 void RAWToUVRow_NEON(const uint8* src_raw, 913 int src_stride_raw, 914 uint8* dst_u, 915 uint8* dst_v, 916 int width); 917 void RGB565ToUVRow_NEON(const uint8* src_rgb565, 918 int src_stride_rgb565, 919 uint8* dst_u, 920 uint8* dst_v, 921 int width); 922 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, 923 int src_stride_argb1555, 924 uint8* dst_u, 925 uint8* dst_v, 926 int width); 927 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, 928 int src_stride_argb4444, 929 uint8* dst_u, 930 uint8* dst_v, 931 int width); 932 void ARGBToUVJRow_MSA(const uint8* src_argb, 933 int src_stride_argb, 934 uint8* dst_u, 935 uint8* dst_v, 936 int width); 937 void BGRAToUVRow_MSA(const uint8* src_bgra, 938 int src_stride_bgra, 939 uint8* dst_u, 940 uint8* dst_v, 941 int width); 942 void ABGRToUVRow_MSA(const uint8* src_abgr, 943 int src_stride_abgr, 944 uint8* dst_u, 945 uint8* dst_v, 946 int width); 947 void RGBAToUVRow_MSA(const uint8* src_rgba, 948 int src_stride_rgba, 949 uint8* dst_u, 950 uint8* dst_v, 951 int width); 952 void RGB24ToUVRow_MSA(const uint8* src_rgb24, 953 int src_stride_rgb24, 954 uint8* dst_u, 955 uint8* dst_v, 956 int width); 957 void RAWToUVRow_MSA(const uint8* src_raw, 958 int src_stride_raw, 959 uint8* dst_u, 960 uint8* dst_v, 961 int width); 962 void RGB565ToUVRow_MSA(const uint8* src_rgb565, 963 int src_stride_rgb565, 964 uint8* dst_u, 965 uint8* dst_v, 966 int width); 967 void ARGB1555ToUVRow_MSA(const uint8* src_argb1555, 968 int src_stride_argb1555, 969 uint8* dst_u, 970 uint8* dst_v, 971 int width); 680 972 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); 681 973 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); … … 686 978 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); 687 979 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); 980 void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width); 981 void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width); 982 void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width); 983 void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 984 void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width); 985 void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 986 void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 987 void BGRAToUVRow_DSPR2(const uint8* src_bgra, 988 int src_stride_bgra, 989 uint8* dst_u, 990 uint8* dst_v, 991 int width); 992 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 993 void ABGRToUVRow_DSPR2(const uint8* src_abgr, 994 int src_stride_abgr, 995 uint8* dst_u, 996 uint8* dst_v, 997 int width); 998 void ARGBToYRow_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 999 void ABGRToYRow_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 1000 void RGBAToUVRow_DSPR2(const uint8* src_rgba, 1001 int src_stride_rgba, 1002 uint8* dst_u, 1003 uint8* dst_v, 1004 int width); 1005 void RGBAToYRow_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 1006 void ARGBToUVRow_DSPR2(const uint8* src_argb, 1007 int src_stride_argb, 1008 uint8* dst_u, 1009 uint8* dst_v, 1010 int width); 688 1011 void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width); 689 1012 void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width); … … 711 1034 void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width); 712 1035 void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width); 713 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, 714 int width); 715 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, 716 int width); 717 718 void ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb, 719 uint8* dst_u, uint8* dst_v, int width); 720 void ARGBToUVJRow_AVX2(const uint8* src_argb, int src_stride_argb, 721 uint8* dst_u, uint8* dst_v, int width); 722 void ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb, 723 uint8* dst_u, uint8* dst_v, int width); 724 void ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb, 725 uint8* dst_u, uint8* dst_v, int width); 726 void BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra, 727 uint8* dst_u, uint8* dst_v, int width); 728 void ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr, 729 uint8* dst_u, uint8* dst_v, int width); 730 void RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba, 731 uint8* dst_u, uint8* dst_v, int width); 732 void ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, 733 uint8* dst_u, uint8* dst_v, int width); 734 void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, 735 uint8* dst_u, uint8* dst_v, int width); 736 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, 737 uint8* dst_u, uint8* dst_v, int width); 738 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, 739 uint8* dst_u, uint8* dst_v, int width); 740 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra, 741 uint8* dst_u, uint8* dst_v, int width); 742 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr, 743 uint8* dst_u, uint8* dst_v, int width); 744 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba, 745 uint8* dst_u, uint8* dst_v, int width); 746 void ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 747 int width); 748 void ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 749 int width); 750 void ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb, 751 uint8* dst_u, uint8* dst_v, int width); 752 void ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb, 753 uint8* dst_u, uint8* dst_v, int width); 754 void BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra, 755 uint8* dst_u, uint8* dst_v, int width); 756 void ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr, 757 uint8* dst_u, uint8* dst_v, int width); 758 void RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba, 759 uint8* dst_u, uint8* dst_v, int width); 760 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24, 761 uint8* dst_u, uint8* dst_v, int width); 762 void RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw, 763 uint8* dst_u, uint8* dst_v, int width); 764 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565, 765 uint8* dst_u, uint8* dst_v, int width); 1036 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, 1037 uint8* dst_y, 1038 int width); 1039 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 1040 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 1041 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 1042 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 1043 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, 1044 uint8* dst_y, 1045 int width); 1046 void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width); 1047 void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width); 1048 void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width); 1049 void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 1050 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 1051 void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 1052 void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width); 1053 void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 1054 void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 1055 1056 void ARGBToUVRow_AVX2(const uint8* src_argb, 1057 int src_stride_argb, 1058 uint8* dst_u, 1059 uint8* dst_v, 1060 int width); 1061 void ARGBToUVJRow_AVX2(const uint8* src_argb, 1062 int src_stride_argb, 1063 uint8* dst_u, 1064 uint8* dst_v, 1065 int width); 1066 void ARGBToUVRow_SSSE3(const uint8* src_argb, 1067 int src_stride_argb, 1068 uint8* dst_u, 1069 uint8* dst_v, 1070 int width); 1071 void ARGBToUVJRow_SSSE3(const uint8* src_argb, 1072 int src_stride_argb, 1073 uint8* dst_u, 1074 uint8* dst_v, 1075 int width); 1076 void BGRAToUVRow_SSSE3(const uint8* src_bgra, 1077 int src_stride_bgra, 1078 uint8* dst_u, 1079 uint8* dst_v, 1080 int width); 1081 void ABGRToUVRow_SSSE3(const uint8* src_abgr, 1082 int src_stride_abgr, 1083 uint8* dst_u, 1084 uint8* dst_v, 1085 int width); 1086 void RGBAToUVRow_SSSE3(const uint8* src_rgba, 1087 int src_stride_rgba, 1088 uint8* dst_u, 1089 uint8* dst_v, 1090 int width); 1091 void ARGBToUVRow_Any_AVX2(const uint8* src_argb, 1092 int src_stride_argb, 1093 uint8* dst_u, 1094 uint8* dst_v, 1095 int width); 1096 void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, 1097 int src_stride_argb, 1098 uint8* dst_u, 1099 uint8* dst_v, 1100 int width); 1101 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, 1102 int src_stride_argb, 1103 uint8* dst_u, 1104 uint8* dst_v, 1105 int width); 1106 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, 1107 int src_stride_argb, 1108 uint8* dst_u, 1109 uint8* dst_v, 1110 int width); 1111 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, 1112 int src_stride_bgra, 1113 uint8* dst_u, 1114 uint8* dst_v, 1115 int width); 1116 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, 1117 int src_stride_abgr, 1118 uint8* dst_u, 1119 uint8* dst_v, 1120 int width); 1121 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, 1122 int src_stride_rgba, 1123 uint8* dst_u, 1124 uint8* dst_v, 1125 int width); 1126 void ARGBToUV444Row_Any_NEON(const uint8* src_argb, 1127 uint8* dst_u, 1128 uint8* dst_v, 1129 int width); 1130 void ARGBToUVRow_Any_NEON(const uint8* src_argb, 1131 int src_stride_argb, 1132 uint8* dst_u, 1133 uint8* dst_v, 1134 int width); 1135 void ARGBToUV444Row_Any_MSA(const uint8* src_argb, 1136 uint8* dst_u, 1137 uint8* dst_v, 1138 int width); 1139 void ARGBToUVRow_Any_MSA(const uint8* src_argb, 1140 int src_stride_argb, 1141 uint8* dst_u, 1142 uint8* dst_v, 1143 int width); 1144 void ARGBToUVJRow_Any_NEON(const uint8* src_argb, 1145 int src_stride_argb, 1146 uint8* dst_u, 1147 uint8* dst_v, 1148 int width); 1149 void BGRAToUVRow_Any_NEON(const uint8* src_bgra, 1150 int src_stride_bgra, 1151 uint8* dst_u, 1152 uint8* dst_v, 1153 int width); 1154 void ABGRToUVRow_Any_NEON(const uint8* src_abgr, 1155 int src_stride_abgr, 1156 uint8* dst_u, 1157 uint8* dst_v, 1158 int width); 1159 void RGBAToUVRow_Any_NEON(const uint8* src_rgba, 1160 int src_stride_rgba, 1161 uint8* dst_u, 1162 uint8* dst_v, 1163 int width); 1164 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, 1165 int src_stride_rgb24, 1166 uint8* dst_u, 1167 uint8* dst_v, 1168 int width); 1169 void RAWToUVRow_Any_NEON(const uint8* src_raw, 1170 int src_stride_raw, 1171 uint8* dst_u, 1172 uint8* dst_v, 1173 int width); 1174 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, 1175 int src_stride_rgb565, 1176 uint8* dst_u, 1177 uint8* dst_v, 1178 int width); 766 1179 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, 767 1180 int src_stride_argb1555, 768 uint8* dst_u, uint8* dst_v, int width); 1181 uint8* dst_u, 1182 uint8* dst_v, 1183 int width); 769 1184 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, 770 1185 int src_stride_argb4444, 771 uint8* dst_u, uint8* dst_v, int width); 772 void ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb, 773 uint8* dst_u, uint8* dst_v, int width); 774 void ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb, 775 uint8* dst_u, uint8* dst_v, int width); 776 void BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra, 777 uint8* dst_u, uint8* dst_v, int width); 778 void ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr, 779 uint8* dst_u, uint8* dst_v, int width); 780 void RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba, 781 uint8* dst_u, uint8* dst_v, int width); 782 void RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24, 783 uint8* dst_u, uint8* dst_v, int width); 784 void RAWToUVRow_C(const uint8* src_raw, int src_stride_raw, 785 uint8* dst_u, uint8* dst_v, int width); 786 void RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565, 787 uint8* dst_u, uint8* dst_v, int width); 788 void ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555, 789 uint8* dst_u, uint8* dst_v, int width); 790 void ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444, 791 uint8* dst_u, uint8* dst_v, int width); 1186 uint8* dst_u, 1187 uint8* dst_v, 1188 int width); 1189 void ARGBToUVJRow_Any_MSA(const uint8* src_argb, 1190 int src_stride_argb, 1191 uint8* dst_u, 1192 uint8* dst_v, 1193 int width); 1194 void BGRAToUVRow_Any_MSA(const uint8* src_bgra, 1195 int src_stride_bgra, 1196 uint8* dst_u, 1197 uint8* dst_v, 1198 int width); 1199 void ABGRToUVRow_Any_MSA(const uint8* src_abgr, 1200 int src_stride_abgr, 1201 uint8* dst_u, 1202 uint8* dst_v, 1203 int width); 1204 void RGBAToUVRow_Any_MSA(const uint8* src_rgba, 1205 int src_stride_rgba, 1206 uint8* dst_u, 1207 uint8* dst_v, 1208 int width); 1209 void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24, 1210 int src_stride_rgb24, 1211 uint8* dst_u, 1212 uint8* dst_v, 1213 int width); 1214 void RAWToUVRow_Any_MSA(const uint8* src_raw, 1215 int src_stride_raw, 1216 uint8* dst_u, 1217 uint8* dst_v, 1218 int width); 1219 void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565, 1220 int src_stride_rgb565, 1221 uint8* dst_u, 1222 uint8* dst_v, 1223 int width); 1224 void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555, 1225 int src_stride_argb1555, 1226 uint8* dst_u, 1227 uint8* dst_v, 1228 int width); 1229 void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra, 1230 int src_stride_bgra, 1231 uint8* dst_u, 1232 uint8* dst_v, 1233 int width); 1234 void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr, 1235 int src_stride_abgr, 1236 uint8* dst_u, 1237 uint8* dst_v, 1238 int width); 1239 void RGBAToUVRow_Any_DSPR2(const uint8* src_rgba, 1240 int src_stride_rgba, 1241 uint8* dst_u, 1242 uint8* dst_v, 1243 int width); 1244 void ARGBToUVRow_Any_DSPR2(const uint8* src_argb, 1245 int src_stride_argb, 1246 uint8* dst_u, 1247 uint8* dst_v, 1248 int width); 1249 void ARGBToUVRow_C(const uint8* src_argb, 1250 int src_stride_argb, 1251 uint8* dst_u, 1252 uint8* dst_v, 1253 int width); 1254 void ARGBToUVJRow_C(const uint8* src_argb, 1255 int src_stride_argb, 1256 uint8* dst_u, 1257 uint8* dst_v, 1258 int width); 1259 void ARGBToUVRow_C(const uint8* src_argb, 1260 int src_stride_argb, 1261 uint8* dst_u, 1262 uint8* dst_v, 1263 int width); 1264 void ARGBToUVJRow_C(const uint8* src_argb, 1265 int src_stride_argb, 1266 uint8* dst_u, 1267 uint8* dst_v, 1268 int width); 1269 void BGRAToUVRow_C(const uint8* src_bgra, 1270 int src_stride_bgra, 1271 uint8* dst_u, 1272 uint8* dst_v, 1273 int width); 1274 void ABGRToUVRow_C(const uint8* src_abgr, 1275 int src_stride_abgr, 1276 uint8* dst_u, 1277 uint8* dst_v, 1278 int width); 1279 void RGBAToUVRow_C(const uint8* src_rgba, 1280 int src_stride_rgba, 1281 uint8* dst_u, 1282 uint8* dst_v, 1283 int width); 1284 void RGB24ToUVRow_C(const uint8* src_rgb24, 1285 int src_stride_rgb24, 1286 uint8* dst_u, 1287 uint8* dst_v, 1288 int width); 1289 void RAWToUVRow_C(const uint8* src_raw, 1290 int src_stride_raw, 1291 uint8* dst_u, 1292 uint8* dst_v, 1293 int width); 1294 void RGB565ToUVRow_C(const uint8* src_rgb565, 1295 int src_stride_rgb565, 1296 uint8* dst_u, 1297 uint8* dst_v, 1298 int width); 1299 void ARGB1555ToUVRow_C(const uint8* src_argb1555, 1300 int src_stride_argb1555, 1301 uint8* dst_u, 1302 uint8* dst_v, 1303 int width); 1304 void ARGB4444ToUVRow_C(const uint8* src_argb4444, 1305 int src_stride_argb4444, 1306 uint8* dst_u, 1307 uint8* dst_v, 1308 int width); 792 1309 793 1310 void ARGBToUV444Row_SSSE3(const uint8* src_argb, 794 uint8* dst_u, uint8* dst_v, int width); 1311 uint8* dst_u, 1312 uint8* dst_v, 1313 int width); 795 1314 void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb, 796 uint8* dst_u, uint8* dst_v, int width); 1315 uint8* dst_u, 1316 uint8* dst_v, 1317 int width); 797 1318 798 1319 void ARGBToUV444Row_C(const uint8* src_argb, 799 uint8* dst_u, uint8* dst_v, int width);800 void ARGBToUV411Row_C(const uint8* src_argb,801 uint8* dst_u, uint8* dst_v,int width);1320 uint8* dst_u, 1321 uint8* dst_v, 1322 int width); 802 1323 803 1324 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); … … 805 1326 void MirrorRow_NEON(const uint8* src, uint8* dst, int width); 806 1327 void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width); 1328 void MirrorRow_MSA(const uint8* src, uint8* dst, int width); 807 1329 void MirrorRow_C(const uint8* src, uint8* dst, int width); 808 1330 void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); … … 810 1332 void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); 811 1333 void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); 812 813 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 814 int width); 815 void MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1334 void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); 1335 1336 void MirrorUVRow_SSSE3(const uint8* src_uv, 1337 uint8* dst_u, 1338 uint8* dst_v, 1339 int width); 1340 void MirrorUVRow_NEON(const uint8* src_uv, 1341 uint8* dst_u, 1342 uint8* dst_v, 816 1343 int width); 817 void MirrorUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1344 void MirrorUVRow_DSPR2(const uint8* src_uv, 1345 uint8* dst_u, 1346 uint8* dst_v, 818 1347 int width); 819 1348 void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); … … 822 1351 void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width); 823 1352 void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width); 1353 void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width); 824 1354 void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width); 825 1355 void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); 826 1356 void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); 827 1357 void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); 1358 void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); 828 1359 829 1360 void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); 830 void SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1361 void SplitUVRow_SSE2(const uint8* src_uv, 1362 uint8* dst_u, 1363 uint8* dst_v, 831 1364 int width); 832 void SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1365 void SplitUVRow_AVX2(const uint8* src_uv, 1366 uint8* dst_u, 1367 uint8* dst_v, 833 1368 int width); 834 void SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1369 void SplitUVRow_NEON(const uint8* src_uv, 1370 uint8* dst_u, 1371 uint8* dst_v, 835 1372 int width); 836 void SplitUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 1373 void SplitUVRow_DSPR2(const uint8* src_uv, 1374 uint8* dst_u, 1375 uint8* dst_v, 837 1376 int width); 838 void SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 839 int width); 840 void SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 841 int width); 842 void SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 843 int width); 844 void SplitUVRow_Any_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 845 int width); 846 847 void MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 1377 void SplitUVRow_Any_SSE2(const uint8* src_uv, 1378 uint8* dst_u, 1379 uint8* dst_v, 1380 int width); 1381 void SplitUVRow_Any_AVX2(const uint8* src_uv, 1382 uint8* dst_u, 1383 uint8* dst_v, 1384 int width); 1385 void SplitUVRow_Any_NEON(const uint8* src_uv, 1386 uint8* dst_u, 1387 uint8* dst_v, 1388 int width); 1389 void SplitUVRow_Any_DSPR2(const uint8* src_uv, 1390 uint8* dst_u, 1391 uint8* dst_v, 1392 int width); 1393 1394 void MergeUVRow_C(const uint8* src_u, 1395 const uint8* src_v, 1396 uint8* dst_uv, 848 1397 int width); 849 void MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 1398 void MergeUVRow_SSE2(const uint8* src_u, 1399 const uint8* src_v, 1400 uint8* dst_uv, 850 1401 int width); 851 void MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 1402 void MergeUVRow_AVX2(const uint8* src_u, 1403 const uint8* src_v, 1404 uint8* dst_uv, 852 1405 int width); 853 void MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 1406 void MergeUVRow_NEON(const uint8* src_u, 1407 const uint8* src_v, 1408 uint8* dst_uv, 854 1409 int width); 855 void MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 856 int width); 857 void MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 858 int width); 859 void MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 860 int width); 1410 void MergeUVRow_MSA(const uint8* src_u, 1411 const uint8* src_v, 1412 uint8* dst_uv, 1413 int width); 1414 void MergeUVRow_Any_SSE2(const uint8* src_u, 1415 const uint8* src_v, 1416 uint8* dst_uv, 1417 int width); 1418 void MergeUVRow_Any_AVX2(const uint8* src_u, 1419 const uint8* src_v, 1420 uint8* dst_uv, 1421 int width); 1422 void MergeUVRow_Any_NEON(const uint8* src_u, 1423 const uint8* src_v, 1424 uint8* dst_uv, 1425 int width); 1426 void MergeUVRow_Any_MSA(const uint8* src_u, 1427 const uint8* src_v, 1428 uint8* dst_uv, 1429 int width); 861 1430 862 1431 void CopyRow_SSE2(const uint8* src, uint8* dst, int count); … … 875 1444 void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); 876 1445 void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); 877 void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, 1446 void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, 1447 uint8* dst_argb, 878 1448 int width); 879 void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, 1449 void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, 1450 uint8* dst_argb, 880 1451 int width); 881 1452 882 1453 void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width); 883 1454 void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width); 1455 void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width); 884 1456 void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width); 885 void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_a, 1457 void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, 1458 uint8* dst_a, 886 1459 int width); 887 void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, uint8* dst_a, 1460 void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb, 1461 uint8* dst_a, 1462 int width); 1463 void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, 1464 uint8* dst_a, 888 1465 int width); 889 1466 … … 891 1468 void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); 892 1469 void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); 893 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, 1470 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, 1471 uint8* dst_argb, 894 1472 int width); 895 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, 1473 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, 1474 uint8* dst_argb, 896 1475 int width); 897 1476 … … 907 1486 void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count); 908 1487 void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count); 1488 void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int count); 1489 void ARGBSetRow_Any_MSA(uint8* dst_argb, uint32 v32, int count); 909 1490 910 1491 // ARGBShufflers for BGRAToARGB etc. 911 void ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb, 912 const uint8* shuffler, int width); 913 void ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb, 914 const uint8* shuffler, int width); 915 void ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb, 916 const uint8* shuffler, int width); 917 void ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb, 918 const uint8* shuffler, int width); 919 void ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb, 920 const uint8* shuffler, int width); 921 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, 922 const uint8* shuffler, int width); 923 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, 924 const uint8* shuffler, int width); 925 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, 926 const uint8* shuffler, int width); 927 void ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, 928 const uint8* shuffler, int width); 1492 void ARGBShuffleRow_C(const uint8* src_argb, 1493 uint8* dst_argb, 1494 const uint8* shuffler, 1495 int width); 1496 void ARGBShuffleRow_SSE2(const uint8* src_argb, 1497 uint8* dst_argb, 1498 const uint8* shuffler, 1499 int width); 1500 void ARGBShuffleRow_SSSE3(const uint8* src_argb, 1501 uint8* dst_argb, 1502 const uint8* shuffler, 1503 int width); 1504 void ARGBShuffleRow_AVX2(const uint8* src_argb, 1505 uint8* dst_argb, 1506 const uint8* shuffler, 1507 int width); 1508 void ARGBShuffleRow_NEON(const uint8* src_argb, 1509 uint8* dst_argb, 1510 const uint8* shuffler, 1511 int width); 1512 void ARGBShuffleRow_MSA(const uint8* src_argb, 1513 uint8* dst_argb, 1514 const uint8* shuffler, 1515 int width); 1516 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, 1517 uint8* dst_argb, 1518 const uint8* shuffler, 1519 int width); 1520 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, 1521 uint8* dst_argb, 1522 const uint8* shuffler, 1523 int width); 1524 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, 1525 uint8* dst_argb, 1526 const uint8* shuffler, 1527 int width); 1528 void ARGBShuffleRow_Any_NEON(const uint8* src_argb, 1529 uint8* dst_argb, 1530 const uint8* shuffler, 1531 int width); 1532 void ARGBShuffleRow_Any_MSA(const uint8* src_argb, 1533 uint8* dst_argb, 1534 const uint8* shuffler, 1535 int width); 929 1536 930 1537 void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width); … … 932 1539 void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); 933 1540 void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width); 934 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb, 935 int width); 936 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb, 1541 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, 1542 uint8* dst_argb, 1543 int width); 1544 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, 1545 uint8* dst_argb, 937 1546 int width); 938 1547 void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); 939 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, uint8* dst_argb, 940 int width); 941 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, uint8* dst_argb, 1548 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, 1549 uint8* dst_argb, 1550 int width); 1551 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, 1552 uint8* dst_argb, 942 1553 int width); 943 1554 944 1555 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); 1556 void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); 945 1557 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); 1558 void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width); 946 1559 void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 1560 void RAWToRGB24Row_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); 947 1561 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); 948 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb, 949 int width); 950 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb, 951 int width); 1562 void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width); 1563 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, 1564 uint8* dst_argb, 1565 int width); 1566 void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555, 1567 uint8* dst_argb, 1568 int width); 1569 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, 1570 uint8* dst_argb, 1571 int width); 1572 void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width); 1573 void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); 1574 void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width); 1575 void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555, 1576 uint8* dst_argb, 1577 int width); 1578 void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444, 1579 uint8* dst_argb, 1580 int width); 1581 void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444, 1582 uint8* dst_argb, 1583 int width); 952 1584 void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width); 953 1585 void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width); … … 956 1588 void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); 957 1589 void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); 958 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, 1590 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, 1591 uint8* dst_argb, 959 1592 int width); 960 1593 void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); 961 1594 void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); 962 1595 963 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb, 1596 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, 1597 uint8* dst_argb, 964 1598 int width); 965 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb, 1599 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, 1600 uint8* dst_argb, 966 1601 int width); 967 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb, 1602 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, 1603 uint8* dst_argb, 968 1604 int width); 969 void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, uint8* dst_argb, 1605 void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, 1606 uint8* dst_argb, 970 1607 int width); 971 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, uint8* dst_argb, 1608 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, 1609 uint8* dst_argb, 972 1610 int width); 973 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, uint8* dst_argb, 1611 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, 1612 uint8* dst_argb, 974 1613 int width); 975 1614 976 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, 977 int width); 1615 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, 1616 uint8* dst_argb, 1617 int width); 1618 void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); 978 1619 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); 1620 void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width); 979 1621 void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 980 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb, 1622 void RAWToRGB24Row_Any_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); 1623 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, 1624 uint8* dst_argb, 981 1625 int width); 982 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb, 1626 void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565, 1627 uint8* dst_argb, 1628