Changeset 239415 in webkit
- Timestamp:
- Dec 19, 2018 5:37:30 PM (5 years ago)
- Location:
- trunk/Source/ThirdParty/libwebrtc
- Files:
-
- 9 added
- 7 deleted
- 63 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r239396 r239415 1 2018-12-19 Youenn Fablet <youenn@apple.com> 2 3 Refresh libyuv to M72 4 https://bugs.webkit.org/show_bug.cgi?id=192864 5 6 Reviewed by Alex Christensen. 7 8 * Source/third_party/libyuv: Resynced. 9 1 10 2018-12-19 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/.gn
r235135 r239415 30 30 31 31 default_args = { 32 mac_sdk_min = "10.1 1"32 mac_sdk_min = "10.12" 33 33 34 34 # LibYUV does not want to switch to C++14 yet. -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/.vpython
r229378 r239415 31 31 version: "version:5.2.2" 32 32 > 33 34 # Used by: 35 # third_party/catapult 36 wheel: < 37 name: "infra/python/wheels/pypiwin32/${vpython_platform}" 38 version: "version:219" 39 match_tag: < 40 platform: "win32" 41 > 42 match_tag: < 43 platform: "win_amd64" 44 > 45 > -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/Android.bp
r235135 r239415 12 12 "source/compare_neon.cc", 13 13 "source/compare_neon64.cc", 14 "source/compare_mmi.cc", 14 15 "source/compare_msa.cc", 15 16 "source/convert.cc", … … 26 27 "source/rotate_common.cc", 27 28 "source/rotate_gcc.cc", 29 "source/rotate_mmi.cc", 28 30 "source/rotate_msa.cc", 29 31 "source/rotate_neon.cc", … … 32 34 "source/row_common.cc", 33 35 "source/row_gcc.cc", 36 "source/row_mmi.cc", 34 37 "source/row_msa.cc", 35 38 "source/row_neon.cc", … … 40 43 "source/scale_common.cc", 41 44 "source/scale_gcc.cc", 45 "source/scale_mmi.cc", 42 46 "source/scale_msa.cc", 43 47 "source/scale_neon.cc", 44 48 "source/scale_neon64.cc", 45 49 "source/video_common.cc", 46 47 50 "source/convert_jpeg.cc", 48 51 "source/mjpeg_decoder.cc", -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/Android.mk
r235135 r239415 10 10 source/compare_common.cc \ 11 11 source/compare_gcc.cc \ 12 source/compare_mmi.cc \ 12 13 source/compare_msa.cc \ 13 14 source/compare_neon.cc \ … … 26 27 source/rotate_common.cc \ 27 28 source/rotate_gcc.cc \ 29 source/rotate_mmi.cc \ 28 30 source/rotate_msa.cc \ 29 31 source/rotate_neon.cc \ … … 32 34 source/row_common.cc \ 33 35 source/row_gcc.cc \ 36 source/row_mmi.cc \ 34 37 source/row_msa.cc \ 35 38 source/row_neon.cc \ … … 40 43 source/scale_common.cc \ 41 44 source/scale_gcc.cc \ 45 source/scale_mmi.cc \ 42 46 source/scale_msa.cc \ 43 47 source/scale_neon.cc \ -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/BUILD.gn
r235135 r239415 68 68 if (libyuv_use_msa) { 69 69 deps += [ ":libyuv_msa" ] 70 } 71 72 if (libyuv_use_mmi) { 73 deps += [ ":libyuv_mmi" ] 70 74 } 71 75 … … 230 234 } 231 235 236 if (libyuv_use_mmi) { 237 static_library("libyuv_mmi") { 238 sources = [ 239 # MMI Source Files 240 "source/compare_mmi.cc", 241 "source/rotate_mmi.cc", 242 "source/row_mmi.cc", 243 "source/scale_mmi.cc", 244 ] 245 246 deps = [ 247 ":libyuv_internal", 248 ] 249 250 public_configs = [ ":libyuv_config" ] 251 } 252 } 253 232 254 if (libyuv_include_tests) { 233 255 config("libyuv_unittest_warnings_config") { … … 330 352 deps = [ 331 353 ":libyuv", 332 "//build/config:exe_and_shlib_deps", # for asan on llvm libc++333 354 ] 334 355 if (is_linux) { … … 344 365 deps = [ 345 366 ":libyuv", 346 "//build/config:exe_and_shlib_deps", # for new[] on llvm libc++347 367 ] 348 368 if (is_linux) { … … 360 380 deps = [ 361 381 ":libyuv", 362 "//build/config:exe_and_shlib_deps", # for new[] on llvm libc++363 382 ] 364 383 … … 375 394 deps = [ 376 395 ":libyuv", 377 "//build/config:exe_and_shlib_deps", # for asan on llvm libc++ 378 ] 379 } 380 } 396 ] 397 } 398 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/CMakeLists.txt
r218670 r239415 60 60 61 61 add_executable(libyuv_unittest ${ly_unittest_sources}) 62 target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread) 62 target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY}) 63 find_library(PTHREAD_LIBRARY pthread) 64 if(NOT PTHREAD_LIBRARY STREQUAL "PTHREAD_LIBRARY-NOTFOUND") 65 target_link_libraries(libyuv_unittest pthread) 66 endif() 63 67 if (JPEG_FOUND) 64 68 target_link_libraries(libyuv_unittest ${JPEG_LIBRARY}) … … 69 73 endif() 70 74 71 target_link_libraries(libyuv_unittest gflags) 75 find_library(GFLAGS_LIBRARY gflags) 76 if(NOT GFLAGS_LIBRARY STREQUAL "GFLAGS_LIBRARY-NOTFOUND") 77 target_link_libraries(libyuv_unittest gflags) 78 add_definitions(-DLIBYUV_USE_GFLAGS) 79 endif() 72 80 endif() 73 81 … … 76 84 INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) 77 85 INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) 78 INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib )86 INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) 79 87 INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) 80 88 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/DEPS
r235135 r239415 1 1 vars = { 2 2 'chromium_git': 'https://chromium.googlesource.com', 3 'chromium_revision': ' 80f0c5570649c35a869429b2ab8c381a0a7246cb',4 'swarming_revision': ' 88229872dd17e71658fe96763feaa77915d8cbd6',3 'chromium_revision': '35b72bf255d6519506b7e732f9c74205d2ab452d', 4 'swarming_revision': '486c9b53c4d54dd4b95bb6ce0e31160e600dfc11', 5 5 # Three lines of non-changing comments so that 6 6 # the commit queue can handle CLs rolling lss … … 10 10 # the commit queue can handle CLs rolling catapult 11 11 # and whatever else without interference from each other. 12 'catapult_revision': ' e7298f36f7912f2caa122086cfbe71734d04b73f',12 'catapult_revision': '0d25dda9b148bcd2dad9e1080b1dc57eaf9d2c2a', 13 13 } 14 14 15 15 deps = { 16 16 'src/build': 17 Var('chromium_git') + '/chromium/src/build' + '@' + ' 39738e75b27f39d4c0030a0b11d5d2ddd34715f7',17 Var('chromium_git') + '/chromium/src/build' + '@' + 'f79db013c75bff172913707cd762eba847838fea', 18 18 'src/buildtools': 19 Var('chromium_git') + '/chromium/buildtools.git' + '@' + ' a09e064635a49f08e585e3b173d5fbc3dd3f485e',19 Var('chromium_git') + '/chromium/buildtools.git' + '@' + '9a90d9aaadeb5e04327ed05775f45132e4b3523f', 20 20 'src/testing': 21 Var('chromium_git') + '/chromium/src/testing' + '@' + ' 5f7e36cad6434fd3d65674af96653a23ecc9f694',21 Var('chromium_git') + '/chromium/src/testing' + '@' + 'd2fde4ae5b8d0a5021e6f79d2f4a62e83ba348bc', 22 22 'src/third_party': 23 Var('chromium_git') + '/chromium/src/third_party' + '@' + ' 2c0ced3ddbf84ce1c0759b277d9538da42f23650',23 Var('chromium_git') + '/chromium/src/third_party' + '@' + 'f931bb4f2bdcb327d066052df1914cab4bd68c50', 24 24 'src/third_party/catapult': 25 25 Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'), 26 26 'src/third_party/colorama/src': 27 27 Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 28 'src/third_party/freetype/src': 29 Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '578bcf103a12fb742cdb314565819011d1ac12a7', 28 30 'src/third_party/googletest/src': 29 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '0062e4869f07a3ef235703ddf63af604b712446c', 31 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'd5266326752f0a1dadbd310932d8f4fd8c3c5e7d', 32 'src/third_party/harfbuzz-ng/src': 33 Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + '2b76767bf572364d3d647cdd139f2044a7ad06b2', 30 34 'src/third_party/libjpeg_turbo': 31 35 Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'a1750dbc79a8792dde3d3f7d7d8ac28ba01ac9dd', 32 36 'src/third_party/yasm/source/patched-yasm': 33 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + ' b98114e18d8b9b84586b10d24353ab8616d4c5fc',37 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '720b70524a4424b15fc57e82263568c8ba0496ad', 34 38 'src/tools': 35 Var('chromium_git') + '/chromium/src/tools' + '@' + '6202b67fc46a9984097caf237e12e3b8f7a9f7da', 36 'src/tools/gyp': 37 Var('chromium_git') + '/external/gyp.git' + '@' + 'd61a9397e668fa9843c4aa7da9e79460fe590bfb', 38 'src/tools/swarming_client': 39 Var('chromium_git') + '/infra/luci/client-py.git' + '@' + Var('swarming_revision'), 39 Var('chromium_git') + '/chromium/src/tools' + '@' + 'f2c6ed916b94176158763400de308c2afd56b259', 40 'src/tools/swarming_client': 41 Var('chromium_git') + '/infra/luci/client-py.git' + '@' + Var('swarming_revision'), 40 42 41 43 # libyuv-only dependencies (not present in Chromium). … … 53 55 54 56 # Android deps: 57 'src/third_party/accessibility_test_framework': { 58 'packages': [ 59 { 60 'package': 'chromium/third_party/accessibility-test-framework', 61 'version': 'version:2.1-cr0', 62 }, 63 ], 64 'condition': 'checkout_android', 65 'dep_type': 'cipd', 66 }, 55 67 'src/third_party/auto/src': { 56 68 'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82', 57 69 'condition': 'checkout_android', 58 70 }, 59 'src/third_party/auto/src': {60 'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82',61 'condition': 'checkout_android',62 },63 71 'src/base': { 64 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'ac3d2b81181b085a9952cb83dba748420eefe691', 65 'condition': 'checkout_android', 72 'url': Var('chromium_git') + '/chromium/src/base' + '@' + '6c0497f398c5f6e6af0c66fbf4d77e875eb3f2b1', 73 'condition': 'checkout_android', 74 }, 75 'src/third_party/bazel': { 76 'packages': [ 77 { 78 'package': 'chromium/third_party/bazel', 79 'version': 'version:0.10.0', 80 }, 81 ], 82 'condition': 'checkout_android', 83 'dep_type': 'cipd', 84 }, 85 'src/third_party/bouncycastle': { 86 'packages': [ 87 { 88 'package': 'chromium/third_party/bouncycastle', 89 'version': 'version:1.46-cr0', 90 }, 91 ], 92 'condition': 'checkout_android', 93 'dep_type': 'cipd', 66 94 }, 67 95 'src/third_party/android_ndk': { 68 'url': Var('chromium_git') + '/android_ndk.git' + '@' + 'e951c37287c7d8cd915bf8d4149fd4a06d808b55', 69 'condition': 'checkout_android', 96 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '5cd86312e794bdf542a3685c6f10cbb96072990b', 97 'condition': 'checkout_android', 98 }, 99 'src/third_party/android_support_test_runner': { 100 'packages': [ 101 { 102 'package': 'chromium/third_party/android_support_test_runner', 103 'version': 'version:0.5-cr0', 104 }, 105 ], 106 'condition': 'checkout_android', 107 'dep_type': 'cipd', 70 108 }, 71 109 'src/third_party/android_tools': { 72 'url': Var('chromium_git') + '/android_tools.git' + '@' + '9a70d48fcdd68cd0e7e968f342bd767ee6323bd1', 73 'condition': 'checkout_android', 110 'url': Var('chromium_git') + '/android_tools.git' + '@' + '130499e25286f4d56acafa252fee09f3cc595c49', 111 'condition': 'checkout_android', 112 }, 113 'src/third_party/byte_buddy': { 114 'packages': [ 115 { 116 'package': 'chromium/third_party/byte_buddy', 117 'version': 'version:1.4.17-cr0', 118 }, 119 ], 120 'condition': 'checkout_android', 121 'dep_type': 'cipd', 74 122 }, 75 123 'src/third_party/ced/src': { … … 78 126 }, 79 127 'src/third_party/errorprone/lib': { 80 'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + ' ecc57c2b00627667874744b9ad8efe10734d97a8',128 'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '980d49e839aa4984015efed34b0134d4b2c9b6d7', 81 129 'condition': 'checkout_android', 82 130 }, … … 85 133 'condition': 'checkout_android', 86 134 }, 135 'src/third_party/gson': { 136 'packages': [ 137 { 138 'package': 'chromium/third_party/gson', 139 'version': 'version:2.8.0-cr0', 140 }, 141 ], 142 'condition': 'checkout_android', 143 'dep_type': 'cipd', 144 }, 145 'src/third_party/guava': { 146 'packages': [ 147 { 148 'package': 'chromium/third_party/guava', 149 'version': 'version:23.0-cr0', 150 }, 151 ], 152 'condition': 'checkout_android', 153 'dep_type': 'cipd', 154 }, 155 'src/third_party/hamcrest': { 156 'packages': [ 157 { 158 'package': 'chromium/third_party/hamcrest', 159 'version': 'version:1.3-cr0', 160 }, 161 ], 162 'condition': 'checkout_android', 163 'dep_type': 'cipd', 164 }, 87 165 'src/third_party/icu': { 88 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd888fd2a1be890f4d35e43f68d6d79f42519a357', 166 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '297a4dd02b9d36c92ab9b4f121e433c9c3bc14f8', 167 }, 168 'src/third_party/icu4j': { 169 'packages': [ 170 { 171 'package': 'chromium/third_party/icu4j', 172 'version': 'version:53.1-cr0', 173 }, 174 ], 175 'condition': 'checkout_android', 176 'dep_type': 'cipd', 177 }, 178 'src/third_party/intellij': { 179 'packages': [ 180 { 181 'package': 'chromium/third_party/intellij', 182 'version': 'version:12.0-cr0', 183 }, 184 ], 185 'condition': 'checkout_android', 186 'dep_type': 'cipd', 89 187 }, 90 188 'src/third_party/jsr-305/src': { … … 97 195 }, 98 196 'src/third_party/mockito/src': { 99 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'de83ad4598ad4cf5ea53c69a8a8053780b04b850', 100 'condition': 'checkout_android', 197 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '04a2a289a4222f80ad20717c25144981210d2eac', 198 'condition': 'checkout_android', 199 }, 200 'src/third_party/objenesis': { 201 'packages': [ 202 { 203 'package': 'chromium/third_party/objenesis', 204 'version': 'version:2.4-cr0', 205 }, 206 ], 207 'condition': 'checkout_android', 208 'dep_type': 'cipd', 209 }, 210 'src/third_party/ow2_asm': { 211 'packages': [ 212 { 213 'package': 'chromium/third_party/ow2_asm', 214 'version': 'version:5.0.1-cr0', 215 }, 216 ], 217 'condition': 'checkout_android', 218 'dep_type': 'cipd', 219 }, 220 'src/third_party/r8': { 221 'packages': [ 222 { 223 'package': 'chromium/third_party/r8', 224 'version': 'version:1.0.30', 225 }, 226 ], 227 'condition': 'checkout_android', 228 'dep_type': 'cipd', 101 229 }, 102 230 'src/third_party/requests/src': { … … 104 232 'condition': 'checkout_android', 105 233 }, 234 'src/third_party/robolectric': { 235 'packages': [ 236 { 237 'package': 'chromium/third_party/robolectric', 238 'version': 'version:3.5.1', 239 }, 240 ], 241 'condition': 'checkout_android', 242 'dep_type': 'cipd', 243 }, 106 244 'src/third_party/robolectric/robolectric': { 107 245 'url': Var('chromium_git') + '/external/robolectric.git' + '@' + '7e067f1112e1502caa742f7be72d37b5678d3403', 108 246 'condition': 'checkout_android', 109 247 }, 248 'src/third_party/sqlite4java': { 249 'packages': [ 250 { 251 'package': 'chromium/third_party/sqlite4java', 252 'version': 'version:0.282-cr0', 253 }, 254 ], 255 'condition': 'checkout_android', 256 'dep_type': 'cipd', 257 }, 110 258 'src/third_party/ub-uiautomator/lib': { 111 259 'url': Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + '00270549ce3161ae72ceb24712618ea28b4f9434', 112 260 'condition': 'checkout_android', 113 261 }, 262 'src/third_party/xstream': { 263 'packages': [ 264 { 265 'package': 'chromium/third_party/xstream', 266 'version': 'version:1.4.8-cr0', 267 }, 268 ], 269 'condition': 'checkout_android', 270 'dep_type': 'cipd', 271 }, 114 272 115 273 # iOS deps: 116 274 'src/ios': { 117 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + ' 299ef76e844a74a1f2f4ce7f06d101861fb49aba',275 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '8e45eb00dffadde7e0669a881991e237b0b7a8eb', 118 276 'condition': 'checkout_ios' 119 277 }, … … 125 283 'condition': 'checkout_win', 126 284 }, 285 286 # === ANDROID_DEPS Generated Code Start === 287 # Generated by //tools/android/roll/android_deps/fetch_all.sh 288 'src/third_party/android_deps/libs/android_arch_core_common': { 289 'packages': [ 290 { 291 'package': 'chromium/third_party/android_deps/libs/android_arch_core_common', 292 'version': 'version:1.0.0-cr0', 293 }, 294 ], 295 'condition': 'checkout_android', 296 'dep_type': 'cipd', 297 }, 298 299 'src/third_party/android_deps/libs/android_arch_lifecycle_common': { 300 'packages': [ 301 { 302 'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common', 303 'version': 'version:1.0.0-cr0', 304 }, 305 ], 306 'condition': 'checkout_android', 307 'dep_type': 'cipd', 308 }, 309 310 'src/third_party/android_deps/libs/android_arch_lifecycle_runtime': { 311 'packages': [ 312 { 313 'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_runtime', 314 'version': 'version:1.0.0-cr0', 315 }, 316 ], 317 'condition': 'checkout_android', 318 'dep_type': 'cipd', 319 }, 320 321 'src/third_party/android_deps/libs/com_android_support_animated_vector_drawable': { 322 'packages': [ 323 { 324 'package': 'chromium/third_party/android_deps/libs/com_android_support_animated_vector_drawable', 325 'version': 'version:27.0.0-cr0', 326 }, 327 ], 328 'condition': 'checkout_android', 329 'dep_type': 'cipd', 330 }, 331 332 'src/third_party/android_deps/libs/com_android_support_appcompat_v7': { 333 'packages': [ 334 { 335 'package': 'chromium/third_party/android_deps/libs/com_android_support_appcompat_v7', 336 'version': 'version:27.0.0-cr0', 337 }, 338 ], 339 'condition': 'checkout_android', 340 'dep_type': 'cipd', 341 }, 342 343 'src/third_party/android_deps/libs/com_android_support_cardview_v7': { 344 'packages': [ 345 { 346 'package': 'chromium/third_party/android_deps/libs/com_android_support_cardview_v7', 347 'version': 'version:27.0.0-cr0', 348 }, 349 ], 350 'condition': 'checkout_android', 351 'dep_type': 'cipd', 352 }, 353 354 'src/third_party/android_deps/libs/com_android_support_design': { 355 'packages': [ 356 { 357 'package': 'chromium/third_party/android_deps/libs/com_android_support_design', 358 'version': 'version:27.0.0-cr0', 359 }, 360 ], 361 'condition': 'checkout_android', 362 'dep_type': 'cipd', 363 }, 364 365 'src/third_party/android_deps/libs/com_android_support_gridlayout_v7': { 366 'packages': [ 367 { 368 'package': 'chromium/third_party/android_deps/libs/com_android_support_gridlayout_v7', 369 'version': 'version:27.0.0-cr0', 370 }, 371 ], 372 'condition': 'checkout_android', 373 'dep_type': 'cipd', 374 }, 375 376 'src/third_party/android_deps/libs/com_android_support_leanback_v17': { 377 'packages': [ 378 { 379 'package': 'chromium/third_party/android_deps/libs/com_android_support_leanback_v17', 380 'version': 'version:27.0.0-cr0', 381 }, 382 ], 383 'condition': 'checkout_android', 384 'dep_type': 'cipd', 385 }, 386 387 'src/third_party/android_deps/libs/com_android_support_mediarouter_v7': { 388 'packages': [ 389 { 390 'package': 'chromium/third_party/android_deps/libs/com_android_support_mediarouter_v7', 391 'version': 'version:27.0.0-cr0', 392 }, 393 ], 394 'condition': 'checkout_android', 395 'dep_type': 'cipd', 396 }, 397 398 'src/third_party/android_deps/libs/com_android_support_multidex': { 399 'packages': [ 400 { 401 'package': 'chromium/third_party/android_deps/libs/com_android_support_multidex', 402 'version': 'version:1.0.0-cr0', 403 }, 404 ], 405 'condition': 'checkout_android', 406 'dep_type': 'cipd', 407 }, 408 409 'src/third_party/android_deps/libs/com_android_support_palette_v7': { 410 'packages': [ 411 { 412 'package': 'chromium/third_party/android_deps/libs/com_android_support_palette_v7', 413 'version': 'version:27.0.0-cr0', 414 }, 415 ], 416 'condition': 'checkout_android', 417 'dep_type': 'cipd', 418 }, 419 420 'src/third_party/android_deps/libs/com_android_support_preference_leanback_v17': { 421 'packages': [ 422 { 423 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_leanback_v17', 424 'version': 'version:27.0.0-cr0', 425 }, 426 ], 427 'condition': 'checkout_android', 428 'dep_type': 'cipd', 429 }, 430 431 'src/third_party/android_deps/libs/com_android_support_preference_v14': { 432 'packages': [ 433 { 434 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v14', 435 'version': 'version:27.0.0-cr0', 436 }, 437 ], 438 'condition': 'checkout_android', 439 'dep_type': 'cipd', 440 }, 441 442 'src/third_party/android_deps/libs/com_android_support_preference_v7': { 443 'packages': [ 444 { 445 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v7', 446 'version': 'version:27.0.0-cr0', 447 }, 448 ], 449 'condition': 'checkout_android', 450 'dep_type': 'cipd', 451 }, 452 453 'src/third_party/android_deps/libs/com_android_support_recyclerview_v7': { 454 'packages': [ 455 { 456 'package': 'chromium/third_party/android_deps/libs/com_android_support_recyclerview_v7', 457 'version': 'version:27.0.0-cr0', 458 }, 459 ], 460 'condition': 'checkout_android', 461 'dep_type': 'cipd', 462 }, 463 464 'src/third_party/android_deps/libs/com_android_support_support_annotations': { 465 'packages': [ 466 { 467 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_annotations', 468 'version': 'version:27.0.0-cr0', 469 }, 470 ], 471 'condition': 'checkout_android', 472 'dep_type': 'cipd', 473 }, 474 475 'src/third_party/android_deps/libs/com_android_support_support_compat': { 476 'packages': [ 477 { 478 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_compat', 479 'version': 'version:27.0.0-cr0', 480 }, 481 ], 482 'condition': 'checkout_android', 483 'dep_type': 'cipd', 484 }, 485 486 'src/third_party/android_deps/libs/com_android_support_support_core_ui': { 487 'packages': [ 488 { 489 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_ui', 490 'version': 'version:27.0.0-cr0', 491 }, 492 ], 493 'condition': 'checkout_android', 494 'dep_type': 'cipd', 495 }, 496 497 'src/third_party/android_deps/libs/com_android_support_support_core_utils': { 498 'packages': [ 499 { 500 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_utils', 501 'version': 'version:27.0.0-cr0', 502 }, 503 ], 504 'condition': 'checkout_android', 505 'dep_type': 'cipd', 506 }, 507 508 'src/third_party/android_deps/libs/com_android_support_support_fragment': { 509 'packages': [ 510 { 511 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_fragment', 512 'version': 'version:27.0.0-cr0', 513 }, 514 ], 515 'condition': 'checkout_android', 516 'dep_type': 'cipd', 517 }, 518 519 'src/third_party/android_deps/libs/com_android_support_support_media_compat': { 520 'packages': [ 521 { 522 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_media_compat', 523 'version': 'version:27.0.0-cr0', 524 }, 525 ], 526 'condition': 'checkout_android', 527 'dep_type': 'cipd', 528 }, 529 530 'src/third_party/android_deps/libs/com_android_support_support_v13': { 531 'packages': [ 532 { 533 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v13', 534 'version': 'version:27.0.0-cr0', 535 }, 536 ], 537 'condition': 'checkout_android', 538 'dep_type': 'cipd', 539 }, 540 541 'src/third_party/android_deps/libs/com_android_support_support_v4': { 542 'packages': [ 543 { 544 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v4', 545 'version': 'version:27.0.0-cr0', 546 }, 547 ], 548 'condition': 'checkout_android', 549 'dep_type': 'cipd', 550 }, 551 552 'src/third_party/android_deps/libs/com_android_support_support_vector_drawable': { 553 'packages': [ 554 { 555 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_vector_drawable', 556 'version': 'version:27.0.0-cr0', 557 }, 558 ], 559 'condition': 'checkout_android', 560 'dep_type': 'cipd', 561 }, 562 563 'src/third_party/android_deps/libs/com_android_support_transition': { 564 'packages': [ 565 { 566 'package': 'chromium/third_party/android_deps/libs/com_android_support_transition', 567 'version': 'version:27.0.0-cr0', 568 }, 569 ], 570 'condition': 'checkout_android', 571 'dep_type': 'cipd', 572 }, 573 574 'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth': { 575 'packages': [ 576 { 577 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth', 578 'version': 'version:12.0.1-cr0', 579 }, 580 ], 581 'condition': 'checkout_android', 582 'dep_type': 'cipd', 583 }, 584 585 'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone': { 586 'packages': [ 587 { 588 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone', 589 'version': 'version:12.0.1-cr0', 590 }, 591 ], 592 'condition': 'checkout_android', 593 'dep_type': 'cipd', 594 }, 595 596 'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base': { 597 'packages': [ 598 { 599 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base', 600 'version': 'version:12.0.1-cr0', 601 }, 602 ], 603 'condition': 'checkout_android', 604 'dep_type': 'cipd', 605 }, 606 607 'src/third_party/android_deps/libs/com_google_android_gms_play_services_base': { 608 'packages': [ 609 { 610 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_base', 611 'version': 'version:12.0.1-cr0', 612 }, 613 ], 614 'condition': 'checkout_android', 615 'dep_type': 'cipd', 616 }, 617 618 'src/third_party/android_deps/libs/com_google_android_gms_play_services_basement': { 619 'packages': [ 620 { 621 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement', 622 'version': 'version:12.0.1-cr0', 623 }, 624 ], 625 'condition': 'checkout_android', 626 'dep_type': 'cipd', 627 }, 628 629 'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast': { 630 'packages': [ 631 { 632 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast', 633 'version': 'version:12.0.1-cr0', 634 }, 635 ], 636 'condition': 'checkout_android', 637 'dep_type': 'cipd', 638 }, 639 640 'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework': { 641 'packages': [ 642 { 643 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework', 644 'version': 'version:12.0.1-cr0', 645 }, 646 ], 647 'condition': 'checkout_android', 648 'dep_type': 'cipd', 649 }, 650 651 'src/third_party/android_deps/libs/com_google_android_gms_play_services_fido': { 652 'packages': [ 653 { 654 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido', 655 'version': 'version:12.0.1-cr0', 656 }, 657 ], 658 'condition': 'checkout_android', 659 'dep_type': 'cipd', 660 }, 661 662 'src/third_party/android_deps/libs/com_google_android_gms_play_services_gcm': { 663 'packages': [ 664 { 665 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_gcm', 666 'version': 'version:12.0.1-cr0', 667 }, 668 ], 669 'condition': 'checkout_android', 670 'dep_type': 'cipd', 671 }, 672 673 'src/third_party/android_deps/libs/com_google_android_gms_play_services_iid': { 674 'packages': [ 675 { 676 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_iid', 677 'version': 'version:12.0.1-cr0', 678 }, 679 ], 680 'condition': 'checkout_android', 681 'dep_type': 'cipd', 682 }, 683 684 'src/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps': { 685 'packages': [ 686 { 687 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps', 688 'version': 'version:12.0.1-cr0', 689 }, 690 ], 691 'condition': 'checkout_android', 692 'dep_type': 'cipd', 693 }, 694 695 'src/third_party/android_deps/libs/com_google_android_gms_play_services_location': { 696 'packages': [ 697 { 698 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_location', 699 'version': 'version:12.0.1-cr0', 700 }, 701 ], 702 'condition': 'checkout_android', 703 'dep_type': 'cipd', 704 }, 705 706 'src/third_party/android_deps/libs/com_google_android_gms_play_services_tasks': { 707 'packages': [ 708 { 709 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks', 710 'version': 'version:12.0.1-cr0', 711 }, 712 ], 713 'condition': 'checkout_android', 714 'dep_type': 'cipd', 715 }, 716 717 'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision': { 718 'packages': [ 719 { 720 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision', 721 'version': 'version:12.0.1-cr0', 722 }, 723 ], 724 'condition': 'checkout_android', 725 'dep_type': 'cipd', 726 }, 727 728 'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common': { 729 'packages': [ 730 { 731 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common', 732 'version': 'version:12.0.1-cr0', 733 }, 734 ], 735 'condition': 'checkout_android', 736 'dep_type': 'cipd', 737 }, 738 739 'src/third_party/android_deps/libs/com_google_android_play_core': { 740 'packages': [ 741 { 742 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core', 743 'version': 'version:1.3.0-cr0', 744 }, 745 ], 746 'condition': 'checkout_android', 747 'dep_type': 'cipd', 748 }, 749 750 # === ANDROID_DEPS Generated Code End === 127 751 } 128 752 … … 198 822 'action': ['python', 'src/build/vs_toolchain.py', 'update'], 199 823 }, 824 { 825 # Update the Mac toolchain if necessary. 826 'name': 'mac_toolchain', 827 'pattern': '.', 828 'action': ['python', 'src/build/mac_toolchain.py'], 829 }, 200 830 # Pull binutils for linux, enabled debug fission for faster linking / 201 831 # debugging when used with clang on Ubuntu Precise. … … 214 844 'name': 'clang', 215 845 'pattern': '.', 216 'action': ['python', 'src/tools/clang/scripts/update.py' , '--if-needed'],846 'action': ['python', 'src/tools/clang/scripts/update.py'], 217 847 }, 218 848 { … … 326 956 }, 327 957 { 328 'name': 'Android CIPD Ensure', 329 'pattern': '.', 330 'condition': 'checkout_android', 331 'action': ['src/build/cipd/cipd_wrapper.py', 332 '--chromium-root', 'src', 333 '--ensure-file', 'src/build/cipd/android/android.ensure', 958 # We used to use src as a CIPD root. We moved it to a different directory 959 # in crrev.com/c/930178 but left the clobber here to ensure that that CL 960 # could be reverted safely. This can be safely removed once crbug.com/794764 961 # is resolved. 962 'name': 'Android Clobber Deprecated CIPD Root', 963 'pattern': '.', 964 'condition': 'checkout_android', 965 'action': ['src/build/cipd/clobber_cipd_root.py', 966 '--root', 'src', 334 967 ], 335 968 }, … … 341 974 # third_party/android_tools/sdk/extras directory. 342 975 'name': 'sdkextras', 976 'condition': 'checkout_android', 343 977 'pattern': '.', 344 978 # When adding a new sdk extras package to download, add the package 345 979 # directory and zip file to .gitignore in third_party/android_tools. 346 'action': [' python',980 'action': ['vpython', 347 981 'src/build/android/play_services/update.py', 348 982 'download' -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/README.chromium
r235135 r239415 1 1 Name: libyuv 2 2 URL: http://code.google.com/p/libyuv/ 3 Version: 17 033 Version: 1722 4 4 License: BSD 5 5 License File: LICENSE -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/README.md
r235135 r239415 11 11 ### Development 12 12 13 See [Getting started] 13 See [Getting started][1] for instructions on how to get started developing. 14 14 15 You can also browse the [docs directory] 15 You can also browse the [docs directory][2] for more documentation. 16 16 17 [1]: https://chromium.googlesource.com/libyuv/libyuv/+/master/docs/getting_started.md18 [2]: https://chromium.googlesource.com/libyuv/libyuv/+/master/docs/17 [1]: ./docs/getting_started.md 18 [2]: ./docs/ -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/build_overrides/build.gni
r229378 r239415 34 34 ignore_elf32_limitations = true 35 35 36 # Use system Xcode installation instead of the Chromium bundled Mac toolchain, 37 # since it contains only SDK 10.11, not 10.12 which WebRTC needs. 38 use_system_xcode = true 36 # Use bundled hermetic Xcode installation maintained by Chromium, 37 # except for local iOS builds where it is unsupported. 38 if (host_os == "mac") { 39 _result = exec_script("//build/mac/should_use_hermetic_xcode.py", 40 [ target_os ], 41 "value") 42 assert(_result != 2, 43 "Do not allow building targets with the default" + 44 "hermetic toolchain if the minimum OS version is not met.") 45 use_system_xcode = _result == 0 46 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/docs/environment_variables.md
r235135 r239415 7 7 By default the cpu is detected and the most advanced form of SIMD is used. But you can disable instruction sets selectively, or completely, falling back on C code. Set the variable to 1 to disable the specified instruction set. 8 8 9 ## All CPUs 9 10 LIBYUV_DISABLE_ASM 11 12 ## Intel CPUs 10 13 LIBYUV_DISABLE_X86 11 14 LIBYUV_DISABLE_SSE2 … … 15 18 LIBYUV_DISABLE_AVX 16 19 LIBYUV_DISABLE_AVX2 17 LIBYUV_DISABLE_AVX512BW18 20 LIBYUV_DISABLE_ERMS 19 21 LIBYUV_DISABLE_FMA3 22 LIBYUV_DISABLE_F16C 23 LIBYUV_DISABLE_AVX512BW 24 LIBYUV_DISABLE_AVX512VL 25 LIBYUV_DISABLE_AVX512VBMI 26 LIBYUV_DISABLE_AVX512VBMI2 27 LIBYUV_DISABLE_AVX512VBITALG 28 LIBYUV_DISABLE_AVX512VPOPCNTDQ 29 LIBYUV_DISABLE_GFNI 30 31 ## ARM CPUs 32 33 LIBYUV_DISABLE_NEON 34 35 ## MIPS CPUs 20 36 LIBYUV_DISABLE_MSA 21 LIBYUV_DISABLE_ NEON37 LIBYUV_DISABLE_MMI 22 38 23 39 # Test Width/Height/Repeat -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/docs/formats.md
r235135 r239415 67 67 FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), 68 68 69 // 7Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias.69 // 8 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. 70 70 FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), 71 71 FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), … … 75 75 FOURCC_J400 = FOURCC('J', '4', '0', '0'), // unofficial fourcc 76 76 FOURCC_H420 = FOURCC('H', '4', '2', '0'), // unofficial fourcc 77 FOURCC_H422 = FOURCC('H', '4', '2', '2'), // unofficial fourcc 77 78 78 79 // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/docs/getting_started.md
r235135 r239415 28 28 ]; 29 29 30 For iOS add `;target_os=['ios'];` to your OSX .gclient and run ` GYP_DEFINES="OS=ios"gclient sync.`30 For iOS add `;target_os=['ios'];` to your OSX .gclient and run `gclient sync.` 31 31 32 32 Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/master … … 49 49 Then run: 50 50 51 export GYP_DEFINES="OS=android"52 51 gclient sync 53 54 The sync will generate native build files for your environment using gyp (Windows: Visual Studio, OSX: XCode, Linux: make). This generation can also be forced manually: `gclient runhooks`55 52 56 53 To get just the source (not buildable): … … 99 96 ios simulator 100 97 101 gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\"" 102 gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\"" 103 ninja -v -C out/Debug libyuv_unittest 104 ninja -v -C out/Release libyuv_unittest 98 gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\"" 99 gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\"" 100 ninja -v -C out/Debug libyuv_unittest 101 ninja -v -C out/Release libyuv_unittest 102 103 ios disassembly 104 105 otool -tV ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt 105 106 106 107 ### Android … … 132 133 mips 133 134 134 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 is_clang=true"135 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=true"135 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" 136 gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true" 136 137 ninja -v -C out/Debug libyuv_unittest 137 138 ninja -v -C out/Release libyuv_unittest … … 145 146 third_party/android_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 146 147 148 Caveat: Disassembly may require optimize_max be disabled in BUILD.gn 149 147 150 Running tests: 148 151 149 build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release--gtest_filter=*152 out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* 150 153 151 154 Running test as benchmark: 152 155 153 build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1"156 out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1 154 157 155 158 Running test with C code: 156 159 157 build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1"160 out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1 158 161 159 162 ### Build targets … … 172 175 ninja -v -C out/Debug libyuv_unittest 173 176 ninja -v -C out/Release libyuv_unittest 177 178 ### MIPS Linux 179 180 mips 181 182 gn gen out/Release "--args=is_debug=false target_os=\"linux\" target_cpu=\"mips64el\" mips_arch_variant=\"loongson3\" mips_use_mmi=true is_component_build=false use_sysroot=false use_gold=false" 183 gn gen out/Debug "--args=is_debug=true target_os=\"linux\" target_cpu=\"mips64el\" mips_arch_variant=\"loongson3\" mips_use_mmi=true is_component_build=false use_sysroot=false use_gold=false" 184 ninja -v -C out/Debug libyuv_unittest 185 ninja -v -C out/Release libyuv_unittest 174 186 175 187 ## Building the Library with make -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/basic_types.h
r235135 r239415 30 30 #include <stdint.h> // for uintptr_t and C99 types 31 31 #endif // defined(_MSC_VER) && (_MSC_VER < 1600) 32 // Types are deprecated. Enable this macro for legacy types. 33 #ifdef LIBYUV_LEGACY_TYPES 32 34 typedef uint64_t uint64; 33 35 typedef int64_t int64; … … 38 40 typedef uint8_t uint8; 39 41 typedef int8_t int8; 42 #endif // LIBYUV_LEGACY_TYPES 40 43 #endif // INT_TYPES_DEFINED 41 44 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/compare_row.h
r235135 r239415 46 46 #endif // __clang__ 47 47 48 // The following are available for Visual C:49 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \50 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))51 #define HAS_HASHDJB2_AVX252 #endif53 54 48 // The following are available for Visual C and GCC: 55 49 #if !defined(LIBYUV_DISABLE_X86) && \ … … 61 55 62 56 // The following are available for Visual C and clangcl 32 bit: 63 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \57 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \ 64 58 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 65 59 #define HAS_HASHDJB2_AVX2 … … 91 85 #endif 92 86 87 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 88 #define HAS_HAMMINGDISTANCE_MMI 89 #define HAS_SUMSQUAREERROR_MMI 90 #endif 91 93 92 uint32_t HammingDistance_C(const uint8_t* src_a, 94 93 const uint8_t* src_b, … … 109 108 const uint8_t* src_b, 110 109 int count); 111 110 uint32_t HammingDistance_MMI(const uint8_t* src_a, 111 const uint8_t* src_b, 112 int count); 112 113 uint32_t SumSquareError_C(const uint8_t* src_a, 113 114 const uint8_t* src_b, … … 125 126 const uint8_t* src_b, 126 127 int count); 128 uint32_t SumSquareError_MMI(const uint8_t* src_a, 129 const uint8_t* src_b, 130 int count); 127 131 128 132 uint32_t HashDjb2_C(const uint8_t* src, int count, uint32_t seed); -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/convert.h
r235135 r239415 43 43 int height); 44 44 45 // Convert I4 22 to I420.46 LIBYUV_API 47 int I4 22ToI420(const uint8_t* src_y,45 // Convert I444 to NV21. 46 LIBYUV_API 47 int I444ToNV21(const uint8_t* src_y, 48 48 int src_stride_y, 49 49 const uint8_t* src_u, … … 53 53 uint8_t* dst_y, 54 54 int dst_stride_y, 55 uint8_t* dst_u, 56 int dst_stride_u, 57 uint8_t* dst_v, 58 int dst_stride_v, 55 uint8_t* dst_vu, 56 int dst_stride_vu, 57 int width, 58 int height); 59 60 // Convert I422 to I420. 61 LIBYUV_API 62 int I422ToI420(const uint8_t* src_y, 63 int src_stride_y, 64 const uint8_t* src_u, 65 int src_stride_u, 66 const uint8_t* src_v, 67 int src_stride_v, 68 uint8_t* dst_y, 69 int dst_stride_y, 70 uint8_t* dst_u, 71 int dst_stride_u, 72 uint8_t* dst_v, 73 int dst_stride_v, 74 int width, 75 int height); 76 77 // Convert I422 to NV21. 78 LIBYUV_API 79 int I422ToNV21(const uint8_t* src_y, 80 int src_stride_y, 81 const uint8_t* src_u, 82 int src_stride_u, 83 const uint8_t* src_v, 84 int src_stride_v, 85 uint8_t* dst_y, 86 int dst_stride_y, 87 uint8_t* dst_vu, 88 int dst_stride_vu, 59 89 int width, 60 90 int height); … … 125 155 uint8_t* dst_v, 126 156 int dst_stride_v, 157 int width, 158 int height); 159 160 // Convert I400 (grey) to NV21. 161 LIBYUV_API 162 int I400ToNV21(const uint8_t* src_y, 163 int src_stride_y, 164 uint8_t* dst_y, 165 int dst_stride_y, 166 uint8_t* dst_vu, 167 int dst_stride_vu, 127 168 int width, 128 169 int height); … … 346 387 uint8_t* dst_v, 347 388 int dst_stride_v, 389 int src_width, 390 int src_height, 391 int dst_width, 392 int dst_height); 393 394 // JPEG to NV21 395 LIBYUV_API 396 int MJPGToNV21(const uint8_t* sample, 397 size_t sample_size, 398 uint8_t* dst_y, 399 int dst_stride_y, 400 uint8_t* dst_vu, 401 int dst_stride_vu, 348 402 int src_width, 349 403 int src_height, -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/convert_argb.h
r235135 r239415 298 298 int width, 299 299 int height); 300 301 // Convert NV12 to RAW. 302 LIBYUV_API 303 int NV12ToRAW(const uint8_t* src_y, 304 int src_stride_y, 305 const uint8_t* src_uv, 306 int src_stride_uv, 307 uint8_t* dst_raw, 308 int dst_stride_raw, 309 int width, 310 int height); 311 312 // Convert NV21 to RAW. 313 LIBYUV_API 314 int NV21ToRAW(const uint8_t* src_y, 315 int src_stride_y, 316 const uint8_t* src_vu, 317 int src_stride_vu, 318 uint8_t* dst_raw, 319 int dst_stride_raw, 320 int width, 321 int height); 300 322 301 323 // Convert M420 to ARGB. -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/convert_from.h
r235135 r239415 230 230 LIBYUV_API 231 231 int I420ToRGB565(const uint8_t* src_y, 232 int src_stride_y, 233 const uint8_t* src_u, 234 int src_stride_u, 235 const uint8_t* src_v, 236 int src_stride_v, 237 uint8_t* dst_rgb565, 238 int dst_stride_rgb565, 239 int width, 240 int height); 241 242 LIBYUV_API 243 int J420ToRGB565(const uint8_t* src_y, 244 int src_stride_y, 245 const uint8_t* src_u, 246 int src_stride_u, 247 const uint8_t* src_v, 248 int src_stride_v, 249 uint8_t* dst_rgb565, 250 int dst_stride_rgb565, 251 int width, 252 int height); 253 254 LIBYUV_API 255 int H420ToRGB565(const uint8_t* src_y, 232 256 int src_stride_y, 233 257 const uint8_t* src_u, -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/cpu_id.h
r235135 r239415 49 49 static const int kCpuHasMIPS = 0x200000; 50 50 static const int kCpuHasMSA = 0x400000; 51 static const int kCpuHasMMI = 0x800000; 51 52 52 53 // Optional init function. TestCpuFlag does an auto-init. … … 81 82 int MaskCpuFlags(int enable_flags); 82 83 84 // Sets the CPU flags to |cpu_flags|, bypassing the detection code. |cpu_flags| 85 // should be a valid combination of the kCpuHas constants above and include 86 // kCpuInitialized. Use this method when running in a sandboxed process where 87 // the detection code might fail (as it might access /proc/cpuinfo). In such 88 // cases the cpu_info can be obtained from a non sandboxed process by calling 89 // InitCpuFlags() and passed to the sandboxed process (via command line 90 // parameters, IPC...) which can then call this method to initialize the CPU 91 // flags. 92 // Notes: 93 // - when specifying 0 for |cpu_flags|, the auto initialization is enabled 94 // again. 95 // - enabling CPU features that are not supported by the CPU will result in 96 // undefined behavior. 97 // TODO(fbarchard): consider writing a helper function that translates from 98 // other library CPU info to libyuv CPU info and add a .md doc that explains 99 // CPU detection. 100 static __inline void SetCpuFlags(int cpu_flags) { 101 LIBYUV_API extern int cpu_info_; 102 #ifdef __ATOMIC_RELAXED 103 __atomic_store_n(&cpu_info_, cpu_flags, __ATOMIC_RELAXED); 104 #else 105 cpu_info_ = cpu_flags; 106 #endif 107 } 108 83 109 // Low level cpuid for X86. Returns zeros on other CPUs. 84 110 // eax is the info type that you want. -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/macros_msa.h
r235135 r239415 17 17 18 18 #if (__mips_isa_rev >= 6) 19 #define LW(psrc) 20 ({ 21 uint8_t* psrc_lw_m = (uint8_t*)(psrc); /* NOLINT */\22 uint32_t val_m; 23 asm volatile("lw %[val_m], %[psrc_lw_m] \n" 24 : [val_m] "=r"(val_m) 25 : [psrc_lw_m] "m"(*psrc_lw_m)); 26 val_m; 19 #define LW(psrc) \ 20 ({ \ 21 const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ 22 uint32_t val_m; \ 23 asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ 24 : [val_m] "=r"(val_m) \ 25 : [psrc_lw_m] "m"(*psrc_lw_m)); \ 26 val_m; \ 27 27 }) 28 28 29 29 #if (__mips == 64) 30 #define LD(psrc) 31 ({ 32 uint8_t* psrc_ld_m = (uint8_t*)(psrc); /* NOLINT */\33 uint64_t val_m = 0; 34 asm volatile("ld %[val_m], %[psrc_ld_m] \n" 35 : [val_m] "=r"(val_m) 36 : [psrc_ld_m] "m"(*psrc_ld_m)); 37 val_m; 30 #define LD(psrc) \ 31 ({ \ 32 const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ 33 uint64_t val_m = 0; \ 34 asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ 35 : [val_m] "=r"(val_m) \ 36 : [psrc_ld_m] "m"(*psrc_ld_m)); \ 37 val_m; \ 38 38 }) 39 39 #else // !(__mips == 64) 40 40 #define LD(psrc) \ 41 41 ({ \ 42 uint8_t* psrc_ld_m = (uint8_t*)(psrc); /* NOLINT */\42 const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ 43 43 uint32_t val0_m, val1_m; \ 44 44 uint64_t val_m = 0; \ … … 82 82 #endif // !(__mips == 64) 83 83 #else // !(__mips_isa_rev >= 6) 84 #define LW(psrc) 85 ({ 86 uint8_t* psrc_lw_m = (uint8_t*)(psrc); /* NOLINT */\87 uint32_t val_m; 88 asm volatile("ulw %[val_m], %[psrc_lw_m] \n" 89 : [val_m] "=r"(val_m) 90 : [psrc_lw_m] "m"(*psrc_lw_m)); 91 val_m; 84 #define LW(psrc) \ 85 ({ \ 86 const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ 87 uint32_t val_m; \ 88 asm volatile("ulw %[val_m], %[psrc_lw_m] \n" \ 89 : [val_m] "=r"(val_m) \ 90 : [psrc_lw_m] "m"(*psrc_lw_m)); \ 91 val_m; \ 92 92 }) 93 93 94 94 #if (__mips == 64) 95 #define LD(psrc) 96 ({ 97 uint8_t* psrc_ld_m = (uint8_t*)(psrc); /* NOLINT */\98 uint64_t val_m = 0; 99 asm volatile("uld %[val_m], %[psrc_ld_m] \n" 100 : [val_m] "=r"(val_m) 101 : [psrc_ld_m] "m"(*psrc_ld_m)); 102 val_m; 95 #define LD(psrc) \ 96 ({ \ 97 const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ 98 uint64_t val_m = 0; \ 99 asm volatile("uld %[val_m], %[psrc_ld_m] \n" \ 100 : [val_m] "=r"(val_m) \ 101 : [psrc_ld_m] "m"(*psrc_ld_m)); \ 102 val_m; \ 103 103 }) 104 104 #else // !(__mips == 64) 105 105 #define LD(psrc) \ 106 106 ({ \ 107 uint8_t* psrc_ld_m = (uint8_t*)(psrc); /* NOLINT */\107 const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ 108 108 uint32_t val0_m, val1_m; \ 109 109 uint64_t val_m = 0; \ … … 139 139 // TODO(fbarchard): Consider removing __VAR_ARGS versions. 140 140 #define LD_B(RTYPE, psrc) *((RTYPE*)(psrc)) /* NOLINT */ 141 #define LD_UB(...) LD_B( v16u8, __VA_ARGS__)141 #define LD_UB(...) LD_B(const v16u8, __VA_ARGS__) 142 142 143 143 #define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */ … … 159 159 out1 = LD_B(RTYPE, (psrc) + stride); \ 160 160 } 161 #define LD_UB2(...) LD_B2( v16u8, __VA_ARGS__)161 #define LD_UB2(...) LD_B2(const v16u8, __VA_ARGS__) 162 162 163 163 #define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) \ … … 166 166 LD_B2(RTYPE, (psrc) + 2 * stride, stride, out2, out3); \ 167 167 } 168 #define LD_UB4(...) LD_B4( v16u8, __VA_ARGS__)168 #define LD_UB4(...) LD_B4(const v16u8, __VA_ARGS__) 169 169 170 170 /* Description : Store two vectors with stride each having 16 'byte' sized -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/mjpeg_decoder.h
r235135 r239415 169 169 170 170 // A buffer holding the input data for a frame. 171 Buffer buf_ {};172 BufferVector buf_vec_ {};171 Buffer buf_; 172 BufferVector buf_vec_; 173 173 174 174 jpeg_decompress_struct* decompress_struct_; … … 182 182 // Temporaries used to point to scanline outputs. 183 183 int num_outbufs_; // Outermost size of all arrays below. 184 uint8_t*** scanlines_ {};185 int* scanlines_sizes_ {};184 uint8_t*** scanlines_; 185 int* scanlines_sizes_; 186 186 // Temporary buffer used for decoding when we can't decode directly to the 187 187 // output buffers. Large enough for just one iMCU row. 188 uint8_t** databuf_ {};189 int* databuf_strides_ {};188 uint8_t** databuf_; 189 int* databuf_strides_; 190 190 }; 191 191 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/rotate_row.h
r235135 r239415 59 59 #define HAS_TRANSPOSEWX16_MSA 60 60 #define HAS_TRANSPOSEUVWX16_MSA 61 #endif 62 63 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 64 #define HAS_TRANSPOSEWX8_MMI 65 #define HAS_TRANSPOSEUVWX8_MMI 61 66 #endif 62 67 … … 88 93 int dst_stride, 89 94 int width); 95 void TransposeWx8_MMI(const uint8_t* src, 96 int src_stride, 97 uint8_t* dst, 98 int dst_stride, 99 int width); 90 100 void TransposeWx8_Fast_SSSE3(const uint8_t* src, 91 101 int src_stride, … … 109 119 int dst_stride, 110 120 int width); 121 void TransposeWx8_Any_MMI(const uint8_t* src, 122 int src_stride, 123 uint8_t* dst, 124 int dst_stride, 125 int width); 111 126 void TransposeWx8_Fast_Any_SSSE3(const uint8_t* src, 112 127 int src_stride, … … 157 172 int dst_stride_b, 158 173 int width); 174 void TransposeUVWx8_MMI(const uint8_t* src, 175 int src_stride, 176 uint8_t* dst_a, 177 int dst_stride_a, 178 uint8_t* dst_b, 179 int dst_stride_b, 180 int width); 159 181 void TransposeUVWx16_MSA(const uint8_t* src, 160 182 int src_stride, … … 179 201 int dst_stride_b, 180 202 int width); 203 void TransposeUVWx8_Any_MMI(const uint8_t* src, 204 int src_stride, 205 uint8_t* dst_a, 206 int dst_stride_a, 207 uint8_t* dst_b, 208 int dst_stride_b, 209 int width); 181 210 void TransposeUVWx16_Any_MSA(const uint8_t* src, 182 211 int src_stride, -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/row.h
r235135 r239415 54 54 #define CLANG_HAS_AVX2 1 55 55 #endif // clang >= 3.4 56 #endif // __clang__ 57 58 // clang >= 6.0.0 required for AVX512. 59 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) 60 // clang in xcode follows a different versioning scheme. 61 // TODO(fbarchard): fix xcode 9 ios b/789. 62 #if (__clang_major__ >= 7) && !defined(__APPLE__) 63 #define CLANG_HAS_AVX512 1 64 #endif // clang >= 7 56 65 #endif // __clang__ 57 66 … … 106 115 #define HAS_MIRRORUVROW_SSSE3 107 116 #define HAS_NV12TOARGBROW_SSSE3 117 #define HAS_NV12TORGB24ROW_SSSE3 108 118 #define HAS_NV12TORGB565ROW_SSSE3 109 119 #define HAS_NV21TOARGBROW_SSSE3 120 #define HAS_NV21TORGB24ROW_SSSE3 110 121 #define HAS_RAWTOARGBROW_SSSE3 111 122 #define HAS_RAWTORGB24ROW_SSSE3 … … 201 212 #define HAS_MIRRORROW_AVX2 202 213 #define HAS_NV12TOARGBROW_AVX2 214 #define HAS_NV12TORGB24ROW_AVX2 203 215 #define HAS_NV12TORGB565ROW_AVX2 204 216 #define HAS_NV21TOARGBROW_AVX2 217 #define HAS_NV21TORGB24ROW_AVX2 205 218 #define HAS_SPLITUVROW_AVX2 206 219 #define HAS_UYVYTOARGBROW_AVX2 … … 231 244 // The following are available for AVX2 Visual C and clangcl 32 bit: 232 245 // TODO(fbarchard): Port to gcc. 233 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \246 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \ 234 247 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 235 248 #define HAS_ARGB1555TOARGBROW_AVX2 … … 272 285 #define HAS_ABGRTOAR30ROW_AVX2 273 286 #define HAS_ARGBTOAR30ROW_AVX2 287 // Fix AVX2 b:118386049 segfault 288 //#define HAS_ARGBTORAWROW_AVX2 289 //#define HAS_ARGBTORGB24ROW_AVX2 274 290 #define HAS_CONVERT16TO8ROW_AVX2 275 291 #define HAS_CONVERT8TO16ROW_AVX2 292 #define HAS_I210TOAR30ROW_AVX2 276 293 #define HAS_I210TOARGBROW_AVX2 277 #define HAS_I210TOAR30ROW_AVX2278 294 #define HAS_I422TOAR30ROW_AVX2 279 295 #define HAS_I422TOUYVYROW_AVX2 … … 281 297 #define HAS_MERGEUVROW_16_AVX2 282 298 #define HAS_MULTIPLYROW_16_AVX2 299 #endif 300 301 // The following are available for AVX512 clang x86 platforms: 302 // TODO(fbarchard): Port to GCC and Visual C 303 // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789 304 #if !defined(LIBYUV_DISABLE_X86) && \ 305 (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \ 306 (defined(CLANG_HAS_AVX512)) 307 // Fix AVX2 b:118386049 segfault 308 //#define HAS_ARGBTORGB24ROW_AVX512VBMI 283 309 #endif 284 310 … … 460 486 #endif 461 487 488 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 489 #define HAS_ABGRTOUVROW_MMI 490 #define HAS_ABGRTOYROW_MMI 491 #define HAS_ARGB1555TOARGBROW_MMI 492 #define HAS_ARGB1555TOUVROW_MMI 493 #define HAS_ARGB1555TOYROW_MMI 494 #define HAS_ARGB4444TOARGBROW_MMI 495 #define HAS_ARGB4444TOUVROW_MMI 496 #define HAS_ARGB4444TOYROW_MMI 497 #define HAS_ARGBADDROW_MMI 498 #define HAS_ARGBATTENUATEROW_MMI 499 #define HAS_ARGBBLENDROW_MMI 500 #define HAS_ARGBCOLORMATRIXROW_MMI 501 #define HAS_ARGBCOPYALPHAROW_MMI 502 #define HAS_ARGBCOPYYTOALPHAROW_MMI 503 #define HAS_ARGBEXTRACTALPHAROW_MMI 504 #define HAS_ARGBGRAYROW_MMI 505 #define HAS_ARGBMIRRORROW_MMI 506 #define HAS_ARGBMULTIPLYROW_MMI 507 #define HAS_ARGBSEPIAROW_MMI 508 #define HAS_ARGBSHADEROW_MMI 509 #define HAS_ARGBSHUFFLEROW_MMI 510 #define HAS_ARGBSUBTRACTROW_MMI 511 #define HAS_ARGBTOARGB1555ROW_MMI 512 #define HAS_ARGBTOARGB4444ROW_MMI 513 #define HAS_ARGBTORAWROW_MMI 514 #define HAS_ARGBTORGB24ROW_MMI 515 #define HAS_ARGBTORGB565DITHERROW_MMI 516 #define HAS_ARGBTORGB565ROW_MMI 517 #define HAS_ARGBTOUV444ROW_MMI 518 #define HAS_ARGBTOUVJROW_MMI 519 #define HAS_ARGBTOUVROW_MMI 520 #define HAS_ARGBTOYJROW_MMI 521 #define HAS_ARGBTOYROW_MMI 522 #define HAS_BGRATOUVROW_MMI 523 #define HAS_BGRATOYROW_MMI 524 #define HAS_BLENDPLANEROW_MMI 525 #define HAS_COMPUTECUMULATIVESUMROW_MMI 526 #define HAS_CUMULATIVESUMTOAVERAGEROW_MMI 527 #define HAS_HALFFLOATROW_MMI 528 #define HAS_I400TOARGBROW_MMI 529 #define HAS_I422TOUYVYROW_MMI 530 #define HAS_I422TOYUY2ROW_MMI 531 #define HAS_INTERPOLATEROW_MMI 532 #define HAS_J400TOARGBROW_MMI 533 #define HAS_MERGERGBROW_MMI 534 #define HAS_MERGEUVROW_MMI 535 #define HAS_MIRRORROW_MMI 536 #define HAS_MIRRORUVROW_MMI 537 #define HAS_RAWTOARGBROW_MMI 538 #define HAS_RAWTORGB24ROW_MMI 539 #define HAS_RAWTOUVROW_MMI 540 #define HAS_RAWTOYROW_MMI 541 #define HAS_RGB24TOARGBROW_MMI 542 #define HAS_RGB24TOUVROW_MMI 543 #define HAS_RGB24TOYROW_MMI 544 #define HAS_RGB565TOARGBROW_MMI 545 #define HAS_RGB565TOUVROW_MMI 546 #define HAS_RGB565TOYROW_MMI 547 #define HAS_RGBATOUVROW_MMI 548 #define HAS_RGBATOYROW_MMI 549 #define HAS_SOBELROW_MMI 550 #define HAS_SOBELTOPLANEROW_MMI 551 #define HAS_SOBELXROW_MMI 552 #define HAS_SOBELXYROW_MMI 553 #define HAS_SOBELYROW_MMI 554 #define HAS_SPLITRGBROW_MMI 555 #define HAS_SPLITUVROW_MMI 556 #define HAS_UYVYTOUVROW_MMI 557 #define HAS_UYVYTOYROW_MMI 558 #define HAS_YUY2TOUV422ROW_MMI 559 #define HAS_YUY2TOUVROW_MMI 560 #define HAS_YUY2TOYROW_MMI 561 #endif 562 462 563 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) 463 564 #if defined(VISUALC_HAS_AVX2) … … 814 915 void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); 815 916 void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); 917 void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 918 void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 816 919 void ARGBToUV444Row_NEON(const uint8_t* src_argb, 817 920 uint8_t* dst_u, … … 828 931 int width); 829 932 void ARGBToUVRow_MSA(const uint8_t* src_argb0, 933 int src_stride_argb, 934 uint8_t* dst_u, 935 uint8_t* dst_v, 936 int width); 937 void ARGBToUV444Row_MMI(const uint8_t* src_argb, 938 uint8_t* dst_u, 939 uint8_t* dst_v, 940 int width); 941 void ARGBToUVRow_MMI(const uint8_t* src_argb0, 830 942 int src_stride_argb, 831 943 uint8_t* dst_u, … … 917 1029 uint8_t* dst_v, 918 1030 int width); 1031 void ARGBToUVJRow_MMI(const uint8_t* src_rgb0, 1032 int src_stride_rgb, 1033 uint8_t* dst_u, 1034 uint8_t* dst_v, 1035 int width); 1036 void BGRAToUVRow_MMI(const uint8_t* src_rgb0, 1037 int src_stride_rgb, 1038 uint8_t* dst_u, 1039 uint8_t* dst_v, 1040 int width); 1041 void ABGRToUVRow_MMI(const uint8_t* src_rgb0, 1042 int src_stride_rgb, 1043 uint8_t* dst_u, 1044 uint8_t* dst_v, 1045 int width); 1046 void RGBAToUVRow_MMI(const uint8_t* src_rgb0, 1047 int src_stride_rgb, 1048 uint8_t* dst_u, 1049 uint8_t* dst_v, 1050 int width); 1051 void RGB24ToUVRow_MMI(const uint8_t* src_rgb0, 1052 int src_stride_rgb, 1053 uint8_t* dst_u, 1054 uint8_t* dst_v, 1055 int width); 1056 void RAWToUVRow_MMI(const uint8_t* src_rgb0, 1057 int src_stride_rgb, 1058 uint8_t* dst_u, 1059 uint8_t* dst_v, 1060 int width); 1061 void RGB565ToUVRow_MMI(const uint8_t* src_rgb565, 1062 int src_stride_rgb565, 1063 uint8_t* dst_u, 1064 uint8_t* dst_v, 1065 int width); 1066 void ARGB1555ToUVRow_MMI(const uint8_t* src_argb1555, 1067 int src_stride_argb1555, 1068 uint8_t* dst_u, 1069 uint8_t* dst_v, 1070 int width); 1071 void ARGB4444ToUVRow_MMI(const uint8_t* src_argb4444, 1072 int src_stride_argb4444, 1073 uint8_t* dst_u, 1074 uint8_t* dst_v, 1075 int width); 919 1076 void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width); 920 1077 void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width); … … 936 1093 void RGB565ToYRow_MSA(const uint8_t* src_rgb565, uint8_t* dst_y, int width); 937 1094 void ARGB1555ToYRow_MSA(const uint8_t* src_argb1555, uint8_t* dst_y, int width); 1095 void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 1096 void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 1097 void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 1098 void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 1099 void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width); 1100 void RGB565ToYRow_MMI(const uint8_t* src_rgb565, uint8_t* dst_y, int width); 1101 void ARGB1555ToYRow_MMI(const uint8_t* src_argb1555, uint8_t* dst_y, int width); 1102 void ARGB4444ToYRow_MMI(const uint8_t* src_argb4444, uint8_t* dst_y, int width); 1103 938 1104 void ARGBToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width); 939 1105 void ARGBToYJRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width); … … 978 1144 uint8_t* dst_ptr, 979 1145 int width); 1146 void BGRAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1147 void ABGRToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1148 void RGBAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1149 void ARGBToYJRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1150 void ARGBToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1151 void RGB24ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1152 void RAWToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1153 void RGB565ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1154 void ARGB1555ToYRow_Any_MMI(const uint8_t* src_ptr, 1155 uint8_t* dst_ptr, 1156 int width); 1157 void ARGB4444ToYRow_Any_MMI(const uint8_t* src_ptr, 1158 uint8_t* dst_ptr, 1159 int width); 980 1160 981 1161 void ARGBToUVRow_AVX2(const uint8_t* src_argb0, … … 1063 1243 int width); 1064 1244 void ARGBToUVRow_Any_MSA(const uint8_t* src_ptr, 1245 int src_stride_ptr, 1246 uint8_t* dst_u, 1247 uint8_t* dst_v, 1248 int width); 1249 void ARGBToUV444Row_Any_MMI(const uint8_t* src_ptr, 1250 uint8_t* dst_u, 1251 uint8_t* dst_v, 1252 int width); 1253 void ARGBToUVRow_Any_MMI(const uint8_t* src_ptr, 1065 1254 int src_stride_ptr, 1066 1255 uint8_t* dst_u, … … 1148 1337 int width); 1149 1338 void ARGB1555ToUVRow_Any_MSA(const uint8_t* src_ptr, 1339 int src_stride_ptr, 1340 uint8_t* dst_u, 1341 uint8_t* dst_v, 1342 int width); 1343 void ARGBToUVJRow_Any_MMI(const uint8_t* src_ptr, 1344 int src_stride_ptr, 1345 uint8_t* dst_u, 1346 uint8_t* dst_v, 1347 int width); 1348 void BGRAToUVRow_Any_MMI(const uint8_t* src_ptr, 1349 int src_stride_ptr, 1350 uint8_t* dst_u, 1351 uint8_t* dst_v, 1352 int width); 1353 void ABGRToUVRow_Any_MMI(const uint8_t* src_ptr, 1354 int src_stride_ptr, 1355 uint8_t* dst_u, 1356 uint8_t* dst_v, 1357 int width); 1358 void RGBAToUVRow_Any_MMI(const uint8_t* src_ptr, 1359 int src_stride_ptr, 1360 uint8_t* dst_u, 1361 uint8_t* dst_v, 1362 int width); 1363 void RGB24ToUVRow_Any_MMI(const uint8_t* src_ptr, 1364 int src_stride_ptr, 1365 uint8_t* dst_u, 1366 uint8_t* dst_v, 1367 int width); 1368 void RAWToUVRow_Any_MMI(const uint8_t* src_ptr, 1369 int src_stride_ptr, 1370 uint8_t* dst_u, 1371 uint8_t* dst_v, 1372 int width); 1373 void RGB565ToUVRow_Any_MMI(const uint8_t* src_ptr, 1374 int src_stride_ptr, 1375 uint8_t* dst_u, 1376 uint8_t* dst_v, 1377 int width); 1378 void ARGB1555ToUVRow_Any_MMI(const uint8_t* src_ptr, 1379 int src_stride_ptr, 1380 uint8_t* dst_u, 1381 uint8_t* dst_v, 1382 int width); 1383 void ARGB4444ToUVRow_Any_MMI(const uint8_t* src_ptr, 1150 1384 int src_stride_ptr, 1151 1385 uint8_t* dst_u, … … 1231 1465 void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width); 1232 1466 void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); 1467 void MirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width); 1233 1468 void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width); 1234 1469 void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); … … 1237 1472 void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1238 1473 void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1474 void MirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1239 1475 1240 1476 void MirrorUVRow_SSSE3(const uint8_t* src, … … 1250 1486 uint8_t* dst_v, 1251 1487 int width); 1488 void MirrorUVRow_MMI(const uint8_t* src_uv, 1489 uint8_t* dst_u, 1490 uint8_t* dst_v, 1491 int width); 1252 1492 void MirrorUVRow_C(const uint8_t* src_uv, 1253 1493 uint8_t* dst_u, … … 1259 1499 void ARGBMirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width); 1260 1500 void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); 1501 void ARGBMirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width); 1261 1502 void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width); 1262 1503 void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr, … … 1270 1511 int width); 1271 1512 void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1513 void ARGBMirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1272 1514 1273 1515 void SplitUVRow_C(const uint8_t* src_uv, … … 1291 1533 uint8_t* dst_v, 1292 1534 int width); 1535 void SplitUVRow_MMI(const uint8_t* src_uv, 1536 uint8_t* dst_u, 1537 uint8_t* dst_v, 1538 int width); 1293 1539 void SplitUVRow_Any_SSE2(const uint8_t* src_ptr, 1294 1540 uint8_t* dst_u, … … 1304 1550 int width); 1305 1551 void SplitUVRow_Any_MSA(const uint8_t* src_ptr, 1552 uint8_t* dst_u, 1553 uint8_t* dst_v, 1554 int width); 1555 void SplitUVRow_Any_MMI(const uint8_t* src_ptr, 1306 1556 uint8_t* dst_u, 1307 1557 uint8_t* dst_v, … … 1328 1578 uint8_t* dst_uv, 1329 1579 int width); 1580 void MergeUVRow_MMI(const uint8_t* src_u, 1581 const uint8_t* src_v, 1582 uint8_t* dst_uv, 1583 int width); 1330 1584 void MergeUVRow_Any_SSE2(const uint8_t* y_buf, 1331 1585 const uint8_t* uv_buf, … … 1341 1595 int width); 1342 1596 void MergeUVRow_Any_MSA(const uint8_t* y_buf, 1597 const uint8_t* uv_buf, 1598 uint8_t* dst_ptr, 1599 int width); 1600 void MergeUVRow_Any_MMI(const uint8_t* y_buf, 1343 1601 const uint8_t* uv_buf, 1344 1602 uint8_t* dst_ptr, … … 1360 1618 uint8_t* dst_b, 1361 1619 int width); 1620 void SplitRGBRow_MMI(const uint8_t* src_rgb, 1621 uint8_t* dst_r, 1622 uint8_t* dst_g, 1623 uint8_t* dst_b, 1624 int width); 1362 1625 void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr, 1363 1626 uint8_t* dst_r, … … 1370 1633 uint8_t* dst_b, 1371 1634 int width); 1635 void SplitRGBRow_Any_MMI(const uint8_t* src_ptr, 1636 uint8_t* dst_r, 1637 uint8_t* dst_g, 1638 uint8_t* dst_b, 1639 int width); 1372 1640 1373 1641 void MergeRGBRow_C(const uint8_t* src_r, … … 1386 1654 uint8_t* dst_rgb, 1387 1655 int width); 1656 void MergeRGBRow_MMI(const uint8_t* src_r, 1657 const uint8_t* src_g, 1658 const uint8_t* src_b, 1659 uint8_t* dst_rgb, 1660 int width); 1388 1661 void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf, 1389 1662 const uint8_t* u_buf, … … 1396 1669 uint8_t* dst_rgb, 1397 1670 int width); 1671 void MergeRGBRow_Any_MMI(const uint8_t* src_r, 1672 const uint8_t* src_g, 1673 const uint8_t* src_b, 1674 uint8_t* dst_rgb, 1675 int width); 1398 1676 1399 1677 void MergeUVRow_16_C(const uint16_t* src_u, … … 1474 1752 void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width); 1475 1753 void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width); 1754 void ARGBCopyAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width); 1476 1755 void ARGBCopyAlphaRow_Any_SSE2(const uint8_t* src_ptr, 1477 1756 uint8_t* dst_ptr, … … 1480 1759 uint8_t* dst_ptr, 1481 1760 int width); 1761 void ARGBCopyAlphaRow_Any_MMI(const uint8_t* src_ptr, 1762 uint8_t* dst_ptr, 1763 int width); 1482 1764 1483 1765 void ARGBExtractAlphaRow_C(const uint8_t* src_argb, uint8_t* dst_a, int width); … … 1494 1776 uint8_t* dst_a, 1495 1777 int width); 1778 void ARGBExtractAlphaRow_MMI(const uint8_t* src_argb, 1779 uint8_t* dst_a, 1780 int width); 1496 1781 void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr, 1497 1782 uint8_t* dst_ptr, … … 1506 1791 uint8_t* dst_ptr, 1507 1792 int width); 1793 void ARGBExtractAlphaRow_Any_MMI(const uint8_t* src_ptr, 1794 uint8_t* dst_ptr, 1795 int width); 1508 1796 1509 1797 void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width); 1510 1798 void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width); 1511 1799 void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width); 1800 void ARGBCopyYToAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width); 1512 1801 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr, 1513 1802 uint8_t* dst_ptr, … … 1516 1805 uint8_t* dst_ptr, 1517 1806 int width); 1807 void ARGBCopyYToAlphaRow_Any_MMI(const uint8_t* src_ptr, 1808 uint8_t* dst_ptr, 1809 int width); 1518 1810 1519 1811 void SetRow_C(uint8_t* dst, uint8_t v8, int width); … … 1553 1845 const uint8_t* shuffler, 1554 1846 int width); 1847 void ARGBShuffleRow_MMI(const uint8_t* src_argb, 1848 uint8_t* dst_argb, 1849 const uint8_t* shuffler, 1850 int width); 1555 1851 void ARGBShuffleRow_Any_SSSE3(const uint8_t* src_ptr, 1556 1852 uint8_t* dst_ptr, … … 1569 1865 const uint8_t* param, 1570 1866 int width); 1867 void ARGBShuffleRow_Any_MMI(const uint8_t* src_ptr, 1868 uint8_t* dst_ptr, 1869 const uint8_t* param, 1870 int width); 1571 1871 1572 1872 void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24, … … 1592 1892 int width); 1593 1893 void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width); 1894 void RGB24ToARGBRow_MMI(const uint8_t* src_rgb24, uint8_t* dst_argb, int width); 1594 1895 void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width); 1595 1896 void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width); 1897 void RAWToARGBRow_MMI(const uint8_t* src_raw, uint8_t* dst_argb, int width); 1596 1898 void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); 1597 1899 void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); 1900 void RAWToRGB24Row_MMI(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); 1598 1901 void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, 1599 1902 uint8_t* dst_argb, … … 1602 1905 uint8_t* dst_argb, 1603 1906 int width); 1907 void RGB565ToARGBRow_MMI(const uint8_t* src_rgb565, 1908 uint8_t* dst_argb, 1909 int width); 1604 1910 void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, 1605 1911 uint8_t* dst_argb, … … 1608 1914 uint8_t* dst_argb, 1609 1915 int width); 1916 void ARGB1555ToARGBRow_MMI(const uint8_t* src_argb1555, 1917 uint8_t* dst_argb, 1918 int width); 1610 1919 void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444, 1611 1920 uint8_t* dst_argb, 1612 1921 int width); 1613 1922 void ARGB4444ToARGBRow_MSA(const uint8_t* src_argb4444, 1923 uint8_t* dst_argb, 1924 int width); 1925 void ARGB4444ToARGBRow_MMI(const uint8_t* src_argb4444, 1614 1926 uint8_t* dst_argb, 1615 1927 int width); … … 1664 1976 uint8_t* dst_ptr, 1665 1977 int width); 1978 void RGB24ToARGBRow_Any_MMI(const uint8_t* src_ptr, 1979 uint8_t* dst_ptr, 1980 int width); 1666 1981 void RAWToARGBRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1667 1982 void RAWToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1983 void RAWToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1668 1984 void RAWToRGB24Row_Any_NEON(const uint8_t* src_ptr, 1669 1985 uint8_t* dst_ptr, 1670 1986 int width); 1671 1987 void RAWToRGB24Row_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1988 void RAWToRGB24Row_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1672 1989 void RGB565ToARGBRow_Any_NEON(const uint8_t* src_ptr, 1673 1990 uint8_t* dst_ptr, 1674 1991 int width); 1675 1992 void RGB565ToARGBRow_Any_MSA(const uint8_t* src_ptr, 1993 uint8_t* dst_ptr, 1994 int width); 1995 void RGB565ToARGBRow_Any_MMI(const uint8_t* src_ptr, 1676 1996 uint8_t* dst_ptr, 1677 1997 int width); … … 1682 2002 uint8_t* dst_ptr, 1683 2003 int width); 2004 void ARGB1555ToARGBRow_Any_MMI(const uint8_t* src_ptr, 2005 uint8_t* dst_ptr, 2006 int width); 1684 2007 void ARGB4444ToARGBRow_Any_NEON(const uint8_t* src_ptr, 1685 2008 uint8_t* dst_ptr, … … 1687 2010 1688 2011 void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr, 2012 uint8_t* dst_ptr, 2013 int width); 2014 void ARGB4444ToARGBRow_Any_MMI(const uint8_t* src_ptr, 1689 2015 uint8_t* dst_ptr, 1690 2016 int width); … … 1697 2023 void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width); 1698 2024 void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width); 2025 2026 void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width); 2027 void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width); 2028 2029 void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width); 1699 2030 1700 2031 void ARGBToRGB565DitherRow_C(const uint8_t* src_argb, … … 1752 2083 int width); 1753 2084 2085 void ARGBToRGB24Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width); 2086 void ARGBToRAWRow_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width); 2087 void ARGBToRGB565Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width); 2088 void ARGBToARGB1555Row_MMI(const uint8_t* src_argb, 2089 uint8_t* dst_rgb, 2090 int width); 2091 void ARGBToARGB4444Row_MMI(const uint8_t* src_argb, 2092 uint8_t* dst_rgb, 2093 int width); 2094 void ARGBToRGB565DitherRow_MMI(const uint8_t* src_argb, 2095 uint8_t* dst_rgb, 2096 const uint32_t dither4, 2097 int width); 2098 1754 2099 void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); 1755 2100 void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); … … 1765 2110 void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width); 1766 2111 void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width); 2112 void J400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width); 1767 2113 void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width); 1768 2114 void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, … … 1776 2122 int width); 1777 2123 void J400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2124 void J400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 1778 2125 1779 2126 void I444ToARGBRow_C(const uint8_t* src_y, … … 1980 2327 const struct YuvConstants* yuvconstants, 1981 2328 int width); 2329 void NV12ToRGB24Row_SSSE3(const uint8_t* src_y, 2330 const uint8_t* src_uv, 2331 uint8_t* dst_rgb24, 2332 const struct YuvConstants* yuvconstants, 2333 int width); 2334 void NV21ToRGB24Row_SSSE3(const uint8_t* src_y, 2335 const uint8_t* src_vu, 2336 uint8_t* dst_rgb24, 2337 const struct YuvConstants* yuvconstants, 2338 int width); 1982 2339 void NV12ToRGB565Row_SSSE3(const uint8_t* src_y, 1983 2340 const uint8_t* src_uv, … … 1985 2342 const struct YuvConstants* yuvconstants, 1986 2343 int width); 2344 void NV12ToRGB24Row_AVX2(const uint8_t* src_y, 2345 const uint8_t* src_uv, 2346 uint8_t* dst_rgb24, 2347 const struct YuvConstants* yuvconstants, 2348 int width); 2349 void NV21ToRGB24Row_AVX2(const uint8_t* src_y, 2350 const uint8_t* src_vu, 2351 uint8_t* dst_rgb24, 2352 const struct YuvConstants* yuvconstants, 2353 int width); 1987 2354 void NV12ToRGB565Row_AVX2(const uint8_t* src_y, 1988 2355 const uint8_t* src_uv, … … 2170 2537 const struct YuvConstants* yuvconstants, 2171 2538 int width); 2539 void NV12ToRGB24Row_Any_SSSE3(const uint8_t* y_buf, 2540 const uint8_t* uv_buf, 2541 uint8_t* dst_ptr, 2542 const struct YuvConstants* yuvconstants, 2543 int width); 2544 void NV21ToRGB24Row_Any_SSSE3(const uint8_t* y_buf, 2545 const uint8_t* uv_buf, 2546 uint8_t* dst_ptr, 2547 const struct YuvConstants* yuvconstants, 2548 int width); 2549 void NV12ToRGB24Row_Any_AVX2(const uint8_t* y_buf, 2550 const uint8_t* uv_buf, 2551 uint8_t* dst_ptr, 2552 const struct YuvConstants* yuvconstants, 2553 int width); 2554 void NV21ToRGB24Row_Any_AVX2(const uint8_t* y_buf, 2555 const uint8_t* uv_buf, 2556 uint8_t* dst_ptr, 2557 const struct YuvConstants* yuvconstants, 2558 int width); 2172 2559 void NV12ToRGB565Row_Any_SSSE3(const uint8_t* y_buf, 2173 2560 const uint8_t* uv_buf, … … 2256 2643 void I400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width); 2257 2644 void I400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width); 2645 void I400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width); 2258 2646 void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, 2259 2647 uint8_t* dst_ptr, … … 2266 2654 int width); 2267 2655 void I400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2656 void I400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2268 2657 2269 2658 // ARGB preattenuated alpha blend. … … 2277 2666 int width); 2278 2667 void ARGBBlendRow_MSA(const uint8_t* src_argb0, 2668 const uint8_t* src_argb1, 2669 uint8_t* dst_argb, 2670 int width); 2671 void ARGBBlendRow_MMI(const uint8_t* src_argb0, 2279 2672 const uint8_t* src_argb1, 2280 2673 uint8_t* dst_argb, … … 2306 2699 uint8_t* dst_ptr, 2307 2700 int width); 2701 void BlendPlaneRow_MMI(const uint8_t* src0, 2702 const uint8_t* src1, 2703 const uint8_t* alpha, 2704 uint8_t* dst, 2705 int width); 2706 void BlendPlaneRow_Any_MMI(const uint8_t* y_buf, 2707 const uint8_t* u_buf, 2708 const uint8_t* v_buf, 2709 uint8_t* dst_ptr, 2710 int width); 2308 2711 void BlendPlaneRow_C(const uint8_t* src0, 2309 2712 const uint8_t* src1, … … 2347 2750 int width); 2348 2751 void ARGBMultiplyRow_Any_MSA(const uint8_t* y_buf, 2752 const uint8_t* uv_buf, 2753 uint8_t* dst_ptr, 2754 int width); 2755 void ARGBMultiplyRow_MMI(const uint8_t* src_argb0, 2756 const uint8_t* src_argb1, 2757 uint8_t* dst_argb, 2758 int width); 2759 void ARGBMultiplyRow_Any_MMI(const uint8_t* y_buf, 2349 2760 const uint8_t* uv_buf, 2350 2761 uint8_t* dst_ptr, … … 2388 2799 uint8_t* dst_ptr, 2389 2800 int width); 2801 void ARGBAddRow_MMI(const uint8_t* src_argb0, 2802 const uint8_t* src_argb1, 2803 uint8_t* dst_argb, 2804 int width); 2805 void ARGBAddRow_Any_MMI(const uint8_t* y_buf, 2806 const uint8_t* uv_buf, 2807 uint8_t* dst_ptr, 2808 int width); 2390 2809 2391 2810 // ARGB subtract images. Same API as Blend, but these require … … 2424 2843 int width); 2425 2844 void ARGBSubtractRow_Any_MSA(const uint8_t* y_buf, 2845 const uint8_t* uv_buf, 2846 uint8_t* dst_ptr, 2847 int width); 2848 void ARGBSubtractRow_MMI(const uint8_t* src_argb0, 2849 const uint8_t* src_argb1, 2850 uint8_t* dst_argb, 2851 int width); 2852 void ARGBSubtractRow_Any_MMI(const uint8_t* y_buf, 2426 2853 const uint8_t* uv_buf, 2427 2854 uint8_t* dst_ptr, … … 2449 2876 uint8_t* dst_ptr, 2450 2877 int width); 2451 2878 void ARGBToRAWRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2879 void ARGBToRGB24Row_Any_AVX2(const uint8_t* src_ptr, 2880 uint8_t* dst_ptr, 2881 int width); 2882 void ARGBToRGB24Row_Any_AVX512VBMI(const uint8_t* src_ptr, 2883 uint8_t* dst_ptr, 2884 int width); 2452 2885 void ARGBToRGB565DitherRow_Any_SSE2(const uint8_t* src_ptr, 2453 2886 uint8_t* dst_ptr, … … 2506 2939 int width); 2507 2940 void ARGBToRGB565DitherRow_Any_MSA(const uint8_t* src_ptr, 2941 uint8_t* dst_ptr, 2942 const uint32_t param, 2943 int width); 2944 2945 void ARGBToRGB24Row_Any_MMI(const uint8_t* src_ptr, 2946 uint8_t* dst_ptr, 2947 int width); 2948 void ARGBToRAWRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2949 void ARGBToRGB565Row_Any_MMI(const uint8_t* src_ptr, 2950 uint8_t* dst_ptr, 2951 int width); 2952 void ARGBToARGB1555Row_Any_MMI(const uint8_t* src_ptr, 2953 uint8_t* dst_ptr, 2954 int width); 2955 void ARGBToARGB4444Row_Any_MMI(const uint8_t* src_ptr, 2956 uint8_t* dst_ptr, 2957 int width); 2958 void ARGBToRGB565DitherRow_Any_MMI(const uint8_t* src_ptr, 2508 2959 uint8_t* dst_ptr, 2509 2960 const uint32_t param, … … 2696 3147 int width); 2697 3148 void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width); 3149 void YUY2ToYRow_MMI(const uint8_t* src_yuy2, uint8_t* dst_y, int width); 2698 3150 void YUY2ToUVRow_MSA(const uint8_t* src_yuy2, 2699 3151 int src_stride_yuy2, … … 2701 3153 uint8_t* dst_v, 2702 3154 int width); 3155 void YUY2ToUVRow_MMI(const uint8_t* src_yuy2, 3156 int src_stride_yuy2, 3157 uint8_t* dst_u, 3158 uint8_t* dst_v, 3159 int width); 2703 3160 void YUY2ToUV422Row_MSA(const uint8_t* src_yuy2, 3161 uint8_t* dst_u, 3162 uint8_t* dst_v, 3163 int width); 3164 void YUY2ToUV422Row_MMI(const uint8_t* src_yuy2, 2704 3165 uint8_t* dst_u, 2705 3166 uint8_t* dst_v, … … 2746 3207 int width); 2747 3208 void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 3209 void YUY2ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2748 3210 void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr, 2749 3211 int src_stride_ptr, … … 2751 3213 uint8_t* dst_v, 2752 3214 int width); 3215 void YUY2ToUVRow_Any_MMI(const uint8_t* src_ptr, 3216 int src_stride_ptr, 3217 uint8_t* dst_u, 3218 uint8_t* dst_v, 3219 int width); 2753 3220 void YUY2ToUV422Row_Any_MSA(const uint8_t* src_ptr, 3221 uint8_t* dst_u, 3222 uint8_t* dst_v, 3223 int width); 3224 void YUY2ToUV422Row_Any_MMI(const uint8_t* src_ptr, 2754 3225 uint8_t* dst_u, 2755 3226 uint8_t* dst_v, … … 2796 3267 int width); 2797 3268 void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width); 3269 void UYVYToYRow_MMI(const uint8_t* src_uyvy, uint8_t* dst_y, int width); 2798 3270 void UYVYToUVRow_MSA(const uint8_t* src_uyvy, 2799 3271 int src_stride_uyvy, … … 2801 3273 uint8_t* dst_v, 2802 3274 int width); 3275 void UYVYToUVRow_MMI(const uint8_t* src_uyvy, 3276 int src_stride_uyvy, 3277 uint8_t* dst_u, 3278 uint8_t* dst_v, 3279 int width); 2803 3280 void UYVYToUV422Row_MSA(const uint8_t* src_uyvy, 3281 uint8_t* dst_u, 3282 uint8_t* dst_v, 3283 int width); 3284 void UYVYToUV422Row_MMI(const uint8_t* src_uyvy, 2804 3285 uint8_t* dst_u, 2805 3286 uint8_t* dst_v, … … 2847 3328 int width); 2848 3329 void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 3330 void UYVYToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); 2849 3331 void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr, 2850 3332 int src_stride_ptr, … … 2852 3334 uint8_t* dst_v, 2853 3335 int width); 3336 void UYVYToUVRow_Any_MMI(const uint8_t* src_ptr, 3337 int src_stride_ptr, 3338 uint8_t* dst_u, 3339 uint8_t* dst_v, 3340 int width); 2854 3341 void UYVYToUV422Row_Any_MSA(const uint8_t* src_ptr, 3342 uint8_t* dst_u, 3343 uint8_t* dst_v, 3344 int width); 3345 void UYVYToUV422Row_Any_MMI(const uint8_t* src_ptr, 2855 3346 uint8_t* dst_u, 2856 3347 uint8_t* dst_v, … … 2932 3423 uint8_t* dst_yuy2, 2933 3424 int width); 3425 void I422ToYUY2Row_MMI(const uint8_t* src_y, 3426 const uint8_t* src_u, 3427 const uint8_t* src_v, 3428 uint8_t* dst_yuy2, 3429 int width); 2934 3430 void I422ToUYVYRow_MSA(const uint8_t* src_y, 2935 3431 const uint8_t* src_u, … … 2937 3433 uint8_t* dst_uyvy, 2938 3434 int width); 3435 void I422ToUYVYRow_MMI(const uint8_t* src_y, 3436 const uint8_t* src_u, 3437 const uint8_t* src_v, 3438 uint8_t* dst_uyvy, 3439 int width); 2939 3440 void I422ToYUY2Row_Any_MSA(const uint8_t* y_buf, 2940 3441 const uint8_t* u_buf, … … 2942 3443 uint8_t* dst_ptr, 2943 3444 int width); 3445 void I422ToYUY2Row_Any_MMI(const uint8_t* y_buf, 3446 const uint8_t* u_buf, 3447 const uint8_t* v_buf, 3448 uint8_t* dst_ptr, 3449 int width); 2944 3450 void I422ToUYVYRow_Any_MSA(const uint8_t* y_buf, 2945 3451 const uint8_t* u_buf, … … 2947 3453 uint8_t* dst_ptr, 2948 3454 int width); 3455 void I422ToUYVYRow_Any_MMI(const uint8_t* y_buf, 3456 const uint8_t* u_buf, 3457 const uint8_t* v_buf, 3458 uint8_t* dst_ptr, 3459 int width); 2949 3460 2950 3461 // Effects related row functions. … … 2960 3471 int width); 2961 3472 void ARGBAttenuateRow_MSA(const uint8_t* src_argb, 3473 uint8_t* dst_argb, 3474 int width); 3475 void ARGBAttenuateRow_MMI(const uint8_t* src_argb, 2962 3476 uint8_t* dst_argb, 2963 3477 int width); … … 2974 3488 uint8_t* dst_ptr, 2975 3489 int width); 3490 void ARGBAttenuateRow_Any_MMI(const uint8_t* src_ptr, 3491 uint8_t* dst_ptr, 3492 int width); 2976 3493 2977 3494 // Inverse table for unattenuate, shared by C and SSE2. … … 2997 3514 void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width); 2998 3515 void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width); 3516 void ARGBGrayRow_MMI(const uint8_t* src_argb, uint8_t* dst_argb, int width); 2999 3517 3000 3518 void ARGBSepiaRow_C(uint8_t* dst_argb, int width); … … 3002 3520 void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width); 3003 3521 void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width); 3522 void ARGBSepiaRow_MMI(uint8_t* dst_argb, int width); 3004 3523 3005 3524 void ARGBColorMatrixRow_C(const uint8_t* src_argb, … … 3016 3535 int width); 3017 3536 void ARGBColorMatrixRow_MSA(const uint8_t* src_argb, 3537 uint8_t* dst_argb, 3538 const int8_t* matrix_argb, 3539 int width); 3540 void ARGBColorMatrixRow_MMI(const uint8_t* src_argb, 3018 3541 uint8_t* dst_argb, 3019 3542 const int8_t* matrix_argb, … … 3071 3594 int width, 3072 3595 uint32_t value); 3596 void ARGBShadeRow_MMI(const uint8_t* src_argb, 3597 uint8_t* dst_argb, 3598 int width, 3599 uint32_t value); 3073 3600 3074 3601 // Used for blur. … … 3083 3610 const int32_t* previous_cumsum, 3084 3611 int width); 3612 3613 void ComputeCumulativeSumRow_MMI(const uint8_t* row, 3614 int32_t* cumsum, 3615 const int32_t* previous_cumsum, 3616 int width); 3085 3617 3086 3618 void CumulativeSumToAverageRow_C(const int32_t* tl, … … 3134 3666 int width, 3135 3667 int source_y_fraction); 3668 void InterpolateRow_MMI(uint8_t* dst_ptr, 3669 const uint8_t* src_ptr, 3670 ptrdiff_t src_stride, 3671 int width, 3672 int source_y_fraction); 3136 3673 void InterpolateRow_Any_NEON(uint8_t* dst_ptr, 3137 3674 const uint8_t* src_ptr, … … 3150 3687 int source_y_fraction); 3151 3688 void InterpolateRow_Any_MSA(uint8_t* dst_ptr, 3689 const uint8_t* src_ptr, 3690 ptrdiff_t src_stride_ptr, 3691 int width, 3692 int source_y_fraction); 3693 void InterpolateRow_Any_MMI(uint8_t* dst_ptr, 3152 3694 const uint8_t* src_ptr, 3153 3695 ptrdiff_t src_stride_ptr, … … 3182 3724 uint8_t* dst_sobelx, 3183 3725 int width); 3726 void SobelXRow_MMI(const uint8_t* src_y0, 3727 const uint8_t* src_y1, 3728 const uint8_t* src_y2, 3729 uint8_t* dst_sobelx, 3730 int width); 3184 3731 void SobelYRow_C(const uint8_t* src_y0, 3185 3732 const uint8_t* src_y1, … … 3195 3742 int width); 3196 3743 void SobelYRow_MSA(const uint8_t* src_y0, 3744 const uint8_t* src_y1, 3745 uint8_t* dst_sobely, 3746 int width); 3747 void SobelYRow_MMI(const uint8_t* src_y0, 3197 3748 const uint8_t* src_y1, 3198 3749 uint8_t* dst_sobely, … … 3214 3765 uint8_t* dst_argb, 3215 3766 int width); 3767 void SobelRow_MMI(const uint8_t* src_sobelx, 3768 const uint8_t* src_sobely, 3769 uint8_t* dst_argb, 3770 int width); 3216 3771 void SobelToPlaneRow_C(const uint8_t* src_sobelx, 3217 3772 const uint8_t* src_sobely, … … 3227 3782 int width); 3228 3783 void SobelToPlaneRow_MSA(const uint8_t* src_sobelx, 3784 const uint8_t* src_sobely, 3785 uint8_t* dst_y, 3786 int width); 3787 void SobelToPlaneRow_MMI(const uint8_t* src_sobelx, 3229 3788 const uint8_t* src_sobely, 3230 3789 uint8_t* dst_y, … … 3246 3805 uint8_t* dst_argb, 3247 3806 int width); 3807 void SobelXYRow_MMI(const uint8_t* src_sobelx, 3808 const uint8_t* src_sobely, 3809 uint8_t* dst_argb, 3810 int width); 3248 3811 void SobelRow_Any_SSE2(const uint8_t* y_buf, 3249 3812 const uint8_t* uv_buf, … … 3255 3818 int width); 3256 3819 void SobelRow_Any_MSA(const uint8_t* y_buf, 3820 const uint8_t* uv_buf, 3821 uint8_t* dst_ptr, 3822 int width); 3823 void SobelRow_Any_MMI(const uint8_t* y_buf, 3257 3824 const uint8_t* uv_buf, 3258 3825 uint8_t* dst_ptr, … … 3270 3837 uint8_t* dst_ptr, 3271 3838 int width); 3839 void SobelToPlaneRow_Any_MMI(const uint8_t* y_buf, 3840 const uint8_t* uv_buf, 3841 uint8_t* dst_ptr, 3842 int width); 3272 3843 void SobelXYRow_Any_SSE2(const uint8_t* y_buf, 3273 3844 const uint8_t* uv_buf, … … 3279 3850 int width); 3280 3851 void SobelXYRow_Any_MSA(const uint8_t* y_buf, 3852 const uint8_t* uv_buf, 3853 uint8_t* dst_ptr, 3854 int width); 3855 void SobelXYRow_Any_MMI(const uint8_t* y_buf, 3281 3856 const uint8_t* uv_buf, 3282 3857 uint8_t* dst_ptr, … … 3359 3934 float scale, 3360 3935 int width); 3361 void ByteToFloatRow_Any_NEON(const uint8_t* src ,3362 float* dst ,3363 float scale,3936 void ByteToFloatRow_Any_NEON(const uint8_t* src_ptr, 3937 float* dst_ptr, 3938 float param, 3364 3939 int width); 3365 3940 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/scale_row.h
r235135 r239415 59 59 #define HAS_FIXEDDIV1_X86 60 60 #define HAS_FIXEDDIV_X86 61 #define HAS_SCALEADDROW_SSE2 61 62 #define HAS_SCALEARGBCOLS_SSE2 62 63 #define HAS_SCALEARGBCOLSUP2_SSE2 … … 70 71 #define HAS_SCALEROWDOWN38_SSSE3 71 72 #define HAS_SCALEROWDOWN4_SSSE3 72 #define HAS_SCALEADDROW_SSE273 73 #endif 74 74 … … 87 87 #if !defined(LIBYUV_DISABLE_NEON) && \ 88 88 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) 89 #define HAS_SCALEADDROW_NEON 89 90 #define HAS_SCALEARGBCOLS_NEON 91 #define HAS_SCALEARGBFILTERCOLS_NEON 90 92 #define HAS_SCALEARGBROWDOWN2_NEON 91 93 #define HAS_SCALEARGBROWDOWNEVEN_NEON … … 95 97 #define HAS_SCALEROWDOWN38_NEON 96 98 #define HAS_SCALEROWDOWN4_NEON 97 #define HAS_SCALEARGBFILTERCOLS_NEON98 99 #endif 99 100 … … 109 110 #define HAS_SCALEROWDOWN38_MSA 110 111 #define HAS_SCALEROWDOWN4_MSA 112 #endif 113 114 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 115 #define HAS_FIXEDDIV1_MIPS 116 #define HAS_FIXEDDIV_MIPS 117 #define HAS_SCALEADDROW_16_MMI 118 #define HAS_SCALEADDROW_MMI 119 #define HAS_SCALEARGBCOLS_MMI 120 #define HAS_SCALEARGBCOLSUP2_MMI 121 #define HAS_SCALEARGBROWDOWN2_MMI 122 #define HAS_SCALEARGBROWDOWNEVEN_MMI 123 #define HAS_SCALECOLS_16_MMI 124 #define HAS_SCALECOLS_MMI 125 #define HAS_SCALEROWDOWN2_16_MMI 126 #define HAS_SCALEROWDOWN2_MMI 127 #define HAS_SCALEROWDOWN4_16_MMI 128 #define HAS_SCALEROWDOWN4_MMI 111 129 #endif 112 130 … … 148 166 int FixedDiv_C(int num, int div); 149 167 int FixedDiv_X86(int num, int div); 168 int FixedDiv_MIPS(int num, int div); 150 169 // Divide num - 1 by div - 1 and return as 16.16 fixed point result. 151 170 int FixedDiv1_C(int num, int div); 152 171 int FixedDiv1_X86(int num, int div); 172 int FixedDiv1_MIPS(int num, int div); 153 173 #ifdef HAS_FIXEDDIV_X86 154 174 #define FixedDiv FixedDiv_X86 155 175 #define FixedDiv1 FixedDiv1_X86 176 #elif defined HAS_FIXEDDIV_MIPS 177 #define FixedDiv FixedDiv_MIPS 178 #define FixedDiv1 FixedDiv1_MIPS 156 179 #else 157 180 #define FixedDiv FixedDiv_C … … 570 593 int x, 571 594 int dx); 595 void ScaleARGBCols_MMI(uint8_t* dst_argb, 596 const uint8_t* src_argb, 597 int dst_width, 598 int x, 599 int dx); 600 void ScaleARGBCols_Any_MMI(uint8_t* dst_ptr, 601 const uint8_t* src_ptr, 602 int dst_width, 603 int x, 604 int dx); 572 605 573 606 // ARGB Row functions … … 605 638 int dst_width); 606 639 void ScaleARGBRowDown2Box_MSA(const uint8_t* src_argb, 640 ptrdiff_t src_stride, 641 uint8_t* dst_argb, 642 int dst_width); 643 void ScaleARGBRowDown2_MMI(const uint8_t* src_argb, 644 ptrdiff_t src_stride, 645 uint8_t* dst_argb, 646 int dst_width); 647 void ScaleARGBRowDown2Linear_MMI(const uint8_t* src_argb, 648 ptrdiff_t src_stride, 649 uint8_t* dst_argb, 650 int dst_width); 651 void ScaleARGBRowDown2Box_MMI(const uint8_t* src_argb, 607 652 ptrdiff_t src_stride, 608 653 uint8_t* dst_argb, … … 644 689 uint8_t* dst_ptr, 645 690 int dst_width); 646 691 void ScaleARGBRowDown2_Any_MMI(const uint8_t* src_ptr, 692 ptrdiff_t src_stride, 693 uint8_t* dst_ptr, 694 int dst_width); 695 void ScaleARGBRowDown2Linear_Any_MMI(const uint8_t* src_ptr, 696 ptrdiff_t src_stride, 697 uint8_t* dst_ptr, 698 int dst_width); 699 void ScaleARGBRowDown2Box_Any_MMI(const uint8_t* src_ptr, 700 ptrdiff_t src_stride, 701 uint8_t* dst_ptr, 702 int dst_width); 647 703 void ScaleARGBRowDownEven_SSE2(const uint8_t* src_argb, 648 704 ptrdiff_t src_stride, … … 671 727 int dst_width); 672 728 void ScaleARGBRowDownEvenBox_MSA(const uint8_t* src_argb, 729 ptrdiff_t src_stride, 730 int src_stepx, 731 uint8_t* dst_argb, 732 int dst_width); 733 void ScaleARGBRowDownEven_MMI(const uint8_t* src_argb, 734 ptrdiff_t src_stride, 735 int32_t src_stepx, 736 uint8_t* dst_argb, 737 int dst_width); 738 void ScaleARGBRowDownEvenBox_MMI(const uint8_t* src_argb, 673 739 ptrdiff_t src_stride, 674 740 int src_stepx, … … 701 767 int dst_width); 702 768 void ScaleARGBRowDownEvenBox_Any_MSA(const uint8_t* src_ptr, 769 ptrdiff_t src_stride, 770 int src_stepx, 771 uint8_t* dst_ptr, 772 int dst_width); 773 void ScaleARGBRowDownEven_Any_MMI(const uint8_t* src_ptr, 774 ptrdiff_t src_stride, 775 int32_t src_stepx, 776 uint8_t* dst_ptr, 777 int dst_width); 778 void ScaleARGBRowDownEvenBox_Any_MMI(const uint8_t* src_ptr, 703 779 ptrdiff_t src_stride, 704 780 int src_stepx, … … 937 1013 int dst_width); 938 1014 1015 void ScaleRowDown2_MMI(const uint8_t* src_ptr, 1016 ptrdiff_t src_stride, 1017 uint8_t* dst, 1018 int dst_width); 1019 void ScaleRowDown2_16_MMI(const uint16_t* src_ptr, 1020 ptrdiff_t src_stride, 1021 uint16_t* dst, 1022 int dst_width); 1023 void ScaleRowDown2Linear_MMI(const uint8_t* src_ptr, 1024 ptrdiff_t src_stride, 1025 uint8_t* dst, 1026 int dst_width); 1027 void ScaleRowDown2Linear_16_MMI(const uint16_t* src_ptr, 1028 ptrdiff_t src_stride, 1029 uint16_t* dst, 1030 int dst_width); 1031 void ScaleRowDown2Box_MMI(const uint8_t* src_ptr, 1032 ptrdiff_t src_stride, 1033 uint8_t* dst, 1034 int dst_width); 1035 void ScaleRowDown2Box_16_MMI(const uint16_t* src_ptr, 1036 ptrdiff_t src_stride, 1037 uint16_t* dst, 1038 int dst_width); 1039 void ScaleRowDown2Box_Odd_MMI(const uint8_t* src_ptr, 1040 ptrdiff_t src_stride, 1041 uint8_t* dst, 1042 int dst_width); 1043 void ScaleRowDown4_MMI(const uint8_t* src_ptr, 1044 ptrdiff_t src_stride, 1045 uint8_t* dst, 1046 int dst_width); 1047 void ScaleRowDown4_16_MMI(const uint16_t* src_ptr, 1048 ptrdiff_t src_stride, 1049 uint16_t* dst, 1050 int dst_width); 1051 void ScaleRowDown4Box_MMI(const uint8_t* src_ptr, 1052 ptrdiff_t src_stride, 1053 uint8_t* dst, 1054 int dst_width); 1055 void ScaleRowDown4Box_16_MMI(const uint16_t* src_ptr, 1056 ptrdiff_t src_stride, 1057 uint16_t* dst, 1058 int dst_width); 1059 void ScaleAddRow_MMI(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width); 1060 void ScaleAddRow_16_MMI(const uint16_t* src_ptr, 1061 uint32_t* dst_ptr, 1062 int src_width); 1063 void ScaleColsUp2_MMI(uint8_t* dst_ptr, 1064 const uint8_t* src_ptr, 1065 int dst_width, 1066 int x, 1067 int dx); 1068 void ScaleColsUp2_16_MMI(uint16_t* dst_ptr, 1069 const uint16_t* src_ptr, 1070 int dst_width, 1071 int x, 1072 int dx); 1073 void ScaleARGBColsUp2_MMI(uint8_t* dst_argb, 1074 const uint8_t* src_argb, 1075 int dst_width, 1076 int x, 1077 int dx); 1078 1079 void ScaleRowDown2_Any_MMI(const uint8_t* src_ptr, 1080 ptrdiff_t src_stride, 1081 uint8_t* dst_ptr, 1082 int dst_width); 1083 void ScaleRowDown2Linear_Any_MMI(const uint8_t* src_ptr, 1084 ptrdiff_t src_stride, 1085 uint8_t* dst_ptr, 1086 int dst_width); 1087 void ScaleRowDown2Box_Any_MMI(const uint8_t* src_ptr, 1088 ptrdiff_t src_stride, 1089 uint8_t* dst_ptr, 1090 int dst_width); 1091 void ScaleRowDown4_Any_MMI(const uint8_t* src_ptr, 1092 ptrdiff_t src_stride, 1093 uint8_t* dst_ptr, 1094 int dst_width); 1095 void ScaleRowDown4Box_Any_MMI(const uint8_t* src_ptr, 1096 ptrdiff_t src_stride, 1097 uint8_t* dst_ptr, 1098 int dst_width); 1099 void ScaleAddRow_Any_MMI(const uint8_t* src_ptr, 1100 uint16_t* dst_ptr, 1101 int src_width); 939 1102 #ifdef __cplusplus 940 1103 } // extern "C" -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/version.h
r235135 r239415 12 12 #define INCLUDE_LIBYUV_VERSION_H_ 13 13 14 #define LIBYUV_VERSION 17 0314 #define LIBYUV_VERSION 1722 15 15 16 16 #endif // INCLUDE_LIBYUV_VERSION_H_ -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/include/libyuv/video_common.h
r235135 r239415 31 31 #define FOURCC(a, b, c, d) \ 32 32 ((static_cast<uint32_t>(a)) | (static_cast<uint32_t>(b) << 8) | \ 33 (static_cast<uint32_t>(c) << 16) | (static_cast<uint32_t>(d) << 24)) 33 (static_cast<uint32_t>(c) << 16) | /* NOLINT */ \ 34 (static_cast<uint32_t>(d) << 24)) /* NOLINT */ 34 35 #else 35 36 #define FOURCC(a, b, c, d) \ … … 80 81 FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), 81 82 82 // 7Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias.83 // 8 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. 83 84 FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), 84 85 FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), … … 88 89 FOURCC_J400 = FOURCC('J', '4', '0', '0'), // unofficial fourcc 89 90 FOURCC_H420 = FOURCC('H', '4', '2', '0'), // unofficial fourcc 91 FOURCC_H422 = FOURCC('H', '4', '2', '2'), // unofficial fourcc 90 92 91 93 // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. … … 156 158 FOURCC_BPP_J400 = 8, 157 159 FOURCC_BPP_H420 = 12, 160 FOURCC_BPP_H422 = 16, 158 161 FOURCC_BPP_H010 = 24, 159 162 FOURCC_BPP_MJPG = 0, // 0 means unknown. -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/infra/config/PRESUBMIT.py
r239414 r239415 1 # Copyright 201 3The LibYuv Project Authors. All rights reserved.1 # Copyright 2018 The LibYuv Project Authors. All rights reserved. 2 2 # 3 3 # Use of this source code is governed by a BSD-style license … … 7 7 # be found in the AUTHORS file in the root of the source tree. 8 8 9 # all.gyp and All target are for benefit of android gyp build. 10 { 11 'targets': [ 12 { 13 'target_name': 'All', 14 'type': 'none', 15 'dependencies': [ 16 'libyuv.gyp:*', 17 'libyuv_test.gyp:*', 18 ], 19 }, 20 ], 21 } 9 10 def CheckChangeOnUpload(input_api, output_api): 11 return input_api.canned_checks.CheckChangedLUCIConfigs(input_api, output_api) 12 13 14 def CheckChangeOnCommit(input_api, output_api): 15 return input_api.canned_checks.CheckChangedLUCIConfigs(input_api, output_api) -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/infra/config/cq.cfg
r229378 r239415 3 3 4 4 version: 1 5 cq_name: "libyuv"6 5 cq_status_url: "https://chromium-cq-status.appspot.com" 7 6 git_repo_url: "https://chromium.googlesource.com/libyuv/libyuv.git" … … 17 16 try_job { 18 17 buckets { 19 name: " master.tryserver.libyuv"18 name: "luci.libyuv.try" 20 19 builders { name: "win" } 21 20 builders { name: "win_rel" } … … 48 47 builders { name: "android_x86" } 49 48 builders { name: "android_x64" } 50 builders {51 name: "android_mips"52 experiment_percentage: 10053 }54 49 } 55 50 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/libyuv.gni
r210942 r239415 14 14 libyuv_include_tests = !build_with_chromium 15 15 libyuv_disable_jpeg = false 16 libyuv_use_neon = (current_cpu == "arm64" || 17 (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))) 18 libyuv_use_msa = (current_cpu == "mips64el" || current_cpu == "mipsel") && 19 mips_use_msa 16 libyuv_use_neon = 17 current_cpu == "arm64" || 18 (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) 19 libyuv_use_msa = 20 (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa 21 libyuv_use_mmi = 22 (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_mmi 20 23 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/linux.mk
r235135 r239415 14 14 source/compare_common.o \ 15 15 source/compare_gcc.o \ 16 source/compare_mmi.o \ 17 source/compare_msa.o \ 16 18 source/compare_neon64.o \ 17 19 source/compare_neon.o \ … … 33 35 source/rotate_common.o \ 34 36 source/rotate_gcc.o \ 37 source/rotate_mmi.o \ 38 source/rotate_msa.o \ 35 39 source/rotate_neon64.o \ 36 40 source/rotate_neon.o \ … … 39 43 source/row_common.o \ 40 44 source/row_gcc.o \ 45 source/row_mmi.o \ 46 source/row_msa.o \ 41 47 source/row_neon64.o \ 42 48 source/row_neon.o \ … … 47 53 source/scale_common.o \ 48 54 source/scale_gcc.o \ 55 source/scale_mmi.o \ 56 source/scale_msa.o \ 49 57 source/scale_neon64.o \ 50 58 source/scale_neon.o \ -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/compare.cc
r235135 r239415 155 155 } 156 156 #endif 157 #if defined(HAS_HAMMINGDISTANCE_MMI) 158 if (TestCpuFlag(kCpuHasMMI)) { 159 HammingDistance = HammingDistance_MMI; 160 } 161 #endif 162 157 163 #ifdef _OPENMP 158 164 #pragma omp parallel for reduction(+ : diff) … … 209 215 if (TestCpuFlag(kCpuHasMSA)) { 210 216 SumSquareError = SumSquareError_MSA; 217 } 218 #endif 219 #if defined(HAS_SUMSQUAREERROR_MMI) 220 if (TestCpuFlag(kCpuHasMMI)) { 221 SumSquareError = SumSquareError_MMI; 211 222 } 212 223 #endif -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/compare_common.cc
r235135 r239415 56 56 int i; 57 57 for (i = 0; i < count - 3; i += 4) { 58 uint32_t x = *(( uint32_t*)src_a) ^ *((uint32_t*)src_b); // NOLINT58 uint32_t x = *((const uint32_t*)src_a) ^ *((const uint32_t*)src_b); 59 59 uint32_t u = x - ((x >> 1) & 0x55555555); 60 60 u = ((u >> 2) & 0x33333333) + (u & 0x33333333); -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert.cc
r235135 r239415 216 216 } 217 217 218 // TODO(fbarchard): Implement row conversion. 219 LIBYUV_API 220 int I422ToNV21(const uint8_t* src_y, 221 int src_stride_y, 222 const uint8_t* src_u, 223 int src_stride_u, 224 const uint8_t* src_v, 225 int src_stride_v, 226 uint8_t* dst_y, 227 int dst_stride_y, 228 uint8_t* dst_vu, 229 int dst_stride_vu, 230 int width, 231 int height) { 232 int halfwidth = (width + 1) >> 1; 233 int halfheight = (height + 1) >> 1; 234 // Negative height means invert the image. 235 if (height < 0) { 236 height = -height; 237 halfheight = (height + 1) >> 1; 238 src_y = src_y + (height - 1) * src_stride_y; 239 src_u = src_u + (height - 1) * src_stride_u; 240 src_v = src_v + (height - 1) * src_stride_v; 241 src_stride_y = -src_stride_y; 242 src_stride_u = -src_stride_u; 243 src_stride_v = -src_stride_v; 244 } 245 246 // Allocate u and v buffers 247 align_buffer_64(plane_u, halfwidth * halfheight * 2); 248 uint8_t* plane_v = plane_u + halfwidth * halfheight; 249 250 I422ToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, 251 dst_y, dst_stride_y, plane_u, halfwidth, plane_v, halfwidth, width, 252 height); 253 MergeUVPlane(plane_v, halfwidth, plane_u, halfwidth, dst_vu, dst_stride_vu, 254 halfwidth, halfheight); 255 free_aligned_buffer_64(plane_u); 256 return 0; 257 } 258 259 #ifdef I422TONV21_ROW_VERSION 260 // Unittest fails for this version. 261 // 422 chroma is 1/2 width, 1x height 262 // 420 chroma is 1/2 width, 1/2 height 263 // Swap src_u and src_v to implement I422ToNV12 264 LIBYUV_API 265 int I422ToNV21(const uint8_t* src_y, 266 int src_stride_y, 267 const uint8_t* src_u, 268 int src_stride_u, 269 const uint8_t* src_v, 270 int src_stride_v, 271 uint8_t* dst_y, 272 int dst_stride_y, 273 uint8_t* dst_vu, 274 int dst_stride_vu, 275 int width, 276 int height) { 277 int y; 278 void (*MergeUVRow)(const uint8_t* src_u, const uint8_t* src_v, 279 uint8_t* dst_uv, int width) = MergeUVRow_C; 280 void (*InterpolateRow)(uint8_t * dst_ptr, const uint8_t* src_ptr, 281 ptrdiff_t src_stride, int dst_width, 282 int source_y_fraction) = InterpolateRow_C; 283 int halfwidth = (width + 1) >> 1; 284 int halfheight = (height + 1) >> 1; 285 if (!src_u || !src_v || !dst_vu || width <= 0 || height == 0) { 286 return -1; 287 } 288 // Negative height means invert the image. 289 if (height < 0) { 290 height = -height; 291 halfheight = (height + 1) >> 1; 292 src_y = src_y + (height - 1) * src_stride_y; 293 src_u = src_u + (halfheight - 1) * src_stride_u; 294 src_v = src_v + (halfheight - 1) * src_stride_v; 295 src_stride_y = -src_stride_y; 296 src_stride_u = -src_stride_u; 297 src_stride_v = -src_stride_v; 298 } 299 #if defined(HAS_MERGEUVROW_SSE2) 300 if (TestCpuFlag(kCpuHasSSE2)) { 301 MergeUVRow = MergeUVRow_Any_SSE2; 302 if (IS_ALIGNED(halfwidth, 16)) { 303 MergeUVRow = MergeUVRow_SSE2; 304 } 305 } 306 #endif 307 #if defined(HAS_MERGEUVROW_AVX2) 308 if (TestCpuFlag(kCpuHasAVX2)) { 309 MergeUVRow = MergeUVRow_Any_AVX2; 310 if (IS_ALIGNED(halfwidth, 32)) { 311 MergeUVRow = MergeUVRow_AVX2; 312 } 313 } 314 #endif 315 #if defined(HAS_MERGEUVROW_NEON) 316 if (TestCpuFlag(kCpuHasNEON)) { 317 MergeUVRow = MergeUVRow_Any_NEON; 318 if (IS_ALIGNED(halfwidth, 16)) { 319 MergeUVRow = MergeUVRow_NEON; 320 } 321 } 322 #endif 323 #if defined(HAS_MERGEUVROW_MSA) 324 if (TestCpuFlag(kCpuHasMSA)) { 325 MergeUVRow = MergeUVRow_Any_MSA; 326 if (IS_ALIGNED(halfwidth, 16)) { 327 MergeUVRow = MergeUVRow_MSA; 328 } 329 } 330 #endif 331 #if defined(HAS_MERGEUVROW_MMI) 332 if (TestCpuFlag(kCpuHasMMI)) { 333 MergeUVRow = MergeUVRow_Any_MMI; 334 if (IS_ALIGNED(halfwidth, 8)) { 335 MergeUVRow = MergeUVRow_MMI; 336 } 337 } 338 #endif 339 #if defined(HAS_INTERPOLATEROW_SSSE3) 340 if (TestCpuFlag(kCpuHasSSSE3)) { 341 InterpolateRow = InterpolateRow_Any_SSSE3; 342 if (IS_ALIGNED(width, 16)) { 343 InterpolateRow = InterpolateRow_SSSE3; 344 } 345 } 346 #endif 347 #if defined(HAS_INTERPOLATEROW_AVX2) 348 if (TestCpuFlag(kCpuHasAVX2)) { 349 InterpolateRow = InterpolateRow_Any_AVX2; 350 if (IS_ALIGNED(width, 32)) { 351 InterpolateRow = InterpolateRow_AVX2; 352 } 353 } 354 #endif 355 #if defined(HAS_INTERPOLATEROW_NEON) 356 if (TestCpuFlag(kCpuHasNEON)) { 357 InterpolateRow = InterpolateRow_Any_NEON; 358 if (IS_ALIGNED(width, 16)) { 359 InterpolateRow = InterpolateRow_NEON; 360 } 361 } 362 #endif 363 #if defined(HAS_INTERPOLATEROW_MSA) 364 if (TestCpuFlag(kCpuHasMSA)) { 365 InterpolateRow = InterpolateRow_Any_MSA; 366 if (IS_ALIGNED(width, 32)) { 367 InterpolateRow = InterpolateRow_MSA; 368 } 369 } 370 #endif 371 #if defined(HAS_INTERPOLATEROW_MMI) 372 if (TestCpuFlag(kCpuHasMMI)) { 373 InterpolateRow = InterpolateRow_Any_MMI; 374 if (IS_ALIGNED(width, 8)) { 375 InterpolateRow = InterpolateRow_MMI; 376 } 377 } 378 #endif 379 380 if (dst_y) { 381 CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, halfwidth, height); 382 } 383 { 384 // Allocate 2 rows of vu. 385 int awidth = halfwidth * 2; 386 align_buffer_64(row_vu_0, awidth * 2); 387 uint8_t* row_vu_1 = row_vu_0 + awidth; 388 389 for (y = 0; y < height - 1; y += 2) { 390 MergeUVRow(src_v, src_u, row_vu_0, halfwidth); 391 MergeUVRow(src_v + src_stride_v, src_u + src_stride_u, row_vu_1, 392 halfwidth); 393 InterpolateRow(dst_vu, row_vu_0, awidth, awidth, 128); 394 src_u += src_stride_u * 2; 395 src_v += src_stride_v * 2; 396 dst_vu += dst_stride_vu; 397 } 398 if (height & 1) { 399 MergeUVRow(src_v, src_u, dst_vu, halfwidth); 400 } 401 free_aligned_buffer_64(row_vu_0); 402 } 403 return 0; 404 } 405 #endif // I422TONV21_ROW_VERSION 406 218 407 // 444 chroma is 1x width, 1x height 219 408 // 420 chroma is 1/2 width, 1/2 height … … 238 427 } 239 428 429 // TODO(fbarchard): Implement row conversion. 430 LIBYUV_API 431 int I444ToNV21(const uint8_t* src_y, 432 int src_stride_y, 433 const uint8_t* src_u, 434 int src_stride_u, 435 const uint8_t* src_v, 436 int src_stride_v, 437 uint8_t* dst_y, 438 int dst_stride_y, 439 uint8_t* dst_vu, 440 int dst_stride_vu, 441 int width, 442 int height) { 443 int halfwidth = (width + 1) >> 1; 444 int halfheight = (height + 1) >> 1; 445 // Negative height means invert the image. 446 if (height < 0) { 447 height = -height; 448 halfheight = (height + 1) >> 1; 449 src_y = src_y + (height - 1) * src_stride_y; 450 src_u = src_u + (height - 1) * src_stride_u; 451 src_v = src_v + (height - 1) * src_stride_v; 452 src_stride_y = -src_stride_y; 453 src_stride_u = -src_stride_u; 454 src_stride_v = -src_stride_v; 455 } 456 // Allocate u and v buffers 457 align_buffer_64(plane_u, halfwidth * halfheight * 2); 458 uint8_t* plane_v = plane_u + halfwidth * halfheight; 459 460 I444ToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, 461 dst_y, dst_stride_y, plane_u, halfwidth, plane_v, halfwidth, width, 462 height); 463 MergeUVPlane(plane_v, halfwidth, plane_u, halfwidth, dst_vu, dst_stride_vu, 464 halfwidth, halfheight); 465 free_aligned_buffer_64(plane_u); 466 return 0; 467 } 468 240 469 // I400 is greyscale typically used in MJPG 241 470 LIBYUV_API … … 267 496 SetPlane(dst_u, dst_stride_u, halfwidth, halfheight, 128); 268 497 SetPlane(dst_v, dst_stride_v, halfwidth, halfheight, 128); 498 return 0; 499 } 500 501 // I400 is greyscale typically used in MJPG 502 LIBYUV_API 503 int I400ToNV21(const uint8_t* src_y, 504 int src_stride_y, 505 uint8_t* dst_y, 506 int dst_stride_y, 507 uint8_t* dst_vu, 508 int dst_stride_vu, 509 int width, 510 int height) { 511 int halfwidth = (width + 1) >> 1; 512 int halfheight = (height + 1) >> 1; 513 if (!dst_vu || width <= 0 || height == 0) { 514 return -1; 515 } 516 // Negative height means invert the image. 517 if (height < 0) { 518 height = -height; 519 halfheight = (height + 1) >> 1; 520 src_y = src_y + (height - 1) * src_stride_y; 521 src_stride_y = -src_stride_y; 522 } 523 if (dst_y) { 524 CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); 525 } 526 SetPlane(dst_vu, dst_stride_vu, halfwidth * 2, halfheight, 128); 269 527 return 0; 270 528 } … … 503 761 } 504 762 #endif 763 #if defined(HAS_YUY2TOYROW_MMI) 764 if (TestCpuFlag(kCpuHasMMI)) { 765 YUY2ToYRow = YUY2ToYRow_Any_MMI; 766 YUY2ToUVRow = YUY2ToUVRow_Any_MMI; 767 if (IS_ALIGNED(width, 8)) { 768 YUY2ToYRow = YUY2ToYRow_MMI; 769 if (IS_ALIGNED(width, 16)) { 770 YUY2ToUVRow = YUY2ToUVRow_MMI; 771 } 772 } 773 } 774 #endif 505 775 506 776 for (y = 0; y < height - 1; y += 2) { … … 584 854 } 585 855 #endif 856 #if defined(HAS_UYVYTOYROW_MMI) 857 if (TestCpuFlag(kCpuHasMMI)) { 858 UYVYToYRow = UYVYToYRow_Any_MMI; 859 UYVYToUVRow = UYVYToUVRow_Any_MMI; 860 if (IS_ALIGNED(width, 16)) { 861 UYVYToYRow = UYVYToYRow_MMI; 862 UYVYToUVRow = UYVYToUVRow_MMI; 863 } 864 } 865 #endif 586 866 587 867 for (y = 0; y < height - 1; y += 2) { … … 680 960 } 681 961 #endif 962 #if defined(HAS_ARGBTOYROW_MMI) 963 if (TestCpuFlag(kCpuHasMMI)) { 964 ARGBToYRow = ARGBToYRow_Any_MMI; 965 if (IS_ALIGNED(width, 8)) { 966 ARGBToYRow = ARGBToYRow_MMI; 967 } 968 } 969 #endif 970 #if defined(HAS_ARGBTOUVROW_MMI) 971 if (TestCpuFlag(kCpuHasMMI)) { 972 ARGBToUVRow = ARGBToUVRow_Any_MMI; 973 if (IS_ALIGNED(width, 16)) { 974 ARGBToUVRow = ARGBToUVRow_MMI; 975 } 976 } 977 #endif 682 978 683 979 for (y = 0; y < height - 1; y += 2) { … … 766 1062 } 767 1063 #endif 1064 #if defined(HAS_BGRATOYROW_MMI) 1065 if (TestCpuFlag(kCpuHasMMI)) { 1066 BGRAToYRow = BGRAToYRow_Any_MMI; 1067 if (IS_ALIGNED(width, 8)) { 1068 BGRAToYRow = BGRAToYRow_MMI; 1069 } 1070 } 1071 #endif 1072 #if defined(HAS_BGRATOUVROW_MMI) 1073 if (TestCpuFlag(kCpuHasMMI)) { 1074 BGRAToUVRow = BGRAToUVRow_Any_MMI; 1075 if (IS_ALIGNED(width, 16)) { 1076 BGRAToUVRow = BGRAToUVRow_MMI; 1077 } 1078 } 1079 #endif 768 1080 769 1081 for (y = 0; y < height - 1; y += 2) { … … 852 1164 } 853 1165 #endif 1166 #if defined(HAS_ABGRTOYROW_MMI) 1167 if (TestCpuFlag(kCpuHasMMI)) { 1168 ABGRToYRow = ABGRToYRow_Any_MMI; 1169 if (IS_ALIGNED(width, 8)) { 1170 ABGRToYRow = ABGRToYRow_MMI; 1171 } 1172 } 1173 #endif 1174 #if defined(HAS_ABGRTOUVROW_MMI) 1175 if (TestCpuFlag(kCpuHasMMI)) { 1176 ABGRToUVRow = ABGRToUVRow_Any_MMI; 1177 if (IS_ALIGNED(width, 16)) { 1178 ABGRToUVRow = ABGRToUVRow_MMI; 1179 } 1180 } 1181 #endif 854 1182 855 1183 for (y = 0; y < height - 1; y += 2) { … … 938 1266 } 939 1267 #endif 1268 #if defined(HAS_RGBATOYROW_MMI) 1269 if (TestCpuFlag(kCpuHasMMI)) { 1270 RGBAToYRow = RGBAToYRow_Any_MMI; 1271 if (IS_ALIGNED(width, 8)) { 1272 RGBAToYRow = RGBAToYRow_MMI; 1273 } 1274 } 1275 #endif 1276 #if defined(HAS_RGBATOUVROW_MMI) 1277 if (TestCpuFlag(kCpuHasMMI)) { 1278 RGBAToUVRow = RGBAToUVRow_Any_MMI; 1279 if (IS_ALIGNED(width, 16)) { 1280 RGBAToUVRow = RGBAToUVRow_MMI; 1281 } 1282 } 1283 #endif 940 1284 941 1285 for (y = 0; y < height - 1; y += 2) { … … 968 1312 int height) { 969 1313 int y; 970 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA)) 1314 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ 1315 defined(HAS_RGB24TOYROW_MMI)) 971 1316 void (*RGB24ToUVRow)(const uint8_t* src_rgb24, int src_stride_rgb24, 972 1317 uint8_t* dst_u, uint8_t* dst_v, int width) = … … 1014 1359 } 1015 1360 } 1361 #elif defined(HAS_RGB24TOYROW_MMI) 1362 if (TestCpuFlag(kCpuHasMMI)) { 1363 RGB24ToUVRow = RGB24ToUVRow_Any_MMI; 1364 RGB24ToYRow = RGB24ToYRow_Any_MMI; 1365 if (IS_ALIGNED(width, 8)) { 1366 RGB24ToYRow = RGB24ToYRow_MMI; 1367 if (IS_ALIGNED(width, 16)) { 1368 RGB24ToUVRow = RGB24ToUVRow_MMI; 1369 } 1370 } 1371 } 1016 1372 // Other platforms do intermediate conversion from RGB24 to ARGB. 1017 1373 #else … … 1047 1403 1048 1404 { 1049 #if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA)) 1405 #if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ 1406 defined(HAS_RGB24TOYROW_MMI)) 1050 1407 // Allocate 2 rows of ARGB. 1051 1408 const int kRowSize = (width * 4 + 31) & ~31; … … 1054 1411 1055 1412 for (y = 0; y < height - 1; y += 2) { 1056 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA)) 1413 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ 1414 defined(HAS_RGB24TOYROW_MMI)) 1057 1415 RGB24ToUVRow(src_rgb24, src_stride_rgb24, dst_u, dst_v, width); 1058 1416 RGB24ToYRow(src_rgb24, dst_y, width); … … 1071 1429 } 1072 1430 if (height & 1) { 1073 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA)) 1431 #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ 1432 defined(HAS_RGB24TOYROW_MMI)) 1074 1433 RGB24ToUVRow(src_rgb24, 0, dst_u, dst_v, width); 1075 1434 RGB24ToYRow(src_rgb24, dst_y, width); … … 1080 1439 #endif 1081 1440 } 1082 #if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA)) 1441 #if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ 1442 defined(HAS_RGB24TOYROW_MMI)) 1083 1443 free_aligned_buffer_64(row); 1084 1444 #endif … … 1100 1460 int height) { 1101 1461 int y; 1102 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA)) 1462 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ 1463 defined(HAS_RAWTOYROW_MMI)) 1103 1464 void (*RAWToUVRow)(const uint8_t* src_raw, int src_stride_raw, uint8_t* dst_u, 1104 1465 uint8_t* dst_v, int width) = RAWToUVRow_C; … … 1145 1506 } 1146 1507 } 1508 #elif defined(HAS_RAWTOYROW_MMI) 1509 if (TestCpuFlag(kCpuHasMMI)) { 1510 RAWToUVRow = RAWToUVRow_Any_MMI; 1511 RAWToYRow = RAWToYRow_Any_MMI; 1512 if (IS_ALIGNED(width, 8)) { 1513 RAWToYRow = RAWToYRow_MMI; 1514 if (IS_ALIGNED(width, 16)) { 1515 RAWToUVRow = RAWToUVRow_MMI; 1516 } 1517 } 1518 } 1147 1519 // Other platforms do intermediate conversion from RAW to ARGB. 1148 1520 #else … … 1178 1550 1179 1551 { 1180 #if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA)) 1552 #if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ 1553 defined(HAS_RAWTOYROW_MMI)) 1181 1554 // Allocate 2 rows of ARGB. 1182 1555 const int kRowSize = (width * 4 + 31) & ~31; … … 1185 1558 1186 1559 for (y = 0; y < height - 1; y += 2) { 1187 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA)) 1560 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ 1561 defined(HAS_RAWTOYROW_MMI)) 1188 1562 RAWToUVRow(src_raw, src_stride_raw, dst_u, dst_v, width); 1189 1563 RAWToYRow(src_raw, dst_y, width); … … 1202 1576 } 1203 1577 if (height & 1) { 1204 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA)) 1578 #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ 1579 defined(HAS_RAWTOYROW_MMI)) 1205 1580 RAWToUVRow(src_raw, 0, dst_u, dst_v, width); 1206 1581 RAWToYRow(src_raw, dst_y, width); … … 1211 1586 #endif 1212 1587 } 1213 #if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA)) 1588 #if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ 1589 defined(HAS_RAWTOYROW_MMI)) 1214 1590 free_aligned_buffer_64(row); 1215 1591 #endif … … 1231 1607 int height) { 1232 1608 int y; 1233 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA)) 1609 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ 1610 defined(HAS_RGB565TOYROW_MMI)) 1234 1611 void (*RGB565ToUVRow)(const uint8_t* src_rgb565, int src_stride_rgb565, 1235 1612 uint8_t* dst_u, uint8_t* dst_v, int width) = … … 1277 1654 } 1278 1655 } 1656 #elif defined(HAS_RGB565TOYROW_MMI) 1657 if (TestCpuFlag(kCpuHasMMI)) { 1658 RGB565ToUVRow = RGB565ToUVRow_Any_MMI; 1659 RGB565ToYRow = RGB565ToYRow_Any_MMI; 1660 if (IS_ALIGNED(width, 8)) { 1661 RGB565ToYRow = RGB565ToYRow_MMI; 1662 if (IS_ALIGNED(width, 16)) { 1663 RGB565ToUVRow = RGB565ToUVRow_MMI; 1664 } 1665 } 1666 } 1279 1667 // Other platforms do intermediate conversion from RGB565 to ARGB. 1280 1668 #else … … 1317 1705 #endif 1318 1706 { 1319 #if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA)) 1707 #if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ 1708 defined(HAS_RGB565TOYROW_MMI)) 1320 1709 // Allocate 2 rows of ARGB. 1321 1710 const int kRowSize = (width * 4 + 31) & ~31; … … 1323 1712 #endif 1324 1713 for (y = 0; y < height - 1; y += 2) { 1325 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA)) 1714 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ 1715 defined(HAS_RGB565TOYROW_MMI)) 1326 1716 RGB565ToUVRow(src_rgb565, src_stride_rgb565, dst_u, dst_v, width); 1327 1717 RGB565ToYRow(src_rgb565, dst_y, width); … … 1340 1730 } 1341 1731 if (height & 1) { 1342 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA)) 1732 #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ 1733 defined(HAS_RGB565TOYROW_MMI)) 1343 1734 RGB565ToUVRow(src_rgb565, 0, dst_u, dst_v, width); 1344 1735 RGB565ToYRow(src_rgb565, dst_y, width); … … 1349 1740 #endif 1350 1741 } 1351 #if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA)) 1742 #if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ 1743 defined(HAS_RGB565TOYROW_MMI)) 1352 1744 free_aligned_buffer_64(row); 1353 1745 #endif … … 1369 1761 int height) { 1370 1762 int y; 1371 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA)) 1763 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \ 1764 defined(HAS_ARGB1555TOYROW_MMI)) 1372 1765 void (*ARGB1555ToUVRow)(const uint8_t* src_argb1555, int src_stride_argb1555, 1373 1766 uint8_t* dst_u, uint8_t* dst_v, int width) = … … 1416 1809 } 1417 1810 } 1811 #elif defined(HAS_ARGB1555TOYROW_MMI) 1812 if (TestCpuFlag(kCpuHasMMI)) { 1813 ARGB1555ToUVRow = ARGB1555ToUVRow_Any_MMI; 1814 ARGB1555ToYRow = ARGB1555ToYRow_Any_MMI; 1815 if (IS_ALIGNED(width, 8)) { 1816 ARGB1555ToYRow = ARGB1555ToYRow_MMI; 1817 if (IS_ALIGNED(width, 16)) { 1818 ARGB1555ToUVRow = ARGB1555ToUVRow_MMI; 1819 } 1820 } 1821 } 1418 1822 // Other platforms do intermediate conversion from ARGB1555 to ARGB. 1419 1823 #else … … 1456 1860 #endif 1457 1861 { 1458 #if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA)) 1862 #if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \ 1863 defined(HAS_ARGB1555TOYROW_MMI)) 1459 1864 // Allocate 2 rows of ARGB. 1460 1865 const int kRowSize = (width * 4 + 31) & ~31; … … 1463 1868 1464 1869 for (y = 0; y < height - 1; y += 2) { 1465 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA)) 1870 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \ 1871 defined(HAS_ARGB1555TOYROW_MMI)) 1466 1872 ARGB1555ToUVRow(src_argb1555, src_stride_argb1555, dst_u, dst_v, width); 1467 1873 ARGB1555ToYRow(src_argb1555, dst_y, width); … … 1482 1888 } 1483 1889 if (height & 1) { 1484 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA)) 1890 #if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \ 1891 defined(HAS_ARGB1555TOYROW_MMI)) 1485 1892 ARGB1555ToUVRow(src_argb1555, 0, dst_u, dst_v, width); 1486 1893 ARGB1555ToYRow(src_argb1555, dst_y, width); … … 1491 1898 #endif 1492 1899 } 1493 #if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA)) 1900 #if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \ 1901 defined(HAS_ARGB1555TOYROW_MMI)) 1494 1902 free_aligned_buffer_64(row); 1495 1903 #endif … … 1511 1919 int height) { 1512 1920 int y; 1513 #if defined(HAS_ARGB4444TOYROW_NEON)1921 #if (defined(HAS_ARGB4444TOYROW_NEON) || defined(HAS_ARGB4444TOYROW_MMI)) 1514 1922 void (*ARGB4444ToUVRow)(const uint8_t* src_argb4444, int src_stride_argb4444, 1515 1923 uint8_t* dst_u, uint8_t* dst_v, int width) = … … 1549 1957 } 1550 1958 } 1959 #elif defined(HAS_ARGB4444TOYROW_MMI) 1960 if (TestCpuFlag(kCpuHasMMI)) { 1961 ARGB4444ToUVRow = ARGB4444ToUVRow_Any_MMI; 1962 ARGB4444ToYRow = ARGB4444ToYRow_Any_MMI; 1963 if (IS_ALIGNED(width, 8)) { 1964 ARGB4444ToYRow = ARGB4444ToYRow_MMI; 1965 if (IS_ALIGNED(width, 16)) { 1966 ARGB4444ToUVRow = ARGB4444ToUVRow_MMI; 1967 } 1968 } 1969 } 1551 1970 // Other platforms do intermediate conversion from ARGB4444 to ARGB. 1552 1971 #else … … 1607 2026 } 1608 2027 #endif 2028 #if defined(HAS_ARGBTOYROW_MMI) 2029 if (TestCpuFlag(kCpuHasMMI)) { 2030 ARGBToUVRow = ARGBToUVRow_Any_MMI; 2031 ARGBToYRow = ARGBToYRow_Any_MMI; 2032 if (IS_ALIGNED(width, 8)) { 2033 ARGBToYRow = ARGBToYRow_MMI; 2034 if (IS_ALIGNED(width, 16)) { 2035 ARGBToUVRow = ARGBToUVRow_MMI; 2036 } 2037 } 2038 } 2039 #endif 1609 2040 #endif 1610 2041 1611 2042 { 1612 #if ! defined(HAS_ARGB4444TOYROW_NEON)2043 #if !(defined(HAS_ARGB4444TOYROW_NEON) || defined(HAS_ARGB4444TOYROW_MMI)) 1613 2044 // Allocate 2 rows of ARGB. 1614 2045 const int kRowSize = (width * 4 + 31) & ~31; … … 1617 2048 1618 2049 for (y = 0; y < height - 1; y += 2) { 1619 #if defined(HAS_ARGB4444TOYROW_NEON)2050 #if (defined(HAS_ARGB4444TOYROW_NEON) || defined(HAS_ARGB4444TOYROW_MMI)) 1620 2051 ARGB4444ToUVRow(src_argb4444, src_stride_argb4444, dst_u, dst_v, width); 1621 2052 ARGB4444ToYRow(src_argb4444, dst_y, width); … … 1636 2067 } 1637 2068 if (height & 1) { 1638 #if defined(HAS_ARGB4444TOYROW_NEON)2069 #if (defined(HAS_ARGB4444TOYROW_NEON) || defined(HAS_ARGB4444TOYROW_MMI)) 1639 2070 ARGB4444ToUVRow(src_argb4444, 0, dst_u, dst_v, width); 1640 2071 ARGB4444ToYRow(src_argb4444, dst_y, width); … … 1645 2076 #endif 1646 2077 } 1647 #if ! defined(HAS_ARGB4444TOYROW_NEON)2078 #if !(defined(HAS_ARGB4444TOYROW_NEON) || defined(HAS_ARGB4444TOYROW_MMI)) 1648 2079 free_aligned_buffer_64(row); 1649 2080 #endif -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_argb.cc
r235135 r239415 886 886 } 887 887 #endif 888 #if defined(HAS_ARGBATTENUATEROW_MMI) 889 if (TestCpuFlag(kCpuHasMMI)) { 890 ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI; 891 if (IS_ALIGNED(width, 2)) { 892 ARGBAttenuateRow = ARGBAttenuateRow_MMI; 893 } 894 } 895 #endif 888 896 889 897 for (y = 0; y < height; ++y) { … … 1005 1013 } 1006 1014 #endif 1015 #if defined(HAS_I400TOARGBROW_MMI) 1016 if (TestCpuFlag(kCpuHasMMI)) { 1017 I400ToARGBRow = I400ToARGBRow_Any_MMI; 1018 if (IS_ALIGNED(width, 8)) { 1019 I400ToARGBRow = I400ToARGBRow_MMI; 1020 } 1021 } 1022 #endif 1007 1023 1008 1024 for (y = 0; y < height; ++y) { … … 1069 1085 if (IS_ALIGNED(width, 16)) { 1070 1086 J400ToARGBRow = J400ToARGBRow_MSA; 1087 } 1088 } 1089 #endif 1090 #if defined(HAS_J400TOARGBROW_MMI) 1091 if (TestCpuFlag(kCpuHasMMI)) { 1092 J400ToARGBRow = J400ToARGBRow_Any_MMI; 1093 if (IS_ALIGNED(width, 4)) { 1094 J400ToARGBRow = J400ToARGBRow_MMI; 1071 1095 } 1072 1096 } … … 1202 1226 } 1203 1227 #endif 1228 #if defined(HAS_RGB24TOARGBROW_MMI) 1229 if (TestCpuFlag(kCpuHasMMI)) { 1230 RGB24ToARGBRow = RGB24ToARGBRow_Any_MMI; 1231 if (IS_ALIGNED(width, 4)) { 1232 RGB24ToARGBRow = RGB24ToARGBRow_MMI; 1233 } 1234 } 1235 #endif 1204 1236 1205 1237 for (y = 0; y < height; ++y) { … … 1261 1293 } 1262 1294 #endif 1295 #if defined(HAS_RAWTOARGBROW_MMI) 1296 if (TestCpuFlag(kCpuHasMMI)) { 1297 RAWToARGBRow = RAWToARGBRow_Any_MMI; 1298 if (IS_ALIGNED(width, 4)) { 1299 RAWToARGBRow = RAWToARGBRow_MMI; 1300 } 1301 } 1302 #endif 1263 1303 1264 1304 for (y = 0; y < height; ++y) { … … 1328 1368 } 1329 1369 #endif 1370 #if defined(HAS_RGB565TOARGBROW_MMI) 1371 if (TestCpuFlag(kCpuHasMMI)) { 1372 RGB565ToARGBRow = RGB565ToARGBRow_Any_MMI; 1373 if (IS_ALIGNED(width, 4)) { 1374 RGB565ToARGBRow = RGB565ToARGBRow_MMI; 1375 } 1376 } 1377 #endif 1330 1378 1331 1379 for (y = 0; y < height; ++y) { … … 1395 1443 } 1396 1444 #endif 1445 #if defined(HAS_ARGB1555TOARGBROW_MMI) 1446 if (TestCpuFlag(kCpuHasMMI)) { 1447 ARGB1555ToARGBRow = ARGB1555ToARGBRow_Any_MMI; 1448 if (IS_ALIGNED(width, 4)) { 1449 ARGB1555ToARGBRow = ARGB1555ToARGBRow_MMI; 1450 } 1451 } 1452 #endif 1397 1453 1398 1454 for (y = 0; y < height; ++y) { … … 1459 1515 if (IS_ALIGNED(width, 16)) { 1460 1516 ARGB4444ToARGBRow = ARGB4444ToARGBRow_MSA; 1517 } 1518 } 1519 #endif 1520 #if defined(HAS_ARGB4444TOARGBROW_MMI) 1521 if (TestCpuFlag(kCpuHasMMI)) { 1522 ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_MMI; 1523 if (IS_ALIGNED(width, 4)) { 1524 ARGB4444ToARGBRow = ARGB4444ToARGBRow_MMI; 1461 1525 } 1462 1526 } … … 1790 1854 } 1791 1855 #endif 1856 #if defined(HAS_NV12TORGB24ROW_SSSE3) 1857 if (TestCpuFlag(kCpuHasSSSE3)) { 1858 NV12ToRGB24Row = NV12ToRGB24Row_Any_SSSE3; 1859 if (IS_ALIGNED(width, 16)) { 1860 NV12ToRGB24Row = NV12ToRGB24Row_SSSE3; 1861 } 1862 } 1863 #endif 1864 #if defined(HAS_NV12TORGB24ROW_AVX2) 1865 if (TestCpuFlag(kCpuHasAVX2)) { 1866 NV12ToRGB24Row = NV12ToRGB24Row_Any_AVX2; 1867 if (IS_ALIGNED(width, 32)) { 1868 NV12ToRGB24Row = NV12ToRGB24Row_AVX2; 1869 } 1870 } 1871 #endif 1792 1872 1793 1873 for (y = 0; y < height; ++y) { … … 1833 1913 } 1834 1914 #endif 1915 #if defined(HAS_NV21TORGB24ROW_SSSE3) 1916 if (TestCpuFlag(kCpuHasSSSE3)) { 1917 NV21ToRGB24Row = NV21ToRGB24Row_Any_SSSE3; 1918 if (IS_ALIGNED(width, 16)) { 1919 NV21ToRGB24Row = NV21ToRGB24Row_SSSE3; 1920 } 1921 } 1922 #endif 1923 #if defined(HAS_NV21TORGB24ROW_AVX2) 1924 if (TestCpuFlag(kCpuHasAVX2)) { 1925 NV21ToRGB24Row = NV21ToRGB24Row_Any_AVX2; 1926 if (IS_ALIGNED(width, 32)) { 1927 NV21ToRGB24Row = NV21ToRGB24Row_AVX2; 1928 } 1929 } 1930 #endif 1835 1931 1836 1932 for (y = 0; y < height; ++y) { … … 1845 1941 } 1846 1942 1847 // TODO(fbarchard): \(fbarchard): NV12ToRAW can be implemented by mirrored 1848 // matrix. Convert NV12 to RGB24. 1943 // Convert NV12 to RGB24. 1849 1944 LIBYUV_API 1850 1945 int NV12ToRGB24(const uint8_t* src_y, … … 1874 1969 dst_rgb24, dst_stride_rgb24, &kYuvI601Constants, 1875 1970 width, height); 1971 } 1972 1973 // Convert NV12 to RAW. 1974 LIBYUV_API 1975 int NV12ToRAW(const uint8_t* src_y, 1976 int src_stride_y, 1977 const uint8_t* src_uv, 1978 int src_stride_uv, 1979 uint8_t* dst_raw, 1980 int dst_stride_raw, 1981 int width, 1982 int height) { 1983 return NV21ToRGB24Matrix(src_y, src_stride_y, src_uv, src_stride_uv, dst_raw, 1984 dst_stride_raw, &kYvuI601Constants, width, height); 1985 } 1986 1987 // Convert NV21 to RAW. 1988 LIBYUV_API 1989 int NV21ToRAW(const uint8_t* src_y, 1990 int src_stride_y, 1991 const uint8_t* src_vu, 1992 int src_stride_vu, 1993 uint8_t* dst_raw, 1994 int dst_stride_raw, 1995 int width, 1996 int height) { 1997 return NV12ToRGB24Matrix(src_y, src_stride_y, src_vu, src_stride_vu, dst_raw, 1998 dst_stride_raw, &kYvuI601Constants, width, height); 1876 1999 } 1877 2000 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_from.cc
r235135 r239415 303 303 } 304 304 #endif 305 #if defined(HAS_I422TOYUY2ROW_MMI) 306 if (TestCpuFlag(kCpuHasMMI)) { 307 I422ToYUY2Row = I422ToYUY2Row_Any_MMI; 308 if (IS_ALIGNED(width, 8)) { 309 I422ToYUY2Row = I422ToYUY2Row_MMI; 310 } 311 } 312 #endif 305 313 306 314 for (y = 0; y < height - 1; y += 2) { … … 382 390 } 383 391 #endif 392 #if defined(HAS_I422TOUYVYROW_MMI) 393 if (TestCpuFlag(kCpuHasMMI)) { 394 I422ToUYVYRow = I422ToUYVYRow_Any_MMI; 395 if (IS_ALIGNED(width, 8)) { 396 I422ToUYVYRow = I422ToUYVYRow_MMI; 397 } 398 } 399 #endif 384 400 385 401 for (y = 0; y < height; ++y) { … … 446 462 if (IS_ALIGNED(width, 32)) { 447 463 I422ToUYVYRow = I422ToUYVYRow_MSA; 464 } 465 } 466 #endif 467 #if defined(HAS_I422TOUYVYROW_MMI) 468 if (TestCpuFlag(kCpuHasMMI)) { 469 I422ToUYVYRow = I422ToUYVYRow_Any_MMI; 470 if (IS_ALIGNED(width, 8)) { 471 I422ToUYVYRow = I422ToUYVYRow_MMI; 448 472 } 449 473 } … … 907 931 } 908 932 933 // Convert I420 to RGB565 with specified color matrix. 934 LIBYUV_API 935 int I420ToRGB565Matrix(const uint8_t* src_y, 936 int src_stride_y, 937 const uint8_t* src_u, 938 int src_stride_u, 939 const uint8_t* src_v, 940 int src_stride_v, 941 uint8_t* dst_rgb565, 942 int dst_stride_rgb565, 943 const struct YuvConstants* yuvconstants, 944 int width, 945 int height) { 946 int y; 947 void (*I422ToRGB565Row)(const uint8_t* y_buf, const uint8_t* u_buf, 948 const uint8_t* v_buf, uint8_t* rgb_buf, 949 const struct YuvConstants* yuvconstants, int width) = 950 I422ToRGB565Row_C; 951 if (!src_y || !src_u || !src_v || !dst_rgb565 || width <= 0 || height == 0) { 952 return -1; 953 } 954 // Negative height means invert the image. 955 if (height < 0) { 956 height = -height; 957 dst_rgb565 = dst_rgb565 + (height - 1) * dst_stride_rgb565; 958 dst_stride_rgb565 = -dst_stride_rgb565; 959 } 960 #if defined(HAS_I422TORGB565ROW_SSSE3) 961 if (TestCpuFlag(kCpuHasSSSE3)) { 962 I422ToRGB565Row = I422ToRGB565Row_Any_SSSE3; 963 if (IS_ALIGNED(width, 8)) { 964 I422ToRGB565Row = I422ToRGB565Row_SSSE3; 965 } 966 } 967 #endif 968 #if defined(HAS_I422TORGB565ROW_AVX2) 969 if (TestCpuFlag(kCpuHasAVX2)) { 970 I422ToRGB565Row = I422ToRGB565Row_Any_AVX2; 971 if (IS_ALIGNED(width, 16)) { 972 I422ToRGB565Row = I422ToRGB565Row_AVX2; 973 } 974 } 975 #endif 976 #if defined(HAS_I422TORGB565ROW_NEON) 977 if (TestCpuFlag(kCpuHasNEON)) { 978 I422ToRGB565Row = I422ToRGB565Row_Any_NEON; 979 if (IS_ALIGNED(width, 8)) { 980 I422ToRGB565Row = I422ToRGB565Row_NEON; 981 } 982 } 983 #endif 984 #if defined(HAS_I422TORGB565ROW_MSA) 985 if (TestCpuFlag(kCpuHasMSA)) { 986 I422ToRGB565Row = I422ToRGB565Row_Any_MSA; 987 if (IS_ALIGNED(width, 8)) { 988 I422ToRGB565Row = I422ToRGB565Row_MSA; 989 } 990 } 991 #endif 992 993 for (y = 0; y < height; ++y) { 994 I422ToRGB565Row(src_y, src_u, src_v, dst_rgb565, yuvconstants, width); 995 dst_rgb565 += dst_stride_rgb565; 996 src_y += src_stride_y; 997 if (y & 1) { 998 src_u += src_stride_u; 999 src_v += src_stride_v; 1000 } 1001 } 1002 return 0; 1003 } 1004 909 1005 // Convert I420 to RGB565. 910 1006 LIBYUV_API … … 919 1015 int width, 920 1016 int height) { 921 int y; 922 void (*I422ToRGB565Row)(const uint8_t* y_buf, const uint8_t* u_buf, 923 const uint8_t* v_buf, uint8_t* rgb_buf, 924 const struct YuvConstants* yuvconstants, int width) = 925 I422ToRGB565Row_C; 926 if (!src_y || !src_u || !src_v || !dst_rgb565 || width <= 0 || height == 0) { 927 return -1; 928 } 929 // Negative height means invert the image. 930 if (height < 0) { 931 height = -height; 932 dst_rgb565 = dst_rgb565 + (height - 1) * dst_stride_rgb565; 933 dst_stride_rgb565 = -dst_stride_rgb565; 934 } 935 #if defined(HAS_I422TORGB565ROW_SSSE3) 936 if (TestCpuFlag(kCpuHasSSSE3)) { 937 I422ToRGB565Row = I422ToRGB565Row_Any_SSSE3; 938 if (IS_ALIGNED(width, 8)) { 939 I422ToRGB565Row = I422ToRGB565Row_SSSE3; 940 } 941 } 942 #endif 943 #if defined(HAS_I422TORGB565ROW_AVX2) 944 if (TestCpuFlag(kCpuHasAVX2)) { 945 I422ToRGB565Row = I422ToRGB565Row_Any_AVX2; 946 if (IS_ALIGNED(width, 16)) { 947 I422ToRGB565Row = I422ToRGB565Row_AVX2; 948 } 949 } 950 #endif 951 #if defined(HAS_I422TORGB565ROW_NEON) 952 if (TestCpuFlag(kCpuHasNEON)) { 953 I422ToRGB565Row = I422ToRGB565Row_Any_NEON; 954 if (IS_ALIGNED(width, 8)) { 955 I422ToRGB565Row = I422ToRGB565Row_NEON; 956 } 957 } 958 #endif 959 #if defined(HAS_I422TORGB565ROW_MSA) 960 if (TestCpuFlag(kCpuHasMSA)) { 961 I422ToRGB565Row = I422ToRGB565Row_Any_MSA; 962 if (IS_ALIGNED(width, 8)) { 963 I422ToRGB565Row = I422ToRGB565Row_MSA; 964 } 965 } 966 #endif 967 968 for (y = 0; y < height; ++y) { 969 I422ToRGB565Row(src_y, src_u, src_v, dst_rgb565, &kYuvI601Constants, width); 970 dst_rgb565 += dst_stride_rgb565; 971 src_y += src_stride_y; 972 if (y & 1) { 973 src_u += src_stride_u; 974 src_v += src_stride_v; 975 } 976 } 977 return 0; 1017 return I420ToRGB565Matrix(src_y, src_stride_y, src_u, src_stride_u, src_v, 1018 src_stride_v, dst_rgb565, dst_stride_rgb565, 1019 &kYuvI601Constants, width, height); 1020 } 1021 1022 // Convert J420 to RGB565. 1023 LIBYUV_API 1024 int J420ToRGB565(const uint8_t* src_y, 1025 int src_stride_y, 1026 const uint8_t* src_u, 1027 int src_stride_u, 1028 const uint8_t* src_v, 1029 int src_stride_v, 1030 uint8_t* dst_rgb565, 1031 int dst_stride_rgb565, 1032 int width, 1033 int height) { 1034 return I420ToRGB565Matrix(src_y, src_stride_y, src_u, src_stride_u, src_v, 1035 src_stride_v, dst_rgb565, dst_stride_rgb565, 1036 &kYuvJPEGConstants, width, height); 1037 } 1038 1039 // Convert H420 to RGB565. 1040 LIBYUV_API 1041 int H420ToRGB565(const uint8_t* src_y, 1042 int src_stride_y, 1043 const uint8_t* src_u, 1044 int src_stride_u, 1045 const uint8_t* src_v, 1046 int src_stride_v, 1047 uint8_t* dst_rgb565, 1048 int dst_stride_rgb565, 1049 int width, 1050 int height) { 1051 return I420ToRGB565Matrix(src_y, src_stride_y, src_u, src_stride_u, src_v, 1052 src_stride_v, dst_rgb565, dst_stride_rgb565, 1053 &kYuvH709Constants, width, height); 978 1054 } 979 1055 … … 1155 1231 I422ToARGBRow(src_y, src_u, src_v, row_argb, &kYuvI601Constants, width); 1156 1232 ARGBToRGB565DitherRow(row_argb, dst_rgb565, 1157 *( uint32_t*)(dither4x4 + ((y & 3) << 2)), // NOLINT1158 width); // NOLINT1233 *(const uint32_t*)(dither4x4 + ((y & 3) << 2)), 1234 width); 1159 1235 dst_rgb565 += dst_stride_rgb565; 1160 1236 src_y += src_stride_y; -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_from_argb.cc
r235135 r239415 77 77 } 78 78 #endif 79 #if defined(HAS_ARGBTOUV444ROW_MMI) 80 if (TestCpuFlag(kCpuHasMMI)) { 81 ARGBToUV444Row = ARGBToUV444Row_Any_MMI; 82 if (IS_ALIGNED(width, 8)) { 83 ARGBToUV444Row = ARGBToUV444Row_MMI; 84 } 85 } 86 #endif 79 87 #if defined(HAS_ARGBTOYROW_SSSE3) 80 88 if (TestCpuFlag(kCpuHasSSSE3)) { … … 106 114 if (IS_ALIGNED(width, 16)) { 107 115 ARGBToYRow = ARGBToYRow_MSA; 116 } 117 } 118 #endif 119 #if defined(HAS_ARGBTOYROW_MMI) 120 if (TestCpuFlag(kCpuHasMMI)) { 121 ARGBToYRow = ARGBToYRow_Any_MMI; 122 if (IS_ALIGNED(width, 8)) { 123 ARGBToYRow = ARGBToYRow_MMI; 108 124 } 109 125 } … … 209 225 #endif 210 226 227 #if defined(HAS_ARGBTOYROW_MMI) 228 if (TestCpuFlag(kCpuHasMMI)) { 229 ARGBToYRow = ARGBToYRow_Any_MMI; 230 if (IS_ALIGNED(width, 8)) { 231 ARGBToYRow = ARGBToYRow_MMI; 232 } 233 } 234 #endif 235 #if defined(HAS_ARGBTOUVROW_MMI) 236 if (TestCpuFlag(kCpuHasMMI)) { 237 ARGBToUVRow = ARGBToUVRow_Any_MMI; 238 if (IS_ALIGNED(width, 16)) { 239 ARGBToUVRow = ARGBToUVRow_MMI; 240 } 241 } 242 #endif 243 211 244 for (y = 0; y < height; ++y) { 212 245 ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); … … 299 332 } 300 333 #endif 334 #if defined(HAS_ARGBTOYROW_MMI) 335 if (TestCpuFlag(kCpuHasMMI)) { 336 ARGBToYRow = ARGBToYRow_Any_MMI; 337 if (IS_ALIGNED(width, 8)) { 338 ARGBToYRow = ARGBToYRow_MMI; 339 } 340 } 341 #endif 342 #if defined(HAS_ARGBTOUVROW_MMI) 343 if (TestCpuFlag(kCpuHasMMI)) { 344 ARGBToUVRow = ARGBToUVRow_Any_MMI; 345 if (IS_ALIGNED(width, 16)) { 346 ARGBToUVRow = ARGBToUVRow_MMI; 347 } 348 } 349 #endif 301 350 #if defined(HAS_MERGEUVROW_SSE2) 302 351 if (TestCpuFlag(kCpuHasSSE2)) { … … 328 377 if (IS_ALIGNED(halfwidth, 16)) { 329 378 MergeUVRow_ = MergeUVRow_MSA; 379 } 380 } 381 #endif 382 #if defined(HAS_MERGEUVROW_MMI) 383 if (TestCpuFlag(kCpuHasMMI)) { 384 MergeUVRow_ = MergeUVRow_Any_MMI; 385 if (IS_ALIGNED(halfwidth, 8)) { 386 MergeUVRow_ = MergeUVRow_MMI; 330 387 } 331 388 } … … 435 492 } 436 493 #endif 494 #if defined(HAS_ARGBTOYROW_MMI) 495 if (TestCpuFlag(kCpuHasMMI)) { 496 ARGBToYRow = ARGBToYRow_Any_MMI; 497 if (IS_ALIGNED(width, 8)) { 498 ARGBToYRow = ARGBToYRow_MMI; 499 } 500 } 501 #endif 502 #if defined(HAS_ARGBTOUVROW_MMI) 503 if (TestCpuFlag(kCpuHasMMI)) { 504 ARGBToUVRow = ARGBToUVRow_Any_MMI; 505 if (IS_ALIGNED(width, 16)) { 506 ARGBToUVRow = ARGBToUVRow_MMI; 507 } 508 } 509 #endif 510 437 511 #if defined(HAS_MERGEUVROW_SSE2) 438 512 if (TestCpuFlag(kCpuHasSSE2)) { … … 464 538 if (IS_ALIGNED(halfwidth, 16)) { 465 539 MergeUVRow_ = MergeUVRow_MSA; 540 } 541 } 542 #endif 543 #if defined(HAS_MERGEUVROW_MMI) 544 if (TestCpuFlag(kCpuHasMMI)) { 545 MergeUVRow_ = MergeUVRow_Any_MMI; 546 if (IS_ALIGNED(halfwidth, 8)) { 547 MergeUVRow_ = MergeUVRow_MMI; 466 548 } 467 549 } … … 576 658 } 577 659 #endif 660 #if defined(HAS_ARGBTOYROW_MMI) 661 if (TestCpuFlag(kCpuHasMMI)) { 662 ARGBToYRow = ARGBToYRow_Any_MMI; 663 if (IS_ALIGNED(width, 8)) { 664 ARGBToYRow = ARGBToYRow_MMI; 665 } 666 } 667 #endif 668 #if defined(HAS_ARGBTOUVROW_MMI) 669 if (TestCpuFlag(kCpuHasMMI)) { 670 ARGBToUVRow = ARGBToUVRow_Any_MMI; 671 if (IS_ALIGNED(width, 16)) { 672 ARGBToUVRow = ARGBToUVRow_MMI; 673 } 674 } 675 #endif 578 676 #if defined(HAS_I422TOYUY2ROW_SSE2) 579 677 if (TestCpuFlag(kCpuHasSSE2)) { … … 605 703 if (IS_ALIGNED(width, 32)) { 606 704 I422ToYUY2Row = I422ToYUY2Row_MSA; 705 } 706 } 707 #endif 708 #if defined(HAS_I422TOYUY2ROW_MMI) 709 if (TestCpuFlag(kCpuHasMMI)) { 710 I422ToYUY2Row = I422ToYUY2Row_Any_MMI; 711 if (IS_ALIGNED(width, 8)) { 712 I422ToYUY2Row = I422ToYUY2Row_MMI; 607 713 } 608 714 } … … 713 819 } 714 820 #endif 821 #if defined(HAS_ARGBTOYROW_MMI) 822 if (TestCpuFlag(kCpuHasMMI)) { 823 ARGBToYRow = ARGBToYRow_Any_MMI; 824 if (IS_ALIGNED(width, 8)) { 825 ARGBToYRow = ARGBToYRow_MMI; 826 } 827 } 828 #endif 829 #if defined(HAS_ARGBTOUVROW_MMI) 830 if (TestCpuFlag(kCpuHasMMI)) { 831 ARGBToUVRow = ARGBToUVRow_Any_MMI; 832 if (IS_ALIGNED(width, 16)) { 833 ARGBToUVRow = ARGBToUVRow_MMI; 834 } 835 } 836 #endif 715 837 #if defined(HAS_I422TOUYVYROW_SSE2) 716 838 if (TestCpuFlag(kCpuHasSSE2)) { … … 742 864 if (IS_ALIGNED(width, 32)) { 743 865 I422ToUYVYRow = I422ToUYVYRow_MSA; 866 } 867 } 868 #endif 869 #if defined(HAS_I422TOUYVYROW_MMI) 870 if (TestCpuFlag(kCpuHasMMI)) { 871 I422ToUYVYRow = I422ToUYVYRow_Any_MMI; 872 if (IS_ALIGNED(width, 8)) { 873 I422ToUYVYRow = I422ToUYVYRow_MMI; 744 874 } 745 875 } … … 822 952 } 823 953 #endif 954 #if defined(HAS_ARGBTOYROW_MMI) 955 if (TestCpuFlag(kCpuHasMMI)) { 956 ARGBToYRow = ARGBToYRow_Any_MMI; 957 if (IS_ALIGNED(width, 8)) { 958 ARGBToYRow = ARGBToYRow_MMI; 959 } 960 } 961 #endif 824 962 825 963 for (y = 0; y < height; ++y) { … … 880 1018 } 881 1019 #endif 1020 #if defined(HAS_ARGBTORGB24ROW_AVX2) 1021 if (TestCpuFlag(kCpuHasAVX2)) { 1022 ARGBToRGB24Row = ARGBToRGB24Row_Any_AVX2; 1023 if (IS_ALIGNED(width, 32)) { 1024 ARGBToRGB24Row = ARGBToRGB24Row_AVX2; 1025 } 1026 } 1027 #endif 1028 #if defined(HAS_ARGBTORGB24ROW_AVX512VBMI) 1029 if (TestCpuFlag(kCpuHasAVX512VBMI)) { 1030 ARGBToRGB24Row = ARGBToRGB24Row_Any_AVX512VBMI; 1031 if (IS_ALIGNED(width, 32)) { 1032 ARGBToRGB24Row = ARGBToRGB24Row_AVX512VBMI; 1033 } 1034 } 1035 #endif 882 1036 #if defined(HAS_ARGBTORGB24ROW_NEON) 883 1037 if (TestCpuFlag(kCpuHasNEON)) { … … 893 1047 if (IS_ALIGNED(width, 16)) { 894 1048 ARGBToRGB24Row = ARGBToRGB24Row_MSA; 1049 } 1050 } 1051 #endif 1052 #if defined(HAS_ARGBTORGB24ROW_MMI) 1053 if (TestCpuFlag(kCpuHasMMI)) { 1054 ARGBToRGB24Row = ARGBToRGB24Row_Any_MMI; 1055 if (IS_ALIGNED(width, 4)) { 1056 ARGBToRGB24Row = ARGBToRGB24Row_MMI; 895 1057 } 896 1058 } … … 938 1100 } 939 1101 #endif 1102 #if defined(HAS_ARGBTORAWROW_AVX2) 1103 if (TestCpuFlag(kCpuHasAVX2)) { 1104 ARGBToRAWRow = ARGBToRAWRow_Any_AVX2; 1105 if (IS_ALIGNED(width, 32)) { 1106 ARGBToRAWRow = ARGBToRAWRow_AVX2; 1107 } 1108 } 1109 #endif 940 1110 #if defined(HAS_ARGBTORAWROW_NEON) 941 1111 if (TestCpuFlag(kCpuHasNEON)) { … … 951 1121 if (IS_ALIGNED(width, 16)) { 952 1122 ARGBToRAWRow = ARGBToRAWRow_MSA; 1123 } 1124 } 1125 #endif 1126 #if defined(HAS_ARGBTORAWROW_MMI) 1127 if (TestCpuFlag(kCpuHasMMI)) { 1128 ARGBToRAWRow = ARGBToRAWRow_Any_MMI; 1129 if (IS_ALIGNED(width, 4)) { 1130 ARGBToRAWRow = ARGBToRAWRow_MMI; 953 1131 } 954 1132 } … … 1024 1202 } 1025 1203 #endif 1204 #if defined(HAS_ARGBTORGB565DITHERROW_MMI) 1205 if (TestCpuFlag(kCpuHasMMI)) { 1206 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MMI; 1207 if (IS_ALIGNED(width, 4)) { 1208 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_MMI; 1209 } 1210 } 1211 #endif 1026 1212 1027 1213 for (y = 0; y < height; ++y) { 1028 1214 ARGBToRGB565DitherRow(src_argb, dst_rgb565, 1029 *( uint32_t*)(dither4x4 + ((y & 3) << 2)), // NOLINT1030 width); /* NOLINT */1215 *(const uint32_t*)(dither4x4 + ((y & 3) << 2)), 1216 width); 1031 1217 src_argb += src_stride_argb; 1032 1218 dst_rgb565 += dst_stride_rgb565; … … 1093 1279 } 1094 1280 #endif 1281 #if defined(HAS_ARGBTORGB565ROW_MMI) 1282 if (TestCpuFlag(kCpuHasMMI)) { 1283 ARGBToRGB565Row = ARGBToRGB565Row_Any_MMI; 1284 if (IS_ALIGNED(width, 4)) { 1285 ARGBToRGB565Row = ARGBToRGB565Row_MMI; 1286 } 1287 } 1288 #endif 1095 1289 1096 1290 for (y = 0; y < height; ++y) { … … 1159 1353 } 1160 1354 #endif 1355 #if defined(HAS_ARGBTOARGB1555ROW_MMI) 1356 if (TestCpuFlag(kCpuHasMMI)) { 1357 ARGBToARGB1555Row = ARGBToARGB1555Row_Any_MMI; 1358 if (IS_ALIGNED(width, 4)) { 1359 ARGBToARGB1555Row = ARGBToARGB1555Row_MMI; 1360 } 1361 } 1362 #endif 1161 1363 1162 1364 for (y = 0; y < height; ++y) { … … 1222 1424 if (IS_ALIGNED(width, 8)) { 1223 1425 ARGBToARGB4444Row = ARGBToARGB4444Row_MSA; 1426 } 1427 } 1428 #endif 1429 #if defined(HAS_ARGBTOARGB4444ROW_MMI) 1430 if (TestCpuFlag(kCpuHasMMI)) { 1431 ARGBToARGB4444Row = ARGBToARGB4444Row_Any_MMI; 1432 if (IS_ALIGNED(width, 4)) { 1433 ARGBToARGB4444Row = ARGBToARGB4444Row_MMI; 1224 1434 } 1225 1435 } … … 1401 1611 } 1402 1612 #endif 1613 #if defined(HAS_ARGBTOYJROW_MMI) 1614 if (TestCpuFlag(kCpuHasMMI)) { 1615 ARGBToYJRow = ARGBToYJRow_Any_MMI; 1616 if (IS_ALIGNED(width, 8)) { 1617 ARGBToYJRow = ARGBToYJRow_MMI; 1618 } 1619 } 1620 #endif 1403 1621 #if defined(HAS_ARGBTOUVJROW_MSA) 1404 1622 if (TestCpuFlag(kCpuHasMSA)) { … … 1406 1624 if (IS_ALIGNED(width, 32)) { 1407 1625 ARGBToUVJRow = ARGBToUVJRow_MSA; 1626 } 1627 } 1628 #endif 1629 #if defined(HAS_ARGBTOUVJROW_MMI) 1630 if (TestCpuFlag(kCpuHasMMI)) { 1631 ARGBToUVJRow = ARGBToUVJRow_Any_MMI; 1632 if (IS_ALIGNED(width, 16)) { 1633 ARGBToUVJRow = ARGBToUVJRow_MMI; 1408 1634 } 1409 1635 } … … 1502 1728 } 1503 1729 #endif 1730 #if defined(HAS_ARGBTOYJROW_MMI) 1731 if (TestCpuFlag(kCpuHasMMI)) { 1732 ARGBToYJRow = ARGBToYJRow_Any_MMI; 1733 if (IS_ALIGNED(width, 8)) { 1734 ARGBToYJRow = ARGBToYJRow_MMI; 1735 } 1736 } 1737 #endif 1504 1738 #if defined(HAS_ARGBTOUVJROW_MSA) 1505 1739 if (TestCpuFlag(kCpuHasMSA)) { … … 1507 1741 if (IS_ALIGNED(width, 32)) { 1508 1742 ARGBToUVJRow = ARGBToUVJRow_MSA; 1743 } 1744 } 1745 #endif 1746 #if defined(HAS_ARGBTOUVJROW_MMI) 1747 if (TestCpuFlag(kCpuHasMMI)) { 1748 ARGBToUVJRow = ARGBToUVJRow_Any_MMI; 1749 if (IS_ALIGNED(width, 16)) { 1750 ARGBToUVJRow = ARGBToUVJRow_MMI; 1509 1751 } 1510 1752 } … … 1579 1821 } 1580 1822 #endif 1823 #if defined(HAS_ARGBTOYJROW_MMI) 1824 if (TestCpuFlag(kCpuHasMMI)) { 1825 ARGBToYJRow = ARGBToYJRow_Any_MMI; 1826 if (IS_ALIGNED(width, 8)) { 1827 ARGBToYJRow = ARGBToYJRow_MMI; 1828 } 1829 } 1830 #endif 1581 1831 1582 1832 for (y = 0; y < height; ++y) { -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_jpeg.cc
r235135 r239415 191 191 } 192 192 193 #ifdef HAVE_JPEG 193 struct NV21Buffers { 194 uint8_t* y; 195 int y_stride; 196 uint8_t* vu; 197 int vu_stride; 198 int w; 199 int h; 200 }; 201 202 static void JpegI420ToNV21(void* opaque, 203 const uint8_t* const* data, 204 const int* strides, 205 int rows) { 206 NV21Buffers* dest = (NV21Buffers*)(opaque); 207 I420ToNV21(data[0], strides[0], data[1], strides[1], data[2], strides[2], 208 dest->y, dest->y_stride, dest->vu, dest->vu_stride, dest->w, rows); 209 dest->y += rows * dest->y_stride; 210 dest->vu += ((rows + 1) >> 1) * dest->vu_stride; 211 dest->h -= rows; 212 } 213 214 static void JpegI422ToNV21(void* opaque, 215 const uint8_t* const* data, 216 const int* strides, 217 int rows) { 218 NV21Buffers* dest = (NV21Buffers*)(opaque); 219 I422ToNV21(data[0], strides[0], data[1], strides[1], data[2], strides[2], 220 dest->y, dest->y_stride, dest->vu, dest->vu_stride, dest->w, rows); 221 dest->y += rows * dest->y_stride; 222 dest->vu += ((rows + 1) >> 1) * dest->vu_stride; 223 dest->h -= rows; 224 } 225 226 static void JpegI444ToNV21(void* opaque, 227 const uint8_t* const* data, 228 const int* strides, 229 int rows) { 230 NV21Buffers* dest = (NV21Buffers*)(opaque); 231 I444ToNV21(data[0], strides[0], data[1], strides[1], data[2], strides[2], 232 dest->y, dest->y_stride, dest->vu, dest->vu_stride, dest->w, rows); 233 dest->y += rows * dest->y_stride; 234 dest->vu += ((rows + 1) >> 1) * dest->vu_stride; 235 dest->h -= rows; 236 } 237 238 static void JpegI400ToNV21(void* opaque, 239 const uint8_t* const* data, 240 const int* strides, 241 int rows) { 242 NV21Buffers* dest = (NV21Buffers*)(opaque); 243 I400ToNV21(data[0], strides[0], dest->y, dest->y_stride, dest->vu, 244 dest->vu_stride, dest->w, rows); 245 dest->y += rows * dest->y_stride; 246 dest->vu += ((rows + 1) >> 1) * dest->vu_stride; 247 dest->h -= rows; 248 } 249 250 // MJPG (Motion JPeg) to NV21 251 LIBYUV_API 252 int MJPGToNV21(const uint8_t* sample, 253 size_t sample_size, 254 uint8_t* dst_y, 255 int dst_stride_y, 256 uint8_t* dst_vu, 257 int dst_stride_vu, 258 int src_width, 259 int src_height, 260 int dst_width, 261 int dst_height) { 262 if (sample_size == kUnknownDataSize) { 263 // ERROR: MJPEG frame size unknown 264 return -1; 265 } 266 267 // TODO(fbarchard): Port MJpeg to C. 268 MJpegDecoder mjpeg_decoder; 269 LIBYUV_BOOL ret = mjpeg_decoder.LoadFrame(sample, sample_size); 270 if (ret && (mjpeg_decoder.GetWidth() != src_width || 271 mjpeg_decoder.GetHeight() != src_height)) { 272 // ERROR: MJPEG frame has unexpected dimensions 273 mjpeg_decoder.UnloadFrame(); 274 return 1; // runtime failure 275 } 276 if (ret) { 277 NV21Buffers bufs = {dst_y, dst_stride_y, dst_vu, 278 dst_stride_vu, dst_width, dst_height}; 279 // YUV420 280 if (mjpeg_decoder.GetColorSpace() == MJpegDecoder::kColorSpaceYCbCr && 281 mjpeg_decoder.GetNumComponents() == 3 && 282 mjpeg_decoder.GetVertSampFactor(0) == 2 && 283 mjpeg_decoder.GetHorizSampFactor(0) == 2 && 284 mjpeg_decoder.GetVertSampFactor(1) == 1 && 285 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 286 mjpeg_decoder.GetVertSampFactor(2) == 1 && 287 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 288 ret = mjpeg_decoder.DecodeToCallback(&JpegI420ToNV21, &bufs, dst_width, 289 dst_height); 290 // YUV422 291 } else if (mjpeg_decoder.GetColorSpace() == 292 MJpegDecoder::kColorSpaceYCbCr && 293 mjpeg_decoder.GetNumComponents() == 3 && 294 mjpeg_decoder.GetVertSampFactor(0) == 1 && 295 mjpeg_decoder.GetHorizSampFactor(0) == 2 && 296 mjpeg_decoder.GetVertSampFactor(1) == 1 && 297 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 298 mjpeg_decoder.GetVertSampFactor(2) == 1 && 299 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 300 ret = mjpeg_decoder.DecodeToCallback(&JpegI422ToNV21, &bufs, dst_width, 301 dst_height); 302 // YUV444 303 } else if (mjpeg_decoder.GetColorSpace() == 304 MJpegDecoder::kColorSpaceYCbCr && 305 mjpeg_decoder.GetNumComponents() == 3 && 306 mjpeg_decoder.GetVertSampFactor(0) == 1 && 307 mjpeg_decoder.GetHorizSampFactor(0) == 1 && 308 mjpeg_decoder.GetVertSampFactor(1) == 1 && 309 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 310 mjpeg_decoder.GetVertSampFactor(2) == 1 && 311 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 312 ret = mjpeg_decoder.DecodeToCallback(&JpegI444ToNV21, &bufs, dst_width, 313 dst_height); 314 // YUV400 315 } else if (mjpeg_decoder.GetColorSpace() == 316 MJpegDecoder::kColorSpaceGrayscale && 317 mjpeg_decoder.GetNumComponents() == 1 && 318 mjpeg_decoder.GetVertSampFactor(0) == 1 && 319 mjpeg_decoder.GetHorizSampFactor(0) == 1) { 320 ret = mjpeg_decoder.DecodeToCallback(&JpegI400ToNV21, &bufs, dst_width, 321 dst_height); 322 } else { 323 // Unknown colorspace. 324 mjpeg_decoder.UnloadFrame(); 325 return 1; 326 } 327 } 328 return ret ? 0 : 1; 329 } 330 194 331 struct ARGBBuffers { 195 332 uint8_t* argb; … … 323 460 return ret ? 0 : 1; 324 461 } 325 #endif 326 327 #endif 462 463 #endif // HAVE_JPEG 328 464 329 465 #ifdef __cplusplus -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_to_argb.cc
r235135 r239415 29 29 // sample_size is measured in bytes and is the size of the frame. 30 30 // With MJPEG it is the compressed size of the frame. 31 32 // TODO(fbarchard): Add the following: 33 // H010ToARGB 34 // I010ToARGB 35 // J400ToARGB 36 // J422ToARGB 37 // J444ToARGB 38 31 39 LIBYUV_API 32 40 int ConvertToARGB(const uint8_t* sample, … … 124 132 inv_crop_height); 125 133 break; 134 case FOURCC_AR30: 135 src = sample + (src_width * crop_y + crop_x) * 4; 136 r = AR30ToARGB(src, src_width * 4, dst_argb, dst_stride_argb, crop_width, 137 inv_crop_height); 138 break; 139 case FOURCC_AB30: 140 src = sample + (src_width * crop_y + crop_x) * 4; 141 r = AB30ToARGB(src, src_width * 4, dst_argb, dst_stride_argb, crop_width, 142 inv_crop_height); 143 break; 126 144 case FOURCC_RGBP: 127 145 src = sample + (src_width * crop_y + crop_x) * 2; … … 148 166 case FOURCC_NV12: 149 167 src = sample + (src_width * crop_y + crop_x); 150 src_uv = sample + aligned_src_width * (src_height + crop_y / 2) + crop_x; 168 src_uv = 169 sample + aligned_src_width * (abs_src_height + crop_y / 2) + crop_x; 151 170 r = NV12ToARGB(src, src_width, src_uv, aligned_src_width, dst_argb, 152 171 dst_stride_argb, crop_width, inv_crop_height); … … 154 173 case FOURCC_NV21: 155 174 src = sample + (src_width * crop_y + crop_x); 156 src_uv = sample + aligned_src_width * (src_height + crop_y / 2) + crop_x; 175 src_uv = 176 sample + aligned_src_width * (abs_src_height + crop_y / 2) + crop_x; 157 177 // Call NV12 but with u and v parameters swapped. 158 178 r = NV21ToARGB(src, src_width, src_uv, aligned_src_width, dst_argb, … … 164 184 inv_crop_height); 165 185 break; 186 166 187 // Triplanar formats 167 188 case FOURCC_I420: … … 188 209 } 189 210 211 case FOURCC_H420: { 212 int halfwidth = (src_width + 1) / 2; 213 int halfheight = (abs_src_height + 1) / 2; 214 const uint8_t* src_y = sample + (src_width * crop_y + crop_x); 215 const uint8_t* src_u = sample + src_width * abs_src_height + 216 (halfwidth * crop_y + crop_x) / 2; 217 const uint8_t* src_v = sample + src_width * abs_src_height + 218 halfwidth * (halfheight + crop_y / 2) + crop_x / 2; 219 r = H420ToARGB(src_y, src_width, src_u, halfwidth, src_v, halfwidth, 220 dst_argb, dst_stride_argb, crop_width, inv_crop_height); 221 break; 222 } 223 190 224 case FOURCC_J420: { 225 int halfwidth = (src_width + 1) / 2; 226 int halfheight = (abs_src_height + 1) / 2; 191 227 const uint8_t* src_y = sample + (src_width * crop_y + crop_x); 192 const uint8_t* src_u; 193 const uint8_t* src_v; 194 int halfwidth = (src_width + 1) / 2; 195 int halfheight = (abs_src_height + 1) / 2; 196 src_u = sample + src_width * abs_src_height + 197 (halfwidth * crop_y + crop_x) / 2; 198 src_v = sample + src_width * abs_src_height + 199 halfwidth * (halfheight + crop_y / 2) + crop_x / 2; 228 const uint8_t* src_u = sample + src_width * abs_src_height + 229 (halfwidth * crop_y + crop_x) / 2; 230 const uint8_t* src_v = sample + src_width * abs_src_height + 231 halfwidth * (halfheight + crop_y / 2) + crop_x / 2; 200 232 r = J420ToARGB(src_y, src_width, src_u, halfwidth, src_v, halfwidth, 201 233 dst_argb, dst_stride_argb, crop_width, inv_crop_height); … … 205 237 case FOURCC_I422: 206 238 case FOURCC_YV16: { 239 int halfwidth = (src_width + 1) / 2; 207 240 const uint8_t* src_y = sample + src_width * crop_y + crop_x; 208 241 const uint8_t* src_u; 209 242 const uint8_t* src_v; 210 int halfwidth = (src_width + 1) / 2;211 243 if (format == FOURCC_YV16) { 212 244 src_v = sample + src_width * abs_src_height + halfwidth * crop_y + … … 224 256 break; 225 257 } 258 259 case FOURCC_H422: { 260 int halfwidth = (src_width + 1) / 2; 261 const uint8_t* src_y = sample + src_width * crop_y + crop_x; 262 const uint8_t* src_u = 263 sample + src_width * abs_src_height + halfwidth * crop_y + crop_x / 2; 264 const uint8_t* src_v = sample + src_width * abs_src_height + 265 halfwidth * (abs_src_height + crop_y) + crop_x / 2; 266 r = H422ToARGB(src_y, src_width, src_u, halfwidth, src_v, halfwidth, 267 dst_argb, dst_stride_argb, crop_width, inv_crop_height); 268 break; 269 } 270 226 271 case FOURCC_I444: 227 272 case FOURCC_YV24: { -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/convert_to_i420.cc
r235135 r239415 156 156 inv_crop_height); 157 157 break; 158 // TODO(fbarchard): Add AR30 and AB30 158 159 case FOURCC_I400: 159 160 src = sample + src_width * crop_y + crop_x; … … 164 165 case FOURCC_NV12: 165 166 src = sample + (src_width * crop_y + crop_x); 166 src_uv = sample + (src_width * src_height) +167 src_uv = sample + (src_width * abs_src_height) + 167 168 ((crop_y / 2) * aligned_src_width) + ((crop_x / 2) * 2); 168 169 r = NV12ToI420Rotate(src, src_width, src_uv, aligned_src_width, dst_y, … … 172 173 case FOURCC_NV21: 173 174 src = sample + (src_width * crop_y + crop_x); 174 src_uv = sample + (src_width * src_height) +175 src_uv = sample + (src_width * abs_src_height) + 175 176 ((crop_y / 2) * aligned_src_width) + ((crop_x / 2) * 2); 176 177 // Call NV12 but with dst_u and dst_v parameters swapped. … … 193 194 int halfheight = (abs_src_height + 1) / 2; 194 195 if (format == FOURCC_YV12) { 196 src_v = sample + src_width * abs_src_height + halfwidth * (crop_y / 2) + 197 (crop_x / 2); 198 src_u = sample + src_width * abs_src_height + 199 halfwidth * (halfheight + (crop_y / 2)) + (crop_x / 2); 200 } else { 201 src_u = sample + src_width * abs_src_height + halfwidth * (crop_y / 2) + 202 (crop_x / 2); 195 203 src_v = sample + src_width * abs_src_height + 196 (halfwidth * crop_y + crop_x) / 2; 197 src_u = sample + src_width * abs_src_height + 198 halfwidth * (halfheight + crop_y / 2) + crop_x / 2; 199 } else { 200 src_u = sample + src_width * abs_src_height + 201 (halfwidth * crop_y + crop_x) / 2; 202 src_v = sample + src_width * abs_src_height + 203 halfwidth * (halfheight + crop_y / 2) + crop_x / 2; 204 halfwidth * (halfheight + (crop_y / 2)) + (crop_x / 2); 204 205 } 205 206 r = I420Rotate(src_y, src_width, src_u, halfwidth, src_v, halfwidth, … … 216 217 if (format == FOURCC_YV16) { 217 218 src_v = sample + src_width * abs_src_height + halfwidth * crop_y + 218 crop_x / 2;219 (crop_x / 2); 219 220 src_u = sample + src_width * abs_src_height + 220 halfwidth * (abs_src_height + crop_y) + crop_x / 2;221 halfwidth * (abs_src_height + crop_y) + (crop_x / 2); 221 222 } else { 222 223 src_u = sample + src_width * abs_src_height + halfwidth * crop_y + 223 crop_x / 2;224 (crop_x / 2); 224 225 src_v = sample + src_width * abs_src_height + 225 halfwidth * (abs_src_height + crop_y) + crop_x / 2;226 halfwidth * (abs_src_height + crop_y) + (crop_x / 2); 226 227 } 227 228 r = I422ToI420(src_y, src_width, src_u, halfwidth, src_v, halfwidth, -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/cpu_id.cc
r235135 r239415 18 18 defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160040219) 19 19 #include <immintrin.h> // For _xgetbv() 20 #endif21 22 #if !defined(__native_client__)23 #include <stdlib.h> // For getenv()24 20 #endif 25 21 … … 178 174 return kCpuHasMSA; 179 175 } 176 if (strcmp(ase, " mmi") == 0) { 177 return kCpuHasMMI; 178 } 180 179 return 0; 181 180 } … … 190 189 return 0; 191 190 } 191 } else if (memcmp(cpuinfo_line, "cpu model", 9) == 0) { 192 char* p = strstr(cpuinfo_line, "Loongson-3"); 193 if (p) { 194 fclose(f); 195 if (strcmp(ase, " mmi") == 0) { 196 return kCpuHasMMI; 197 } 198 return 0; 199 } 192 200 } 193 201 } … … 195 203 return 0; 196 204 } 197 198 // Test environment variable for disabling CPU features. Any non-zero value199 // to disable. Zero ignored to make it easy to set the variable on/off.200 #if !defined(__native_client__) && !defined(_M_ARM)201 202 static LIBYUV_BOOL TestEnv(const char* name) {203 const char* var = getenv(name);204 if (var) {205 if (var[0] != '0') {206 return LIBYUV_TRUE;207 }208 }209 return LIBYUV_FALSE;210 }211 #else // nacl does not support getenv().212 static LIBYUV_BOOL TestEnv(const char*) {213 return LIBYUV_FALSE;214 }215 #endif216 205 217 206 static SAFEBUFFERS int GetCpuFlags(void) { … … 252 241 } 253 242 } 254 255 // TODO(fbarchard): Consider moving these to gtest256 // Environment variable overrides for testing.257 if (TestEnv("LIBYUV_DISABLE_X86")) {258 cpu_info &= ~kCpuHasX86;259 }260 if (TestEnv("LIBYUV_DISABLE_SSE2")) {261 cpu_info &= ~kCpuHasSSE2;262 }263 if (TestEnv("LIBYUV_DISABLE_SSSE3")) {264 cpu_info &= ~kCpuHasSSSE3;265 }266 if (TestEnv("LIBYUV_DISABLE_SSE41")) {267 cpu_info &= ~kCpuHasSSE41;268 }269 if (TestEnv("LIBYUV_DISABLE_SSE42")) {270 cpu_info &= ~kCpuHasSSE42;271 }272 if (TestEnv("LIBYUV_DISABLE_AVX")) {273 cpu_info &= ~kCpuHasAVX;274 }275 if (TestEnv("LIBYUV_DISABLE_AVX2")) {276 cpu_info &= ~kCpuHasAVX2;277 }278 if (TestEnv("LIBYUV_DISABLE_ERMS")) {279 cpu_info &= ~kCpuHasERMS;280 }281 if (TestEnv("LIBYUV_DISABLE_FMA3")) {282 cpu_info &= ~kCpuHasFMA3;283 }284 if (TestEnv("LIBYUV_DISABLE_F16C")) {285 cpu_info &= ~kCpuHasF16C;286 }287 if (TestEnv("LIBYUV_DISABLE_AVX512BW")) {288 cpu_info &= ~kCpuHasAVX512BW;289 }290 291 243 #endif 292 244 #if defined(__mips__) && defined(__linux__) 293 245 #if defined(__mips_msa) 294 246 cpu_info = MipsCpuCaps("/proc/cpuinfo", " msa"); 247 #elif defined(_MIPS_ARCH_LOONGSON3A) 248 cpu_info = MipsCpuCaps("/proc/cpuinfo", " mmi"); 295 249 #endif 296 250 cpu_info |= kCpuHasMIPS; 297 if (getenv("LIBYUV_DISABLE_MSA")) {298 cpu_info &= ~kCpuHasMSA;299 }300 251 #endif 301 252 #if defined(__arm__) || defined(__aarch64__) … … 316 267 #endif 317 268 cpu_info |= kCpuHasARM; 318 if (TestEnv("LIBYUV_DISABLE_NEON")) {319 cpu_info &= ~kCpuHasNEON;320 }321 269 #endif // __arm__ 322 if (TestEnv("LIBYUV_DISABLE_ASM")) {323 cpu_info = 0;324 }325 270 cpu_info |= kCpuInitialized; 326 271 return cpu_info; … … 331 276 int MaskCpuFlags(int enable_flags) { 332 277 int cpu_info = GetCpuFlags() & enable_flags; 333 #ifdef __ATOMIC_RELAXED 334 __atomic_store_n(&cpu_info_, cpu_info, __ATOMIC_RELAXED); 335 #else 336 cpu_info_ = cpu_info; 337 #endif 278 SetCpuFlags(cpu_info); 338 279 return cpu_info; 339 280 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/planar_functions.cc
r235135 r239415 411 411 } 412 412 #endif 413 #if defined(HAS_SPLITUVROW_MMI) 414 if (TestCpuFlag(kCpuHasMMI)) { 415 SplitUVRow = SplitUVRow_Any_MMI; 416 if (IS_ALIGNED(width, 8)) { 417 SplitUVRow = SplitUVRow_MMI; 418 } 419 } 420 #endif 413 421 414 422 for (y = 0; y < height; ++y) { … … 476 484 if (IS_ALIGNED(width, 16)) { 477 485 MergeUVRow = MergeUVRow_MSA; 486 } 487 } 488 #endif 489 #if defined(HAS_MERGEUVROW_MMI) 490 if (TestCpuFlag(kCpuHasMMI)) { 491 MergeUVRow = MergeUVRow_Any_MMI; 492 if (IS_ALIGNED(width, 8)) { 493 MergeUVRow = MergeUVRow_MMI; 478 494 } 479 495 } … … 538 554 } 539 555 #endif 556 #if defined(HAS_SPLITRGBROW_MMI) 557 if (TestCpuFlag(kCpuHasMMI)) { 558 SplitRGBRow = SplitRGBRow_Any_MMI; 559 if (IS_ALIGNED(width, 4)) { 560 SplitRGBRow = SplitRGBRow_MMI; 561 } 562 } 563 #endif 540 564 541 565 for (y = 0; y < height; ++y) { … … 594 618 } 595 619 #endif 620 #if defined(HAS_MERGERGBROW_MMI) 621 if (TestCpuFlag(kCpuHasMMI)) { 622 MergeRGBRow = MergeRGBRow_Any_MMI; 623 if (IS_ALIGNED(width, 8)) { 624 MergeRGBRow = MergeRGBRow_MMI; 625 } 626 } 627 #endif 596 628 597 629 for (y = 0; y < height; ++y) { … … 649 681 if (IS_ALIGNED(width, 64)) { 650 682 MirrorRow = MirrorRow_MSA; 683 } 684 } 685 #endif 686 #if defined(HAS_MIRRORROW_MMI) 687 if (TestCpuFlag(kCpuHasMMI)) { 688 MirrorRow = MirrorRow_Any_MMI; 689 if (IS_ALIGNED(width, 8)) { 690 MirrorRow = MirrorRow_MMI; 651 691 } 652 692 } … … 735 775 } 736 776 #endif 777 #if defined(HAS_YUY2TOYROW_MMI) 778 if (TestCpuFlag(kCpuHasMMI)) { 779 YUY2ToYRow = YUY2ToYRow_Any_MMI; 780 YUY2ToUV422Row = YUY2ToUV422Row_Any_MMI; 781 if (IS_ALIGNED(width, 8)) { 782 YUY2ToYRow = YUY2ToYRow_MMI; 783 YUY2ToUV422Row = YUY2ToUV422Row_MMI; 784 } 785 } 786 #endif 737 787 738 788 for (y = 0; y < height; ++y) { … … 821 871 } 822 872 #endif 873 #if defined(HAS_UYVYTOYROW_MMI) 874 if (TestCpuFlag(kCpuHasMMI)) { 875 UYVYToYRow = UYVYToYRow_Any_MMI; 876 UYVYToUV422Row = UYVYToUV422Row_Any_MMI; 877 if (IS_ALIGNED(width, 16)) { 878 UYVYToYRow = UYVYToYRow_MMI; 879 UYVYToUV422Row = UYVYToUV422Row_MMI; 880 } 881 } 882 #endif 823 883 824 884 for (y = 0; y < height; ++y) { … … 888 948 if (IS_ALIGNED(width, 32)) { 889 949 YUY2ToYRow = YUY2ToYRow_MSA; 950 } 951 } 952 #endif 953 #if defined(HAS_YUY2TOYROW_MMI) 954 if (TestCpuFlag(kCpuHasMMI)) { 955 YUY2ToYRow = YUY2ToYRow_Any_MMI; 956 if (IS_ALIGNED(width, 8)) { 957 YUY2ToYRow = YUY2ToYRow_MMI; 890 958 } 891 959 } … … 1016 1084 } 1017 1085 #endif 1086 #if defined(HAS_ARGBMIRRORROW_MMI) 1087 if (TestCpuFlag(kCpuHasMMI)) { 1088 ARGBMirrorRow = ARGBMirrorRow_Any_MMI; 1089 if (IS_ALIGNED(width, 2)) { 1090 ARGBMirrorRow = ARGBMirrorRow_MMI; 1091 } 1092 } 1093 #endif 1018 1094 1019 1095 // Mirror plane … … 1047 1123 if (TestCpuFlag(kCpuHasMSA)) { 1048 1124 ARGBBlendRow = ARGBBlendRow_MSA; 1125 } 1126 #endif 1127 #if defined(HAS_ARGBBLENDROW_MMI) 1128 if (TestCpuFlag(kCpuHasMMI)) { 1129 ARGBBlendRow = ARGBBlendRow_MMI; 1049 1130 } 1050 1131 #endif … … 1138 1219 if (IS_ALIGNED(width, 32)) { 1139 1220 BlendPlaneRow = BlendPlaneRow_AVX2; 1221 } 1222 } 1223 #endif 1224 #if defined(HAS_BLENDPLANEROW_MMI) 1225 if (TestCpuFlag(kCpuHasMMI)) { 1226 BlendPlaneRow = BlendPlaneRow_Any_MMI; 1227 if (IS_ALIGNED(width, 8)) { 1228 BlendPlaneRow = BlendPlaneRow_MMI; 1140 1229 } 1141 1230 } … … 1217 1306 } 1218 1307 #endif 1308 #if defined(HAS_BLENDPLANEROW_MMI) 1309 if (TestCpuFlag(kCpuHasMMI)) { 1310 BlendPlaneRow = BlendPlaneRow_Any_MMI; 1311 if (IS_ALIGNED(halfwidth, 8)) { 1312 BlendPlaneRow = BlendPlaneRow_MMI; 1313 } 1314 } 1315 #endif 1219 1316 if (!IS_ALIGNED(width, 2)) { 1220 1317 ScaleRowDown2 = ScaleRowDown2Box_Odd_C; … … 1249 1346 if (IS_ALIGNED(halfwidth, 32)) { 1250 1347 ScaleRowDown2 = ScaleRowDown2Box_AVX2; 1348 } 1349 } 1350 } 1351 #endif 1352 #if defined(HAS_SCALEROWDOWN2_MMI) 1353 if (TestCpuFlag(kCpuHasMMI)) { 1354 ScaleRowDown2 = ScaleRowDown2Box_Odd_MMI; 1355 if (IS_ALIGNED(width, 2)) { 1356 ScaleRowDown2 = ScaleRowDown2Box_Any_MMI; 1357 if (IS_ALIGNED(halfwidth, 8)) { 1358 ScaleRowDown2 = ScaleRowDown2Box_MMI; 1251 1359 } 1252 1360 } … … 1338 1446 } 1339 1447 #endif 1448 #if defined(HAS_ARGBMULTIPLYROW_MMI) 1449 if (TestCpuFlag(kCpuHasMMI)) { 1450 ARGBMultiplyRow = ARGBMultiplyRow_Any_MMI; 1451 if (IS_ALIGNED(width, 2)) { 1452 ARGBMultiplyRow = ARGBMultiplyRow_MMI; 1453 } 1454 } 1455 #endif 1340 1456 1341 1457 // Multiply plane … … 1415 1531 } 1416 1532 #endif 1533 #if defined(HAS_ARGBADDROW_MMI) 1534 if (TestCpuFlag(kCpuHasMMI)) { 1535 ARGBAddRow = ARGBAddRow_Any_MMI; 1536 if (IS_ALIGNED(width, 2)) { 1537 ARGBAddRow = ARGBAddRow_MMI; 1538 } 1539 } 1540 #endif 1417 1541 1418 1542 // Add plane … … 1484 1608 if (IS_ALIGNED(width, 8)) { 1485 1609 ARGBSubtractRow = ARGBSubtractRow_MSA; 1610 } 1611 } 1612 #endif 1613 #if defined(HAS_ARGBSUBTRACTROW_MMI) 1614 if (TestCpuFlag(kCpuHasMMI)) { 1615 ARGBSubtractRow = ARGBSubtractRow_Any_MMI; 1616 if (IS_ALIGNED(width, 2)) { 1617 ARGBSubtractRow = ARGBSubtractRow_MMI; 1486 1618 } 1487 1619 } … … 1716 1848 if (IS_ALIGNED(width, 16)) { 1717 1849 RAWToRGB24Row = RAWToRGB24Row_MSA; 1850 } 1851 } 1852 #endif 1853 #if defined(HAS_RAWTORGB24ROW_MMI) 1854 if (TestCpuFlag(kCpuHasMMI)) { 1855 RAWToRGB24Row = RAWToRGB24Row_Any_MMI; 1856 if (IS_ALIGNED(width, 4)) { 1857 RAWToRGB24Row = RAWToRGB24Row_MMI; 1718 1858 } 1719 1859 } … … 1940 2080 } 1941 2081 #endif 2082 #if defined(HAS_ARGBATTENUATEROW_MMI) 2083 if (TestCpuFlag(kCpuHasMMI)) { 2084 ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI; 2085 if (IS_ALIGNED(width, 2)) { 2086 ARGBAttenuateRow = ARGBAttenuateRow_MMI; 2087 } 2088 } 2089 #endif 1942 2090 1943 2091 for (y = 0; y < height; ++y) { … … 2040 2188 } 2041 2189 #endif 2190 #if defined(HAS_ARGBGRAYROW_MMI) 2191 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 2)) { 2192 ARGBGrayRow = ARGBGrayRow_MMI; 2193 } 2194 #endif 2042 2195 2043 2196 for (y = 0; y < height; ++y) { … … 2085 2238 } 2086 2239 #endif 2240 #if defined(HAS_ARGBGRAYROW_MMI) 2241 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 2)) { 2242 ARGBGrayRow = ARGBGrayRow_MMI; 2243 } 2244 #endif 2087 2245 2088 2246 for (y = 0; y < height; ++y) { … … 2126 2284 if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) { 2127 2285 ARGBSepiaRow = ARGBSepiaRow_MSA; 2286 } 2287 #endif 2288 #if defined(HAS_ARGBSEPIAROW_MMI) 2289 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 2)) { 2290 ARGBSepiaRow = ARGBSepiaRow_MMI; 2128 2291 } 2129 2292 #endif … … 2177 2340 if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) { 2178 2341 ARGBColorMatrixRow = ARGBColorMatrixRow_MSA; 2342 } 2343 #endif 2344 #if defined(HAS_ARGBCOLORMATRIXROW_MMI) 2345 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 2)) { 2346 ARGBColorMatrixRow = ARGBColorMatrixRow_MMI; 2179 2347 } 2180 2348 #endif … … 2373 2541 } 2374 2542 #endif 2543 #if defined(HAS_CUMULATIVESUMTOAVERAGEROW_MMI) 2544 if (TestCpuFlag(kCpuHasMMI)) { 2545 ComputeCumulativeSumRow = ComputeCumulativeSumRow_MMI; 2546 } 2547 #endif 2548 2375 2549 memset(dst_cumsum, 0, width * sizeof(dst_cumsum[0]) * 4); // 4 int per pixel. 2376 2550 for (y = 0; y < height; ++y) { … … 2429 2603 ComputeCumulativeSumRow = ComputeCumulativeSumRow_SSE2; 2430 2604 CumulativeSumToAverageRow = CumulativeSumToAverageRow_SSE2; 2605 } 2606 #endif 2607 #if defined(HAS_CUMULATIVESUMTOAVERAGEROW_MMI) 2608 if (TestCpuFlag(kCpuHasMMI)) { 2609 ComputeCumulativeSumRow = ComputeCumulativeSumRow_MMI; 2431 2610 } 2432 2611 #endif … … 2537 2716 } 2538 2717 #endif 2718 #if defined(HAS_ARGBSHADEROW_MMI) 2719 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 2)) { 2720 ARGBShadeRow = ARGBShadeRow_MMI; 2721 } 2722 #endif 2539 2723 2540 2724 for (y = 0; y < height; ++y) { … … 2605 2789 if (IS_ALIGNED(width, 32)) { 2606 2790 InterpolateRow = InterpolateRow_MSA; 2791 } 2792 } 2793 #endif 2794 #if defined(HAS_INTERPOLATEROW_MMI) 2795 if (TestCpuFlag(kCpuHasMMI)) { 2796 InterpolateRow = InterpolateRow_Any_MMI; 2797 if (IS_ALIGNED(width, 8)) { 2798 InterpolateRow = InterpolateRow_MMI; 2607 2799 } 2608 2800 } … … 2731 2923 } 2732 2924 #endif 2925 #if defined(HAS_ARGBSHUFFLEROW_MMI) 2926 if (TestCpuFlag(kCpuHasMMI)) { 2927 ARGBShuffleRow = ARGBShuffleRow_Any_MMI; 2928 if (IS_ALIGNED(width, 2)) { 2929 ARGBShuffleRow = ARGBShuffleRow_MMI; 2930 } 2931 } 2932 #endif 2733 2933 2734 2934 for (y = 0; y < height; ++y) { … … 2802 3002 } 2803 3003 #endif 3004 #if defined(HAS_ARGBTOYJROW_MMI) 3005 if (TestCpuFlag(kCpuHasMMI)) { 3006 ARGBToYJRow = ARGBToYJRow_Any_MMI; 3007 if (IS_ALIGNED(width, 8)) { 3008 ARGBToYJRow = ARGBToYJRow_MMI; 3009 } 3010 } 3011 #endif 2804 3012 2805 3013 #if defined(HAS_SOBELYROW_SSE2) … … 2818 3026 } 2819 3027 #endif 3028 #if defined(HAS_SOBELYROW_MMI) 3029 if (TestCpuFlag(kCpuHasMMI)) { 3030 SobelYRow = SobelYRow_MMI; 3031 } 3032 #endif 2820 3033 #if defined(HAS_SOBELXROW_SSE2) 2821 3034 if (TestCpuFlag(kCpuHasSSE2)) { … … 2831 3044 if (TestCpuFlag(kCpuHasMSA)) { 2832 3045 SobelXRow = SobelXRow_MSA; 3046 } 3047 #endif 3048 #if defined(HAS_SOBELXROW_MMI) 3049 if (TestCpuFlag(kCpuHasMMI)) { 3050 SobelXRow = SobelXRow_MMI; 2833 3051 } 2834 3052 #endif … … 2915 3133 } 2916 3134 #endif 3135 #if defined(HAS_SOBELROW_MMI) 3136 if (TestCpuFlag(kCpuHasMMI)) { 3137 SobelRow = SobelRow_Any_MMI; 3138 if (IS_ALIGNED(width, 8)) { 3139 SobelRow = SobelRow_MMI; 3140 } 3141 } 3142 #endif 2917 3143 return ARGBSobelize(src_argb, src_stride_argb, dst_argb, dst_stride_argb, 2918 3144 width, height, SobelRow); … … 2953 3179 } 2954 3180 #endif 3181 #if defined(HAS_SOBELTOPLANEROW_MMI) 3182 if (TestCpuFlag(kCpuHasMMI)) { 3183 SobelToPlaneRow = SobelToPlaneRow_Any_MMI; 3184 if (IS_ALIGNED(width, 8)) { 3185 SobelToPlaneRow = SobelToPlaneRow_MMI; 3186 } 3187 } 3188 #endif 2955 3189 return ARGBSobelize(src_argb, src_stride_argb, dst_y, dst_stride_y, width, 2956 3190 height, SobelToPlaneRow); … … 2992 3226 } 2993 3227 #endif 3228 #if defined(HAS_SOBELXYROW_MMI) 3229 if (TestCpuFlag(kCpuHasMMI)) { 3230 SobelXYRow = SobelXYRow_Any_MMI; 3231 if (IS_ALIGNED(width, 8)) { 3232 SobelXYRow = SobelXYRow_MMI; 3233 } 3234 } 3235 #endif 2994 3236 return ARGBSobelize(src_argb, src_stride_argb, dst_argb, dst_stride_argb, 2995 3237 width, height, SobelXYRow); … … 3229 3471 } 3230 3472 #endif 3473 #if defined(HAS_ARGBCOPYALPHAROW_MMI) 3474 if (TestCpuFlag(kCpuHasMMI)) { 3475 ARGBCopyAlphaRow = ARGBCopyAlphaRow_Any_MMI; 3476 if (IS_ALIGNED(width, 2)) { 3477 ARGBCopyAlphaRow = ARGBCopyAlphaRow_MMI; 3478 } 3479 } 3480 #endif 3231 3481 3232 3482 for (y = 0; y < height; ++y) { … … 3287 3537 } 3288 3538 #endif 3539 #if defined(HAS_ARGBEXTRACTALPHAROW_MMI) 3540 if (TestCpuFlag(kCpuHasMMI)) { 3541 ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_MMI 3542 : ARGBExtractAlphaRow_Any_MMI; 3543 } 3544 #endif 3289 3545 3290 3546 for (int y = 0; y < height; ++y) { … … 3335 3591 if (IS_ALIGNED(width, 16)) { 3336 3592 ARGBCopyYToAlphaRow = ARGBCopyYToAlphaRow_AVX2; 3593 } 3594 } 3595 #endif 3596 #if defined(HAS_ARGBCOPYYTOALPHAROW_MMI) 3597 if (TestCpuFlag(kCpuHasMMI)) { 3598 ARGBCopyYToAlphaRow = ARGBCopyYToAlphaRow_Any_MMI; 3599 if (IS_ALIGNED(width, 8)) { 3600 ARGBCopyYToAlphaRow = ARGBCopyYToAlphaRow_MMI; 3337 3601 } 3338 3602 } … … 3407 3671 } 3408 3672 #endif 3673 #if defined(HAS_SPLITUVROW_MMI) 3674 if (TestCpuFlag(kCpuHasMMI)) { 3675 SplitUVRow = SplitUVRow_Any_MMI; 3676 if (IS_ALIGNED(width, 8)) { 3677 SplitUVRow = SplitUVRow_MMI; 3678 } 3679 } 3680 #endif 3409 3681 #if defined(HAS_INTERPOLATEROW_SSSE3) 3410 3682 if (TestCpuFlag(kCpuHasSSSE3)) { … … 3436 3708 if (IS_ALIGNED(width, 32)) { 3437 3709 InterpolateRow = InterpolateRow_MSA; 3710 } 3711 } 3712 #endif 3713 #if defined(HAS_INTERPOLATEROW_MMI) 3714 if (TestCpuFlag(kCpuHasMMI)) { 3715 InterpolateRow = InterpolateRow_Any_MMI; 3716 if (IS_ALIGNED(width, 8)) { 3717 InterpolateRow = InterpolateRow_MMI; 3438 3718 } 3439 3719 } … … 3523 3803 } 3524 3804 #endif 3805 #if defined(HAS_SPLITUVROW_MMI) 3806 if (TestCpuFlag(kCpuHasMMI)) { 3807 SplitUVRow = SplitUVRow_Any_MMI; 3808 if (IS_ALIGNED(width, 8)) { 3809 SplitUVRow = SplitUVRow_MMI; 3810 } 3811 } 3812 #endif 3525 3813 #if defined(HAS_INTERPOLATEROW_SSSE3) 3526 3814 if (TestCpuFlag(kCpuHasSSSE3)) { … … 3552 3840 if (IS_ALIGNED(width, 32)) { 3553 3841 InterpolateRow = InterpolateRow_MSA; 3842 } 3843 } 3844 #endif 3845 #if defined(HAS_INTERPOLATEROW_MMI) 3846 if (TestCpuFlag(kCpuHasMMI)) { 3847 InterpolateRow = InterpolateRow_Any_MMI; 3848 if (IS_ALIGNED(width, 8)) { 3849 InterpolateRow = InterpolateRow_MMI; 3554 3850 } 3555 3851 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/rotate.cc
r235135 r239415 48 48 TransposeWx8 = TransposeWx8_SSSE3; 49 49 } 50 } 51 #endif 52 #if defined(HAS_TRANSPOSEWX8_MMI) 53 if (TestCpuFlag(kCpuHasMMI)) { 54 TransposeWx8 = TransposeWx8_MMI; 50 55 } 51 56 #endif … … 167 172 } 168 173 #endif 174 #if defined(HAS_MIRRORROW_MMI) 175 if (TestCpuFlag(kCpuHasMMI)) { 176 MirrorRow = MirrorRow_Any_MMI; 177 if (IS_ALIGNED(width, 8)) { 178 MirrorRow = MirrorRow_MMI; 179 } 180 } 181 #endif 169 182 #if defined(HAS_COPYROW_SSE2) 170 183 if (TestCpuFlag(kCpuHasSSE2)) { … … 185 198 if (TestCpuFlag(kCpuHasNEON)) { 186 199 CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; 200 } 201 #endif 202 #if defined(HAS_COPYROW_MMI) 203 if (TestCpuFlag(kCpuHasMMI)) { 204 CopyRow = IS_ALIGNED(width, 8) ? CopyRow_MMI : CopyRow_Any_MMI; 187 205 } 188 206 #endif … … 233 251 } 234 252 #endif 253 #if defined(HAS_TRANSPOSEUVWX8_MMI) 254 if (TestCpuFlag(kCpuHasMMI)) { 255 TransposeUVWx8 = TransposeUVWx8_Any_MMI; 256 if (IS_ALIGNED(width, 4)) { 257 TransposeUVWx8 = TransposeUVWx8_MMI; 258 } 259 } 260 #endif 235 261 #if defined(HAS_TRANSPOSEUVWX16_MSA) 236 262 if (TestCpuFlag(kCpuHasMSA)) { … … 330 356 if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 32)) { 331 357 MirrorUVRow = MirrorUVRow_MSA; 358 } 359 #endif 360 #if defined(HAS_MIRRORUVROW_MMI) 361 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(width, 8)) { 362 MirrorUVRow = MirrorUVRow_MMI; 332 363 } 333 364 #endif -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/rotate_any.cc
r235135 r239415 36 36 TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7) 37 37 #endif 38 #ifdef HAS_TRANSPOSEWX8_MMI 39 TANY(TransposeWx8_Any_MMI, TransposeWx8_MMI, 7) 40 #endif 38 41 #ifdef HAS_TRANSPOSEWX8_FAST_SSSE3 39 42 TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, 15) … … 63 66 TUVANY(TransposeUVWx8_Any_SSE2, TransposeUVWx8_SSE2, 7) 64 67 #endif 68 #ifdef HAS_TRANSPOSEUVWX8_MMI 69 TUVANY(TransposeUVWx8_Any_MMI, TransposeUVWx8_MMI, 7) 70 #endif 65 71 #ifdef HAS_TRANSPOSEUVWX16_MSA 66 72 TUVANY(TransposeUVWx16_Any_MSA, TransposeUVWx16_MSA, 7) -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/rotate_argb.cc
r235135 r239415 54 54 if (IS_ALIGNED(height, 4)) { // Width of dest. 55 55 ScaleARGBRowDownEven = ScaleARGBRowDownEven_MSA; 56 } 57 } 58 #endif 59 #if defined(HAS_SCALEARGBROWDOWNEVEN_MMI) 60 if (TestCpuFlag(kCpuHasMMI)) { 61 ScaleARGBRowDownEven = ScaleARGBRowDownEven_Any_MMI; 62 if (IS_ALIGNED(height, 4)) { // Width of dest. 63 ScaleARGBRowDownEven = ScaleARGBRowDownEven_MMI; 56 64 } 57 65 } … … 143 151 } 144 152 #endif 153 #if defined(HAS_ARGBMIRRORROW_MMI) 154 if (TestCpuFlag(kCpuHasMMI)) { 155 ARGBMirrorRow = ARGBMirrorRow_Any_MMI; 156 if (IS_ALIGNED(width, 2)) { 157 ARGBMirrorRow = ARGBMirrorRow_MMI; 158 } 159 } 160 #endif 145 161 #if defined(HAS_COPYROW_SSE2) 146 162 if (TestCpuFlag(kCpuHasSSE2)) { -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/row_any.cc
r235135 r239415 93 93 ANY31(MergeRGBRow_Any_NEON, MergeRGBRow_NEON, 0, 0, 3, 15) 94 94 #endif 95 #ifdef HAS_MERGERGBROW_MMI 96 ANY31(MergeRGBRow_Any_MMI, MergeRGBRow_MMI, 0, 0, 3, 7) 97 #endif 95 98 #ifdef HAS_I422TOYUY2ROW_SSE2 96 99 ANY31(I422ToYUY2Row_Any_SSE2, I422ToYUY2Row_SSE2, 1, 1, 4, 15) … … 107 110 ANY31(I422ToYUY2Row_Any_MSA, I422ToYUY2Row_MSA, 1, 1, 4, 31) 108 111 #endif 112 #ifdef HAS_I422TOYUY2ROW_MMI 113 ANY31(I422ToYUY2Row_Any_MMI, I422ToYUY2Row_MMI, 1, 1, 4, 7) 114 #endif 109 115 #ifdef HAS_I422TOUYVYROW_NEON 110 116 ANY31(I422ToUYVYRow_Any_NEON, I422ToUYVYRow_NEON, 1, 1, 4, 15) … … 113 119 ANY31(I422ToUYVYRow_Any_MSA, I422ToUYVYRow_MSA, 1, 1, 4, 31) 114 120 #endif 121 #ifdef HAS_I422TOUYVYROW_MMI 122 ANY31(I422ToUYVYRow_Any_MMI, I422ToUYVYRow_MMI, 1, 1, 4, 7) 123 #endif 115 124 #ifdef HAS_BLENDPLANEROW_AVX2 116 125 ANY31(BlendPlaneRow_Any_AVX2, BlendPlaneRow_AVX2, 0, 0, 1, 31) … … 118 127 #ifdef HAS_BLENDPLANEROW_SSSE3 119 128 ANY31(BlendPlaneRow_Any_SSSE3, BlendPlaneRow_SSSE3, 0, 0, 1, 7) 129 #endif 130 #ifdef HAS_BLENDPLANEROW_MMI 131 ANY31(BlendPlaneRow_Any_MMI, BlendPlaneRow_MMI, 0, 0, 1, 7) 120 132 #endif 121 133 #undef ANY31 … … 124 136 // on arm that subsamples 444 to 422 internally. 125 137 // Any 3 planes to 1 with yuvconstants 126 #define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ 127 void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ 128 const uint8_t* v_buf, uint8_t* dst_ptr, \ 129 const struct YuvConstants* yuvconstants, int width) { \ 130 SIMD_ALIGNED(uint8_t temp[64 * 4]); \ 131 memset(temp, 0, 64 * 3); /* for YUY2 and msan */ \ 132 int r = width & MASK; \ 133 int n = width & ~MASK; \ 134 if (n > 0) { \ 135 ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ 136 } \ 137 memcpy(temp, y_buf + n, r); \ 138 memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ 139 memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ 140 if (width & 1) { \ 141 temp[64 + SS(r, UVSHIFT)] = temp[64 + SS(r, UVSHIFT) - 1]; \ 142 temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ 143 } \ 144 ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, yuvconstants, MASK + 1); \ 145 memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 192, \ 146 SS(r, DUVSHIFT) * BPP); \ 138 #define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ 139 void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ 140 const uint8_t* v_buf, uint8_t* dst_ptr, \ 141 const struct YuvConstants* yuvconstants, int width) { \ 142 SIMD_ALIGNED(uint8_t temp[128 * 4]); \ 143 memset(temp, 0, 128 * 3); /* for YUY2 and msan */ \ 144 int r = width & MASK; \ 145 int n = width & ~MASK; \ 146 if (n > 0) { \ 147 ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ 148 } \ 149 memcpy(temp, y_buf + n, r); \ 150 memcpy(temp + 128, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ 151 memcpy(temp + 256, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ 152 if (width & 1) { \ 153 temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ 154 temp[256 + SS(r, UVSHIFT)] = temp[256 + SS(r, UVSHIFT) - 1]; \ 155 } \ 156 ANY_SIMD(temp, temp + 128, temp + 256, temp + 384, yuvconstants, \ 157 MASK + 1); \ 158 memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 384, \ 159 SS(r, DUVSHIFT) * BPP); \ 147 160 } 148 161 … … 162 175 ANY31C(I422ToARGB1555Row_Any_SSSE3, I422ToARGB1555Row_SSSE3, 1, 0, 2, 7) 163 176 ANY31C(I422ToRGB565Row_Any_SSSE3, I422ToRGB565Row_SSSE3, 1, 0, 2, 7) 164 ANY31C(I422ToRGB24Row_Any_SSSE3, I422ToRGB24Row_SSSE3, 1, 0, 3, 7)177 ANY31C(I422ToRGB24Row_Any_SSSE3, I422ToRGB24Row_SSSE3, 1, 0, 3, 15) 165 178 #endif // HAS_I444TOARGBROW_SSSE3 166 179 #ifdef HAS_I422TORGB24ROW_AVX2 167 ANY31C(I422ToRGB24Row_Any_AVX2, I422ToRGB24Row_AVX2, 1, 0, 3, 15)180 ANY31C(I422ToRGB24Row_Any_AVX2, I422ToRGB24Row_AVX2, 1, 0, 3, 31) 168 181 #endif 169 182 #ifdef HAS_I422TOARGBROW_AVX2 … … 271 284 ANY21(MergeUVRow_Any_MSA, MergeUVRow_MSA, 0, 1, 1, 2, 15) 272 285 #endif 286 #ifdef HAS_MERGEUVROW_MMI 287 ANY21(MergeUVRow_Any_MMI, MergeUVRow_MMI, 0, 1, 1, 2, 7) 288 #endif 273 289 274 290 // Math functions. … … 303 319 ANY21(ARGBMultiplyRow_Any_MSA, ARGBMultiplyRow_MSA, 0, 4, 4, 4, 3) 304 320 #endif 321 #ifdef HAS_ARGBMULTIPLYROW_MMI 322 ANY21(ARGBMultiplyRow_Any_MMI, ARGBMultiplyRow_MMI, 0, 4, 4, 4, 1) 323 #endif 305 324 #ifdef HAS_ARGBADDROW_MSA 306 325 ANY21(ARGBAddRow_Any_MSA, ARGBAddRow_MSA, 0, 4, 4, 4, 7) 307 326 #endif 327 #ifdef HAS_ARGBADDROW_MMI 328 ANY21(ARGBAddRow_Any_MMI, ARGBAddRow_MMI, 0, 4, 4, 4, 1) 329 #endif 308 330 #ifdef HAS_ARGBSUBTRACTROW_MSA 309 331 ANY21(ARGBSubtractRow_Any_MSA, ARGBSubtractRow_MSA, 0, 4, 4, 4, 7) 310 332 #endif 333 #ifdef HAS_ARGBSUBTRACTROW_MMI 334 ANY21(ARGBSubtractRow_Any_MMI, ARGBSubtractRow_MMI, 0, 4, 4, 4, 1) 335 #endif 311 336 #ifdef HAS_SOBELROW_SSE2 312 337 ANY21(SobelRow_Any_SSE2, SobelRow_SSE2, 0, 1, 1, 4, 15) … … 318 343 ANY21(SobelRow_Any_MSA, SobelRow_MSA, 0, 1, 1, 4, 15) 319 344 #endif 345 #ifdef HAS_SOBELROW_MMI 346 ANY21(SobelRow_Any_MMI, SobelRow_MMI, 0, 1, 1, 4, 7) 347 #endif 320 348 #ifdef HAS_SOBELTOPLANEROW_SSE2 321 349 ANY21(SobelToPlaneRow_Any_SSE2, SobelToPlaneRow_SSE2, 0, 1, 1, 1, 15) … … 327 355 ANY21(SobelToPlaneRow_Any_MSA, SobelToPlaneRow_MSA, 0, 1, 1, 1, 31) 328 356 #endif 357 #ifdef HAS_SOBELTOPLANEROW_MMI 358 ANY21(SobelToPlaneRow_Any_MMI, SobelToPlaneRow_MMI, 0, 1, 1, 1, 7) 359 #endif 329 360 #ifdef HAS_SOBELXYROW_SSE2 330 361 ANY21(SobelXYRow_Any_SSE2, SobelXYRow_SSE2, 0, 1, 1, 4, 15) … … 335 366 #ifdef HAS_SOBELXYROW_MSA 336 367 ANY21(SobelXYRow_Any_MSA, SobelXYRow_MSA, 0, 1, 1, 4, 15) 368 #endif 369 #ifdef HAS_SOBELXYROW_MMI 370 ANY21(SobelXYRow_Any_MMI, SobelXYRow_MMI, 0, 1, 1, 4, 7) 337 371 #endif 338 372 #undef ANY21 … … 342 376 void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \ 343 377 const struct YuvConstants* yuvconstants, int width) { \ 344 SIMD_ALIGNED(uint8_t temp[ 64 * 3]);\345 memset(temp, 0, 64 * 2); /* for msan */\378 SIMD_ALIGNED(uint8_t temp[128 * 3]); \ 379 memset(temp, 0, 128 * 2); /* for msan */ \ 346 380 int r = width & MASK; \ 347 381 int n = width & ~MASK; \ … … 350 384 } \ 351 385 memcpy(temp, y_buf + n * SBPP, r * SBPP); \ 352 memcpy(temp + 64, uv_buf + (n >> UVSHIFT) * SBPP2,\386 memcpy(temp + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ 353 387 SS(r, UVSHIFT) * SBPP2); \ 354 ANY_SIMD(temp, temp + 64, temp + 128, yuvconstants, MASK + 1);\355 memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \388 ANY_SIMD(temp, temp + 128, temp + 256, yuvconstants, MASK + 1); \ 389 memcpy(dst_ptr + n * BPP, temp + 256, r * BPP); \ 356 390 } 357 391 … … 386 420 #ifdef HAS_NV21TORGB24ROW_NEON 387 421 ANY21C(NV21ToRGB24Row_Any_NEON, NV21ToRGB24Row_NEON, 1, 1, 2, 3, 7) 422 #endif 423 #ifdef HAS_NV12TORGB24ROW_SSSE3 424 ANY21C(NV12ToRGB24Row_Any_SSSE3, NV12ToRGB24Row_SSSE3, 1, 1, 2, 3, 15) 425 #endif 426 #ifdef HAS_NV21TORGB24ROW_SSSE3 427 ANY21C(NV21ToRGB24Row_Any_SSSE3, NV21ToRGB24Row_SSSE3, 1, 1, 2, 3, 15) 428 #endif 429 #ifdef HAS_NV12TORGB24ROW_AVX2 430 ANY21C(NV12ToRGB24Row_Any_AVX2, NV12ToRGB24Row_AVX2, 1, 1, 2, 3, 31) 431 #endif 432 #ifdef HAS_NV21TORGB24ROW_AVX2 433 ANY21C(NV21ToRGB24Row_Any_AVX2, NV21ToRGB24Row_AVX2, 1, 1, 2, 3, 31) 388 434 #endif 389 435 #ifdef HAS_NV12TORGB565ROW_SSSE3 … … 432 478 ANY11(ARGBToARGB4444Row_Any_SSE2, ARGBToARGB4444Row_SSE2, 0, 4, 2, 3) 433 479 #endif 480 #if defined(HAS_ARGBTORGB24ROW_AVX2) 481 ANY11(ARGBToRGB24Row_Any_AVX2, ARGBToRGB24Row_AVX2, 0, 4, 3, 31) 482 #endif 483 #if defined(HAS_ARGBTORGB24ROW_AVX512VBMI) 484 ANY11(ARGBToRGB24Row_Any_AVX512VBMI, ARGBToRGB24Row_AVX512VBMI, 0, 4, 3, 31) 485 #endif 486 #if defined(HAS_ARGBTORAWROW_AVX2) 487 ANY11(ARGBToRAWRow_Any_AVX2, ARGBToRAWRow_AVX2, 0, 4, 3, 31) 488 #endif 434 489 #if defined(HAS_ARGBTORGB565ROW_AVX2) 435 490 ANY11(ARGBToRGB565Row_Any_AVX2, ARGBToRGB565Row_AVX2, 0, 4, 2, 7) … … 500 555 ANY11(I400ToARGBRow_Any_MSA, I400ToARGBRow_MSA, 0, 1, 4, 15) 501 556 #endif 557 #if defined(HAS_ARGBTORGB24ROW_MMI) 558 ANY11(ARGBToRGB24Row_Any_MMI, ARGBToRGB24Row_MMI, 0, 4, 3, 3) 559 ANY11(ARGBToRAWRow_Any_MMI, ARGBToRAWRow_MMI, 0, 4, 3, 3) 560 ANY11(ARGBToRGB565Row_Any_MMI, ARGBToRGB565Row_MMI, 0, 4, 2, 3) 561 ANY11(ARGBToARGB1555Row_Any_MMI, ARGBToARGB1555Row_MMI, 0, 4, 2, 3) 562 ANY11(ARGBToARGB4444Row_Any_MMI, ARGBToARGB4444Row_MMI, 0, 4, 2, 3) 563 ANY11(J400ToARGBRow_Any_MMI, J400ToARGBRow_MMI, 0, 1, 4, 3) 564 ANY11(I400ToARGBRow_Any_MMI, I400ToARGBRow_MMI, 0, 1, 4, 7) 565 #endif 502 566 #if defined(HAS_RAWTORGB24ROW_NEON) 503 567 ANY11(RAWToRGB24Row_Any_NEON, RAWToRGB24Row_NEON, 0, 3, 3, 7) … … 505 569 #if defined(HAS_RAWTORGB24ROW_MSA) 506 570 ANY11(RAWToRGB24Row_Any_MSA, RAWToRGB24Row_MSA, 0, 3, 3, 15) 571 #endif 572 #if defined(HAS_RAWTORGB24ROW_MMI) 573 ANY11(RAWToRGB24Row_Any_MMI, RAWToRGB24Row_MMI, 0, 3, 3, 3) 507 574 #endif 508 575 #ifdef HAS_ARGBTOYROW_AVX2 … … 537 604 ANY11(ARGBToYRow_Any_MSA, ARGBToYRow_MSA, 0, 4, 1, 15) 538 605 #endif 606 #ifdef HAS_ARGBTOYROW_MMI 607 ANY11(ARGBToYRow_Any_MMI, ARGBToYRow_MMI, 0, 4, 1, 7) 608 #endif 539 609 #ifdef HAS_ARGBTOYJROW_NEON 540 610 ANY11(ARGBToYJRow_Any_NEON, ARGBToYJRow_NEON, 0, 4, 1, 7) … … 543 613 ANY11(ARGBToYJRow_Any_MSA, ARGBToYJRow_MSA, 0, 4, 1, 15) 544 614 #endif 615 #ifdef HAS_ARGBTOYJROW_MMI 616 ANY11(ARGBToYJRow_Any_MMI, ARGBToYJRow_MMI, 0, 4, 1, 7) 617 #endif 545 618 #ifdef HAS_BGRATOYROW_NEON 546 619 ANY11(BGRAToYRow_Any_NEON, BGRAToYRow_NEON, 0, 4, 1, 7) … … 549 622 ANY11(BGRAToYRow_Any_MSA, BGRAToYRow_MSA, 0, 4, 1, 15) 550 623 #endif 624 #ifdef HAS_BGRATOYROW_MMI 625 ANY11(BGRAToYRow_Any_MMI, BGRAToYRow_MMI, 0, 4, 1, 7) 626 #endif 551 627 #ifdef HAS_ABGRTOYROW_NEON 552 628 ANY11(ABGRToYRow_Any_NEON, ABGRToYRow_NEON, 0, 4, 1, 7) … … 555 631 ANY11(ABGRToYRow_Any_MSA, ABGRToYRow_MSA, 0, 4, 1, 7) 556 632 #endif 633 #ifdef HAS_ABGRTOYROW_MMI 634 ANY11(ABGRToYRow_Any_MMI, ABGRToYRow_MMI, 0, 4, 1, 7) 635 #endif 557 636 #ifdef HAS_RGBATOYROW_NEON 558 637 ANY11(RGBAToYRow_Any_NEON, RGBAToYRow_NEON, 0, 4, 1, 7) … … 561 640 ANY11(RGBAToYRow_Any_MSA, RGBAToYRow_MSA, 0, 4, 1, 15) 562 641 #endif 642 #ifdef HAS_RGBATOYROW_MMI 643 ANY11(RGBAToYRow_Any_MMI, RGBAToYRow_MMI, 0, 4, 1, 7) 644 #endif 563 645 #ifdef HAS_RGB24TOYROW_NEON 564 646 ANY11(RGB24ToYRow_Any_NEON, RGB24ToYRow_NEON, 0, 3, 1, 7) … … 567 649 ANY11(RGB24ToYRow_Any_MSA, RGB24ToYRow_MSA, 0, 3, 1, 15) 568 650 #endif 651 #ifdef HAS_RGB24TOYROW_MMI 652 ANY11(RGB24ToYRow_Any_MMI, RGB24ToYRow_MMI, 0, 3, 1, 7) 653 #endif 569 654 #ifdef HAS_RAWTOYROW_NEON 570 655 ANY11(RAWToYRow_Any_NEON, RAWToYRow_NEON, 0, 3, 1, 7) … … 573 658 ANY11(RAWToYRow_Any_MSA, RAWToYRow_MSA, 0, 3, 1, 15) 574 659 #endif 660 #ifdef HAS_RAWTOYROW_MMI 661 ANY11(RAWToYRow_Any_MMI, RAWToYRow_MMI, 0, 3, 1, 7) 662 #endif 575 663 #ifdef HAS_RGB565TOYROW_NEON 576 664 ANY11(RGB565ToYRow_Any_NEON, RGB565ToYRow_NEON, 0, 2, 1, 7) … … 579 667 ANY11(RGB565ToYRow_Any_MSA, RGB565ToYRow_MSA, 0, 2, 1, 15) 580 668 #endif 669 #ifdef HAS_RGB565TOYROW_MMI 670 ANY11(RGB565ToYRow_Any_MMI, RGB565ToYRow_MMI, 0, 2, 1, 7) 671 #endif 581 672 #ifdef HAS_ARGB1555TOYROW_NEON 582 673 ANY11(ARGB1555ToYRow_Any_NEON, ARGB1555ToYRow_NEON, 0, 2, 1, 7) … … 585 676 ANY11(ARGB1555ToYRow_Any_MSA, ARGB1555ToYRow_MSA, 0, 2, 1, 15) 586 677 #endif 678 #ifdef HAS_ARGB1555TOYROW_MMI 679 ANY11(ARGB1555ToYRow_Any_MMI, ARGB1555ToYRow_MMI, 0, 2, 1, 7) 680 #endif 587 681 #ifdef HAS_ARGB4444TOYROW_NEON 588 682 ANY11(ARGB4444ToYRow_Any_NEON, ARGB4444ToYRow_NEON, 0, 2, 1, 7) 589 683 #endif 684 #ifdef HAS_ARGB4444TOYROW_MMI 685 ANY11(ARGB4444ToYRow_Any_MMI, ARGB4444ToYRow_MMI, 0, 2, 1, 7) 686 #endif 590 687 #ifdef HAS_YUY2TOYROW_NEON 591 688 ANY11(YUY2ToYRow_Any_NEON, YUY2ToYRow_NEON, 1, 4, 1, 15) … … 597 694 ANY11(YUY2ToYRow_Any_MSA, YUY2ToYRow_MSA, 1, 4, 1, 31) 598 695 #endif 696 #ifdef HAS_YUY2TOYROW_MMI 697 ANY11(YUY2ToYRow_Any_MMI, YUY2ToYRow_MMI, 1, 4, 1, 7) 698 #endif 599 699 #ifdef HAS_UYVYTOYROW_MSA 600 700 ANY11(UYVYToYRow_Any_MSA, UYVYToYRow_MSA, 1, 4, 1, 31) 601 701 #endif 702 #ifdef HAS_UYVYTOYROW_MMI 703 ANY11(UYVYToYRow_Any_MMI, UYVYToYRow_MMI, 1, 4, 1, 15) 704 #endif 602 705 #ifdef HAS_RGB24TOARGBROW_NEON 603 706 ANY11(RGB24ToARGBRow_Any_NEON, RGB24ToARGBRow_NEON, 0, 3, 4, 7) … … 606 709 ANY11(RGB24ToARGBRow_Any_MSA, RGB24ToARGBRow_MSA, 0, 3, 4, 15) 607 710 #endif 711 #ifdef HAS_RGB24TOARGBROW_MMI 712 ANY11(RGB24ToARGBRow_Any_MMI, RGB24ToARGBRow_MMI, 0, 3, 4, 3) 713 #endif 608 714 #ifdef HAS_RAWTOARGBROW_NEON 609 715 ANY11(RAWToARGBRow_Any_NEON, RAWToARGBRow_NEON, 0, 3, 4, 7) … … 612 718 ANY11(RAWToARGBRow_Any_MSA, RAWToARGBRow_MSA, 0, 3, 4, 15) 613 719 #endif 720 #ifdef HAS_RAWTOARGBROW_MMI 721 ANY11(RAWToARGBRow_Any_MMI, RAWToARGBRow_MMI, 0, 3, 4, 3) 722 #endif 614 723 #ifdef HAS_RGB565TOARGBROW_NEON 615 724 ANY11(RGB565ToARGBRow_Any_NEON, RGB565ToARGBRow_NEON, 0, 2, 4, 7) … … 618 727 ANY11(RGB565ToARGBRow_Any_MSA, RGB565ToARGBRow_MSA, 0, 2, 4, 15) 619 728 #endif 729 #ifdef HAS_RGB565TOARGBROW_MMI 730 ANY11(RGB565ToARGBRow_Any_MMI, RGB565ToARGBRow_MMI, 0, 2, 4, 3) 731 #endif 620 732 #ifdef HAS_ARGB1555TOARGBROW_NEON 621 733 ANY11(ARGB1555ToARGBRow_Any_NEON, ARGB1555ToARGBRow_NEON, 0, 2, 4, 7) … … 624 736 ANY11(ARGB1555ToARGBRow_Any_MSA, ARGB1555ToARGBRow_MSA, 0, 2, 4, 15) 625 737 #endif 738 #ifdef HAS_ARGB1555TOARGBROW_MMI 739 ANY11(ARGB1555ToARGBRow_Any_MMI, ARGB1555ToARGBRow_MMI, 0, 2, 4, 3) 740 #endif 626 741 #ifdef HAS_ARGB4444TOARGBROW_NEON 627 742 ANY11(ARGB4444ToARGBRow_Any_NEON, ARGB4444ToARGBRow_NEON, 0, 2, 4, 7) … … 630 745 ANY11(ARGB4444ToARGBRow_Any_MSA, ARGB4444ToARGBRow_MSA, 0, 2, 4, 15) 631 746 #endif 747 #ifdef HAS_ARGB4444TOARGBROW_MMI 748 ANY11(ARGB4444ToARGBRow_Any_MMI, ARGB4444ToARGBRow_MMI, 0, 2, 4, 3) 749 #endif 632 750 #ifdef HAS_ARGBATTENUATEROW_SSSE3 633 751 ANY11(ARGBAttenuateRow_Any_SSSE3, ARGBAttenuateRow_SSSE3, 0, 4, 4, 3) … … 648 766 ANY11(ARGBAttenuateRow_Any_MSA, ARGBAttenuateRow_MSA, 0, 4, 4, 7) 649 767 #endif 768 #ifdef HAS_ARGBATTENUATEROW_MMI 769 ANY11(ARGBAttenuateRow_Any_MMI, ARGBAttenuateRow_MMI, 0, 4, 4, 1) 770 #endif 650 771 #ifdef HAS_ARGBEXTRACTALPHAROW_SSE2 651 772 ANY11(ARGBExtractAlphaRow_Any_SSE2, ARGBExtractAlphaRow_SSE2, 0, 4, 1, 7) 652 773 #endif 653 774 #ifdef HAS_ARGBEXTRACTALPHAROW_AVX2 654 ANY11(ARGBExtractAlphaRow_Any_AVX2, ARGBExtractAlphaRow_AVX2, 0, 4, 1, 3 2)775 ANY11(ARGBExtractAlphaRow_Any_AVX2, ARGBExtractAlphaRow_AVX2, 0, 4, 1, 31) 655 776 #endif 656 777 #ifdef HAS_ARGBEXTRACTALPHAROW_NEON … … 659 780 #ifdef HAS_ARGBEXTRACTALPHAROW_MSA 660 781 ANY11(ARGBExtractAlphaRow_Any_MSA, ARGBExtractAlphaRow_MSA, 0, 4, 1, 15) 782 #endif 783 #ifdef HAS_ARGBEXTRACTALPHAROW_MMI 784 ANY11(ARGBExtractAlphaRow_Any_MMI, ARGBExtractAlphaRow_MMI, 0, 4, 1, 7) 661 785 #endif 662 786 #undef ANY11 … … 684 808 ANY11B(ARGBCopyAlphaRow_Any_SSE2, ARGBCopyAlphaRow_SSE2, 0, 4, 4, 7) 685 809 #endif 810 #ifdef HAS_ARGBCOPYALPHAROW_MMI 811 ANY11B(ARGBCopyAlphaRow_Any_MMI, ARGBCopyAlphaRow_MMI, 0, 4, 4, 1) 812 #endif 686 813 #ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2 687 814 ANY11B(ARGBCopyYToAlphaRow_Any_AVX2, ARGBCopyYToAlphaRow_AVX2, 0, 1, 4, 15) … … 689 816 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 690 817 ANY11B(ARGBCopyYToAlphaRow_Any_SSE2, ARGBCopyYToAlphaRow_SSE2, 0, 1, 4, 7) 818 #endif 819 #ifdef HAS_ARGBCOPYYTOALPHAROW_MMI 820 ANY11B(ARGBCopyYToAlphaRow_Any_MMI, ARGBCopyYToAlphaRow_MMI, 0, 1, 4, 7) 691 821 #endif 692 822 #undef ANY11B … … 739 869 7) 740 870 #endif 871 #if defined(HAS_ARGBTORGB565DITHERROW_MMI) 872 ANY11P(ARGBToRGB565DitherRow_Any_MMI, 873 ARGBToRGB565DitherRow_MMI, 874 const uint32_t, 875 4, 876 2, 877 3) 878 #endif 741 879 #ifdef HAS_ARGBSHUFFLEROW_SSSE3 742 880 ANY11P(ARGBShuffleRow_Any_SSSE3, ARGBShuffleRow_SSSE3, const uint8_t*, 4, 4, 7) … … 751 889 ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8_t*, 4, 4, 7) 752 890 #endif 891 #ifdef HAS_ARGBSHUFFLEROW_MMI 892 ANY11P(ARGBShuffleRow_Any_MMI, ARGBShuffleRow_MMI, const uint8_t*, 4, 4, 1) 893 #endif 894 #undef ANY11P 753 895 #undef ANY11P 754 896 … … 919 1061 ANY11T(InterpolateRow_Any_MSA, InterpolateRow_MSA, 1, 1, 31) 920 1062 #endif 1063 #ifdef HAS_INTERPOLATEROW_MMI 1064 ANY11T(InterpolateRow_Any_MMI, InterpolateRow_MMI, 1, 1, 7) 1065 #endif 921 1066 #undef ANY11T 922 1067 … … 948 1093 ANY11M(MirrorRow_Any_MSA, MirrorRow_MSA, 1, 63) 949 1094 #endif 1095 #ifdef HAS_MIRRORROW_MMI 1096 ANY11M(MirrorRow_Any_MMI, MirrorRow_MMI, 1, 7) 1097 #endif 950 1098 #ifdef HAS_ARGBMIRRORROW_AVX2 951 1099 ANY11M(ARGBMirrorRow_Any_AVX2, ARGBMirrorRow_AVX2, 4, 7) … … 959 1107 #ifdef HAS_ARGBMIRRORROW_MSA 960 1108 ANY11M(ARGBMirrorRow_Any_MSA, ARGBMirrorRow_MSA, 4, 15) 1109 #endif 1110 #ifdef HAS_ARGBMIRRORROW_MMI 1111 ANY11M(ARGBMirrorRow_Any_MMI, ARGBMirrorRow_MMI, 4, 1) 961 1112 #endif 962 1113 #undef ANY11M … … 1018 1169 ANY12(SplitUVRow_Any_MSA, SplitUVRow_MSA, 0, 2, 0, 31) 1019 1170 #endif 1171 #ifdef HAS_SPLITUVROW_MMI 1172 ANY12(SplitUVRow_Any_MMI, SplitUVRow_MMI, 0, 2, 0, 7) 1173 #endif 1020 1174 #ifdef HAS_ARGBTOUV444ROW_SSSE3 1021 1175 ANY12(ARGBToUV444Row_Any_SSSE3, ARGBToUV444Row_SSSE3, 0, 4, 0, 15) … … 1038 1192 ANY12(YUY2ToUV422Row_Any_MSA, YUY2ToUV422Row_MSA, 1, 4, 1, 31) 1039 1193 ANY12(UYVYToUV422Row_Any_MSA, UYVYToUV422Row_MSA, 1, 4, 1, 31) 1194 #endif 1195 #ifdef HAS_YUY2TOUV422ROW_MMI 1196 ANY12(ARGBToUV444Row_Any_MMI, ARGBToUV444Row_MMI, 0, 4, 0, 7) 1197 ANY12(UYVYToUV422Row_Any_MMI, UYVYToUV422Row_MMI, 1, 4, 1, 15) 1198 ANY12(YUY2ToUV422Row_Any_MMI, YUY2ToUV422Row_MMI, 1, 4, 1, 15) 1040 1199 #endif 1041 1200 #undef ANY12 … … 1064 1223 #ifdef HAS_SPLITRGBROW_NEON 1065 1224 ANY13(SplitRGBRow_Any_NEON, SplitRGBRow_NEON, 3, 15) 1225 #endif 1226 #ifdef HAS_SPLITRGBROW_MMI 1227 ANY13(SplitRGBRow_Any_MMI, SplitRGBRow_MMI, 3, 3) 1066 1228 #endif 1067 1229 … … 1119 1281 ANY12S(ARGBToUVRow_Any_MSA, ARGBToUVRow_MSA, 0, 4, 31) 1120 1282 #endif 1283 #ifdef HAS_ARGBTOUVROW_MMI 1284 ANY12S(ARGBToUVRow_Any_MMI, ARGBToUVRow_MMI, 0, 4, 15) 1285 #endif 1121 1286 #ifdef HAS_ARGBTOUVJROW_NEON 1122 1287 ANY12S(ARGBToUVJRow_Any_NEON, ARGBToUVJRow_NEON, 0, 4, 15) … … 1125 1290 ANY12S(ARGBToUVJRow_Any_MSA, ARGBToUVJRow_MSA, 0, 4, 31) 1126 1291 #endif 1292 #ifdef HAS_ARGBTOUVJROW_MMI 1293 ANY12S(ARGBToUVJRow_Any_MMI, ARGBToUVJRow_MMI, 0, 4, 15) 1294 #endif 1127 1295 #ifdef HAS_BGRATOUVROW_NEON 1128 1296 ANY12S(BGRAToUVRow_Any_NEON, BGRAToUVRow_NEON, 0, 4, 15) … … 1131 1299 ANY12S(BGRAToUVRow_Any_MSA, BGRAToUVRow_MSA, 0, 4, 31) 1132 1300 #endif 1301 #ifdef HAS_BGRATOUVROW_MMI 1302 ANY12S(BGRAToUVRow_Any_MMI, BGRAToUVRow_MMI, 0, 4, 15) 1303 #endif 1133 1304 #ifdef HAS_ABGRTOUVROW_NEON 1134 1305 ANY12S(ABGRToUVRow_Any_NEON, ABGRToUVRow_NEON, 0, 4, 15) … … 1137 1308 ANY12S(ABGRToUVRow_Any_MSA, ABGRToUVRow_MSA, 0, 4, 31) 1138 1309 #endif 1310 #ifdef HAS_ABGRTOUVROW_MMI 1311 ANY12S(ABGRToUVRow_Any_MMI, ABGRToUVRow_MMI, 0, 4, 15) 1312 #endif 1139 1313 #ifdef HAS_RGBATOUVROW_NEON 1140 1314 ANY12S(RGBAToUVRow_Any_NEON, RGBAToUVRow_NEON, 0, 4, 15) … … 1143 1317 ANY12S(RGBAToUVRow_Any_MSA, RGBAToUVRow_MSA, 0, 4, 31) 1144 1318 #endif 1319 #ifdef HAS_RGBATOUVROW_MMI 1320 ANY12S(RGBAToUVRow_Any_MMI, RGBAToUVRow_MMI, 0, 4, 15) 1321 #endif 1145 1322 #ifdef HAS_RGB24TOUVROW_NEON 1146 1323 ANY12S(RGB24ToUVRow_Any_NEON, RGB24ToUVRow_NEON, 0, 3, 15) … … 1149 1326 ANY12S(RGB24ToUVRow_Any_MSA, RGB24ToUVRow_MSA, 0, 3, 15) 1150 1327 #endif 1328 #ifdef HAS_RGB24TOUVROW_MMI 1329 ANY12S(RGB24ToUVRow_Any_MMI, RGB24ToUVRow_MMI, 0, 3, 15) 1330 #endif 1151 1331 #ifdef HAS_RAWTOUVROW_NEON 1152 1332 ANY12S(RAWToUVRow_Any_NEON, RAWToUVRow_NEON, 0, 3, 15) … … 1155 1335 ANY12S(RAWToUVRow_Any_MSA, RAWToUVRow_MSA, 0, 3, 15) 1156 1336 #endif 1337 #ifdef HAS_RAWTOUVROW_MMI 1338 ANY12S(RAWToUVRow_Any_MMI, RAWToUVRow_MMI, 0, 3, 15) 1339 #endif 1157 1340 #ifdef HAS_RGB565TOUVROW_NEON 1158 1341 ANY12S(RGB565ToUVRow_Any_NEON, RGB565ToUVRow_NEON, 0, 2, 15) … … 1161 1344 ANY12S(RGB565ToUVRow_Any_MSA, RGB565ToUVRow_MSA, 0, 2, 15) 1162 1345 #endif 1346 #ifdef HAS_RGB565TOUVROW_MMI 1347 ANY12S(RGB565ToUVRow_Any_MMI, RGB565ToUVRow_MMI, 0, 2, 15) 1348 #endif 1163 1349 #ifdef HAS_ARGB1555TOUVROW_NEON 1164 1350 ANY12S(ARGB1555ToUVRow_Any_NEON, ARGB1555ToUVRow_NEON, 0, 2, 15) … … 1167 1353 ANY12S(ARGB1555ToUVRow_Any_MSA, ARGB1555ToUVRow_MSA, 0, 2, 15) 1168 1354 #endif 1355 #ifdef HAS_ARGB1555TOUVROW_MMI 1356 ANY12S(ARGB1555ToUVRow_Any_MMI, ARGB1555ToUVRow_MMI, 0, 2, 15) 1357 #endif 1169 1358 #ifdef HAS_ARGB4444TOUVROW_NEON 1170 1359 ANY12S(ARGB4444ToUVRow_Any_NEON, ARGB4444ToUVRow_NEON, 0, 2, 15) 1171 1360 #endif 1361 #ifdef HAS_ARGB4444TOUVROW_MMI 1362 ANY12S(ARGB4444ToUVRow_Any_MMI, ARGB4444ToUVRow_MMI, 0, 2, 15) 1363 #endif 1172 1364 #ifdef HAS_YUY2TOUVROW_NEON 1173 1365 ANY12S(YUY2ToUVRow_Any_NEON, YUY2ToUVRow_NEON, 1, 4, 15) … … 1179 1371 ANY12S(YUY2ToUVRow_Any_MSA, YUY2ToUVRow_MSA, 1, 4, 31) 1180 1372 #endif 1373 #ifdef HAS_YUY2TOUVROW_MMI 1374 ANY12S(YUY2ToUVRow_Any_MMI, YUY2ToUVRow_MMI, 1, 4, 15) 1375 #endif 1181 1376 #ifdef HAS_UYVYTOUVROW_MSA 1182 1377 ANY12S(UYVYToUVRow_Any_MSA, UYVYToUVRow_MSA, 1, 4, 31) 1378 #endif 1379 #ifdef HAS_UYVYTOUVROW_MMI 1380 ANY12S(UYVYToUVRow_Any_MMI, UYVYToUVRow_MMI, 1, 4, 15) 1183 1381 #endif 1184 1382 #undef ANY12S -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/row_common.cc
r235135 r239415 182 182 int x; 183 183 for (x = 0; x < width; ++x) { 184 uint32_t ar30 = *( uint32_t*)src_ar30;184 uint32_t ar30 = *(const uint32_t*)src_ar30; 185 185 uint32_t b = (ar30 >> 2) & 0xff; 186 186 uint32_t g = (ar30 >> 12) & 0xff; … … 196 196 int x; 197 197 for (x = 0; x < width; ++x) { 198 uint32_t ar30 = *( uint32_t*)src_ar30;198 uint32_t ar30 = *(const uint32_t*)src_ar30; 199 199 uint32_t b = (ar30 >> 2) & 0xff; 200 200 uint32_t g = (ar30 >> 12) & 0xff; … … 210 210 int x; 211 211 for (x = 0; x < width; ++x) { 212 uint32_t ar30 = *( uint32_t*)src_ar30;212 uint32_t ar30 = *(const uint32_t*)src_ar30; 213 213 uint32_t b = ar30 & 0x3ff; 214 214 uint32_t ga = ar30 & 0xc00ffc00; … … 2763 2763 // bits of the mantissa from our float and we're done. 2764 2764 2765 // Work around GCC 7 punning warning -Wstrict-aliasing 2766 #if defined(__GNUC__) 2767 typedef uint32_t __attribute__((__may_alias__)) uint32_alias_t; 2768 #else 2769 typedef uint32_t uint32_alias_t; 2770 #endif 2771 2765 2772 void HalfFloatRow_C(const uint16_t* src, 2766 2773 uint16_t* dst, … … 2771 2778 for (i = 0; i < width; ++i) { 2772 2779 float value = src[i] * mult; 2773 dst[i] = (uint16_t)((*( uint32_t*)&value) >> 13);2780 dst[i] = (uint16_t)((*(const uint32_alias_t*)&value) >> 13); 2774 2781 } 2775 2782 } … … 2949 2956 src_uv += twidth; 2950 2957 dst_rgb565 += twidth * 2; 2958 width -= twidth; 2959 } 2960 } 2961 #endif 2962 2963 #if defined(HAS_NV12TORGB24ROW_SSSE3) 2964 void NV12ToRGB24Row_SSSE3(const uint8_t* src_y, 2965 const uint8_t* src_uv, 2966 uint8_t* dst_rgb24, 2967 const struct YuvConstants* yuvconstants, 2968 int width) { 2969 // Row buffer for intermediate ARGB pixels. 2970 SIMD_ALIGNED(uint8_t row[MAXTWIDTH * 4]); 2971 while (width > 0) { 2972 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 2973 NV12ToARGBRow_SSSE3(src_y, src_uv, row, yuvconstants, twidth); 2974 ARGBToRGB24Row_SSSE3(row, dst_rgb24, twidth); 2975 src_y += twidth; 2976 src_uv += twidth; 2977 dst_rgb24 += twidth * 3; 2978 width -= twidth; 2979 } 2980 } 2981 #endif 2982 2983 #if defined(HAS_NV21TORGB24ROW_SSSE3) 2984 void NV21ToRGB24Row_SSSE3(const uint8_t* src_y, 2985 const uint8_t* src_vu, 2986 uint8_t* dst_rgb24, 2987 const struct YuvConstants* yuvconstants, 2988 int width) { 2989 // Row buffer for intermediate ARGB pixels. 2990 SIMD_ALIGNED(uint8_t row[MAXTWIDTH * 4]); 2991 while (width > 0) { 2992 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 2993 NV21ToARGBRow_SSSE3(src_y, src_vu, row, yuvconstants, twidth); 2994 ARGBToRGB24Row_SSSE3(row, dst_rgb24, twidth); 2995 src_y += twidth; 2996 src_vu += twidth; 2997 dst_rgb24 += twidth * 3; 2998 width -= twidth; 2999 } 3000 } 3001 #endif 3002 3003 #if defined(HAS_NV12TORGB24ROW_AVX2) 3004 void NV12ToRGB24Row_AVX2(const uint8_t* src_y, 3005 const uint8_t* src_uv, 3006 uint8_t* dst_rgb24, 3007 const struct YuvConstants* yuvconstants, 3008 int width) { 3009 // Row buffer for intermediate ARGB pixels. 3010 SIMD_ALIGNED(uint8_t row[MAXTWIDTH * 4]); 3011 while (width > 0) { 3012 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 3013 NV12ToARGBRow_AVX2(src_y, src_uv, row, yuvconstants, twidth); 3014 #if defined(HAS_ARGBTORGB24ROW_AVX2) 3015 ARGBToRGB24Row_AVX2(row, dst_rgb24, twidth); 3016 #else 3017 ARGBToRGB24Row_SSSE3(row, dst_rgb24, twidth); 3018 #endif 3019 src_y += twidth; 3020 src_uv += twidth; 3021 dst_rgb24 += twidth * 3; 3022 width -= twidth; 3023 } 3024 } 3025 #endif 3026 3027 #if defined(HAS_NV21TORGB24ROW_AVX2) 3028 void NV21ToRGB24Row_AVX2(const uint8_t* src_y, 3029 const uint8_t* src_vu, 3030 uint8_t* dst_rgb24, 3031 const struct YuvConstants* yuvconstants, 3032 int width) { 3033 // Row buffer for intermediate ARGB pixels. 3034 SIMD_ALIGNED(uint8_t row[MAXTWIDTH * 4]); 3035 while (width > 0) { 3036 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 3037 NV21ToARGBRow_AVX2(src_y, src_vu, row, yuvconstants, twidth); 3038 #if defined(HAS_ARGBTORGB24ROW_AVX2) 3039 ARGBToRGB24Row_AVX2(row, dst_rgb24, twidth); 3040 #else 3041 ARGBToRGB24Row_SSSE3(row, dst_rgb24, twidth); 3042 #endif 3043 src_y += twidth; 3044 src_vu += twidth; 3045 dst_rgb24 += twidth * 3; 2951 3046 width -= twidth; 2952 3047 } … … 3043 3138 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 3044 3139 I422ToARGBRow_AVX2(src_y, src_u, src_v, row, yuvconstants, twidth); 3045 // TODO(fbarchard): ARGBToRGB24Row_AVX2 3140 #if defined(HAS_ARGBTORGB24ROW_AVX2) 3141 ARGBToRGB24Row_AVX2(row, dst_rgb24, twidth); 3142 #else 3046 3143 ARGBToRGB24Row_SSSE3(row, dst_rgb24, twidth); 3144 #endif 3047 3145 src_y += twidth; 3048 3146 src_u += twidth / 2; -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/row_gcc.cc
r235135 r239415 505 505 : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); 506 506 } 507 508 #ifdef HAS_ARGBTORGB24ROW_AVX2 509 // vpermd for 12+12 to 24 510 static const lvec32 kPermdRGB24_AVX = {0, 1, 2, 4, 5, 6, 3, 7}; 511 512 void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { 513 asm volatile( 514 "vbroadcastf128 %3,%%ymm6 \n" 515 "vmovdqa %4,%%ymm7 \n" 516 517 LABELALIGN 518 "1: \n" 519 "vmovdqu (%0),%%ymm0 \n" 520 "vmovdqu 0x20(%0),%%ymm1 \n" 521 "vmovdqu 0x40(%0),%%ymm2 \n" 522 "vmovdqu 0x60(%0),%%ymm3 \n" 523 "lea 0x80(%0),%0 \n" 524 "vpshufb %%ymm6,%%ymm0,%%ymm0 \n" // xxx0yyy0 525 "vpshufb %%ymm6,%%ymm1,%%ymm1 \n" 526 "vpshufb %%ymm6,%%ymm2,%%ymm2 \n" 527 "vpshufb %%ymm6,%%ymm3,%%ymm3 \n" 528 "vpermd %%ymm0,%%ymm7,%%ymm0 \n" // pack to 24 bytes 529 "vpermd %%ymm1,%%ymm7,%%ymm1 \n" 530 "vpermd %%ymm2,%%ymm7,%%ymm2 \n" 531 "vpermd %%ymm3,%%ymm7,%%ymm3 \n" 532 "vpermq $0x3f,%%ymm1,%%ymm4 \n" // combine 24 + 8 533 "vpor %%ymm4,%%ymm0,%%ymm0 \n" 534 "vmovdqu %%ymm0,(%1) \n" 535 "vpermq $0xf9,%%ymm1,%%ymm1 \n" // combine 16 + 16 536 "vpermq $0x4f,%%ymm2,%%ymm4 \n" 537 "vpor %%ymm4,%%ymm1,%%ymm1 \n" 538 "vmovdqu %%ymm1,0x20(%1) \n" 539 "vpermq $0xfe,%%ymm2,%%ymm2 \n" // combine 8 + 24 540 "vpermq $0x93,%%ymm3,%%ymm3 \n" 541 "vpor %%ymm3,%%ymm2,%%ymm2 \n" 542 "vmovdqu %%ymm2,0x40(%1) \n" 543 "lea 0x60(%1),%1 \n" 544 "sub $0x20,%2 \n" 545 "jg 1b \n" 546 "vzeroupper \n" 547 : "+r"(src), // %0 548 "+r"(dst), // %1 549 "+r"(width) // %2 550 : "m"(kShuffleMaskARGBToRGB24), // %3 551 "m"(kPermdRGB24_AVX) // %4 552 : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", 553 "xmm7"); 554 } 555 #endif 556 557 #ifdef HAS_ARGBTORGB24ROW_AVX512VBMI 558 // Shuffle table for converting ARGBToRGB24 559 static const ulvec8 kPermARGBToRGB24_0 = { 560 0u, 1u, 2u, 4u, 5u, 6u, 8u, 9u, 10u, 12u, 13u, 561 14u, 16u, 17u, 18u, 20u, 21u, 22u, 24u, 25u, 26u, 28u, 562 29u, 30u, 32u, 33u, 34u, 36u, 37u, 38u, 40u, 41u}; 563 static const ulvec8 kPermARGBToRGB24_1 = { 564 10u, 12u, 13u, 14u, 16u, 17u, 18u, 20u, 21u, 22u, 24u, 565 25u, 26u, 28u, 29u, 30u, 32u, 33u, 34u, 36u, 37u, 38u, 566 40u, 41u, 42u, 44u, 45u, 46u, 48u, 49u, 50u, 52u}; 567 static const ulvec8 kPermARGBToRGB24_2 = { 568 21u, 22u, 24u, 25u, 26u, 28u, 29u, 30u, 32u, 33u, 34u, 569 36u, 37u, 38u, 40u, 41u, 42u, 44u, 45u, 46u, 48u, 49u, 570 50u, 52u, 53u, 54u, 56u, 57u, 58u, 60u, 61u, 62u}; 571 572 void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) { 573 asm volatile( 574 "vmovdqa %3,%%ymm5 \n" 575 "vmovdqa %4,%%ymm6 \n" 576 "vmovdqa %5,%%ymm7 \n" 577 578 LABELALIGN 579 "1: \n" 580 "vmovdqu (%0),%%ymm0 \n" 581 "vmovdqu 0x20(%0),%%ymm1 \n" 582 "vmovdqu 0x40(%0),%%ymm2 \n" 583 "vmovdqu 0x60(%0),%%ymm3 \n" 584 "lea 0x80(%0),%0 \n" 585 "vpermt2b %%ymm1,%%ymm5,%%ymm0 \n" 586 "vpermt2b %%ymm2,%%ymm6,%%ymm1 \n" 587 "vpermt2b %%ymm3,%%ymm7,%%ymm2 \n" 588 "vmovdqu %%ymm0,(%1) \n" 589 "vmovdqu %%ymm1,0x20(%1) \n" 590 "vmovdqu %%ymm2,0x40(%1) \n" 591 "lea 0x60(%1),%1 \n" 592 "sub $0x20,%2 \n" 593 "jg 1b \n" 594 "vzeroupper \n" 595 : "+r"(src), // %0 596 "+r"(dst), // %1 597 "+r"(width) // %2 598 : "m"(kPermARGBToRGB24_0), // %3 599 "m"(kPermARGBToRGB24_1), // %4 600 "m"(kPermARGBToRGB24_2) // %5 601 : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5", "xmm6", "xmm7"); 602 } 603 #endif 604 605 #ifdef HAS_ARGBTORAWROW_AVX2 606 void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { 607 asm volatile( 608 "vbroadcastf128 %3,%%ymm6 \n" 609 "vmovdqa %4,%%ymm7 \n" 610 611 LABELALIGN 612 "1: \n" 613 "vmovdqu (%0),%%ymm0 \n" 614 "vmovdqu 0x20(%0),%%ymm1 \n" 615 "vmovdqu 0x40(%0),%%ymm2 \n" 616 "vmovdqu 0x60(%0),%%ymm3 \n" 617 "lea 0x80(%0),%0 \n" 618 "vpshufb %%ymm6,%%ymm0,%%ymm0 \n" // xxx0yyy0 619 "vpshufb %%ymm6,%%ymm1,%%ymm1 \n" 620 "vpshufb %%ymm6,%%ymm2,%%ymm2 \n" 621 "vpshufb %%ymm6,%%ymm3,%%ymm3 \n" 622 "vpermd %%ymm0,%%ymm7,%%ymm0 \n" // pack to 24 bytes 623 "vpermd %%ymm1,%%ymm7,%%ymm1 \n" 624 "vpermd %%ymm2,%%ymm7,%%ymm2 \n" 625 "vpermd %%ymm3,%%ymm7,%%ymm3 \n" 626 "vpermq $0x3f,%%ymm1,%%ymm4 \n" // combine 24 + 8 627 "vpor %%ymm4,%%ymm0,%%ymm0 \n" 628 "vmovdqu %%ymm0,(%1) \n" 629 "vpermq $0xf9,%%ymm1,%%ymm1 \n" // combine 16 + 16 630 "vpermq $0x4f,%%ymm2,%%ymm4 \n" 631 "vpor %%ymm4,%%ymm1,%%ymm1 \n" 632 "vmovdqu %%ymm1,0x20(%1) \n" 633 "vpermq $0xfe,%%ymm2,%%ymm2 \n" // combine 8 + 24 634 "vpermq $0x93,%%ymm3,%%ymm3 \n" 635 "vpor %%ymm3,%%ymm2,%%ymm2 \n" 636 "vmovdqu %%ymm2,0x40(%1) \n" 637 "lea 0x60(%1),%1 \n" 638 "sub $0x20,%2 \n" 639 "jg 1b \n" 640 "vzeroupper \n" 641 : "+r"(src), // %0 642 "+r"(dst), // %1 643 "+r"(width) // %2 644 : "m"(kShuffleMaskARGBToRAW), // %3 645 "m"(kPermdRGB24_AVX) // %4 646 : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", 647 "xmm7"); 648 } 649 #endif 507 650 508 651 void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/row_msa.cc
r235135 r239415 164 164 v8u16 reg8_m, reg9_m; \ 165 165 \ 166 src0_m = (v16u8)__msa_ld_b((v 16i8*)s, 0);\167 src1_m = (v16u8)__msa_ld_b((v 16i8*)s, 16);\168 src2_m = (v16u8)__msa_ld_b((v 16i8*)s, 32);\169 src3_m = (v16u8)__msa_ld_b((v 16i8*)s, 48);\170 src4_m = (v16u8)__msa_ld_b((v 16i8*)t, 0);\171 src5_m = (v16u8)__msa_ld_b((v 16i8*)t, 16);\172 src6_m = (v16u8)__msa_ld_b((v 16i8*)t, 32);\173 src7_m = (v16u8)__msa_ld_b((v 16i8*)t, 48);\166 src0_m = (v16u8)__msa_ld_b((void*)s, 0); \ 167 src1_m = (v16u8)__msa_ld_b((void*)s, 16); \ 168 src2_m = (v16u8)__msa_ld_b((void*)s, 32); \ 169 src3_m = (v16u8)__msa_ld_b((void*)s, 48); \ 170 src4_m = (v16u8)__msa_ld_b((void*)t, 0); \ 171 src5_m = (v16u8)__msa_ld_b((void*)t, 16); \ 172 src6_m = (v16u8)__msa_ld_b((void*)t, 32); \ 173 src7_m = (v16u8)__msa_ld_b((void*)t, 48); \ 174 174 vec0_m = (v16u8)__msa_ilvr_b((v16i8)src0_m, (v16i8)src4_m); \ 175 175 vec1_m = (v16u8)__msa_ilvr_b((v16i8)src1_m, (v16i8)src5_m); \ … … 202 202 argb0 = (v16u8)__msa_pckev_b((v16i8)reg9_m, (v16i8)reg8_m); \ 203 203 argb1 = (v16u8)__msa_pckev_b((v16i8)reg1_m, (v16i8)reg0_m); \ 204 src0_m = (v16u8)__msa_ld_b((v 16i8*)s, 64);\205 src1_m = (v16u8)__msa_ld_b((v 16i8*)s, 80);\206 src2_m = (v16u8)__msa_ld_b((v 16i8*)s, 96);\207 src3_m = (v16u8)__msa_ld_b((v 16i8*)s, 112);\208 src4_m = (v16u8)__msa_ld_b((v 16i8*)t, 64);\209 src5_m = (v16u8)__msa_ld_b((v 16i8*)t, 80);\210 src6_m = (v16u8)__msa_ld_b((v 16i8*)t, 96);\211 src7_m = (v16u8)__msa_ld_b((v 16i8*)t, 112);\204 src0_m = (v16u8)__msa_ld_b((void*)s, 64); \ 205 src1_m = (v16u8)__msa_ld_b((void*)s, 80); \ 206 src2_m = (v16u8)__msa_ld_b((void*)s, 96); \ 207 src3_m = (v16u8)__msa_ld_b((void*)s, 112); \ 208 src4_m = (v16u8)__msa_ld_b((void*)t, 64); \ 209 src5_m = (v16u8)__msa_ld_b((void*)t, 80); \ 210 src6_m = (v16u8)__msa_ld_b((void*)t, 96); \ 211 src7_m = (v16u8)__msa_ld_b((void*)t, 112); \ 212 212 vec2_m = (v16u8)__msa_ilvr_b((v16i8)src0_m, (v16i8)src4_m); \ 213 213 vec3_m = (v16u8)__msa_ilvr_b((v16i8)src1_m, (v16i8)src5_m); \ … … 943 943 944 944 for (x = 0; x < width; x += 16) { 945 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);946 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);947 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 32);948 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 48);945 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 946 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 947 src2 = (v16u8)__msa_ld_b((void*)src_argb, 32); 948 src3 = (v16u8)__msa_ld_b((void*)src_argb, 48); 949 949 dst0 = (v16u8)__msa_vshf_b(shuffler0, (v16i8)src1, (v16i8)src0); 950 950 dst1 = (v16u8)__msa_vshf_b(shuffler1, (v16i8)src2, (v16i8)src1); … … 967 967 968 968 for (x = 0; x < width; x += 16) { 969 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);970 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);971 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 32);972 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 48);969 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 970 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 971 src2 = (v16u8)__msa_ld_b((void*)src_argb, 32); 972 src3 = (v16u8)__msa_ld_b((void*)src_argb, 48); 973 973 dst0 = (v16u8)__msa_vshf_b(shuffler0, (v16i8)src1, (v16i8)src0); 974 974 dst1 = (v16u8)__msa_vshf_b(shuffler1, (v16i8)src2, (v16i8)src1); … … 988 988 989 989 for (x = 0; x < width; x += 8) { 990 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);991 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);990 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 991 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 992 992 vec0 = (v16u8)__msa_srai_b((v16i8)src0, 3); 993 993 vec1 = (v16u8)__msa_slli_b((v16i8)src0, 3); … … 1024 1024 1025 1025 for (x = 0; x < width; x += 8) { 1026 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);1027 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);1026 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 1027 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 1028 1028 vec0 = (v16u8)__msa_srai_b((v16i8)src0, 3); 1029 1029 vec1 = (v16u8)__msa_slli_b((v16i8)src0, 2); … … 1067 1067 1068 1068 for (x = 0; x < width; x += 8) { 1069 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);1070 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);1069 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 1070 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 1071 1071 vec0 = (v16u8)__msa_srai_b((v16i8)src0, 4); 1072 1072 vec1 = (v16u8)__msa_srai_b((v16i8)src1, 4); … … 1099 1099 1100 1100 for (x = width; x > 0; x -= 16) { 1101 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);1102 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);1103 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 32);1104 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 48);1101 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 1102 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 1103 src2 = (v16u8)__msa_ld_b((void*)src_argb, 32); 1104 src3 = (v16u8)__msa_ld_b((void*)src_argb, 48); 1105 1105 reg0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0); 1106 1106 reg1 = (v16u8)__msa_pckev_b((v16i8)src3, (v16i8)src2); … … 1165 1165 1166 1166 for (x = 0; x < width; x += 4) { 1167 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);1168 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 0);1167 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 1168 src1 = (v16u8)__msa_ld_b((void*)src_argb1, 0); 1169 1169 vec0 = (v8u16)__msa_ilvr_b((v16i8)src0, (v16i8)src0); 1170 1170 vec1 = (v8u16)__msa_ilvl_b((v16i8)src0, (v16i8)src0); … … 1201 1201 1202 1202 for (x = 0; x < width; x += 8) { 1203 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);1204 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);1205 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 0);1206 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 16);1203 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 1204 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 1205 src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0); 1206 src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16); 1207 1207 dst0 = __msa_adds_u_b(src0, src2); 1208 1208 dst1 = __msa_adds_u_b(src1, src3); … … 1222 1222 1223 1223 for (x = 0; x < width; x += 8) { 1224 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);1225 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);1226 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 0);1227 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 16);1224 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 1225 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 1226 src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0); 1227 src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16); 1228 1228 dst0 = __msa_subs_u_b(src0, src2); 1229 1229 dst1 = __msa_subs_u_b(src1, src3); … … 1246 1246 1247 1247 for (x = 0; x < width; x += 8) { 1248 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);1249 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);1248 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 1249 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 1250 1250 vec0 = (v8u16)__msa_ilvr_b((v16i8)src0, (v16i8)src0); 1251 1251 vec1 = (v8u16)__msa_ilvl_b((v16i8)src0, (v16i8)src0); … … 1317 1317 1318 1318 for (x = 0; x < width; x += 8) { 1319 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);1320 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);1319 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 1320 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 1321 1321 vec0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0); 1322 1322 vec1 = (v16u8)__msa_pckod_b((v16i8)src1, (v16i8)src0); … … 1515 1515 1516 1516 for (x = 0; x < width; x += 16) { 1517 src0 = (v8u16)__msa_ld_h((v 8u16*)src_argb1555, 0);1518 src1 = (v8u16)__msa_ld_h((v 8u16*)src_argb1555, 16);1517 src0 = (v8u16)__msa_ld_h((void*)src_argb1555, 0); 1518 src1 = (v8u16)__msa_ld_h((void*)src_argb1555, 16); 1519 1519 vec0 = src0 & const_0x1F; 1520 1520 vec1 = src1 & const_0x1F; … … 1567 1567 1568 1568 for (x = 0; x < width; x += 16) { 1569 src0 = (v8u16)__msa_ld_h((v 8u16*)src_rgb565, 0);1570 src1 = (v8u16)__msa_ld_h((v 8u16*)src_rgb565, 16);1569 src0 = (v8u16)__msa_ld_h((void*)src_rgb565, 0); 1570 src1 = (v8u16)__msa_ld_h((void*)src_rgb565, 16); 1571 1571 vec0 = src0 & const_0x1F; 1572 1572 vec1 = src0 & const_0x7E0; … … 1612 1612 1613 1613 for (x = 0; x < width; x += 16) { 1614 src0 = (v16u8)__msa_ld_b((v 16i8*)src_rgb24, 0);1615 src1 = (v16u8)__msa_ld_b((v 16i8*)src_rgb24, 16);1616 src2 = (v16u8)__msa_ld_b((v 16i8*)src_rgb24, 32);1614 src0 = (v16u8)__msa_ld_b((void*)src_rgb24, 0); 1615 src1 = (v16u8)__msa_ld_b((void*)src_rgb24, 16); 1616 src2 = (v16u8)__msa_ld_b((void*)src_rgb24, 32); 1617 1617 vec0 = (v16u8)__msa_sldi_b((v16i8)src1, (v16i8)src0, 12); 1618 1618 vec1 = (v16u8)__msa_sldi_b((v16i8)src2, (v16i8)src1, 8); … … 1637 1637 1638 1638 for (x = 0; x < width; x += 16) { 1639 src0 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 0);1640 src1 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 16);1641 src2 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 32);1639 src0 = (v16u8)__msa_ld_b((void*)src_raw, 0); 1640 src1 = (v16u8)__msa_ld_b((void*)src_raw, 16); 1641 src2 = (v16u8)__msa_ld_b((void*)src_raw, 32); 1642 1642 vec0 = (v16u8)__msa_sldi_b((v16i8)src1, (v16i8)src0, 12); 1643 1643 vec1 = (v16u8)__msa_sldi_b((v16i8)src2, (v16i8)src1, 8); … … 1667 1667 1668 1668 for (x = 0; x < width; x += 16) { 1669 src0 = (v8u16)__msa_ld_b((v 8i16*)src_argb1555, 0);1670 src1 = (v8u16)__msa_ld_b((v 8i16*)src_argb1555, 16);1669 src0 = (v8u16)__msa_ld_b((void*)src_argb1555, 0); 1670 src1 = (v8u16)__msa_ld_b((void*)src_argb1555, 16); 1671 1671 vec0 = src0 & const_0x1F; 1672 1672 vec1 = src1 & const_0x1F; … … 1726 1726 1727 1727 for (x = 0; x < width; x += 16) { 1728 src0 = (v8u16)__msa_ld_b((v 8i16*)src_rgb565, 0);1729 src1 = (v8u16)__msa_ld_b((v 8i16*)src_rgb565, 16);1728 src0 = (v8u16)__msa_ld_b((void*)src_rgb565, 0); 1729 src1 = (v8u16)__msa_ld_b((void*)src_rgb565, 16); 1730 1730 vec0 = src0 & const_0x1F; 1731 1731 vec1 = src0 & const_0x7E0; … … 1790 1790 1791 1791 for (x = 0; x < width; x += 16) { 1792 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);1793 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);1794 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);1792 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 1793 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 1794 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 1795 1795 reg0 = (v16u8)__msa_vshf_b(mask0, zero, (v16i8)src0); 1796 1796 reg1 = (v16u8)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0); … … 1831 1831 1832 1832 for (x = 0; x < width; x += 16) { 1833 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);1834 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);1835 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);1833 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 1834 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 1835 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 1836 1836 reg0 = (v16u8)__msa_vshf_b(mask0, zero, (v16i8)src0); 1837 1837 reg1 = (v16u8)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0); … … 1878 1878 1879 1879 for (x = 0; x < width; x += 16) { 1880 src0 = (v8u16)__msa_ld_b((v 8i16*)s, 0);1881 src1 = (v8u16)__msa_ld_b((v 8i16*)s, 16);1882 src2 = (v8u16)__msa_ld_b((v 8i16*)t, 0);1883 src3 = (v8u16)__msa_ld_b((v 8i16*)t, 16);1880 src0 = (v8u16)__msa_ld_b((void*)s, 0); 1881 src1 = (v8u16)__msa_ld_b((void*)s, 16); 1882 src2 = (v8u16)__msa_ld_b((void*)t, 0); 1883 src3 = (v8u16)__msa_ld_b((void*)t, 16); 1884 1884 vec0 = src0 & const_0x1F; 1885 1885 vec1 = src1 & const_0x1F; … … 1960 1960 1961 1961 for (x = 0; x < width; x += 16) { 1962 src0 = (v8u16)__msa_ld_b((v 8i16*)s, 0);1963 src1 = (v8u16)__msa_ld_b((v 8i16*)s, 16);1964 src2 = (v8u16)__msa_ld_b((v 8i16*)t, 0);1965 src3 = (v8u16)__msa_ld_b((v 8i16*)t, 16);1962 src0 = (v8u16)__msa_ld_b((void*)s, 0); 1963 src1 = (v8u16)__msa_ld_b((void*)s, 16); 1964 src2 = (v8u16)__msa_ld_b((void*)t, 0); 1965 src3 = (v8u16)__msa_ld_b((void*)t, 16); 1966 1966 vec0 = src0 & const_0x1F; 1967 1967 vec1 = src1 & const_0x1F; … … 2042 2042 2043 2043 for (x = 0; x < width; x += 16) { 2044 inp0 = (v16u8)__msa_ld_b((v 16i8*)s, 0);2045 inp1 = (v16u8)__msa_ld_b((v 16i8*)s, 16);2046 inp2 = (v16u8)__msa_ld_b((v 16i8*)s, 32);2047 inp3 = (v16u8)__msa_ld_b((v 16i8*)t, 0);2048 inp4 = (v16u8)__msa_ld_b((v 16i8*)t, 16);2049 inp5 = (v16u8)__msa_ld_b((v 16i8*)t, 32);2044 inp0 = (v16u8)__msa_ld_b((void*)s, 0); 2045 inp1 = (v16u8)__msa_ld_b((void*)s, 16); 2046 inp2 = (v16u8)__msa_ld_b((void*)s, 32); 2047 inp3 = (v16u8)__msa_ld_b((void*)t, 0); 2048 inp4 = (v16u8)__msa_ld_b((void*)t, 16); 2049 inp5 = (v16u8)__msa_ld_b((void*)t, 32); 2050 2050 src1 = (v16u8)__msa_sldi_b((v16i8)inp1, (v16i8)inp0, 12); 2051 2051 src5 = (v16u8)__msa_sldi_b((v16i8)inp4, (v16i8)inp3, 12); … … 2147 2147 2148 2148 for (x = 0; x < width; x += 16) { 2149 inp0 = (v16u8)__msa_ld_b((v 16i8*)s, 0);2150 inp1 = (v16u8)__msa_ld_b((v 16i8*)s, 16);2151 inp2 = (v16u8)__msa_ld_b((v 16i8*)s, 32);2152 inp3 = (v16u8)__msa_ld_b((v 16i8*)t, 0);2153 inp4 = (v16u8)__msa_ld_b((v 16i8*)t, 16);2154 inp5 = (v16u8)__msa_ld_b((v 16i8*)t, 32);2149 inp0 = (v16u8)__msa_ld_b((void*)s, 0); 2150 inp1 = (v16u8)__msa_ld_b((void*)s, 16); 2151 inp2 = (v16u8)__msa_ld_b((void*)s, 32); 2152 inp3 = (v16u8)__msa_ld_b((void*)t, 0); 2153 inp4 = (v16u8)__msa_ld_b((void*)t, 16); 2154 inp5 = (v16u8)__msa_ld_b((void*)t, 32); 2155 2155 src1 = (v16u8)__msa_sldi_b((v16i8)inp1, (v16i8)inp0, 12); 2156 2156 src5 = (v16u8)__msa_sldi_b((v16i8)inp4, (v16i8)inp3, 12); … … 2354 2354 2355 2355 for (x = 0; x < width; x += 16) { 2356 src0 = (v16u8)__msa_ld_b((v 16i8*)src_sobelx, 0);2357 src1 = (v16u8)__msa_ld_b((v 16i8*)src_sobely, 0);2356 src0 = (v16u8)__msa_ld_b((void*)src_sobelx, 0); 2357 src1 = (v16u8)__msa_ld_b((void*)src_sobely, 0); 2358 2358 vec0 = __msa_adds_u_b(src0, src1); 2359 2359 dst0 = (v16u8)__msa_vshf_b(mask0, (v16i8)alpha, (v16i8)vec0); … … 2376 2376 2377 2377 for (x = 0; x < width; x += 32) { 2378 src0 = (v16u8)__msa_ld_b((v 16i8*)src_sobelx, 0);2379 src1 = (v16u8)__msa_ld_b((v 16i8*)src_sobelx, 16);2380 src2 = (v16u8)__msa_ld_b((v 16i8*)src_sobely, 0);2381 src3 = (v16u8)__msa_ld_b((v 16i8*)src_sobely, 16);2378 src0 = (v16u8)__msa_ld_b((void*)src_sobelx, 0); 2379 src1 = (v16u8)__msa_ld_b((void*)src_sobelx, 16); 2380 src2 = (v16u8)__msa_ld_b((void*)src_sobely, 0); 2381 src3 = (v16u8)__msa_ld_b((void*)src_sobely, 16); 2382 2382 dst0 = __msa_adds_u_b(src0, src2); 2383 2383 dst1 = __msa_adds_u_b(src1, src3); … … 2399 2399 2400 2400 for (x = 0; x < width; x += 16) { 2401 src0 = (v16u8)__msa_ld_b((v 16i8*)src_sobelx, 0);2402 src1 = (v16u8)__msa_ld_b((v 16i8*)src_sobely, 0);2401 src0 = (v16u8)__msa_ld_b((void*)src_sobelx, 0); 2402 src1 = (v16u8)__msa_ld_b((void*)src_sobely, 0); 2403 2403 vec0 = __msa_adds_u_b(src0, src1); 2404 2404 vec1 = (v16u8)__msa_ilvr_b((v16i8)src0, (v16i8)src1); … … 2425 2425 2426 2426 for (x = 0; x < width; x += 16) { 2427 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);2428 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);2429 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);2430 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 48);2427 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 2428 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 2429 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 2430 src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48); 2431 2431 ARGBTOY(src0, src1, src2, src3, const_0x4B0F, const_0x26, const_0x40, 7, 2432 2432 dst0); … … 2445 2445 2446 2446 for (x = 0; x < width; x += 16) { 2447 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);2448 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);2449 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);2450 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 48);2447 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 2448 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 2449 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 2450 src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48); 2451 2451 ARGBTOY(src0, src1, src2, src3, const_0x4200, const_0x1981, const_0x1080, 8, 2452 2452 dst0); … … 2465 2465 2466 2466 for (x = 0; x < width; x += 16) { 2467 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);2468 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);2469 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);2470 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 48);2467 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 2468 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 2469 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 2470 src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48); 2471 2471 ARGBTOY(src0, src1, src2, src3, const_0x8142, const_0x19, const_0x1080, 8, 2472 2472 dst0); … … 2485 2485 2486 2486 for (x = 0; x < width; x += 16) { 2487 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);2488 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);2489 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 32);2490 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 48);2487 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 2488 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 2489 src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32); 2490 src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48); 2491 2491 ARGBTOY(src0, src1, src2, src3, const_0x1900, const_0x4281, const_0x1080, 8, 2492 2492 dst0); … … 2519 2519 2520 2520 for (x = 0; x < width; x += 32) { 2521 src0 = (v16u8)__msa_ld_b((v 16i8*)s, 0);2522 src1 = (v16u8)__msa_ld_b((v 16i8*)s, 16);2523 src2 = (v16u8)__msa_ld_b((v 16i8*)s, 32);2524 src3 = (v16u8)__msa_ld_b((v 16i8*)s, 48);2525 src4 = (v16u8)__msa_ld_b((v 16i8*)t, 0);2526 src5 = (v16u8)__msa_ld_b((v 16i8*)t, 16);2527 src6 = (v16u8)__msa_ld_b((v 16i8*)t, 32);2528 src7 = (v16u8)__msa_ld_b((v 16i8*)t, 48);2521 src0 = (v16u8)__msa_ld_b((void*)s, 0); 2522 src1 = (v16u8)__msa_ld_b((void*)s, 16); 2523 src2 = (v16u8)__msa_ld_b((void*)s, 32); 2524 src3 = (v16u8)__msa_ld_b((void*)s, 48); 2525 src4 = (v16u8)__msa_ld_b((void*)t, 0); 2526 src5 = (v16u8)__msa_ld_b((void*)t, 16); 2527 src6 = (v16u8)__msa_ld_b((void*)t, 32); 2528 src7 = (v16u8)__msa_ld_b((void*)t, 48); 2529 2529 src0 = __msa_aver_u_b(src0, src4); 2530 2530 src1 = __msa_aver_u_b(src1, src5); … … 2537 2537 vec0 = __msa_aver_u_b(src4, src6); 2538 2538 vec1 = __msa_aver_u_b(src5, src7); 2539 src0 = (v16u8)__msa_ld_b((v 16i8*)s, 64);2540 src1 = (v16u8)__msa_ld_b((v 16i8*)s, 80);2541 src2 = (v16u8)__msa_ld_b((v 16i8*)s, 96);2542 src3 = (v16u8)__msa_ld_b((v 16i8*)s, 112);2543 src4 = (v16u8)__msa_ld_b((v 16i8*)t, 64);2544 src5 = (v16u8)__msa_ld_b((v 16i8*)t, 80);2545 src6 = (v16u8)__msa_ld_b((v 16i8*)t, 96);2546 src7 = (v16u8)__msa_ld_b((v 16i8*)t, 112);2539 src0 = (v16u8)__msa_ld_b((void*)s, 64); 2540 src1 = (v16u8)__msa_ld_b((void*)s, 80); 2541 src2 = (v16u8)__msa_ld_b((void*)s, 96); 2542 src3 = (v16u8)__msa_ld_b((void*)s, 112); 2543 src4 = (v16u8)__msa_ld_b((void*)t, 64); 2544 src5 = (v16u8)__msa_ld_b((void*)t, 80); 2545 src6 = (v16u8)__msa_ld_b((void*)t, 96); 2546 src7 = (v16u8)__msa_ld_b((void*)t, 112); 2547 2547 src0 = __msa_aver_u_b(src0, src4); 2548 2548 src1 = __msa_aver_u_b(src1, src5); … … 2747 2747 2748 2748 for (x = 0; x < width; x += 16) { 2749 src0 = (v16u8)__msa_ld_b((v 16i8*)src_y, 0);2749 src0 = (v16u8)__msa_ld_b((void*)src_y, 0); 2750 2750 vec0 = (v8i16)__msa_ilvr_b((v16i8)src0, (v16i8)src0); 2751 2751 vec1 = (v8i16)__msa_ilvl_b((v16i8)src0, (v16i8)src0); … … 2793 2793 2794 2794 for (x = 0; x < width; x += 16) { 2795 src0 = (v16u8)__msa_ld_b((v 16i8*)src_y, 0);2795 src0 = (v16u8)__msa_ld_b((void*)src_y, 0); 2796 2796 vec0 = (v16u8)__msa_ilvr_b((v16i8)src0, (v16i8)src0); 2797 2797 vec1 = (v16u8)__msa_ilvl_b((v16i8)src0, (v16i8)src0); … … 2825 2825 2826 2826 for (x = 0; x < width; x += 8) { 2827 src0 = (v16u8)__msa_ld_b((v 16i8*)src_yuy2, 0);2827 src0 = (v16u8)__msa_ld_b((void*)src_yuy2, 0); 2828 2828 src1 = (v16u8)__msa_pckev_b((v16i8)src0, (v16i8)src0); 2829 2829 src2 = (v16u8)__msa_pckod_b((v16i8)src0, (v16i8)src0); … … 2853 2853 2854 2854 for (x = 0; x < width; x += 8) { 2855 src0 = (v16u8)__msa_ld_b((v 16i8*)src_uyvy, 0);2855 src0 = (v16u8)__msa_ld_b((void*)src_uyvy, 0); 2856 2856 src1 = (v16u8)__msa_pckod_b((v16i8)src0, (v16i8)src0); 2857 2857 src2 = (v16u8)__msa_pckev_b((v16i8)src0, (v16i8)src0); … … 2885 2885 if (128 == y1_fraction) { 2886 2886 for (x = 0; x < width; x += 32) { 2887 src0 = (v16u8)__msa_ld_b((v 16i8*)s, 0);2888 src1 = (v16u8)__msa_ld_b((v 16i8*)s, 16);2889 src2 = (v16u8)__msa_ld_b((v 16i8*)t, 0);2890 src3 = (v16u8)__msa_ld_b((v 16i8*)t, 16);2887 src0 = (v16u8)__msa_ld_b((void*)s, 0); 2888 src1 = (v16u8)__msa_ld_b((void*)s, 16); 2889 src2 = (v16u8)__msa_ld_b((void*)t, 0); 2890 src3 = (v16u8)__msa_ld_b((void*)t, 16); 2891 2891 dst0 = __msa_aver_u_b(src0, src2); 2892 2892 dst1 = __msa_aver_u_b(src1, src3); … … 2903 2903 2904 2904 for (x = 0; x < width; x += 32) { 2905 src0 = (v16u8)__msa_ld_b((v 16i8*)s, 0);2906 src1 = (v16u8)__msa_ld_b((v 16i8*)s, 16);2907 src2 = (v16u8)__msa_ld_b((v 16i8*)t, 0);2908 src3 = (v16u8)__msa_ld_b((v 16i8*)t, 16);2905 src0 = (v16u8)__msa_ld_b((void*)s, 0); 2906 src1 = (v16u8)__msa_ld_b((void*)s, 16); 2907 src2 = (v16u8)__msa_ld_b((void*)t, 0); 2908 src3 = (v16u8)__msa_ld_b((void*)t, 16); 2909 2909 vec0 = (v8u16)__msa_ilvr_b((v16i8)src2, (v16i8)src0); 2910 2910 vec1 = (v8u16)__msa_ilvl_b((v16i8)src2, (v16i8)src0); … … 2948 2948 2949 2949 for (x = 0; x < width; x += 16) { 2950 src0 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 0);2951 src1 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 16);2952 src2 = (v16u8)__msa_ld_b((v 16i8*)src_raw, 32);2950 src0 = (v16u8)__msa_ld_b((void*)src_raw, 0); 2951 src1 = (v16u8)__msa_ld_b((void*)src_raw, 16); 2952 src2 = (v16u8)__msa_ld_b((void*)src_raw, 32); 2953 2953 src3 = (v16u8)__msa_sldi_b((v16i8)src1, (v16i8)src0, 8); 2954 2954 src4 = (v16u8)__msa_sldi_b((v16i8)src2, (v16i8)src1, 8); … … 2971 2971 2972 2972 for (x = 0; x < width; x += 16) { 2973 src0 = (v16u8)__msa_ld_b((v 16i8*)src_u, 0);2974 src1 = (v16u8)__msa_ld_b((v 16i8*)src_v, 0);2973 src0 = (v16u8)__msa_ld_b((void*)src_u, 0); 2974 src1 = (v16u8)__msa_ld_b((void*)src_v, 0); 2975 2975 dst0 = (v16u8)__msa_ilvr_b((v16i8)src1, (v16i8)src0); 2976 2976 dst1 = (v16u8)__msa_ilvl_b((v16i8)src1, (v16i8)src0); … … 2989 2989 2990 2990 for (i = 0; i < width; i += 16) { 2991 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);2992 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);2993 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 32);2994 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 48);2991 src0 = (v16u8)__msa_ld_b((void*)src_argb, 0); 2992 src1 = (v16u8)__msa_ld_b((void*)src_argb, 16); 2993 src2 = (v16u8)__msa_ld_b((void*)src_argb, 32); 2994 src3 = (v16u8)__msa_ld_b((void*)src_argb, 48); 2995 2995 vec0 = (v16u8)__msa_pckod_b((v16i8)src1, (v16i8)src0); 2996 2996 vec1 = (v16u8)__msa_pckod_b((v16i8)src3, (v16i8)src2); … … 3016 3016 3017 3017 for (x = 0; x < width; x += 8) { 3018 src0 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 0);3019 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb0, 16);3020 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 0);3021 src3 = (v16u8)__msa_ld_b((v 16i8*)src_argb1, 16);3018 src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0); 3019 src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16); 3020 src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0); 3021 src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16); 3022 3022 vec0 = (v8u16)__msa_ilvr_b(zero, (v16i8)src0); 3023 3023 vec1 = (v8u16)__msa_ilvl_b(zero, (v16i8)src0); … … 3084 3084 3085 3085 for (x = 0; x < width; x += 8) { 3086 src0 = (v16u8)__msa_ld_b((v 16i8*)dst_argb, 0);3087 src1 = (v16u8)__msa_ld_b((v 16i8*)dst_argb, 16);3088 src2 = (v16u8)__msa_ld_b((v 16i8*)dst_argb, 32);3089 src3 = (v16u8)__msa_ld_b((v 16i8*)dst_argb, 48);3086 src0 = (v16u8)__msa_ld_b((void*)dst_argb, 0); 3087 src1 = (v16u8)__msa_ld_b((void*)dst_argb, 16); 3088 src2 = (v16u8)__msa_ld_b((void*)dst_argb, 32); 3089 src3 = (v16u8)__msa_ld_b((void*)dst_argb, 48); 3090 3090 vec0 = (v8i16)__msa_ilvr_b(zero, (v16i8)src0); 3091 3091 vec1 = (v8i16)__msa_ilvl_b(zero, (v16i8)src0); … … 3187 3187 v8i16 max = __msa_ldi_h(255); 3188 3188 3189 src0 = __msa_ld_b((v 16i8*)matrix_argb, 0);3189 src0 = __msa_ld_b((void*)matrix_argb, 0); 3190 3190 vec0 = (v8i16)__msa_ilvr_b(zero, src0); 3191 3191 vec1 = (v8i16)__msa_ilvl_b(zero, src0); 3192 3192 3193 3193 for (x = 0; x < width; x += 8) { 3194 src1 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 0);3195 src2 = (v16u8)__msa_ld_b((v 16i8*)src_argb, 16);3194 src1 = (v16u8)__msa_ld_b((void*)src_argb, 0); 3195 src2 = (v16u8)__msa_ld_b((void*)src_argb, 16); 3196 3196 vec2 = (v8i16)__msa_ilvr_b(zero, (v16i8)src1); 3197 3197 vec3 = (v8i16)__msa_ilvl_b(zero, (v16i8)src1); … … 3290 3290 3291 3291 for (x = 0; x < width; x += 32) { 3292 src0 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 0);3293 src1 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 16);3294 src2 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 32);3295 src3 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 48);3292 src0 = (v16u8)__msa_ld_b((void*)src_uv, 0); 3293 src1 = (v16u8)__msa_ld_b((void*)src_uv, 16); 3294 src2 = (v16u8)__msa_ld_b((void*)src_uv, 32); 3295 src3 = (v16u8)__msa_ld_b((void*)src_uv, 48); 3296 3296 dst0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0); 3297 3297 dst1 = (v16u8)__msa_pckev_b((v16i8)src3, (v16i8)src2); … … 3330 3330 for (x = 0; x < width; x += 32) { 3331 3331 src_uv -= 64; 3332 src2 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 0);3333 src3 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 16);3334 src0 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 32);3335 src1 = (v16u8)__msa_ld_b((v 16i8*)src_uv, 48);3332 src2 = (v16u8)__msa_ld_b((void*)src_uv, 0); 3333 src3 = (v16u8)__msa_ld_b((void*)src_uv, 16); 3334 src0 = (v16u8)__msa_ld_b((void*)src_uv, 32); 3335 src1 = (v16u8)__msa_ld_b((void*)src_uv, 48); 3336 3336 dst0 = (v16u8)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0); 3337 3337 dst1 = (v16u8)__msa_vshf_b(mask1, (v16i8)src3, (v16i8)src2); … … 3360 3360 3361 3361 for (x = 0; x < width; x += 16) { 3362 src0 = (v16u8)__msa_ld_b((v 16i8*)src_y0, 0);3363 src1 = (v16u8)__msa_ld_b((v 16i8*)src_y0, 16);3364 src2 = (v16u8)__msa_ld_b((v 16i8*)src_y1, 0);3365 src3 = (v16u8)__msa_ld_b((v 16i8*)src_y1, 16);3366 src4 = (v16u8)__msa_ld_b((v 16i8*)src_y2, 0);3367 src5 = (v16u8)__msa_ld_b((v 16i8*)src_y2, 16);3362 src0 = (v16u8)__msa_ld_b((void*)src_y0, 0); 3363 src1 = (v16u8)__msa_ld_b((void*)src_y0, 16); 3364 src2 = (v16u8)__msa_ld_b((void*)src_y1, 0); 3365 src3 = (v16u8)__msa_ld_b((void*)src_y1, 16); 3366 src4 = (v16u8)__msa_ld_b((void*)src_y2, 0); 3367 src5 = (v16u8)__msa_ld_b((void*)src_y2, 16); 3368 3368 vec0 = (v8i16)__msa_vshf_b(mask0, (v16i8)src1, (v16i8)src0); 3369 3369 vec1 = (v8i16)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0); … … 3410 3410 3411 3411 for (x = 0; x < width; x += 16) { 3412 src0 = (v16u8)__msa_ld_b((v 16i8*)src_y0, 0);3413 src1 = (v16u8)__msa_ld_b((v 16i8*)src_y1, 0);3412 src0 = (v16u8)__msa_ld_b((void*)src_y0, 0); 3413 src1 = (v16u8)__msa_ld_b((void*)src_y1, 0); 3414 3414 vec0 = (v8i16)__msa_ilvr_b((v16i8)zero, (v16i8)src0); 3415 3415 vec1 = (v8i16)__msa_ilvl_b((v16i8)zero, (v16i8)src0); … … 3458 3458 3459 3459 for (i = 0; i < width; i += 32) { 3460 src0 = (v8u16)__msa_ld_h((v 8i16*)src, 0);3461 src1 = (v8u16)__msa_ld_h((v 8i16*)src, 16);3462 src2 = (v8u16)__msa_ld_h((v 8i16*)src, 32);3463 src3 = (v8u16)__msa_ld_h((v 8i16*)src, 48);3460 src0 = (v8u16)__msa_ld_h((void*)src, 0); 3461 src1 = (v8u16)__msa_ld_h((void*)src, 16); 3462 src2 = (v8u16)__msa_ld_h((void*)src, 32); 3463 src3 = (v8u16)__msa_ld_h((void*)src, 48); 3464 3464 vec0 = (v4u32)__msa_ilvr_h(zero, (v8i16)src0); 3465 3465 vec1 = (v4u32)__msa_ilvl_h(zero, (v8i16)src0); -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/row_neon.cc
r235135 r239415 2605 2605 } 2606 2606 2607 // %y passes a float as a scalar vector for vector * scalar multiply. 2608 // the regoster must be d0 to d15 and indexed with [0] or [1] to access 2609 // the float in the first or second float of the d-reg 2610 2607 2611 void HalfFloat1Row_NEON(const uint16_t* src, 2608 2612 uint16_t* dst, … … 2610 2614 int width) { 2611 2615 asm volatile( 2612 "vdup.32 q0, %3 \n"2613 2616 2614 2617 "1: \n" … … 2619 2622 "vcvt.f32.u32 q2, q2 \n" // 8 floats 2620 2623 "vcvt.f32.u32 q3, q3 \n" 2621 "vmul.f32 q2, q2, q0\n" // adjust exponent2622 "vmul.f32 q3, q3, q0\n"2624 "vmul.f32 q2, q2, %y3 \n" // adjust exponent 2625 "vmul.f32 q3, q3, %y3 \n" 2623 2626 "vqshrn.u32 d2, q2, #13 \n" // isolate halffloat 2624 2627 "vqshrn.u32 d3, q3, #13 \n" … … 2628 2631 "+r"(dst), // %1 2629 2632 "+r"(width) // %2 2630 : "r"(1.9259299444e-34f) // %3 2631 : "cc", "memory", "q0", "q1", "q2", "q3"); 2632 } 2633 2634 // TODO(fbarchard): multiply by element. 2633 : "w"(1.9259299444e-34f) // %3 2634 : "cc", "memory", "q1", "q2", "q3"); 2635 } 2636 2635 2637 void HalfFloatRow_NEON(const uint16_t* src, 2636 2638 uint16_t* dst, … … 2638 2640 int width) { 2639 2641 asm volatile( 2640 "vdup.32 q0, %3 \n"2641 2642 2642 2643 "1: \n" … … 2647 2648 "vcvt.f32.u32 q2, q2 \n" // 8 floats 2648 2649 "vcvt.f32.u32 q3, q3 \n" 2649 "vmul.f32 q2, q2, q0\n" // adjust exponent2650 "vmul.f32 q3, q3, q0\n"2650 "vmul.f32 q2, q2, %y3 \n" // adjust exponent 2651 "vmul.f32 q3, q3, %y3 \n" 2651 2652 "vqshrn.u32 d2, q2, #13 \n" // isolate halffloat 2652 2653 "vqshrn.u32 d3, q3, #13 \n" … … 2656 2657 "+r"(dst), // %1 2657 2658 "+r"(width) // %2 2658 : " r"(scale * 1.9259299444e-34f) // %32659 : "cc", "memory", "q 0", "q1", "q2", "q3");2659 : "w"(scale * 1.9259299444e-34f) // %3 2660 : "cc", "memory", "q1", "q2", "q3"); 2660 2661 } 2661 2662 … … 2665 2666 int width) { 2666 2667 asm volatile( 2667 "vdup.32 q0, %3 \n"2668 2668 2669 2669 "1: \n" … … 2675 2675 "vcvt.f32.u32 q2, q2 \n" // 8 floats 2676 2676 "vcvt.f32.u32 q3, q3 \n" 2677 "vmul.f32 q2, q2, d0[0]\n" // scale2678 "vmul.f32 q3, q3, d0[0]\n"2677 "vmul.f32 q2, q2, %y3 \n" // scale 2678 "vmul.f32 q3, q3, %y3 \n" 2679 2679 "vst1.8 {q2, q3}, [%1]! \n" // store 8 floats 2680 2680 "bgt 1b \n" … … 2682 2682 "+r"(dst), // %1 2683 2683 "+r"(width) // %2 2684 : " r"(scale) // %32685 : "cc", "memory", "q 0", "q1", "q2", "q3");2684 : "w"(scale) // %3 2685 : "cc", "memory", "q1", "q2", "q3"); 2686 2686 } 2687 2687 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale.cc
r235135 r239415 119 119 } 120 120 #endif 121 #if defined(HAS_SCALEROWDOWN2_MMI) 122 if (TestCpuFlag(kCpuHasMMI)) { 123 ScaleRowDown2 = 124 filtering == kFilterNone 125 ? ScaleRowDown2_Any_MMI 126 : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_MMI 127 : ScaleRowDown2Box_Any_MMI); 128 if (IS_ALIGNED(dst_width, 8)) { 129 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_MMI 130 : (filtering == kFilterLinear 131 ? ScaleRowDown2Linear_MMI 132 : ScaleRowDown2Box_MMI); 133 } 134 } 135 #endif 121 136 122 137 if (filtering == kFilterLinear) { … … 170 185 } 171 186 #endif 187 #if defined(HAS_SCALEROWDOWN2_16_MMI) 188 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 4)) { 189 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_16_MMI 190 : (filtering == kFilterLinear 191 ? ScaleRowDown2Linear_16_MMI 192 : ScaleRowDown2Box_16_MMI); 193 } 194 #endif 172 195 173 196 if (filtering == kFilterLinear) { … … 242 265 } 243 266 #endif 267 #if defined(HAS_SCALEROWDOWN4_MMI) 268 if (TestCpuFlag(kCpuHasMMI)) { 269 ScaleRowDown4 = 270 filtering ? ScaleRowDown4Box_Any_MMI : ScaleRowDown4_Any_MMI; 271 if (IS_ALIGNED(dst_width, 8)) { 272 ScaleRowDown4 = filtering ? ScaleRowDown4Box_MMI : ScaleRowDown4_MMI; 273 } 274 } 275 #endif 244 276 245 277 if (filtering == kFilterLinear) { … … 283 315 ScaleRowDown4 = 284 316 filtering ? ScaleRowDown4Box_16_SSE2 : ScaleRowDown4_16_SSE2; 317 } 318 #endif 319 #if defined(HAS_SCALEROWDOWN4_16_MMI) 320 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 8)) { 321 ScaleRowDown4 = filtering ? ScaleRowDown4Box_16_MMI : ScaleRowDown4_16_MMI; 285 322 } 286 323 #endif … … 850 887 } 851 888 #endif 889 #if defined(HAS_SCALEADDROW_MMI) 890 if (TestCpuFlag(kCpuHasMMI)) { 891 ScaleAddRow = ScaleAddRow_Any_MMI; 892 if (IS_ALIGNED(src_width, 8)) { 893 ScaleAddRow = ScaleAddRow_MMI; 894 } 895 } 896 #endif 852 897 853 898 for (j = 0; j < dst_height; ++j) { … … 905 950 #endif 906 951 952 #if defined(HAS_SCALEADDROW_16_MMI) 953 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(src_width, 4)) { 954 ScaleAddRow = ScaleAddRow_16_MMI; 955 } 956 #endif 907 957 for (j = 0; j < dst_height; ++j) { 908 958 int boxheight; … … 986 1036 if (IS_ALIGNED(src_width, 32)) { 987 1037 InterpolateRow = InterpolateRow_MSA; 1038 } 1039 } 1040 #endif 1041 #if defined(HAS_INTERPOLATEROW_MMI) 1042 if (TestCpuFlag(kCpuHasMMI)) { 1043 InterpolateRow = InterpolateRow_Any_MMI; 1044 if (IS_ALIGNED(src_width, 16)) { 1045 InterpolateRow = InterpolateRow_MMI; 988 1046 } 989 1047 } … … 1208 1266 } 1209 1267 #endif 1268 #if defined(HAS_SCALECOLS_MMI) 1269 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 8)) { 1270 ScaleFilterCols = ScaleColsUp2_MMI; 1271 } 1272 #endif 1210 1273 } 1211 1274 … … 1335 1398 } 1336 1399 #endif 1400 #if defined(HAS_SCALECOLS_16_MMI) 1401 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 8)) { 1402 ScaleFilterCols = ScaleColsUp2_16_MMI; 1403 } 1404 #endif 1337 1405 } 1338 1406 … … 1420 1488 } 1421 1489 #endif 1490 #if defined(HAS_SCALECOLS_MMI) 1491 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 8)) { 1492 ScaleCols = ScaleColsUp2_MMI; 1493 } 1494 #endif 1422 1495 } 1423 1496 … … 1454 1527 if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) { 1455 1528 ScaleCols = ScaleColsUp2_16_SSE2; 1529 } 1530 #endif 1531 #if defined(HAS_SCALECOLS_16_MMI) 1532 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 8)) { 1533 ScaleCols = ScaleColsUp2_16_MMI; 1456 1534 } 1457 1535 #endif -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_any.cc
r235135 r239415 8 8 * be found in the AUTHORS file in the root of the source tree. 9 9 */ 10 11 #include <string.h> // For memset/memcpy 10 12 11 13 #include "libyuv/scale.h" … … 42 44 #ifdef HAS_SCALEARGBCOLS_MSA 43 45 CANY(ScaleARGBCols_Any_MSA, ScaleARGBCols_MSA, ScaleARGBCols_C, 4, 3) 46 #endif 47 #ifdef HAS_SCALEARGBCOLS_MMI 48 CANY(ScaleARGBCols_Any_MMI, ScaleARGBCols_MMI, ScaleARGBCols_C, 4, 0) 44 49 #endif 45 50 #ifdef HAS_SCALEARGBFILTERCOLS_NEON … … 166 171 31) 167 172 #endif 173 #ifdef HAS_SCALEROWDOWN2_MMI 174 SDANY(ScaleRowDown2_Any_MMI, ScaleRowDown2_MMI, ScaleRowDown2_C, 2, 1, 7) 175 SDANY(ScaleRowDown2Linear_Any_MMI, 176 ScaleRowDown2Linear_MMI, 177 ScaleRowDown2Linear_C, 178 2, 179 1, 180 7) 181 SDANY(ScaleRowDown2Box_Any_MMI, 182 ScaleRowDown2Box_MMI, 183 ScaleRowDown2Box_C, 184 2, 185 1, 186 7) 187 SDODD(ScaleRowDown2Box_Odd_MMI, 188 ScaleRowDown2Box_MMI, 189 ScaleRowDown2Box_Odd_C, 190 2, 191 1, 192 7) 193 #endif 168 194 #ifdef HAS_SCALEROWDOWN4_SSSE3 169 195 SDANY(ScaleRowDown4_Any_SSSE3, ScaleRowDown4_SSSE3, ScaleRowDown4_C, 4, 1, 7) … … 202 228 15) 203 229 #endif 230 #ifdef HAS_SCALEROWDOWN4_MMI 231 SDANY(ScaleRowDown4_Any_MMI, ScaleRowDown4_MMI, ScaleRowDown4_C, 4, 1, 7) 232 SDANY(ScaleRowDown4Box_Any_MMI, 233 ScaleRowDown4Box_MMI, 234 ScaleRowDown4Box_C, 235 4, 236 1, 237 7) 238 #endif 204 239 #ifdef HAS_SCALEROWDOWN34_SSSE3 205 240 SDANY(ScaleRowDown34_Any_SSSE3, … … 382 417 4, 383 418 3) 419 #endif 420 #ifdef HAS_SCALEARGBROWDOWN2_MMI 421 SDANY(ScaleARGBRowDown2_Any_MMI, 422 ScaleARGBRowDown2_MMI, 423 ScaleARGBRowDown2_C, 424 2, 425 4, 426 1) 427 SDANY(ScaleARGBRowDown2Linear_Any_MMI, 428 ScaleARGBRowDown2Linear_MMI, 429 ScaleARGBRowDown2Linear_C, 430 2, 431 4, 432 1) 433 SDANY(ScaleARGBRowDown2Box_Any_MMI, 434 ScaleARGBRowDown2Box_MMI, 435 ScaleARGBRowDown2Box_C, 436 2, 437 4, 438 1) 384 439 #endif 385 440 #undef SDANY … … 434 489 3) 435 490 #endif 491 #ifdef HAS_SCALEARGBROWDOWNEVEN_MMI 492 SDAANY(ScaleARGBRowDownEven_Any_MMI, 493 ScaleARGBRowDownEven_MMI, 494 ScaleARGBRowDownEven_C, 495 4, 496 1) 497 SDAANY(ScaleARGBRowDownEvenBox_Any_MMI, 498 ScaleARGBRowDownEvenBox_MMI, 499 ScaleARGBRowDownEvenBox_C, 500 4, 501 1) 502 #endif 503 504 #ifdef SASIMDONLY 505 // This also works and uses memcpy and SIMD instead of C, but is slower on ARM 506 507 // Add rows box filter scale down. Using macro from row_any 508 #define SAROW(NAMEANY, ANY_SIMD, SBPP, BPP, MASK) \ 509 void NAMEANY(const uint8_t* src_ptr, uint16_t* dst_ptr, int width) { \ 510 SIMD_ALIGNED(uint16_t dst_temp[32]); \ 511 SIMD_ALIGNED(uint8_t src_temp[32]); \ 512 memset(dst_temp, 0, 32 * 2); /* for msan */ \ 513 int r = width & MASK; \ 514 int n = width & ~MASK; \ 515 if (n > 0) { \ 516 ANY_SIMD(src_ptr, dst_ptr, n); \ 517 } \ 518 memcpy(src_temp, src_ptr + n * SBPP, r * SBPP); \ 519 memcpy(dst_temp, dst_ptr + n * BPP, r * BPP); \ 520 ANY_SIMD(src_temp, dst_temp, MASK + 1); \ 521 memcpy(dst_ptr + n * BPP, dst_temp, r * BPP); \ 522 } 523 524 #ifdef HAS_SCALEADDROW_SSE2 525 SAROW(ScaleAddRow_Any_SSE2, ScaleAddRow_SSE2, 1, 2, 15) 526 #endif 527 #ifdef HAS_SCALEADDROW_AVX2 528 SAROW(ScaleAddRow_Any_AVX2, ScaleAddRow_AVX2, 1, 2, 31) 529 #endif 530 #ifdef HAS_SCALEADDROW_NEON 531 SAROW(ScaleAddRow_Any_NEON, ScaleAddRow_NEON, 1, 2, 15) 532 #endif 533 #ifdef HAS_SCALEADDROW_MSA 534 SAROW(ScaleAddRow_Any_MSA, ScaleAddRow_MSA, 1, 2, 15) 535 #endif 536 #ifdef HAS_SCALEADDROW_MMI 537 SAROW(ScaleAddRow_Any_MMI, ScaleAddRow_MMI, 1, 2, 7) 538 #endif 539 #undef SAANY 540 541 #else 436 542 437 543 // Add rows box filter scale down. … … 457 563 SAANY(ScaleAddRow_Any_MSA, ScaleAddRow_MSA, ScaleAddRow_C, 15) 458 564 #endif 565 #ifdef HAS_SCALEADDROW_MMI 566 SAANY(ScaleAddRow_Any_MMI, ScaleAddRow_MMI, ScaleAddRow_C, 7) 567 #endif 459 568 #undef SAANY 569 570 #endif // SASIMDONLY 460 571 461 572 #ifdef __cplusplus -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_argb.cc
r235135 r239415 112 112 } 113 113 #endif 114 #if defined(HAS_SCALEARGBROWDOWN2_MMI) 115 if (TestCpuFlag(kCpuHasMMI)) { 116 ScaleARGBRowDown2 = 117 filtering == kFilterNone 118 ? ScaleARGBRowDown2_Any_MMI 119 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_Any_MMI 120 : ScaleARGBRowDown2Box_Any_MMI); 121 if (IS_ALIGNED(dst_width, 2)) { 122 ScaleARGBRowDown2 = 123 filtering == kFilterNone 124 ? ScaleARGBRowDown2_MMI 125 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_MMI 126 : ScaleARGBRowDown2Box_MMI); 127 } 128 } 129 #endif 114 130 115 131 if (filtering == kFilterLinear) { … … 238 254 } 239 255 #endif 256 #if defined(HAS_SCALEARGBROWDOWNEVEN_MMI) 257 if (TestCpuFlag(kCpuHasMMI)) { 258 ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_Any_MMI 259 : ScaleARGBRowDownEven_Any_MMI; 260 if (IS_ALIGNED(dst_width, 2)) { 261 ScaleARGBRowDownEven = 262 filtering ? ScaleARGBRowDownEvenBox_MMI : ScaleARGBRowDownEven_MMI; 263 } 264 } 265 #endif 240 266 241 267 if (filtering == kFilterLinear) { … … 419 445 } 420 446 #endif 447 #if defined(HAS_INTERPOLATEROW_MMI) 448 if (TestCpuFlag(kCpuHasMMI)) { 449 InterpolateRow = InterpolateRow_Any_MMI; 450 if (IS_ALIGNED(dst_width, 2)) { 451 InterpolateRow = InterpolateRow_MMI; 452 } 453 } 454 #endif 421 455 if (src_width >= 32768) { 422 456 ScaleARGBFilterCols = … … 462 496 if (IS_ALIGNED(dst_width, 4)) { 463 497 ScaleARGBFilterCols = ScaleARGBCols_MSA; 498 } 499 } 500 #endif 501 #if defined(HAS_SCALEARGBCOLS_MMI) 502 if (!filtering && TestCpuFlag(kCpuHasMMI)) { 503 ScaleARGBFilterCols = ScaleARGBCols_Any_MMI; 504 if (IS_ALIGNED(dst_width, 1)) { 505 ScaleARGBFilterCols = ScaleARGBCols_MMI; 464 506 } 465 507 } … … 470 512 if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) { 471 513 ScaleARGBFilterCols = ScaleARGBColsUp2_SSE2; 514 } 515 #endif 516 #if defined(HAS_SCALEARGBCOLSUP2_MMI) 517 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 4)) { 518 ScaleARGBFilterCols = ScaleARGBColsUp2_MMI; 472 519 } 473 520 #endif … … 667 714 } 668 715 #endif 716 #if defined(HAS_SCALEARGBCOLS_MMI) 717 if (!filtering && TestCpuFlag(kCpuHasMMI)) { 718 ScaleARGBFilterCols = ScaleARGBCols_Any_MMI; 719 if (IS_ALIGNED(dst_width, 1)) { 720 ScaleARGBFilterCols = ScaleARGBCols_MMI; 721 } 722 } 723 #endif 669 724 if (!filtering && src_width * 2 == dst_width && x < 0x8000) { 670 725 ScaleARGBFilterCols = ScaleARGBColsUp2_C; … … 672 727 if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) { 673 728 ScaleARGBFilterCols = ScaleARGBColsUp2_SSE2; 729 } 730 #endif 731 #if defined(HAS_SCALEARGBCOLSUP2_MMI) 732 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 4)) { 733 ScaleARGBFilterCols = ScaleARGBColsUp2_MMI; 674 734 } 675 735 #endif … … 798 858 } 799 859 #endif 860 #if defined(HAS_SCALEARGBCOLS_MMI) 861 if (TestCpuFlag(kCpuHasMMI)) { 862 ScaleARGBCols = ScaleARGBCols_Any_MMI; 863 if (IS_ALIGNED(dst_width, 1)) { 864 ScaleARGBCols = ScaleARGBCols_MMI; 865 } 866 } 867 #endif 800 868 if (src_width * 2 == dst_width && x < 0x8000) { 801 869 ScaleARGBCols = ScaleARGBColsUp2_C; … … 803 871 if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) { 804 872 ScaleARGBCols = ScaleARGBColsUp2_SSE2; 873 } 874 #endif 875 #if defined(HAS_SCALEARGBCOLSUP2_MMI) 876 if (TestCpuFlag(kCpuHasMMI) && IS_ALIGNED(dst_width, 4)) { 877 ScaleARGBCols = ScaleARGBColsUp2_MMI; 805 878 } 806 879 #endif -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_common.cc
r235135 r239415 543 543 // Same as 8 bit arm blender but return is cast to uint16_t 544 544 #define BLENDER(a, b, f) \ 545 (uint16_t)((int)(a) + ((((int)((f)) * ((int)(b) - (int)(a))) + 0x8000) >> 16)) 545 (uint16_t)( \ 546 (int)(a) + \ 547 (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> 16)) 546 548 547 549 void ScaleFilterCols_16_C(uint16_t* dst_ptr, … … 1074 1076 } 1075 1077 #endif 1078 #if defined(HAS_INTERPOLATEROW_MMI) 1079 if (TestCpuFlag(kCpuHasMMI)) { 1080 InterpolateRow = InterpolateRow_Any_MMI; 1081 if (IS_ALIGNED(dst_width_bytes, 8)) { 1082 InterpolateRow = InterpolateRow_MMI; 1083 } 1084 } 1085 #endif 1076 1086 for (j = 0; j < dst_height; ++j) { 1077 1087 int yi; -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_neon.cc
r235135 r239415 505 505 } 506 506 507 void ScaleAddRows_NEON(const uint8_t* src_ptr, 508 ptrdiff_t src_stride, 509 uint16_t* dst_ptr, 510 int src_width, 511 int src_height) { 512 const uint8_t* src_tmp; 513 asm volatile( 514 "1: \n" 515 "mov %0, %1 \n" 516 "mov r12, %5 \n" 517 "veor q2, q2, q2 \n" 518 "veor q3, q3, q3 \n" 519 "2: \n" 520 // load 16 pixels into q0 521 "vld1.8 {q0}, [%0], %3 \n" 522 "vaddw.u8 q3, q3, d1 \n" 523 "vaddw.u8 q2, q2, d0 \n" 524 "subs r12, r12, #1 \n" 525 "bgt 2b \n" 526 "vst1.16 {q2, q3}, [%2]! \n" // store pixels 527 "add %1, %1, #16 \n" 528 "subs %4, %4, #16 \n" // 16 processed per loop 529 "bgt 1b \n" 530 : "=&r"(src_tmp), // %0 531 "+r"(src_ptr), // %1 532 "+r"(dst_ptr), // %2 533 "+r"(src_stride), // %3 534 "+r"(src_width), // %4 535 "+r"(src_height) // %5 536 : 537 : "memory", "cc", "r12", "q0", "q1", "q2", "q3" // Clobber List 507 // Add a row of bytes to a row of shorts. Used for box filter. 508 // Reads 16 bytes and accumulates to 16 shorts at a time. 509 void ScaleAddRow_NEON(const uint8_t* src_ptr, 510 uint16_t* dst_ptr, 511 int src_width) { 512 asm volatile( 513 "1: \n" 514 "vld1.16 {q1, q2}, [%1] \n" // load accumulator 515 "vld1.8 {q0}, [%0]! \n" // load 16 bytes 516 "vaddw.u8 q2, q2, d1 \n" // add 517 "vaddw.u8 q1, q1, d0 \n" 518 "vst1.16 {q1, q2}, [%1]! \n" // store accumulator 519 "subs %2, %2, #16 \n" // 16 processed per loop 520 "bgt 1b \n" 521 : "+r"(src_ptr), // %0 522 "+r"(dst_ptr), // %1 523 "+r"(src_width) // %2 524 : 525 : "memory", "cc", "q0", "q1", "q2" // Clobber List 538 526 ); 539 527 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_neon64.cc
r235135 r239415 516 516 } 517 517 518 void ScaleAddRows_NEON(const uint8_t* src_ptr, 519 ptrdiff_t src_stride, 520 uint16_t* dst_ptr, 521 int src_width, 522 int src_height) { 523 const uint8_t* src_tmp; 524 asm volatile( 525 "1: \n" 526 "mov %0, %1 \n" 527 "mov w12, %w5 \n" 528 "eor v2.16b, v2.16b, v2.16b \n" 529 "eor v3.16b, v3.16b, v3.16b \n" 530 "2: \n" 531 // load 16 pixels into q0 532 "ld1 {v0.16b}, [%0], %3 \n" 533 "uaddw2 v3.8h, v3.8h, v0.16b \n" 534 "uaddw v2.8h, v2.8h, v0.8b \n" 535 "subs w12, w12, #1 \n" 536 "b.gt 2b \n" 537 "st1 {v2.8h, v3.8h}, [%2], #32 \n" // store pixels 538 "add %1, %1, #16 \n" 539 "subs %w4, %w4, #16 \n" // 16 processed per loop 518 // Add a row of bytes to a row of shorts. Used for box filter. 519 // Reads 16 bytes and accumulates to 16 shorts at a time. 520 void ScaleAddRow_NEON(const uint8_t* src_ptr, 521 uint16_t* dst_ptr, 522 int src_width) { 523 asm volatile( 524 "1: \n" 525 "ld1 {v1.8h, v2.8h}, [%1] \n" // load accumulator 526 "ld1 {v0.16b}, [%0], #16 \n" // load 16 bytes 527 "uaddw2 v2.8h, v2.8h, v0.16b \n" // add 528 "uaddw v1.8h, v1.8h, v0.8b \n" 529 "st1 {v1.8h, v2.8h}, [%1], #32 \n" // store accumulator 530 "subs %w2, %w2, #16 \n" // 16 processed per loop 540 531 "b.gt 1b \n" 541 : "=&r"(src_tmp), // %0 542 "+r"(src_ptr), // %1 543 "+r"(dst_ptr), // %2 544 "+r"(src_stride), // %3 545 "+r"(src_width), // %4 546 "+r"(src_height) // %5 547 : 548 : "memory", "cc", "w12", "v0", "v1", "v2", "v3" // Clobber List 532 : "+r"(src_ptr), // %0 533 "+r"(dst_ptr), // %1 534 "+r"(src_width) // %2 535 : 536 : "memory", "cc", "v0", "v1", "v2" // Clobber List 549 537 ); 550 538 } -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
r235135 r239415 9 9 10 10 # This is a modified copy of the script in 11 # https:// chromium.googlesource.com/external/webrtc/+/master/tools-webrtc/autoroller/roll_deps.py11 # https://webrtc.googlesource.com/src/+/master/tools_webrtc/autoroller/roll_deps.py 12 12 # customized for libyuv. 13 13 … … 23 23 import subprocess 24 24 import sys 25 import urllib 25 import urllib2 26 26 27 27 … … 91 91 m = COMMIT_POSITION_RE.match(line.strip()) 92 92 if m: 93 return m.group(1)93 return int(m.group(1)) 94 94 logging.error('Failed to parse commit position id from:\n%s\n', 95 95 commit_message) … … 110 110 env = os.environ.copy() 111 111 if extra_env: 112 assert all( type(value) == strfor value in extra_env.values())112 assert all(isinstance(value, str) for value in extra_env.values()) 113 113 logging.debug('extra env: %s', extra_env) 114 114 env.update(extra_env) … … 170 170 def ReadUrlContent(url): 171 171 """Connect to a remote host and read the contents. Returns a list of lines.""" 172 conn = urllib .urlopen(url)172 conn = urllib2.urlopen(url) 173 173 try: 174 174 return conn.readlines() … … 211 211 # The deps url is either an URL and a condition, or just the URL. 212 212 if isinstance(deps_url_spec, dict): 213 if deps_url_spec.get('dep_type') == 'cipd': 214 continue 213 215 deps_url = deps_url_spec['url'] 214 216 else: … … 346 348 'target_os = ["android", "unix", "mac", "ios", "win"];\n' 347 349 'Then run "gclient sync" again.' % local_dep_dir) 348 _, stderr = _RunCommand( 349 ['roll-dep-svn', '--no-verify-revision', dep.path, dep.new_rev], 350 working_dir=CHECKOUT_SRC_DIR, ignore_exit_code=True) 351 if stderr: 352 logging.warning('roll-dep-svn: %s', stderr) 350 _RunCommand( 351 ['gclient', 'setdep', '--revision', '%s@%s' % (dep.path, dep.new_rev)], 352 working_dir=CHECKOUT_SRC_DIR) 353 353 354 354 … … 398 398 399 399 400 def _UploadCL(dry_run, rietveld_email=None): 401 logging.info('Uploading CL...') 402 if not dry_run: 403 cmd = ['git', 'cl', 'upload', '-f'] 404 if rietveld_email: 405 cmd.append('--email=%s' % rietveld_email) 406 _RunCommand(cmd, extra_env={'EDITOR': 'true'}) 407 408 409 def _SendToCQ(dry_run, skip_cq): 410 logging.info('Sending the CL to the CQ...') 411 if not dry_run and not skip_cq: 412 _RunCommand(['git', 'cl', 'set_commit']) 413 logging.info('Sent the CL to the CQ.') 400 def ChooseCQMode(skip_cq, cq_over, current_commit_pos, new_commit_pos): 401 if skip_cq: 402 return 0 403 if (new_commit_pos - current_commit_pos) < cq_over: 404 return 1 405 return 2 406 407 408 def _UploadCL(commit_queue_mode): 409 """Upload the committed changes as a changelist to Gerrit. 410 411 commit_queue_mode: 412 - 2: Submit to commit queue. 413 - 1: Run trybots but do not submit to CQ. 414 - 0: Skip CQ, upload only. 415 """ 416 cmd = ['git', 'cl', 'upload', '--force', '--bypass-hooks', '--send-mail'] 417 if commit_queue_mode >= 2: 418 logging.info('Sending the CL to the CQ...') 419 cmd.extend(['--use-commit-queue']) 420 elif commit_queue_mode >= 1: 421 logging.info('Starting CQ dry run...') 422 cmd.extend(['--cq-dry-run']) 423 extra_env = { 424 'EDITOR': 'true', 425 'SKIP_GCE_AUTH_FOR_GIT': '1', 426 } 427 stdout, stderr = _RunCommand(cmd, extra_env=extra_env) 428 logging.debug('Output from "git cl upload":\nstdout:\n%s\n\nstderr:\n%s', 429 stdout, stderr) 414 430 415 431 … … 421 437 help=('Chromium Git revision to roll to. Defaults to the ' 422 438 'Chromium HEAD revision if omitted.')) 423 p.add_argument('-u', '--rietveld-email',424 help=('E-mail address to use for creating the CL at Rietveld'425 'If omitted a previously cached one will be used or an '426 'error will be thrown during upload.'))427 439 p.add_argument('--dry-run', action='store_true', default=False, 428 440 help=('Calculate changes and modify DEPS, but don\'t create ' … … 433 445 help=('Ignore if the current branch is not master or if there ' 434 446 'are uncommitted changes (default: %(default)s).')) 435 p.add_argument('--skip-cq', action='store_true', default=False, 436 help='Skip sending the CL to the CQ (default: %(default)s)') 447 grp = p.add_mutually_exclusive_group() 448 grp.add_argument('--skip-cq', action='store_true', default=False, 449 help='Skip sending the CL to the CQ (default: %(default)s)') 450 grp.add_argument('--cq-over', type=int, default=1, 451 help=('Commit queue dry run if the revision difference ' 452 'is below this number (default: %(default)s)')) 437 453 p.add_argument('-v', '--verbose', action='store_true', default=False, 438 454 help='Be extra verbose in printing of log messages.') … … 479 495 UpdateDepsFile(deps_filename, current_cr_rev, new_cr_rev, changed_deps) 480 496 _LocalCommit(commit_msg, opts.dry_run) 481 _UploadCL(opts.dry_run, opts.rietveld_email) 482 _SendToCQ(opts.dry_run, opts.skip_cq) 497 commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, 498 current_commit_pos, new_commit_pos) 499 logging.info('Uploading CL...') 500 if not opts.dry_run: 501 _UploadCL(commit_queue_mode) 483 502 return 0 484 503 -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/convert_test.cc
r235135 r239415 282 282 TESTAPLANARTOP(Android420, NV21, 2, 1, 0, 2, 2, I420, 2, 2) 283 283 284 // wrapper to keep API the same 285 int I400ToNV21(const uint8_t* src_y, 286 int src_stride_y, 287 const uint8_t* /* src_u */, 288 int /* src_stride_u */, 289 const uint8_t* /* src_v */, 290 int /* src_stride_v */, 291 uint8_t* dst_y, 292 int dst_stride_y, 293 uint8_t* dst_vu, 294 int dst_stride_vu, 295 int width, 296 int height) { 297 return I400ToNV21(src_y, src_stride_y, dst_y, dst_stride_y, dst_vu, 298 dst_stride_vu, width, height); 299 } 300 284 301 #define TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ 285 302 FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, OFF) \ … … 375 392 TESTPLANARTOBP(I420, 2, 2, NV12, 2, 2) 376 393 TESTPLANARTOBP(I420, 2, 2, NV21, 2, 2) 394 TESTPLANARTOBP(I422, 2, 1, NV21, 2, 2) 395 TESTPLANARTOBP(I444, 1, 1, NV21, 2, 2) 396 TESTPLANARTOBP(I400, 2, 2, NV21, 2, 2) 377 397 378 398 #define TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ … … 567 587 TESTPLANARTOB(H420, 2, 2, RGB24, 3, 3, 1) 568 588 TESTPLANARTOB(I420, 2, 2, RGB565, 2, 2, 1) 589 TESTPLANARTOB(J420, 2, 2, RGB565, 2, 2, 1) 590 TESTPLANARTOB(H420, 2, 2, RGB565, 2, 2, 1) 569 591 TESTPLANARTOB(I420, 2, 2, ARGB1555, 2, 2, 1) 570 592 TESTPLANARTOB(I420, 2, 2, ARGB4444, 2, 2, 1) … … 735 757 TESTBIPLANARTOB(NV12, 2, 2, RGB24, 3, 2) 736 758 TESTBIPLANARTOB(NV21, 2, 2, RGB24, 3, 2) 759 TESTBIPLANARTOB(NV12, 2, 2, RAW, 3, 2) 760 TESTBIPLANARTOB(NV21, 2, 2, RAW, 3, 2) 737 761 TESTBIPLANARTOB(NV12, 2, 2, RGB565, 2, 9) 738 762 … … 1023 1047 FMT_A##To##FMT_B(src_argb, kStrideA, dst_argb_opt, kStrideB, kWidth, \ 1024 1048 kHeight); \ 1025 int max_diff = 0; \1026 1049 for (int i = 0; i < kStrideB * kHeightB; ++i) { \ 1027 int abs_diff = abs(static_cast<int>(dst_argb_c[i]) - \ 1028 static_cast<int>(dst_argb_opt[i])); \ 1029 if (abs_diff > max_diff) { \ 1030 max_diff = abs_diff; \ 1031 } \ 1050 EXPECT_NEAR(dst_argb_c[i], dst_argb_opt[i], DIFF); \ 1032 1051 } \ 1033 EXPECT_LE(max_diff, DIFF); \1034 1052 free_aligned_buffer_page_end(src_argb); \ 1035 1053 free_aligned_buffer_page_end(dst_argb_c); \ … … 1051 1069 HEIGHT_B, DIFF) 1052 1070 1071 // TODO(fbarchard): make ARM version of C code that matches NEON. 1053 1072 TESTATOB(ARGB, 4, 4, 1, ARGB, 4, 4, 1, 0) 1054 1073 TESTATOB(ARGB, 4, 4, 1, BGRA, 4, 4, 1, 0) … … 1362 1381 } 1363 1382 1364 TEST_F(LibYUVConvertTest, MJPGToI420) { 1365 const int kOff = 10; 1366 const int kMinJpeg = 64; 1367 const int kImageSize = benchmark_width_ * benchmark_height_ >= kMinJpeg 1368 ? benchmark_width_ * benchmark_height_ 1369 : kMinJpeg; 1370 const int kSize = kImageSize + kOff; 1371 align_buffer_page_end(orig_pixels, kSize); 1372 align_buffer_page_end(dst_y_opt, benchmark_width_ * benchmark_height_); 1373 align_buffer_page_end(dst_u_opt, SUBSAMPLE(benchmark_width_, 2) * 1374 SUBSAMPLE(benchmark_height_, 2)); 1375 align_buffer_page_end(dst_v_opt, SUBSAMPLE(benchmark_width_, 2) * 1376 SUBSAMPLE(benchmark_height_, 2)); 1377 1378 // EOI, SOI to make MJPG appear valid. 1379 memset(orig_pixels, 0, kSize); 1380 orig_pixels[0] = 0xff; 1381 orig_pixels[1] = 0xd8; // SOI. 1382 orig_pixels[kSize - kOff + 0] = 0xff; 1383 orig_pixels[kSize - kOff + 1] = 0xd9; // EOI. 1384 1385 for (int times = 0; times < benchmark_iterations_; ++times) { 1386 int ret = 1387 MJPGToI420(orig_pixels, kSize, dst_y_opt, benchmark_width_, dst_u_opt, 1388 SUBSAMPLE(benchmark_width_, 2), dst_v_opt, 1389 SUBSAMPLE(benchmark_width_, 2), benchmark_width_, 1390 benchmark_height_, benchmark_width_, benchmark_height_); 1391 // Expect failure because image is not really valid. 1392 EXPECT_EQ(1, ret); 1393 } 1394 1395 free_aligned_buffer_page_end(dst_y_opt); 1396 free_aligned_buffer_page_end(dst_u_opt); 1397 free_aligned_buffer_page_end(dst_v_opt); 1398 free_aligned_buffer_page_end(orig_pixels); 1383 // Test data created in GIMP. In export jpeg, disable thumbnails etc, 1384 // choose a subsampling, and use low quality (50) to keep size small. 1385 // Generated with xxd -i test.jpg 1386 // test 0 is J400 1387 static const uint8_t kTest0Jpg[] = { 1388 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 1389 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 1390 0x00, 0x10, 0x0b, 0x0c, 0x0e, 0x0c, 0x0a, 0x10, 0x0e, 0x0d, 0x0e, 0x12, 1391 0x11, 0x10, 0x13, 0x18, 0x28, 0x1a, 0x18, 0x16, 0x16, 0x18, 0x31, 0x23, 1392 0x25, 0x1d, 0x28, 0x3a, 0x33, 0x3d, 0x3c, 0x39, 0x33, 0x38, 0x37, 0x40, 1393 0x48, 0x5c, 0x4e, 0x40, 0x44, 0x57, 0x45, 0x37, 0x38, 0x50, 0x6d, 0x51, 1394 0x57, 0x5f, 0x62, 0x67, 0x68, 0x67, 0x3e, 0x4d, 0x71, 0x79, 0x70, 0x64, 1395 0x78, 0x5c, 0x65, 0x67, 0x63, 0xff, 0xc2, 0x00, 0x0b, 0x08, 0x00, 0x10, 1396 0x00, 0x20, 0x01, 0x01, 0x11, 0x00, 0xff, 0xc4, 0x00, 0x17, 0x00, 0x01, 1397 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1398 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0x02, 0xff, 0xda, 0x00, 0x08, 0x01, 1399 0x01, 0x00, 0x00, 0x00, 0x01, 0x43, 0x7e, 0xa7, 0x97, 0x57, 0xff, 0xc4, 1400 0x00, 0x1b, 0x10, 0x00, 0x03, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 1401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x11, 0x00, 0x03, 1402 0x10, 0x12, 0x13, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x05, 1403 0x02, 0x3b, 0xc0, 0x6f, 0x66, 0x76, 0x56, 0x23, 0x87, 0x99, 0x0d, 0x26, 1404 0x62, 0xf6, 0xbf, 0xff, 0xc4, 0x00, 0x1e, 0x10, 0x00, 0x02, 0x01, 0x03, 1405 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1406 0x00, 0x11, 0x21, 0x02, 0x12, 0x32, 0x10, 0x31, 0x71, 0x81, 0xa1, 0xff, 1407 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x06, 0x3f, 0x02, 0x4b, 0xb3, 0x28, 1408 0x32, 0xd2, 0xed, 0xf9, 0x1d, 0x3e, 0x13, 0x51, 0x73, 0x83, 0xff, 0xc4, 1409 0x00, 0x1c, 0x10, 0x01, 0x01, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 1410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x21, 0x51, 1411 0x31, 0x61, 0x81, 0xf0, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 1412 0x3f, 0x21, 0x65, 0x6e, 0x31, 0x86, 0x28, 0xf9, 0x30, 0xdc, 0x27, 0xdb, 1413 0xa9, 0x01, 0xf3, 0xde, 0x02, 0xa0, 0xed, 0x1e, 0x34, 0x68, 0x23, 0xf9, 1414 0xc6, 0x48, 0x5d, 0x7a, 0x35, 0x02, 0xf5, 0x6f, 0xff, 0xda, 0x00, 0x08, 1415 0x01, 0x01, 0x00, 0x00, 0x00, 0x10, 0x35, 0xff, 0xc4, 0x00, 0x1f, 0x10, 1416 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 1417 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0x31, 0x41, 0x61, 0x71, 0x91, 1418 0x21, 0x81, 0xd1, 0xb1, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 1419 0x3f, 0x10, 0x0b, 0x30, 0xe9, 0x58, 0xbe, 0x1a, 0xfd, 0x88, 0xab, 0x8b, 1420 0x34, 0x74, 0x80, 0x4b, 0xb5, 0xd5, 0xab, 0xcd, 0x46, 0x96, 0x2e, 0xec, 1421 0xbd, 0xaa, 0x78, 0x47, 0x5c, 0x47, 0xa7, 0x30, 0x49, 0xad, 0x88, 0x7c, 1422 0x40, 0x74, 0x30, 0xff, 0x00, 0x23, 0x1d, 0x03, 0x0b, 0xb7, 0xd4, 0xff, 1423 0xd9}; 1424 static const size_t kTest0JpgLen = 421; 1425 1426 // test 1 is J444 1427 static const uint8_t kTest1Jpg[] = { 1428 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 1429 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 1430 0x00, 0x10, 0x0b, 0x0c, 0x0e, 0x0c, 0x0a, 0x10, 0x0e, 0x0d, 0x0e, 0x12, 1431 0x11, 0x10, 0x13, 0x18, 0x28, 0x1a, 0x18, 0x16, 0x16, 0x18, 0x31, 0x23, 1432 0x25, 0x1d, 0x28, 0x3a, 0x33, 0x3d, 0x3c, 0x39, 0x33, 0x38, 0x37, 0x40, 1433 0x48, 0x5c, 0x4e, 0x40, 0x44, 0x57, 0x45, 0x37, 0x38, 0x50, 0x6d, 0x51, 1434 0x57, 0x5f, 0x62, 0x67, 0x68, 0x67, 0x3e, 0x4d, 0x71, 0x79, 0x70, 0x64, 1435 0x78, 0x5c, 0x65, 0x67, 0x63, 0xff, 0xdb, 0x00, 0x43, 0x01, 0x11, 0x12, 1436 0x12, 0x18, 0x15, 0x18, 0x2f, 0x1a, 0x1a, 0x2f, 0x63, 0x42, 0x38, 0x42, 1437 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1438 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1439 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1440 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1441 0x63, 0x63, 0xff, 0xc2, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 1442 0x01, 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 1443 0x17, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0x02, 0xff, 0xc4, 1445 0x00, 0x16, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x03, 0xff, 0xda, 1447 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x10, 0x03, 0x10, 0x00, 0x00, 0x01, 1448 0x40, 0x8f, 0x26, 0xe8, 0xf4, 0xcc, 0xf9, 0x69, 0x2b, 0x1b, 0x2a, 0xcb, 1449 0xff, 0xc4, 0x00, 0x1b, 0x10, 0x00, 0x03, 0x00, 0x02, 0x03, 0x00, 0x00, 1450 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x11, 1451 0x00, 0x03, 0x10, 0x12, 0x13, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 1452 0x01, 0x05, 0x02, 0x3b, 0x80, 0x6f, 0x56, 0x76, 0x56, 0x23, 0x87, 0x99, 1453 0x0d, 0x26, 0x62, 0xf6, 0xbf, 0xff, 0xc4, 0x00, 0x19, 0x11, 0x01, 0x00, 1454 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1455 0x00, 0x00, 0x01, 0x00, 0x10, 0x11, 0x02, 0x12, 0xff, 0xda, 0x00, 0x08, 1456 0x01, 0x03, 0x01, 0x01, 0x3f, 0x01, 0xf1, 0x00, 0x27, 0x45, 0xbb, 0x31, 1457 0xaf, 0xff, 0xc4, 0x00, 0x1a, 0x11, 0x00, 0x02, 0x03, 0x01, 0x01, 0x00, 1458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 1459 0x02, 0x10, 0x11, 0x41, 0x12, 0xff, 0xda, 0x00, 0x08, 0x01, 0x02, 0x01, 1460 0x01, 0x3f, 0x01, 0xf6, 0x4b, 0x5f, 0x48, 0xb3, 0x69, 0x63, 0x35, 0x72, 1461 0xbf, 0xff, 0xc4, 0x00, 0x1e, 0x10, 0x00, 0x02, 0x01, 0x03, 0x05, 0x00, 1462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 1463 0x21, 0x02, 0x12, 0x32, 0x10, 0x31, 0x71, 0x81, 0xa1, 0xff, 0xda, 0x00, 1464 0x08, 0x01, 0x01, 0x00, 0x06, 0x3f, 0x02, 0x4b, 0xb3, 0x28, 0x32, 0xd2, 1465 0xed, 0xf9, 0x1d, 0x3e, 0x13, 0x51, 0x73, 0x83, 0xff, 0xc4, 0x00, 0x1c, 1466 0x10, 0x01, 0x01, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 1467 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x21, 0x51, 0x31, 0x61, 1468 0x81, 0xf0, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3f, 0x21, 1469 0x75, 0x6e, 0x31, 0x94, 0x28, 0xf9, 0x30, 0xdc, 0x27, 0xdb, 0xa9, 0x01, 1470 0xf3, 0xde, 0x02, 0xa0, 0xed, 0x1e, 0x34, 0x68, 0x23, 0xf9, 0xc6, 0x48, 1471 0x5d, 0x7a, 0x35, 0x02, 0xf5, 0x6f, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 1472 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x26, 0x61, 0xd4, 0xff, 1473 0xc4, 0x00, 0x1a, 0x11, 0x00, 0x03, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 1474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x21, 1475 0x31, 0x41, 0x51, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3f, 1476 0x10, 0x54, 0xa8, 0xbf, 0x50, 0x87, 0xb0, 0x9d, 0x8b, 0xc4, 0x6a, 0x26, 1477 0x6b, 0x2a, 0x9c, 0x1f, 0xff, 0xc4, 0x00, 0x18, 0x11, 0x01, 0x01, 0x01, 1478 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1479 0x00, 0x01, 0x00, 0x11, 0x21, 0x51, 0xff, 0xda, 0x00, 0x08, 0x01, 0x02, 1480 0x01, 0x01, 0x3f, 0x10, 0x70, 0xe1, 0x3e, 0xd1, 0x8e, 0x0d, 0xe1, 0xb5, 1481 0xd5, 0x91, 0x76, 0x43, 0x82, 0x45, 0x4c, 0x7b, 0x7f, 0xff, 0xc4, 0x00, 1482 0x1f, 0x10, 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, 0x00, 0x00, 1483 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0x31, 0x41, 0x61, 1484 0x71, 0x91, 0x21, 0x81, 0xd1, 0xb1, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 1485 0x00, 0x01, 0x3f, 0x10, 0x1b, 0x30, 0xe9, 0x58, 0xbe, 0x1a, 0xfd, 0x8a, 1486 0xeb, 0x8b, 0x34, 0x74, 0x80, 0x4b, 0xb5, 0xd5, 0xab, 0xcd, 0x46, 0x96, 1487 0x2e, 0xec, 0xbd, 0xaa, 0x78, 0x47, 0x5c, 0x47, 0xa7, 0x30, 0x49, 0xad, 1488 0x88, 0x7c, 0x40, 0x74, 0x30, 0xff, 0x00, 0x23, 0x1d, 0x03, 0x0b, 0xb7, 1489 0xd4, 0xff, 0xd9}; 1490 static const size_t kTest1JpgLen = 735; 1491 1492 // test 2 is J420 1493 static const uint8_t kTest2Jpg[] = { 1494 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 1495 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 1496 0x00, 0x10, 0x0b, 0x0c, 0x0e, 0x0c, 0x0a, 0x10, 0x0e, 0x0d, 0x0e, 0x12, 1497 0x11, 0x10, 0x13, 0x18, 0x28, 0x1a, 0x18, 0x16, 0x16, 0x18, 0x31, 0x23, 1498 0x25, 0x1d, 0x28, 0x3a, 0x33, 0x3d, 0x3c, 0x39, 0x33, 0x38, 0x37, 0x40, 1499 0x48, 0x5c, 0x4e, 0x40, 0x44, 0x57, 0x45, 0x37, 0x38, 0x50, 0x6d, 0x51, 1500 0x57, 0x5f, 0x62, 0x67, 0x68, 0x67, 0x3e, 0x4d, 0x71, 0x79, 0x70, 0x64, 1501 0x78, 0x5c, 0x65, 0x67, 0x63, 0xff, 0xdb, 0x00, 0x43, 0x01, 0x11, 0x12, 1502 0x12, 0x18, 0x15, 0x18, 0x2f, 0x1a, 0x1a, 0x2f, 0x63, 0x42, 0x38, 0x42, 1503 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1504 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1505 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1506 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1507 0x63, 0x63, 0xff, 0xc2, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 1508 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 1509 0x18, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x01, 0x02, 0x04, 0xff, 1511 0xc4, 0x00, 0x16, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 1512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x02, 0xff, 1513 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x10, 0x03, 0x10, 0x00, 0x00, 1514 0x01, 0x20, 0xe7, 0x28, 0xa3, 0x0b, 0x2e, 0x2d, 0xcf, 0xff, 0xc4, 0x00, 1515 0x1b, 0x10, 0x00, 0x03, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 1516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x11, 0x00, 0x03, 0x10, 1517 0x12, 0x13, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x05, 0x02, 1518 0x3b, 0x80, 0x6f, 0x56, 0x76, 0x56, 0x23, 0x87, 0x99, 0x0d, 0x26, 0x62, 1519 0xf6, 0xbf, 0xff, 0xc4, 0x00, 0x17, 0x11, 0x01, 0x00, 0x03, 0x00, 0x00, 1520 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1521 0x01, 0x11, 0x21, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3f, 1522 0x01, 0xc8, 0x53, 0xff, 0xc4, 0x00, 0x16, 0x11, 0x01, 0x01, 0x01, 0x00, 1523 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1524 0x00, 0x11, 0x32, 0xff, 0xda, 0x00, 0x08, 0x01, 0x02, 0x01, 0x01, 0x3f, 1525 0x01, 0xd2, 0xc7, 0xff, 0xc4, 0x00, 0x1e, 0x10, 0x00, 0x02, 0x01, 0x03, 1526 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1527 0x00, 0x11, 0x21, 0x02, 0x12, 0x32, 0x10, 0x31, 0x71, 0x81, 0xa1, 0xff, 1528 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x06, 0x3f, 0x02, 0x4b, 0xb3, 0x28, 1529 0x32, 0xd2, 0xed, 0xf9, 0x1d, 0x3e, 0x13, 0x51, 0x73, 0x83, 0xff, 0xc4, 1530 0x00, 0x1c, 0x10, 0x01, 0x01, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 1531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x21, 0x51, 1532 0x31, 0x61, 0x81, 0xf0, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 1533 0x3f, 0x21, 0x75, 0x6e, 0x31, 0x94, 0x28, 0xf9, 0x30, 0xdc, 0x27, 0xdb, 1534 0xa9, 0x01, 0xf3, 0xde, 0x02, 0xa0, 0xed, 0x1e, 0x34, 0x68, 0x23, 0xf9, 1535 0xc6, 0x48, 0x5d, 0x7a, 0x35, 0x02, 0xf5, 0x6f, 0xff, 0xda, 0x00, 0x0c, 1536 0x03, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x13, 0x5f, 1537 0xff, 0xc4, 0x00, 0x17, 0x11, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 1538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 1539 0x21, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3f, 0x10, 0x0e, 1540 0xa1, 0x3a, 0x76, 0xff, 0xc4, 0x00, 0x17, 0x11, 0x01, 0x01, 0x01, 0x01, 1541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1542 0x01, 0x00, 0x21, 0x11, 0xff, 0xda, 0x00, 0x08, 0x01, 0x02, 0x01, 0x01, 1543 0x3f, 0x10, 0x57, 0x0b, 0x08, 0x70, 0xdb, 0xff, 0xc4, 0x00, 0x1f, 0x10, 1544 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 1545 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0x31, 0x41, 0x61, 0x71, 0x91, 1546 0x21, 0x81, 0xd1, 0xb1, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 1547 0x3f, 0x10, 0x1b, 0x30, 0xe9, 0x58, 0xbe, 0x1a, 0xfd, 0x8a, 0xeb, 0x8b, 1548 0x34, 0x74, 0x80, 0x4b, 0xb5, 0xd5, 0xab, 0xcd, 0x46, 0x96, 0x2e, 0xec, 1549 0xbd, 0xaa, 0x78, 0x47, 0x5c, 0x47, 0xa7, 0x30, 0x49, 0xad, 0x88, 0x7c, 1550 0x40, 0x74, 0x30, 0xff, 0x00, 0x23, 0x1d, 0x03, 0x0b, 0xb7, 0xd4, 0xff, 1551 0xd9}; 1552 static const size_t kTest2JpgLen = 685; 1553 1554 // test 3 is J422 1555 static const uint8_t kTest3Jpg[] = { 1556 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 1557 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 1558 0x00, 0x10, 0x0b, 0x0c, 0x0e, 0x0c, 0x0a, 0x10, 0x0e, 0x0d, 0x0e, 0x12, 1559 0x11, 0x10, 0x13, 0x18, 0x28, 0x1a, 0x18, 0x16, 0x16, 0x18, 0x31, 0x23, 1560 0x25, 0x1d, 0x28, 0x3a, 0x33, 0x3d, 0x3c, 0x39, 0x33, 0x38, 0x37, 0x40, 1561 0x48, 0x5c, 0x4e, 0x40, 0x44, 0x57, 0x45, 0x37, 0x38, 0x50, 0x6d, 0x51, 1562 0x57, 0x5f, 0x62, 0x67, 0x68, 0x67, 0x3e, 0x4d, 0x71, 0x79, 0x70, 0x64, 1563 0x78, 0x5c, 0x65, 0x67, 0x63, 0xff, 0xdb, 0x00, 0x43, 0x01, 0x11, 0x12, 1564 0x12, 0x18, 0x15, 0x18, 0x2f, 0x1a, 0x1a, 0x2f, 0x63, 0x42, 0x38, 0x42, 1565 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1566 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1567 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1568 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1569 0x63, 0x63, 0xff, 0xc2, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 1570 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 1571 0x17, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1572 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0x02, 0xff, 0xc4, 1573 0x00, 0x17, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0xff, 1575 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x10, 0x03, 0x10, 0x00, 0x00, 1576 0x01, 0x43, 0x8d, 0x1f, 0xa2, 0xb3, 0xca, 0x1b, 0x57, 0x0f, 0xff, 0xc4, 1577 0x00, 0x1b, 0x10, 0x00, 0x03, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 1578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x11, 0x00, 0x03, 1579 0x10, 0x12, 0x13, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x05, 1580 0x02, 0x3b, 0x80, 0x6f, 0x56, 0x76, 0x56, 0x23, 0x87, 0x99, 0x0d, 0x26, 1581 0x62, 0xf6, 0xbf, 0xff, 0xc4, 0x00, 0x19, 0x11, 0x00, 0x02, 0x03, 0x01, 1582 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1583 0x00, 0x01, 0x02, 0x10, 0x11, 0x21, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 1584 0x01, 0x01, 0x3f, 0x01, 0x51, 0xce, 0x8c, 0x75, 0xff, 0xc4, 0x00, 0x18, 1585 0x11, 0x00, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1586 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x61, 0x21, 0xff, 0xda, 1587 0x00, 0x08, 0x01, 0x02, 0x01, 0x01, 0x3f, 0x01, 0xa6, 0xd9, 0x2f, 0x84, 1588 0xe8, 0xf0, 0xff, 0xc4, 0x00, 0x1e, 0x10, 0x00, 0x02, 0x01, 0x03, 0x05, 1589 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1590 0x11, 0x21, 0x02, 0x12, 0x32, 0x10, 0x31, 0x71, 0x81, 0xa1, 0xff, 0xda, 1591 0x00, 0x08, 0x01, 0x01, 0x00, 0x06, 0x3f, 0x02, 0x4b, 0xb3, 0x28, 0x32, 1592 0xd2, 0xed, 0xf9, 0x1d, 0x3e, 0x13, 0x51, 0x73, 0x83, 0xff, 0xc4, 0x00, 1593 0x1c, 0x10, 0x01, 0x01, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 1594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x21, 0x51, 0x31, 1595 0x61, 0x81, 0xf0, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3f, 1596 0x21, 0x75, 0x6e, 0x31, 0x94, 0x28, 0xf9, 0x30, 0xdc, 0x27, 0xdb, 0xa9, 1597 0x01, 0xf3, 0xde, 0x02, 0xa0, 0xed, 0x1e, 0x34, 0x68, 0x23, 0xf9, 0xc6, 1598 0x48, 0x5d, 0x7a, 0x35, 0x02, 0xf5, 0x6f, 0xff, 0xda, 0x00, 0x0c, 0x03, 1599 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x2e, 0x45, 0xff, 1600 0xc4, 0x00, 0x18, 0x11, 0x00, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 1601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x21, 1602 0x31, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3f, 0x10, 0x53, 1603 0x50, 0xba, 0x54, 0xc1, 0x67, 0x4f, 0xff, 0xc4, 0x00, 0x18, 0x11, 0x00, 1604 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1605 0x00, 0x00, 0x00, 0x01, 0x11, 0x21, 0x00, 0x10, 0xff, 0xda, 0x00, 0x08, 1606 0x01, 0x02, 0x01, 0x01, 0x3f, 0x10, 0x18, 0x81, 0x5c, 0x04, 0x1a, 0xca, 1607 0x91, 0xbf, 0xff, 0xc4, 0x00, 0x1f, 0x10, 0x01, 0x00, 0x02, 0x01, 0x04, 1608 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 1609 0x00, 0x11, 0x31, 0x41, 0x61, 0x71, 0x91, 0x21, 0x81, 0xd1, 0xb1, 0xff, 1610 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3f, 0x10, 0x1b, 0x30, 0xe9, 1611 0x58, 0xbe, 0x1a, 0xfd, 0x8a, 0xeb, 0x8b, 0x34, 0x74, 0x80, 0x4b, 0xb5, 1612 0xd5, 0xab, 0xcd, 0x46, 0x96, 0x2e, 0xec, 0xbd, 0xaa, 0x78, 0x47, 0x5c, 1613 0x47, 0xa7, 0x30, 0x49, 0xad, 0x88, 0x7c, 0x40, 0x74, 0x30, 0xff, 0x00, 1614 0x23, 0x1d, 0x03, 0x0b, 0xb7, 0xd4, 0xff, 0xd9}; 1615 static const size_t kTest3JpgLen = 704; 1616 1617 // test 4 is J422 vertical - not supported 1618 static const uint8_t kTest4Jpg[] = { 1619 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 1620 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 1621 0x00, 0x10, 0x0b, 0x0c, 0x0e, 0x0c, 0x0a, 0x10, 0x0e, 0x0d, 0x0e, 0x12, 1622 0x11, 0x10, 0x13, 0x18, 0x28, 0x1a, 0x18, 0x16, 0x16, 0x18, 0x31, 0x23, 1623 0x25, 0x1d, 0x28, 0x3a, 0x33, 0x3d, 0x3c, 0x39, 0x33, 0x38, 0x37, 0x40, 1624 0x48, 0x5c, 0x4e, 0x40, 0x44, 0x57, 0x45, 0x37, 0x38, 0x50, 0x6d, 0x51, 1625 0x57, 0x5f, 0x62, 0x67, 0x68, 0x67, 0x3e, 0x4d, 0x71, 0x79, 0x70, 0x64, 1626 0x78, 0x5c, 0x65, 0x67, 0x63, 0xff, 0xdb, 0x00, 0x43, 0x01, 0x11, 0x12, 1627 0x12, 0x18, 0x15, 0x18, 0x2f, 0x1a, 0x1a, 0x2f, 0x63, 0x42, 0x38, 0x42, 1628 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1629 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1630 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1631 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 1632 0x63, 0x63, 0xff, 0xc2, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 1633 0x01, 0x12, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 1634 0x18, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1635 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05, 0x01, 0x02, 0x03, 0xff, 1636 0xc4, 0x00, 0x16, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 1637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0xff, 1638 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x10, 0x03, 0x10, 0x00, 0x00, 1639 0x01, 0xd2, 0x98, 0xe9, 0x03, 0x0c, 0x00, 0x46, 0x21, 0xd9, 0xff, 0xc4, 1640 0x00, 0x1b, 0x10, 0x00, 0x03, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 1641 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x11, 0x00, 0x03, 1642 0x10, 0x12, 0x13, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x05, 1643 0x02, 0x3b, 0x80, 0x6f, 0x56, 0x76, 0x56, 0x23, 0x87, 0x99, 0x0d, 0x26, 1644 0x62, 0xf6, 0xbf, 0xff, 0xc4, 0x00, 0x17, 0x11, 0x01, 0x01, 0x01, 0x01, 1645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1646 0x00, 0x11, 0x01, 0x21, 0xff, 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 1647 0x3f, 0x01, 0x98, 0xb1, 0xbd, 0x47, 0xff, 0xc4, 0x00, 0x18, 0x11, 0x00, 1648 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1649 0x00, 0x00, 0x00, 0x00, 0x01, 0x12, 0x11, 0x21, 0xff, 0xda, 0x00, 0x08, 1650 0x01, 0x02, 0x01, 0x01, 0x3f, 0x01, 0xb6, 0x35, 0xa2, 0xe1, 0x47, 0xff, 1651 0xc4, 0x00, 0x1e, 0x10, 0x00, 0x02, 0x01, 0x03, 0x05, 0x00, 0x00, 0x00, 1652 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x21, 0x02, 1653 0x12, 0x32, 0x10, 0x31, 0x71, 0x81, 0xa1, 0xff, 0xda, 0x00, 0x08, 0x01, 1654 0x01, 0x00, 0x06, 0x3f, 0x02, 0x4b, 0xb3, 0x28, 0x32, 0xd2, 0xed, 0xf9, 1655 0x1d, 0x3e, 0x13, 0x51, 0x73, 0x83, 0xff, 0xc4, 0x00, 0x1c, 0x10, 0x01, 1656 0x01, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1657 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x21, 0x51, 0x31, 0x61, 0x81, 0xf0, 1658 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x3f, 0x21, 0x75, 0x6e, 1659 0x31, 0x94, 0x28, 0xf9, 0x30, 0xdc, 0x27, 0xdb, 0xa9, 0x01, 0xf3, 0xde, 1660 0x02, 0xa0, 0xed, 0x1e, 0x34, 0x68, 0x23, 0xf9, 0xc6, 0x48, 0x5d, 0x7a, 1661 0x35, 0x02, 0xf5, 0x6f, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 1662 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x24, 0xaf, 0xff, 0xc4, 0x00, 0x19, 1663 0x11, 0x00, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1664 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x51, 0x21, 0x31, 0xff, 1665 0xda, 0x00, 0x08, 0x01, 0x03, 0x01, 0x01, 0x3f, 0x10, 0x59, 0x11, 0xca, 1666 0x42, 0x60, 0x9f, 0x69, 0xff, 0xc4, 0x00, 0x19, 0x11, 0x00, 0x02, 0x03, 1667 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1668 0x00, 0x00, 0x01, 0x11, 0x21, 0x31, 0x61, 0xff, 0xda, 0x00, 0x08, 0x01, 1669 0x02, 0x01, 0x01, 0x3f, 0x10, 0xb0, 0xd7, 0x27, 0x51, 0xb6, 0x41, 0xff, 1670 0xc4, 0x00, 0x1f, 0x10, 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, 1671 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0x31, 1672 0x41, 0x61, 0x71, 0x91, 0x21, 0x81, 0xd1, 0xb1, 0xff, 0xda, 0x00, 0x08, 1673 0x01, 0x01, 0x00, 0x01, 0x3f, 0x10, 0x1b, 0x30, 0xe9, 0x58, 0xbe, 0x1a, 1674 0xfd, 0x8a, 0xeb, 0x8b, 0x34, 0x74, 0x80, 0x4b, 0xb5, 0xd5, 0xab, 0xcd, 1675 0x46, 0x96, 0x2e, 0xec, 0xbd, 0xaa, 0x78, 0x47, 0x5c, 0x47, 0xa7, 0x30, 1676 0x49, 0xad, 0x88, 0x7c, 0x40, 0x74, 0x30, 0xff, 0x00, 0x23, 0x1d, 0x03, 1677 0x0b, 0xb7, 0xd4, 0xff, 0xd9}; 1678 static const size_t kTest4JpgLen = 701; 1679 1680 TEST_F(LibYUVConvertTest, TestMJPGSize) { 1681 int width = 0; 1682 int height = 0; 1683 int ret = MJPGSize(kTest2Jpg, kTest2JpgLen, &width, &height); 1684 EXPECT_EQ(0, ret); 1685 1686 printf("test jpeg size %d x %d\n", width, height); 1399 1687 } 1400 1688 1401 TEST_F(LibYUVConvertTest, MJPGToARGB) { 1402 const int kOff = 10; 1403 const int kMinJpeg = 64; 1404 const int kImageSize = benchmark_width_ * benchmark_height_ >= kMinJpeg 1405 ? benchmark_width_ * benchmark_height_ 1406 : kMinJpeg; 1407 const int kSize = kImageSize + kOff; 1408 align_buffer_page_end(orig_pixels, kSize); 1409 align_buffer_page_end(dst_argb_opt, benchmark_width_ * benchmark_height_ * 4); 1410 1411 // EOI, SOI to make MJPG appear valid. 1412 memset(orig_pixels, 0, kSize); 1413 orig_pixels[0] = 0xff; 1414 orig_pixels[1] = 0xd8; // SOI. 1415 orig_pixels[kSize - kOff + 0] = 0xff; 1416 orig_pixels[kSize - kOff + 1] = 0xd9; // EOI. 1417 1418 for (int times = 0; times < benchmark_iterations_; ++times) { 1419 int ret = MJPGToARGB(orig_pixels, kSize, dst_argb_opt, benchmark_width_ * 4, 1420 benchmark_width_, benchmark_height_, benchmark_width_, 1421 benchmark_height_); 1422 // Expect failure because image is not really valid. 1423 EXPECT_EQ(1, ret); 1424 } 1425 1426 free_aligned_buffer_page_end(dst_argb_opt); 1427 free_aligned_buffer_page_end(orig_pixels); 1689 TEST_F(LibYUVConvertTest, TestMJPGToI420) { 1690 int width = 0; 1691 int height = 0; 1692 int ret = MJPGSize(kTest2Jpg, kTest2JpgLen, &width, &height); 1693 EXPECT_EQ(0, ret); 1694 1695 int half_width = (width + 1) / 2; 1696 int half_height = (height + 1) / 2; 1697 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1698 benchmark_height_ / (width * height); 1699 1700 align_buffer_page_end(dst_y, width * height); 1701 align_buffer_page_end(dst_u, half_width * half_height); 1702 align_buffer_page_end(dst_v, half_width * half_height); 1703 for (int times = 0; times < benchmark_iterations; ++times) { 1704 ret = MJPGToI420(kTest2Jpg, kTest2JpgLen, dst_y, width, dst_u, half_width, 1705 dst_v, half_width, width, height, width, height); 1706 } 1707 // Expect sucesss 1708 EXPECT_EQ(0, ret); 1709 1710 // Test result matches known hash value. 1711 uint32_t dst_y_hash = HashDjb2(dst_y, width * height, 5381); 1712 uint32_t dst_u_hash = HashDjb2(dst_u, half_width * half_height, 5381); 1713 uint32_t dst_v_hash = HashDjb2(dst_v, half_width * half_height, 5381); 1714 EXPECT_EQ(dst_y_hash, 2682851208u); 1715 EXPECT_EQ(dst_u_hash, 2501859930u); 1716 EXPECT_EQ(dst_v_hash, 2126459123u); 1717 1718 free_aligned_buffer_page_end(dst_y); 1719 free_aligned_buffer_page_end(dst_u); 1720 free_aligned_buffer_page_end(dst_v); 1428 1721 } 1429 1722 1723 TEST_F(LibYUVConvertTest, TestMJPGToI420_NV21) { 1724 int width = 0; 1725 int height = 0; 1726 int ret = MJPGSize(kTest2Jpg, kTest2JpgLen, &width, &height); 1727 EXPECT_EQ(0, ret); 1728 1729 int half_width = (width + 1) / 2; 1730 int half_height = (height + 1) / 2; 1731 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1732 benchmark_height_ / (width * height); 1733 1734 // Convert to NV21 1735 align_buffer_page_end(dst_y, width * height); 1736 align_buffer_page_end(dst_vu, half_width * half_height * 2); 1737 1738 for (int times = 0; times < benchmark_iterations; ++times) { 1739 ret = MJPGToNV21(kTest2Jpg, kTest2JpgLen, dst_y, width, dst_vu, 1740 half_width * 2, width, height, width, height); 1741 } 1742 // Expect sucesss 1743 EXPECT_EQ(0, ret); 1744 1745 // Convert to I420 1746 align_buffer_page_end(dst2_y, width * height); 1747 align_buffer_page_end(dst2_u, half_width * half_height); 1748 align_buffer_page_end(dst2_v, half_width * half_height); 1749 for (int times = 0; times < benchmark_iterations; ++times) { 1750 ret = MJPGToI420(kTest2Jpg, kTest2JpgLen, dst2_y, width, dst2_u, half_width, 1751 dst2_v, half_width, width, height, width, height); 1752 } 1753 // Expect sucesss 1754 EXPECT_EQ(0, ret); 1755 1756 // Convert I420 to NV21 1757 align_buffer_page_end(dst3_y, width * height); 1758 align_buffer_page_end(dst3_vu, half_width * half_height * 2); 1759 1760 I420ToNV21(dst2_y, width, dst2_u, half_width, dst2_v, half_width, dst3_y, 1761 width, dst3_vu, half_width * 2, width, height); 1762 1763 for (int i = 0; i < width * height; ++i) { 1764 EXPECT_EQ(dst_y[i], dst3_y[i]); 1765 } 1766 for (int i = 0; i < half_width * half_height * 2; ++i) { 1767 EXPECT_EQ(dst_vu[i], dst3_vu[i]); 1768 EXPECT_EQ(dst_vu[i], dst3_vu[i]); 1769 } 1770 1771 free_aligned_buffer_page_end(dst3_y); 1772 free_aligned_buffer_page_end(dst3_vu); 1773 1774 free_aligned_buffer_page_end(dst2_y); 1775 free_aligned_buffer_page_end(dst2_u); 1776 free_aligned_buffer_page_end(dst2_v); 1777 1778 free_aligned_buffer_page_end(dst_y); 1779 free_aligned_buffer_page_end(dst_vu); 1780 } 1781 1782 TEST_F(LibYUVConvertTest, TestMJPGToNV21_420) { 1783 int width = 0; 1784 int height = 0; 1785 int ret = MJPGSize(kTest2Jpg, kTest2JpgLen, &width, &height); 1786 EXPECT_EQ(0, ret); 1787 1788 int half_width = (width + 1) / 2; 1789 int half_height = (height + 1) / 2; 1790 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1791 benchmark_height_ / (width * height); 1792 1793 align_buffer_page_end(dst_y, width * height); 1794 align_buffer_page_end(dst_uv, half_width * half_height * 2); 1795 for (int times = 0; times < benchmark_iterations; ++times) { 1796 ret = MJPGToNV21(kTest2Jpg, kTest2JpgLen, dst_y, width, dst_uv, 1797 half_width * 2, width, height, width, height); 1798 } 1799 // Expect sucesss 1800 EXPECT_EQ(0, ret); 1801 1802 // Test result matches known hash value. 1803 uint32_t dst_y_hash = HashDjb2(dst_y, width * height, 5381); 1804 uint32_t dst_uv_hash = HashDjb2(dst_uv, half_width * half_height * 2, 5381); 1805 EXPECT_EQ(dst_y_hash, 2682851208u); 1806 EXPECT_EQ(dst_uv_hash, 1069662856u); 1807 1808 free_aligned_buffer_page_end(dst_y); 1809 free_aligned_buffer_page_end(dst_uv); 1810 } 1811 1812 TEST_F(LibYUVConvertTest, TestMJPGToNV21_422) { 1813 int width = 0; 1814 int height = 0; 1815 int ret = MJPGSize(kTest3Jpg, kTest3JpgLen, &width, &height); 1816 EXPECT_EQ(0, ret); 1817 1818 int half_width = (width + 1) / 2; 1819 int half_height = (height + 1) / 2; 1820 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1821 benchmark_height_ / (width * height); 1822 1823 align_buffer_page_end(dst_y, width * height); 1824 align_buffer_page_end(dst_uv, half_width * half_height * 2); 1825 for (int times = 0; times < benchmark_iterations; ++times) { 1826 ret = MJPGToNV21(kTest3Jpg, kTest3JpgLen, dst_y, width, dst_uv, 1827 half_width * 2, width, height, width, height); 1828 } 1829 // Expect sucesss 1830 EXPECT_EQ(0, ret); 1831 1832 // Test result matches known hash value. 1833 uint32_t dst_y_hash = HashDjb2(dst_y, width * height, 5381); 1834 uint32_t dst_uv_hash = HashDjb2(dst_uv, half_width * half_height * 2, 5381); 1835 EXPECT_EQ(dst_y_hash, 2682851208u); 1836 EXPECT_EQ(dst_uv_hash, 3543430771u); 1837 1838 free_aligned_buffer_page_end(dst_y); 1839 free_aligned_buffer_page_end(dst_uv); 1840 } 1841 1842 TEST_F(LibYUVConvertTest, TestMJPGToNV21_400) { 1843 int width = 0; 1844 int height = 0; 1845 int ret = MJPGSize(kTest0Jpg, kTest0JpgLen, &width, &height); 1846 EXPECT_EQ(0, ret); 1847 1848 int half_width = (width + 1) / 2; 1849 int half_height = (height + 1) / 2; 1850 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1851 benchmark_height_ / (width * height); 1852 1853 align_buffer_page_end(dst_y, width * height); 1854 align_buffer_page_end(dst_uv, half_width * half_height * 2); 1855 for (int times = 0; times < benchmark_iterations; ++times) { 1856 ret = MJPGToNV21(kTest0Jpg, kTest0JpgLen, dst_y, width, dst_uv, 1857 half_width * 2, width, height, width, height); 1858 } 1859 // Expect sucesss 1860 EXPECT_EQ(0, ret); 1861 1862 // Test result matches known hash value. 1863 uint32_t dst_y_hash = HashDjb2(dst_y, width * height, 5381); 1864 uint32_t dst_uv_hash = HashDjb2(dst_uv, half_width * half_height * 2, 5381); 1865 EXPECT_EQ(dst_y_hash, 330644005u); 1866 EXPECT_EQ(dst_uv_hash, 135214341u); 1867 1868 free_aligned_buffer_page_end(dst_y); 1869 free_aligned_buffer_page_end(dst_uv); 1870 } 1871 1872 TEST_F(LibYUVConvertTest, TestMJPGToNV21_444) { 1873 int width = 0; 1874 int height = 0; 1875 int ret = MJPGSize(kTest1Jpg, kTest1JpgLen, &width, &height); 1876 EXPECT_EQ(0, ret); 1877 1878 int half_width = (width + 1) / 2; 1879 int half_height = (height + 1) / 2; 1880 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1881 benchmark_height_ / (width * height); 1882 1883 align_buffer_page_end(dst_y, width * height); 1884 align_buffer_page_end(dst_uv, half_width * half_height * 2); 1885 for (int times = 0; times < benchmark_iterations; ++times) { 1886 ret = MJPGToNV21(kTest1Jpg, kTest1JpgLen, dst_y, width, dst_uv, 1887 half_width * 2, width, height, width, height); 1888 } 1889 // Expect sucesss 1890 EXPECT_EQ(0, ret); 1891 1892 // Test result matches known hash value. 1893 uint32_t dst_y_hash = HashDjb2(dst_y, width * height, 5381); 1894 uint32_t dst_uv_hash = HashDjb2(dst_uv, half_width * half_height * 2, 5381); 1895 EXPECT_EQ(dst_y_hash, 2682851208u); 1896 EXPECT_EQ(dst_uv_hash, 506143297u); 1897 1898 free_aligned_buffer_page_end(dst_y); 1899 free_aligned_buffer_page_end(dst_uv); 1900 } 1901 1902 TEST_F(LibYUVConvertTest, TestMJPGToARGB) { 1903 int width = 0; 1904 int height = 0; 1905 int ret = MJPGSize(kTest3Jpg, kTest3JpgLen, &width, &height); 1906 EXPECT_EQ(0, ret); 1907 1908 int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * 1909 benchmark_height_ / (width * height); 1910 1911 align_buffer_page_end(dst_argb, width * height * 4); 1912 for (int times = 0; times < benchmark_iterations; ++times) { 1913 ret = MJPGToARGB(kTest3Jpg, kTest3JpgLen, dst_argb, width * 4, width, 1914 height, width, height); 1915 } 1916 // Expect sucesss 1917 EXPECT_EQ(0, ret); 1918 1919 // Test result matches known hash value. 1920 uint32_t dst_argb_hash = HashDjb2(dst_argb, width * height, 5381); 1921 EXPECT_EQ(dst_argb_hash, 2355976473u); 1922 1923 free_aligned_buffer_page_end(dst_argb); 1924 } 1925 1926 static int ShowJPegInfo(const uint8_t* sample, size_t sample_size) { 1927 MJpegDecoder mjpeg_decoder; 1928 LIBYUV_BOOL ret = mjpeg_decoder.LoadFrame(sample, sample_size); 1929 1930 int width = mjpeg_decoder.GetWidth(); 1931 int height = mjpeg_decoder.GetHeight(); 1932 1933 // YUV420 1934 if (mjpeg_decoder.GetColorSpace() == MJpegDecoder::kColorSpaceYCbCr && 1935 mjpeg_decoder.GetNumComponents() == 3 && 1936 mjpeg_decoder.GetVertSampFactor(0) == 2 && 1937 mjpeg_decoder.GetHorizSampFactor(0) == 2 && 1938 mjpeg_decoder.GetVertSampFactor(1) == 1 && 1939 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 1940 mjpeg_decoder.GetVertSampFactor(2) == 1 && 1941 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 1942 printf("JPeg is J420, %dx%d %d bytes\n", width, height, 1943 static_cast<int>(sample_size)); 1944 // YUV422 1945 } else if (mjpeg_decoder.GetColorSpace() == MJpegDecoder::kColorSpaceYCbCr && 1946 mjpeg_decoder.GetNumComponents() == 3 && 1947 mjpeg_decoder.GetVertSampFactor(0) == 1 && 1948 mjpeg_decoder.GetHorizSampFactor(0) == 2 && 1949 mjpeg_decoder.GetVertSampFactor(1) == 1 && 1950 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 1951 mjpeg_decoder.GetVertSampFactor(2) == 1 && 1952 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 1953 printf("JPeg is J422, %dx%d %d bytes\n", width, height, 1954 static_cast<int>(sample_size)); 1955 // YUV444 1956 } else if (mjpeg_decoder.GetColorSpace() == MJpegDecoder::kColorSpaceYCbCr && 1957 mjpeg_decoder.GetNumComponents() == 3 && 1958 mjpeg_decoder.GetVertSampFactor(0) == 1 && 1959 mjpeg_decoder.GetHorizSampFactor(0) == 1 && 1960 mjpeg_decoder.GetVertSampFactor(1) == 1 && 1961 mjpeg_decoder.GetHorizSampFactor(1) == 1 && 1962 mjpeg_decoder.GetVertSampFactor(2) == 1 && 1963 mjpeg_decoder.GetHorizSampFactor(2) == 1) { 1964 printf("JPeg is J444, %dx%d %d bytes\n", width, height, 1965 static_cast<int>(sample_size)); 1966 // YUV400 1967 } else if (mjpeg_decoder.GetColorSpace() == 1968 MJpegDecoder::kColorSpaceGrayscale && 1969 mjpeg_decoder.GetNumComponents() == 1 && 1970 mjpeg_decoder.GetVertSampFactor(0) == 1 && 1971 mjpeg_decoder.GetHorizSampFactor(0) == 1) { 1972 printf("JPeg is J400, %dx%d %d bytes\n", width, height, 1973 static_cast<int>(sample_size)); 1974 } else { 1975 // Unknown colorspace. 1976 printf("JPeg is Unknown colorspace.\n"); 1977 } 1978 mjpeg_decoder.UnloadFrame(); 1979 return ret; 1980 } 1981 1982 TEST_F(LibYUVConvertTest, TestMJPGInfo) { 1983 EXPECT_EQ(1, ShowJPegInfo(kTest0Jpg, kTest0JpgLen)); 1984 EXPECT_EQ(1, ShowJPegInfo(kTest1Jpg, kTest1JpgLen)); 1985 EXPECT_EQ(1, ShowJPegInfo(kTest2Jpg, kTest2JpgLen)); 1986 EXPECT_EQ(1, ShowJPegInfo(kTest3Jpg, kTest3JpgLen)); 1987 EXPECT_EQ(1, 1988 ShowJPegInfo(kTest4Jpg, kTest4JpgLen)); // Valid but unsupported. 1989 } 1430 1990 #endif // HAVE_JPEG 1431 1991 … … 1507 2067 free_aligned_buffer_page_end(dst_u_2); 1508 2068 free_aligned_buffer_page_end(dst_v_2); 2069 free_aligned_buffer_page_end(src_y); 2070 } 2071 2072 TEST_F(LibYUVConvertTest, I420CropOddY) { 2073 const int SUBSAMP_X = 2; 2074 const int SUBSAMP_Y = 2; 2075 const int kWidth = benchmark_width_; 2076 const int kHeight = benchmark_height_; 2077 const int crop_y = 1; 2078 const int kDestWidth = benchmark_width_; 2079 const int kDestHeight = benchmark_height_ - crop_y * 2; 2080 const int kStrideU = SUBSAMPLE(kWidth, SUBSAMP_X); 2081 const int kStrideV = SUBSAMPLE(kWidth, SUBSAMP_X); 2082 const int sample_size = kWidth * kHeight + 2083 kStrideU * SUBSAMPLE(kHeight, SUBSAMP_Y) + 2084 kStrideV * SUBSAMPLE(kHeight, SUBSAMP_Y); 2085 align_buffer_page_end(src_y, sample_size); 2086 uint8_t* src_u = src_y + kWidth * kHeight; 2087 uint8_t* src_v = src_u + kStrideU * SUBSAMPLE(kHeight, SUBSAMP_Y); 2088 2089 align_buffer_page_end(dst_y, kDestWidth * kDestHeight); 2090 align_buffer_page_end(dst_u, SUBSAMPLE(kDestWidth, SUBSAMP_X) * 2091 SUBSAMPLE(kDestHeight, SUBSAMP_Y)); 2092 align_buffer_page_end(dst_v, SUBSAMPLE(kDestWidth, SUBSAMP_X) * 2093 SUBSAMPLE(kDestHeight, SUBSAMP_Y)); 2094 2095 for (int i = 0; i < kHeight * kWidth; ++i) { 2096 src_y[i] = (fastrand() & 0xff); 2097 } 2098 for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y) * kStrideU; ++i) { 2099 src_u[i] = (fastrand() & 0xff); 2100 } 2101 for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y) * kStrideV; ++i) { 2102 src_v[i] = (fastrand() & 0xff); 2103 } 2104 memset(dst_y, 1, kDestWidth * kDestHeight); 2105 memset(dst_u, 2, 2106 SUBSAMPLE(kDestWidth, SUBSAMP_X) * SUBSAMPLE(kDestHeight, SUBSAMP_Y)); 2107 memset(dst_v, 3, 2108 SUBSAMPLE(kDestWidth, SUBSAMP_X) * SUBSAMPLE(kDestHeight, SUBSAMP_Y)); 2109 2110 MaskCpuFlags(benchmark_cpu_info_); 2111 for (int i = 0; i < benchmark_iterations_; ++i) { 2112 ConvertToI420(src_y, sample_size, dst_y, kDestWidth, dst_u, 2113 SUBSAMPLE(kDestWidth, SUBSAMP_X), dst_v, 2114 SUBSAMPLE(kDestWidth, SUBSAMP_X), 0, crop_y, kWidth, kHeight, 2115 kDestWidth, kDestHeight, libyuv::kRotate0, 2116 libyuv::FOURCC_I420); 2117 } 2118 2119 for (int i = 0; i < kDestHeight; ++i) { 2120 for (int j = 0; j < kDestWidth; ++j) { 2121 EXPECT_EQ(src_y[crop_y * kWidth + i * kWidth + j], 2122 dst_y[i * kDestWidth + j]); 2123 } 2124 } 2125 for (int i = 0; i < SUBSAMPLE(kDestHeight, SUBSAMP_Y); ++i) { 2126 for (int j = 0; j < SUBSAMPLE(kDestWidth, SUBSAMP_X); ++j) { 2127 EXPECT_EQ(src_u[(crop_y / 2 + i) * kStrideU + j], 2128 dst_u[i * SUBSAMPLE(kDestWidth, SUBSAMP_X) + j]); 2129 } 2130 } 2131 for (int i = 0; i < SUBSAMPLE(kDestHeight, SUBSAMP_Y); ++i) { 2132 for (int j = 0; j < SUBSAMPLE(kDestWidth, SUBSAMP_X); ++j) { 2133 EXPECT_EQ(src_v[(crop_y / 2 + i) * kStrideV + j], 2134 dst_v[i * SUBSAMPLE(kDestWidth, SUBSAMP_X) + j]); 2135 } 2136 } 2137 2138 free_aligned_buffer_page_end(dst_y); 2139 free_aligned_buffer_page_end(dst_u); 2140 free_aligned_buffer_page_end(dst_v); 1509 2141 free_aligned_buffer_page_end(src_y); 1510 2142 } … … 2459 3091 } 2460 3092 3093 // Test RGB24 to ARGB and back to RGB24 3094 TEST_F(LibYUVConvertTest, TestARGBToRGB24) { 3095 const int kSize = 256; 3096 align_buffer_page_end(orig_rgb24, kSize * 3); 3097 align_buffer_page_end(argb_pixels, kSize * 4); 3098 align_buffer_page_end(dest_rgb24, kSize * 3); 3099 3100 // Test grey scale 3101 for (int i = 0; i < kSize * 3; ++i) { 3102 orig_rgb24[i] = i; 3103 } 3104 3105 RGB24ToARGB(orig_rgb24, 0, argb_pixels, 0, kSize, 1); 3106 ARGBToRGB24(argb_pixels, 0, dest_rgb24, 0, kSize, 1); 3107 3108 for (int i = 0; i < kSize * 3; ++i) { 3109 EXPECT_EQ(orig_rgb24[i], dest_rgb24[i]); 3110 } 3111 3112 free_aligned_buffer_page_end(orig_rgb24); 3113 free_aligned_buffer_page_end(argb_pixels); 3114 free_aligned_buffer_page_end(dest_rgb24); 3115 } 3116 2461 3117 } // namespace libyuv -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/cpu_test.cc
r235135 r239415 21 21 TEST_F(LibYUVBaseTest, TestCpuHas) { 22 22 int cpu_flags = TestCpuFlag(-1); 23 printf("Cpu Flags % x\n", cpu_flags);23 printf("Cpu Flags %d\n", cpu_flags); 24 24 #if defined(__arm__) || defined(__aarch64__) 25 25 int has_arm = TestCpuFlag(kCpuHasARM); 26 printf("Has ARM % x\n", has_arm);26 printf("Has ARM %d\n", has_arm); 27 27 int has_neon = TestCpuFlag(kCpuHasNEON); 28 printf("Has NEON % x\n", has_neon);28 printf("Has NEON %d\n", has_neon); 29 29 #endif 30 30 int has_x86 = TestCpuFlag(kCpuHasX86); … … 45 45 int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); 46 46 int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); 47 printf("Has X86 % x\n", has_x86);48 printf("Has SSE2 % x\n", has_sse2);49 printf("Has SSSE3 % x\n", has_ssse3);50 printf("Has SSE4 .1 %x\n", has_sse41);51 printf("Has SSE4 .2 %x\n", has_sse42);52 printf("Has AVX % x\n", has_avx);53 printf("Has AVX2 % x\n", has_avx2);54 printf("Has ERMS % x\n", has_erms);55 printf("Has FMA3 % x\n", has_fma3);56 printf("Has F16C % x\n", has_f16c);57 printf("Has GFNI % x\n", has_gfni);58 printf("Has AVX512BW % x\n", has_avx512bw);59 printf("Has AVX512VL % x\n", has_avx512vl);60 printf("Has AVX512VBMI % x\n", has_avx512vbmi);61 printf("Has AVX512VBMI2 % x\n", has_avx512vbmi2);62 printf("Has AVX512VBITALG % x\n", has_avx512vbitalg);63 printf("Has AVX512VPOPCNTDQ % x\n", has_avx512vpopcntdq);47 printf("Has X86 %d\n", has_x86); 48 printf("Has SSE2 %d\n", has_sse2); 49 printf("Has SSSE3 %d\n", has_ssse3); 50 printf("Has SSE41 %d\n", has_sse41); 51 printf("Has SSE42 %d\n", has_sse42); 52 printf("Has AVX %d\n", has_avx); 53 printf("Has AVX2 %d\n", has_avx2); 54 printf("Has ERMS %d\n", has_erms); 55 printf("Has FMA3 %d\n", has_fma3); 56 printf("Has F16C %d\n", has_f16c); 57 printf("Has GFNI %d\n", has_gfni); 58 printf("Has AVX512BW %d\n", has_avx512bw); 59 printf("Has AVX512VL %d\n", has_avx512vl); 60 printf("Has AVX512VBMI %d\n", has_avx512vbmi); 61 printf("Has AVX512VBMI2 %d\n", has_avx512vbmi2); 62 printf("Has AVX512VBITALG %d\n", has_avx512vbitalg); 63 printf("Has AVX512VPOPCNTDQ %d\n", has_avx512vpopcntdq); 64 64 65 65 #if defined(__mips__) 66 66 int has_mips = TestCpuFlag(kCpuHasMIPS); 67 printf("Has MIPS % x\n", has_mips);67 printf("Has MIPS %d\n", has_mips); 68 68 int has_msa = TestCpuFlag(kCpuHasMSA); 69 printf("Has MSA %x\n", has_msa); 69 printf("Has MSA %d\n", has_msa); 70 int has_mmi = TestCpuFlag(kCpuHasMMI); 71 printf("Has MMI %d\n", has_mmi); 70 72 #endif 71 73 } … … 159 161 } 160 162 163 TEST_F(LibYUVBaseTest, TestSetCpuFlags) { 164 // Reset any masked flags that may have been set so auto init is enabled. 165 MaskCpuFlags(0); 166 167 int original_cpu_flags = TestCpuFlag(-1); 168 169 // Test setting different CPU configurations. 170 int cpu_flags = kCpuHasARM | kCpuHasNEON | kCpuInitialized; 171 SetCpuFlags(cpu_flags); 172 EXPECT_EQ(cpu_flags, TestCpuFlag(-1)); 173 174 cpu_flags = kCpuHasX86 | kCpuInitialized; 175 SetCpuFlags(cpu_flags); 176 EXPECT_EQ(cpu_flags, TestCpuFlag(-1)); 177 178 // Test that setting 0 turns auto-init back on. 179 SetCpuFlags(0); 180 EXPECT_EQ(original_cpu_flags, TestCpuFlag(-1)); 181 182 // Restore the CPU flag mask. 183 MaskCpuFlags(benchmark_cpu_info_); 184 } 185 161 186 } // namespace libyuv -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/scale_argb_test.cc
r235135 r239415 304 304 TEST_SCALETO(ARGBScale, 1, 1) 305 305 TEST_SCALETO(ARGBScale, 320, 240) 306 TEST_SCALETO(ARGBScale, 352, 288)307 306 TEST_SCALETO(ARGBScale, 569, 480) 308 307 TEST_SCALETO(ARGBScale, 640, 360) 309 308 TEST_SCALETO(ARGBScale, 1280, 720) 309 TEST_SCALETO(ARGBScale, 1920, 1080) 310 310 #undef TEST_SCALETO1 311 311 #undef TEST_SCALETO … … 320 320 const uint8_t* src_v, 321 321 int src_stride_v, 322 uint32 /* src_fourcc */,322 uint32_t /* src_fourcc */, 323 323 int src_width, 324 324 int src_height, 325 325 uint8_t* dst_argb, 326 326 int dst_stride_argb, 327 uint32 /* dst_fourcc */,327 uint32_t /* dst_fourcc */, 328 328 int dst_width, 329 329 int dst_height, -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/scale_test.cc
r235135 r239415 337 337 TEST_SCALETO(Scale, 1, 1) 338 338 TEST_SCALETO(Scale, 320, 240) 339 TEST_SCALETO(Scale, 352, 288)340 339 TEST_SCALETO(Scale, 569, 480) 341 340 TEST_SCALETO(Scale, 640, 360) 342 341 TEST_SCALETO(Scale, 1280, 720) 342 TEST_SCALETO(Scale, 1920, 1080) 343 343 #undef TEST_SCALETO1 344 344 #undef TEST_SCALETO … … 438 438 uint16_t* dst, 439 439 int dst_width); 440 extern "C" void ScaleRowUp2_16_MMI(const uint16_t* src_ptr, 441 ptrdiff_t src_stride, 442 uint16_t* dst, 443 int dst_width); 440 444 extern "C" void ScaleRowUp2_16_C(const uint16_t* src_ptr, 441 445 ptrdiff_t src_stride, … … 461 465 if (has_neon) { 462 466 ScaleRowUp2_16_NEON(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); 467 } else { 468 ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); 469 } 470 #elif !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 471 int has_mmi = TestCpuFlag(kCpuHasMMI); 472 if (has_mmi) { 473 ScaleRowUp2_16_MMI(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); 463 474 } else { 464 475 ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/unit_test.cc
r235135 r239415 39 39 #endif 40 40 41 // Test environment variable for disabling CPU features. Any non-zero value 42 // to disable. Zero ignored to make it easy to set the variable on/off. 43 #if !defined(__native_client__) && !defined(_M_ARM) 44 static LIBYUV_BOOL TestEnv(const char* name) { 45 const char* var = getenv(name); 46 if (var) { 47 if (var[0] != '0') { 48 return LIBYUV_TRUE; 49 } 50 } 51 return LIBYUV_FALSE; 52 } 53 #else // nacl does not support getenv(). 54 static LIBYUV_BOOL TestEnv(const char*) { 55 return LIBYUV_FALSE; 56 } 57 #endif 58 59 int TestCpuEnv(int cpu_info) { 60 #if defined(__arm__) || defined(__aarch64__) 61 if (TestEnv("LIBYUV_DISABLE_NEON")) { 62 cpu_info &= ~libyuv::kCpuHasNEON; 63 } 64 #endif 65 #if defined(__mips__) && defined(__linux__) 66 if (TestEnv("LIBYUV_DISABLE_MSA")) { 67 cpu_info &= ~libyuv::kCpuHasMSA; 68 } 69 if (TestEnv("LIBYUV_DISABLE_MMI")) { 70 cpu_info &= ~libyuv::kCpuHasMMI; 71 } 72 #endif 73 #if !defined(__pnacl__) && !defined(__CLR_VER) && \ 74 (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ 75 defined(_M_IX86)) 76 if (TestEnv("LIBYUV_DISABLE_X86")) { 77 cpu_info &= ~libyuv::kCpuHasX86; 78 } 79 if (TestEnv("LIBYUV_DISABLE_SSE2")) { 80 cpu_info &= ~libyuv::kCpuHasSSE2; 81 } 82 if (TestEnv("LIBYUV_DISABLE_SSSE3")) { 83 cpu_info &= ~libyuv::kCpuHasSSSE3; 84 } 85 if (TestEnv("LIBYUV_DISABLE_SSE41")) { 86 cpu_info &= ~libyuv::kCpuHasSSE41; 87 } 88 if (TestEnv("LIBYUV_DISABLE_SSE42")) { 89 cpu_info &= ~libyuv::kCpuHasSSE42; 90 } 91 if (TestEnv("LIBYUV_DISABLE_AVX")) { 92 cpu_info &= ~libyuv::kCpuHasAVX; 93 } 94 if (TestEnv("LIBYUV_DISABLE_AVX2")) { 95 cpu_info &= ~libyuv::kCpuHasAVX2; 96 } 97 if (TestEnv("LIBYUV_DISABLE_ERMS")) { 98 cpu_info &= ~libyuv::kCpuHasERMS; 99 } 100 if (TestEnv("LIBYUV_DISABLE_FMA3")) { 101 cpu_info &= ~libyuv::kCpuHasFMA3; 102 } 103 if (TestEnv("LIBYUV_DISABLE_F16C")) { 104 cpu_info &= ~libyuv::kCpuHasF16C; 105 } 106 if (TestEnv("LIBYUV_DISABLE_AVX512BW")) { 107 cpu_info &= ~libyuv::kCpuHasAVX512BW; 108 } 109 if (TestEnv("LIBYUV_DISABLE_AVX512VL")) { 110 cpu_info &= ~libyuv::kCpuHasAVX512VL; 111 } 112 if (TestEnv("LIBYUV_DISABLE_AVX512VBMI")) { 113 cpu_info &= ~libyuv::kCpuHasAVX512VBMI; 114 } 115 if (TestEnv("LIBYUV_DISABLE_AVX512VBMI2")) { 116 cpu_info &= ~libyuv::kCpuHasAVX512VBMI2; 117 } 118 if (TestEnv("LIBYUV_DISABLE_AVX512VBITALG")) { 119 cpu_info &= ~libyuv::kCpuHasAVX512VBITALG; 120 } 121 if (TestEnv("LIBYUV_DISABLE_AVX512VPOPCNTDQ")) { 122 cpu_info &= ~libyuv::kCpuHasAVX512VPOPCNTDQ; 123 } 124 if (TestEnv("LIBYUV_DISABLE_GFNI")) { 125 cpu_info &= ~libyuv::kCpuHasGFNI; 126 } 127 #endif 128 if (TestEnv("LIBYUV_DISABLE_ASM")) { 129 cpu_info = libyuv::kCpuInitialized; 130 } 131 return cpu_info; 132 } 133 41 134 // For quicker unittests, default is 128 x 72. But when benchmarking, 42 135 // default to 720p. Allow size to specify. … … 88 181 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 89 182 } 183 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 184 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 90 185 libyuv::MaskCpuFlags(benchmark_cpu_info_); 91 186 benchmark_pixels_div1280_ = … … 142 237 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 143 238 } 239 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 240 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 144 241 libyuv::MaskCpuFlags(benchmark_cpu_info_); 145 242 benchmark_pixels_div1280_ = … … 196 293 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 197 294 } 295 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 296 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 198 297 libyuv::MaskCpuFlags(benchmark_cpu_info_); 199 298 benchmark_pixels_div1280_ = … … 250 349 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 251 350 } 351 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 352 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 252 353 libyuv::MaskCpuFlags(benchmark_cpu_info_); 253 354 benchmark_pixels_div1280_ = … … 304 405 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 305 406 } 407 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 408 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 306 409 libyuv::MaskCpuFlags(benchmark_cpu_info_); 307 410 benchmark_pixels_div1280_ = … … 358 461 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 359 462 } 463 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 464 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 360 465 libyuv::MaskCpuFlags(benchmark_cpu_info_); 361 466 benchmark_pixels_div1280_ = … … 412 517 benchmark_cpu_info_ = FLAGS_libyuv_cpu_info; 413 518 } 519 disable_cpu_flags_ = TestCpuEnv(disable_cpu_flags_); 520 benchmark_cpu_info_ = TestCpuEnv(benchmark_cpu_info_); 414 521 libyuv::MaskCpuFlags(benchmark_cpu_info_); 415 522 benchmark_pixels_div1280_ = -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/unit_test/video_common_test.cc
r235135 r239415 80 80 EXPECT_TRUE(TestValidFourCC(FOURCC_R444, FOURCC_BPP_R444)); 81 81 EXPECT_TRUE(TestValidFourCC(FOURCC_H420, FOURCC_BPP_H420)); 82 EXPECT_TRUE(TestValidFourCC(FOURCC_H422, FOURCC_BPP_H422)); 82 83 EXPECT_TRUE(TestValidFourCC(FOURCC_H010, FOURCC_BPP_H010)); 83 84 EXPECT_TRUE(TestValidFourCC(FOURCC_MJPG, FOURCC_BPP_MJPG)); -
trunk/Source/ThirdParty/libwebrtc/Source/third_party/libyuv/util/cpuid.c
r235135 r239415 72 72 int has_msa = TestCpuFlag(kCpuHasMSA); 73 73 printf("Has MSA %x\n", has_msa); 74 int has_mmi = TestCpuFlag(kCpuHasMMI); 75 printf("Has MMI %x\n", has_mmi); 74 76 } 75 77 if (has_x86) {
Note: See TracChangeset
for help on using the changeset viewer.