| OLD | NEW |
| 1 # Getting Started | 1 # Getting Started |
| 2 | 2 |
| 3 How to get and build the libyuv code. | 3 How to get and build the libyuv code. |
| 4 | 4 |
| 5 ## Pre-requisites | 5 ## Pre-requisites |
| 6 | 6 |
| 7 You'll need to have depot tools installed: https://www.chromium.org/developers/h
ow-tos/install-depot-tools | 7 You'll need to have depot tools installed: https://www.chromium.org/developers/h
ow-tos/install-depot-tools |
| 8 Refer to chromium instructions for each platform for other prerequisites. | 8 Refer to chromium instructions for each platform for other prerequisites. |
| 9 | 9 |
| 10 ## Getting the Code | 10 ## Getting the Code |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 git clone https://chromium.googlesource.com/libyuv/libyuv | 66 git clone https://chromium.googlesource.com/libyuv/libyuv |
| 67 | 67 |
| 68 | 68 |
| 69 ## Building the Library and Unittests | 69 ## Building the Library and Unittests |
| 70 | 70 |
| 71 ### Windows | 71 ### Windows |
| 72 | 72 |
| 73 call gn gen out/Release "--args=is_debug=false target_cpu=\"x86\"" | 73 call gn gen out/Release "--args=is_debug=false target_cpu=\"x86\"" |
| 74 call gn gen out/Debug "--args=is_debug=true target_cpu=\"x86\"" | 74 call gn gen out/Debug "--args=is_debug=true target_cpu=\"x86\"" |
| 75 ninja -j7 -v -C out/Release | 75 ninja -v -C out/Release |
| 76 ninja -j7 -v -C out/Debug | 76 ninja -v -C out/Debug |
| 77 | 77 |
| 78 call gn gen out/Release "--args=is_debug=false target_cpu=\"x64\"" | 78 call gn gen out/Release "--args=is_debug=false target_cpu=\"x64\"" |
| 79 call gn gen out/Debug "--args=is_debug=true target_cpu=\"x64\"" | 79 call gn gen out/Debug "--args=is_debug=true target_cpu=\"x64\"" |
| 80 ninja -j7 -v -C out/Release | 80 ninja -v -C out/Release |
| 81 ninja -j7 -v -C out/Debug | 81 ninja -v -C out/Debug |
| 82 | 82 |
| 83 #### Building with clang-cl | 83 #### Building with clang-cl |
| 84 | 84 |
| 85 set GYP_DEFINES=clang=1 target_arch=ia32 | 85 set GYP_DEFINES=clang=1 target_arch=ia32 |
| 86 call python tools\clang\scripts\update.py | 86 call python tools\clang\scripts\update.py |
| 87 | 87 |
| 88 call gn gen out/Release "--args=is_debug=false is_official_build=false is_cl
ang=true target_cpu=\"x86\"" | 88 call gn gen out/Release "--args=is_debug=false is_official_build=false is_cl
ang=true target_cpu=\"x86\"" |
| 89 call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang
=true target_cpu=\"x86\"" | 89 call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang
=true target_cpu=\"x86\"" |
| 90 ninja -j7 -v -C out/Release | 90 ninja -v -C out/Release |
| 91 ninja -j7 -v -C out/Debug | 91 ninja -v -C out/Debug |
| 92 | 92 |
| 93 call gn gen out/Release "--args=is_debug=false is_official_build=false is_cl
ang=true target_cpu=\"x64\"" | 93 call gn gen out/Release "--args=is_debug=false is_official_build=false is_cl
ang=true target_cpu=\"x64\"" |
| 94 call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang
=true target_cpu=\"x64\"" | 94 call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang
=true target_cpu=\"x64\"" |
| 95 ninja -j7 -v -C out/Release | 95 ninja -v -C out/Release |
| 96 ninja -j7 -v -C out/Debug | 96 ninja -v -C out/Debug |
| 97 | 97 |
| 98 ### macOS and Linux | 98 ### macOS and Linux |
| 99 | 99 |
| 100 gn gen out/Release "--args=is_debug=false" | 100 gn gen out/Release "--args=is_debug=false" |
| 101 gn gen out/Debug "--args=is_debug=true" | 101 gn gen out/Debug "--args=is_debug=true" |
| 102 ninja -j7 -v -C out/Release | 102 ninja -v -C out/Release |
| 103 ninja -j7 -v -C out/Debug | 103 ninja -v -C out/Debug |
| 104 | 104 |
| 105 ### Building Offical with GN | 105 ### Building Offical with GN |
| 106 | 106 |
| 107 gn gen out/Official "--args=is_debug=false is_official_build=true is_chrome_
branded=true" | 107 gn gen out/Official "--args=is_debug=false is_official_build=true is_chrome_
branded=true" |
| 108 ninja -C out/Official | 108 ninja -C out/Official |
| 109 | 109 |
| 110 ### iOS | 110 ### iOS |
| 111 This section needs an update to GN build documentation. | |
| 112 http://www.chromium.org/developers/how-tos/build-instructions-ios | 111 http://www.chromium.org/developers/how-tos/build-instructions-ios |
| 113 | 112 |
| 114 Add to .gclient last line: `target_os=['ios'];` | 113 Add to .gclient last line: `target_os=['ios'];` |
| 115 | 114 |
| 116 armv7 | |
| 117 | |
| 118 GYP_DEFINES="OS=ios target_arch=armv7 target_subarch=arm32" GYP_CROSSCOMPILE
=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv | |
| 119 ninja -j7 -C out_ios/Debug-iphoneos libyuv_unittest | |
| 120 ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest | |
| 121 | |
| 122 arm64 | 115 arm64 |
| 123 | 116 |
| 124 GYP_DEFINES="OS=ios target_arch=arm64 target_subarch=arm64" GYP_CROSSCOMPILE
=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv | 117 gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_
signing=false target_cpu=\"arm64\"" |
| 125 ninja -j7 -C out_ios/Debug-iphoneos libyuv_unittest | 118 gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_sig
ning=false target_cpu=\"arm64\"" |
| 126 ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest | 119 ninja -v -C out/Debug libyuv_unittest |
| 120 ninja -v -C out/Release libyuv_unittest |
| 127 | 121 |
| 128 both armv7 and arm64 (fat) | 122 ios simulator |
| 129 | 123 |
| 130 GYP_DEFINES="OS=ios target_arch=armv7 target_subarch=both" GYP_CROSSCOMPILE=
1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv | 124 gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_
signing=false target_cpu=\"x86\"" |
| 131 ninja -j7 -C out_ios/Debug-iphoneos libyuv_unittest | 125 gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_sig
ning=false target_cpu=\"x86\"" |
| 132 ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest | 126 ninja -v -C out/Debug libyuv_unittest |
| 133 | 127 ninja -v -C out/Release libyuv_unittest |
| 134 simulator | |
| 135 | |
| 136 GYP_DEFINES="OS=ios target_arch=ia32 target_subarch=arm32" GYP_CROSSCOMPILE=
1 GYP_GENERATOR_FLAGS="output_dir=out_sim" ./gyp_libyuv | |
| 137 ninja -j7 -C out_sim/Debug-iphonesimulator libyuv_unittest | |
| 138 ninja -j7 -C out_sim/Release-iphonesimulator libyuv_unittest | |
| 139 | 128 |
| 140 ### Android | 129 ### Android |
| 141 https://code.google.com/p/chromium/wiki/AndroidBuildInstructions | 130 https://code.google.com/p/chromium/wiki/AndroidBuildInstructions |
| 142 | 131 |
| 143 Add to .gclient last line: `target_os=['android'];` | 132 Add to .gclient last line: `target_os=['android'];` |
| 144 | 133 |
| 145 armv7 | 134 armv7 |
| 146 | 135 |
| 147 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"arm\"" | 136 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"arm\"" |
| 148 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"ar
m\"" | 137 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"ar
m\"" |
| 149 ninja -j7 -v -C out/Debug libyuv_unittest | 138 ninja -v -C out/Debug libyuv_unittest |
| 150 ninja -j7 -v -C out/Release libyuv_unittest | 139 ninja -v -C out/Release libyuv_unittest |
| 151 | 140 |
| 152 arm64 | 141 arm64 |
| 153 | 142 |
| 154 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"arm64\"" | 143 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"arm64\"" |
| 155 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"ar
m64\"" | 144 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"ar
m64\"" |
| 156 ninja -j7 -v -C out/Debug libyuv_unittest | 145 ninja -v -C out/Debug libyuv_unittest |
| 157 ninja -j7 -v -C out/Release libyuv_unittest | 146 ninja -v -C out/Release libyuv_unittest |
| 158 | 147 |
| 159 ia32 | 148 ia32 |
| 160 | 149 |
| 161 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"x86\"" | 150 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"x86\"" |
| 162 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"x8
6\"" | 151 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"x8
6\"" |
| 163 ninja -j7 -v -C out/Debug libyuv_unittest | 152 ninja -v -C out/Debug libyuv_unittest |
| 164 ninja -j7 -v -C out/Release libyuv_unittest | 153 ninja -v -C out/Release libyuv_unittest |
| 165 | 154 |
| 166 mipsel | 155 mipsel |
| 167 | 156 |
| 168 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"mipsel\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_
clang=false" | 157 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"mipsel\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_
clang=false" |
| 169 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mi
psel\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_cla
ng=false" | 158 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mi
psel\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_cla
ng=false" |
| 170 ninja -j7 -v -C out/Debug libyuv_unittest | 159 ninja -v -C out/Debug libyuv_unittest |
| 171 ninja -j7 -v -C out/Release libyuv_unittest | 160 ninja -v -C out/Release libyuv_unittest |
| 172 | 161 |
| 173 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true i
s_clang=false" | 162 gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\
"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true i
s_clang=false" |
| 174 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mi
ps64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_c
lang=false" | 163 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mi
ps64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_c
lang=false" |
| 175 ninja -j7 -v -C out/Debug libyuv_unittest | 164 ninja -v -C out/Debug libyuv_unittest |
| 176 ninja -j7 -v -C out/Release libyuv_unittest | 165 ninja -v -C out/Release libyuv_unittest |
| 177 | 166 |
| 178 arm disassembly: | 167 arm disassembly: |
| 179 | 168 |
| 180 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_c
ommon.o >row_common.txt | 169 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_c
ommon.o >row_common.txt |
| 181 | 170 |
| 182 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/
row_neon.o >row_neon.txt | 171 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/
row_neon.o >row_neon.txt |
| 183 | 172 |
| 184 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/
row_neon64.o >row_neon64.txt | 173 third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/
linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/
row_neon64.o >row_neon64.txt |
| 185 | 174 |
| 186 Running tests: | 175 Running tests: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 201 ninja -C out/Debug libyuv_unittest | 190 ninja -C out/Debug libyuv_unittest |
| 202 ninja -C out/Debug compare | 191 ninja -C out/Debug compare |
| 203 ninja -C out/Debug convert | 192 ninja -C out/Debug convert |
| 204 ninja -C out/Debug psnr | 193 ninja -C out/Debug psnr |
| 205 ninja -C out/Debug cpuid | 194 ninja -C out/Debug cpuid |
| 206 | 195 |
| 207 ### ARM Linux | 196 ### ARM Linux |
| 208 | 197 |
| 209 gn gen out/Release "--args=is_debug=false target_cpu=\"arm64\"" | 198 gn gen out/Release "--args=is_debug=false target_cpu=\"arm64\"" |
| 210 gn gen out/Debug "--args=is_debug=true target_cpu=\"arm64\"" | 199 gn gen out/Debug "--args=is_debug=true target_cpu=\"arm64\"" |
| 211 ninja -j7 -v -C out/Debug libyuv_unittest | 200 ninja -v -C out/Debug libyuv_unittest |
| 212 ninja -j7 -v -C out/Release libyuv_unittest | 201 ninja -v -C out/Release libyuv_unittest |
| 213 | 202 |
| 214 ## Building the Library with make | 203 ## Building the Library with make |
| 215 | 204 |
| 216 ### Linux | 205 ### Linux |
| 217 | 206 |
| 218 make -j7 V=1 -f linux.mk | 207 make V=1 -f linux.mk |
| 219 make -j7 V=1 -f linux.mk clean | 208 make V=1 -f linux.mk clean |
| 220 make -j7 V=1 -f linux.mk CXX=clang++ | 209 make V=1 -f linux.mk CXX=clang++ |
| 221 | 210 |
| 222 ## Building the Library with cmake | 211 ## Building the Library with cmake |
| 223 | 212 |
| 224 Install cmake: http://www.cmake.org/ | 213 Install cmake: http://www.cmake.org/ |
| 225 | 214 |
| 226 Default debug build: | 215 Default debug build: |
| 227 | 216 |
| 228 mkdir out | 217 mkdir out |
| 229 cd out | 218 cd out |
| 230 cmake .. | 219 cmake .. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 253 |
| 265 Then run: | 254 Then run: |
| 266 | 255 |
| 267 c:\intelsde\sde -hsw -- out\Release\libyuv_unittest.exe --gtest_filter=* | 256 c:\intelsde\sde -hsw -- out\Release\libyuv_unittest.exe --gtest_filter=* |
| 268 | 257 |
| 269 ~/intelsde/sde -skx -- out/Release/libyuv_unittest --gtest_filter=**I420ToAR
GB_Opt | 258 ~/intelsde/sde -skx -- out/Release/libyuv_unittest --gtest_filter=**I420ToAR
GB_Opt |
| 270 | 259 |
| 271 ## Sanitizers | 260 ## Sanitizers |
| 272 | 261 |
| 273 gn gen out/Debug "--args=is_debug=true is_asan=true" | 262 gn gen out/Debug "--args=is_debug=true is_asan=true" |
| 274 ninja -j7 -v -C out/Debug | 263 ninja -v -C out/Debug |
| 275 | 264 |
| 276 Sanitizers available: tsan, msan, asan, ubsan, lsan | 265 Sanitizers available: tsan, msan, asan, ubsan, lsan |
| 277 | 266 |
| 278 ### Running Dr Memory memcheck for Windows | 267 ### Running Dr Memory memcheck for Windows |
| 279 | 268 |
| 280 Pre-requisite: Install Dr Memory for Windows and add it to your path: http://www
.drmemory.org/docs/page_install_windows.html | 269 Pre-requisite: Install Dr Memory for Windows and add it to your path: http://www
.drmemory.org/docs/page_install_windows.html |
| 281 | 270 |
| 282 drmemory out\Debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_fi
lter=* | 271 drmemory out\Debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_fi
lter=* |
| OLD | NEW |