on a263091 help sign in
14182 files changed+3300680−2549
since splitsnapshots
unifiedsplit
.github/workflows/build.yml−137 .github/workflows/release.yml−242 .github/workflows/sync-forkgram.yml−177 .gitignore+25 .gitmodules+48 .vscode/keybindings.json+7 .vscode/tasks.json+76 BUILDING.md+95 Dockerfile+50 LICENSE+339 Notifications.md+11 README.md+61−140 TMessagesProj/build.gradle+319 TMessagesProj/config/debug/AndroidManifest.xml+30 TMessagesProj/config/debug/AndroidManifest_SDK23.xml+38 TMessagesProj/config/release.keystore TMessagesProj/config/release/AndroidManifest.xml+30 TMessagesProj/config/release/AndroidManifest_SDK23.xml+38 TMessagesProj/config/release/AndroidManifest_standalone.xml+127 TMessagesProj/config/test.keystore TMessagesProj/emoji/FORMAT.md+117 TMessagesProj/emoji/base_builder.py+174 TMessagesProj/emoji/build_emoji_pack.py+87 TMessagesProj/emoji/emoji.stats.json+36 TMessagesProj/emoji/optimizer_core.py+294 TMessagesProj/emoji/optimizer_visual.py+179 TMessagesProj/emoji/quality_seams.py+19 TMessagesProj/emoji/requirements.txt+3 TMessagesProj/emoji/research_results.json+186 TMessagesProj/emoji/test_java_loader.py+41 TMessagesProj/emoji/verification.json+955 TMessagesProj/emoji/verify_emoji_pack.py+247 TMessagesProj/google-services.json+98 TMessagesProj/jni/Application.mk+7 TMessagesProj/jni/CMakeLists.txt+291 TMessagesProj/jni/SqliteWrapper.cpp+249 TMessagesProj/jni/TgNetWrapper.cpp+778 TMessagesProj/jni/audio.c+1128 TMessagesProj/jni/c_utils.h+27 TMessagesProj/jni/exports.map+8 TMessagesProj/jni/fast-edge.cpp+550 TMessagesProj/jni/fast-edge.h+61 TMessagesProj/jni/ffmpeg_jni.cc+1632 TMessagesProj/jni/genann.c+357 TMessagesProj/jni/genann.h+110 TMessagesProj/jni/gifvideo.cpp+1034 TMessagesProj/jni/gifvideo/sws_context_holder.h+103 TMessagesProj/jni/gifvideo/video_frame_reader.h+148 TMessagesProj/jni/image.cpp+2440 TMessagesProj/jni/intro/IntroRenderer.c+2849 TMessagesProj/jni/intro/IntroRenderer.h+113 TMessagesProj/jni/jni.c+292 TMessagesProj/jni/libwebp+1 TMessagesProj/jni/lottie.cpp+260 TMessagesProj/jni/openssl/aes_ige.c+324 TMessagesProj/jni/openssl/include/openssl/aes_ige.h+37 TMessagesProj/jni/prebuild/build_all.sh+48 TMessagesProj/jni/prebuild/build_boringssl.sh+71 TMessagesProj/jni/prebuild/build_dav1d.sh+312 TMessagesProj/jni/prebuild/build_ffmpeg.sh+468 TMessagesProj/jni/prebuild/build_libvpx.sh+389 TMessagesProj/jni/prebuild/build_openh264.sh+81 TMessagesProj/jni/prebuild/build_opus.sh+218 TMessagesProj/jni/prebuild/build_tdlib.sh+101 TMessagesProj/jni/prebuild/build_tlottie.sh+172 TMessagesProj/jni/prebuild/build_wamr.sh+95 TMessagesProj/jni/prebuild/common.sh+424 TMessagesProj/jni/prebuild/lib/arm64-v8a/libiwasm.a TMessagesProj/jni/prebuild/lib/armeabi-v7a/libiwasm.a TMessagesProj/jni/prebuild/lib/x86/libiwasm.a TMessagesProj/jni/prebuild/lib/x86_64/libiwasm.a TMessagesProj/jni/prepare.py+413 TMessagesProj/jni/secureid_ocr.cpp+640 TMessagesProj/jni/sqlite/sqlite3.c+241687 TMessagesProj/jni/sqlite/sqlite3.h+12836 TMessagesProj/jni/td+1 TMessagesProj/jni/tde2e/bridge.cpp+411 TMessagesProj/jni/tests.cpp+30 TMessagesProj/jni/tgnet/ApiScheme.cpp+2035 TMessagesProj/jni/tgnet/ApiScheme.h+1007 TMessagesProj/jni/tgnet/BuffersStorage.cpp+123 TMessagesProj/jni/tgnet/BuffersStorage.h+38 TMessagesProj/jni/tgnet/ByteArray.cpp+71 TMessagesProj/jni/tgnet/ByteArray.h+31 TMessagesProj/jni/tgnet/ByteStream.cpp+86 TMessagesProj/jni/tgnet/ByteStream.h+32 TMessagesProj/jni/tgnet/Config.cpp+131 TMessagesProj/jni/tgnet/Config.h+29 TMessagesProj/jni/tgnet/Connection.cpp+808 TMessagesProj/jni/tgnet/Connection.h+124 TMessagesProj/jni/tgnet/ConnectionSession.cpp+114 TMessagesProj/jni/tgnet/ConnectionSession.h+45 TMessagesProj/jni/tgnet/ConnectionSocket.cpp+1322 TMessagesProj/jni/tgnet/ConnectionSocket.h+144 TMessagesProj/jni/tgnet/ConnectionsManager.cpp+4130 TMessagesProj/jni/tgnet/ConnectionsManager.h+297 TMessagesProj/jni/tgnet/Datacenter.cpp+1585 TMessagesProj/jni/tgnet/Datacenter.h+154 TMessagesProj/jni/tgnet/Defines.h+207 TMessagesProj/jni/tgnet/EventObject.cpp+50 TMessagesProj/jni/tgnet/EventObject.h+26 TMessagesProj/jni/tgnet/FileLog.cpp+212 TMessagesProj/jni/tgnet/FileLog.h+42 TMessagesProj/jni/tgnet/Handshake.cpp+1074 TMessagesProj/jni/tgnet/Handshake.h+73 TMessagesProj/jni/tgnet/MTProtoScheme.cpp+1191 TMessagesProj/jni/tgnet/MTProtoScheme.h+923 TMessagesProj/jni/tgnet/NativeByteBuffer.cpp+710 TMessagesProj/jni/tgnet/NativeByteBuffer.h+107 TMessagesProj/jni/tgnet/ProxyCheckInfo.cpp+21 TMessagesProj/jni/tgnet/ProxyCheckInfo.h+41 TMessagesProj/jni/tgnet/Request.cpp+93 TMessagesProj/jni/tgnet/Request.h+83 TMessagesProj/jni/tgnet/TLObject.cpp+38 TMessagesProj/jni/tgnet/TLObject.h+30 TMessagesProj/jni/tgnet/TLSHello.cpp+389 TMessagesProj/jni/tgnet/TLSHello.h+61 TMessagesProj/jni/tgnet/Timer.cpp+62 TMessagesProj/jni/tgnet/Timer.h+41 TMessagesProj/jni/third_party/absl+1 TMessagesProj/jni/third_party/boringssl+1 TMessagesProj/jni/third_party/breakpad/Android.mk+104 TMessagesProj/jni/third_party/breakpad/src/breakpad_googletest_includes.h+57 TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/client_info.h+53 TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_client.cc+105 TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_client.h+65 TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_server.cc+330 TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_server.h+135 TMessagesProj/jni/third_party/breakpad/src/client/linux/data/linux-gate-amd.sym+3 TMessagesProj/jni/third_party/breakpad/src/client/linux/data/linux-gate-intel.sym+3 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/mapping_info.h+61 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h+53 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/seccomp_unwinder.cc+154 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/seccomp_unwinder.h+50 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/thread_info.cc+299 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/thread_info.h+91 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc+253 TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h+64 TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler.cc+743 TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler.h+278 TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler_unittest.cc+1195 TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/minidump_descriptor.cc+100 TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/minidump_descriptor.h+161 TMessagesProj/jni/third_party/breakpad/src/client/linux/log/log.cc+48 TMessagesProj/jni/third_party/breakpad/src/client/linux/log/log.h+41 TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer.cc+423 TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer.h+64 TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc+164 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/cpu_set.h+144 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/cpu_set_unittest.cc+164 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/directory_reader.h+106 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/directory_reader_unittest.cc+78 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/line_reader.h+131 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/line_reader_unittest.cc+169 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc+257 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper.h+123 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc+118 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper.cc+475 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper.h+189 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc+94 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc+349 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.h+92 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc+463 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer.cc+1373 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer.h+124 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc+756 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc+66 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.h+49 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h+130 TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc+199 TMessagesProj/jni/third_party/breakpad/src/client/linux/sender/google_crash_report_sender.cc+104 TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer-inl.h+97 TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer.cc+284 TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer.h+272 TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer_unittest.cc+179 TMessagesProj/jni/third_party/breakpad/src/common/android/breakpad_getcontext.S+489 TMessagesProj/jni/third_party/breakpad/src/common/android/breakpad_getcontext_unittest.cc+186 TMessagesProj/jni/third_party/breakpad/src/common/android/include/elf.h+168 TMessagesProj/jni/third_party/breakpad/src/common/android/include/sgidefs.h+41 TMessagesProj/jni/third_party/breakpad/src/common/android/include/stab.h+100 TMessagesProj/jni/third_party/breakpad/src/common/android/include/sys/procfs.h+124 TMessagesProj/jni/third_party/breakpad/src/common/android/include/sys/signal.h+35 TMessagesProj/jni/third_party/breakpad/src/common/android/include/ucontext.h+56 TMessagesProj/jni/third_party/breakpad/src/common/android/testing/include/wchar.h+76 TMessagesProj/jni/third_party/breakpad/src/common/android/testing/mkdtemp.h+110 TMessagesProj/jni/third_party/breakpad/src/common/android/testing/pthread_fixes.h+99 TMessagesProj/jni/third_party/breakpad/src/common/android/ucontext_constants.h+144 TMessagesProj/jni/third_party/breakpad/src/common/basictypes.h+58 TMessagesProj/jni/third_party/breakpad/src/common/byte_cursor.h+265 TMessagesProj/jni/third_party/breakpad/src/common/byte_cursor_unittest.cc+776 TMessagesProj/jni/third_party/breakpad/src/common/common.gyp+243 TMessagesProj/jni/third_party/breakpad/src/common/convert_UTF.c+554 TMessagesProj/jni/third_party/breakpad/src/common/convert_UTF.h+164 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader-inl.h+175 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader.cc+245 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader.h+310 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader_unittest.cc+697 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/cfi_assembler.cc+198 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/cfi_assembler.h+269 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler.cc+198 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler.h+363 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler_unittest.cc+524 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2enums.h+650 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader.cc+2344 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader.h+1050 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_cfi_unittest.cc+2452 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_die_unittest.cc+484 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_test_common.h+149 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/functioninfo.cc+231 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/functioninfo.h+188 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/line_state_machine.h+61 TMessagesProj/jni/third_party/breakpad/src/common/dwarf/types.h+55 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module.cc+295 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module.h+202 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module_unittest.cc+306 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module.cc+1073 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module.h+318 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module_unittest.cc+1779 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module.cc+143 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module.h+188 TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module_unittest.cc+391 TMessagesProj/jni/third_party/breakpad/src/common/language.cc+83 TMessagesProj/jni/third_party/breakpad/src/common/language.h+88 TMessagesProj/jni/third_party/breakpad/src/common/linux/crc32.cc+70 TMessagesProj/jni/third_party/breakpad/src/common/linux/crc32.h+53 TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols.cc+976 TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols.h+80 TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols_unittest.cc+172 TMessagesProj/jni/third_party/breakpad/src/common/linux/eintr_wrapper.h+58 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump.cc+179 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump.h+148 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump_unittest.cc+256 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_gnu_compat.h+46 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module.cc+178 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module.h+58 TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module_unittest.cc+370 TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils-inl.h+74 TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils.cc+194 TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils.h+118 TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id.cc+191 TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id.h+78 TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id_unittest.cc+263 TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader.cc+202 TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader.h+107 TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader_test.cc+170 TMessagesProj/jni/third_party/breakpad/src/common/linux/guid_creator.cc+104 TMessagesProj/jni/third_party/breakpad/src/common/linux/guid_creator.h+48 TMessagesProj/jni/third_party/breakpad/src/common/linux/http_upload.cc+216 TMessagesProj/jni/third_party/breakpad/src/common/linux/http_upload.h+88 TMessagesProj/jni/third_party/breakpad/src/common/linux/ignore_ret.h+40 TMessagesProj/jni/third_party/breakpad/src/common/linux/libcurl_wrapper.cc+241 TMessagesProj/jni/third_party/breakpad/src/common/linux/libcurl_wrapper.h+93 TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support.cc+237 TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support.h+96 TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support_unittest.cc+213 TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file.cc+118 TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file.h+87 TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file_unittest.cc+208 TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink.cc+53 TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink.h+65 TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink_unittest.cc+89 TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf.cc+261 TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf.h+195 TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf_unittest.cc+413 TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/auto_testfile.h+124 TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/crash_generator.cc+322 TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/crash_generator.h+117 TMessagesProj/jni/third_party/breakpad/src/common/md5.cc+251 TMessagesProj/jni/third_party/breakpad/src/common/md5.h+27 TMessagesProj/jni/third_party/breakpad/src/common/memory.h+212 TMessagesProj/jni/third_party/breakpad/src/common/memory_range.h+145 TMessagesProj/jni/third_party/breakpad/src/common/memory_range_unittest.cc+193 TMessagesProj/jni/third_party/breakpad/src/common/memory_unittest.cc+97 TMessagesProj/jni/third_party/breakpad/src/common/minidump_type_helper.h+56 TMessagesProj/jni/third_party/breakpad/src/common/module.cc+319 TMessagesProj/jni/third_party/breakpad/src/common/module.h+336 TMessagesProj/jni/third_party/breakpad/src/common/module_unittest.cc+546 TMessagesProj/jni/third_party/breakpad/src/common/scoped_ptr.h+404 TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary.cc+45 TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary.h+260 TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary_unittest.cc+308 TMessagesProj/jni/third_party/breakpad/src/common/solaris/dump_symbols.cc+681 TMessagesProj/jni/third_party/breakpad/src/common/solaris/dump_symbols.h+49 TMessagesProj/jni/third_party/breakpad/src/common/solaris/file_id.cc+197 TMessagesProj/jni/third_party/breakpad/src/common/solaris/file_id.h+66 TMessagesProj/jni/third_party/breakpad/src/common/solaris/guid_creator.cc+84 TMessagesProj/jni/third_party/breakpad/src/common/solaris/guid_creator.h+50 TMessagesProj/jni/third_party/breakpad/src/common/solaris/message_output.h+54 TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader.cc+315 TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader.h+326 TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader_unittest.cc+611 TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module.cc+197 TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module.h+143 TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module_unittest.cc+258 TMessagesProj/jni/third_party/breakpad/src/common/string_conversion.cc+155 TMessagesProj/jni/third_party/breakpad/src/common/string_conversion.h+68 TMessagesProj/jni/third_party/breakpad/src/common/symbol_data.h+42 TMessagesProj/jni/third_party/breakpad/src/common/test_assembler.cc+359 TMessagesProj/jni/third_party/breakpad/src/common/test_assembler.h+484 TMessagesProj/jni/third_party/breakpad/src/common/test_assembler_unittest.cc+1662 TMessagesProj/jni/third_party/breakpad/src/common/testdata/func-line-pairing.h+676 TMessagesProj/jni/third_party/breakpad/src/common/unordered.h+62 TMessagesProj/jni/third_party/breakpad/src/common/using_std_string.h+65 TMessagesProj/jni/third_party/breakpad/src/config.h.in+76 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/breakpad_types.h+86 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_amd64.h+235 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_arm.h+151 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_arm64.h+140 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_mips.h+160 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_ppc.h+163 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_ppc64.h+129 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_sparc.h+158 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_x86.h+174 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_linux.h+87 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_mac.h+205 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_ps3.h+67 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_solaris.h+94 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_win32.h+2261 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_format.h+972 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_size.h+107 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/basic_source_line_resolver.h+144 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/call_stack.h+77 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/code_module.h+94 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/code_modules.h+98 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/dump_context.h+112 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/dump_object.h+53 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/exploitability.h+73 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/fast_source_line_resolver.h+100 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/memory_region.h+79 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/microdump.h+126 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/microdump_processor.h+63 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/minidump.h+1030 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/minidump_processor.h+141 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/process_result.h+66 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/process_state.h+189 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/source_line_resolver_base.h+128 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/source_line_resolver_interface.h+117 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame.h+144 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame_cpu.h+405 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame_symbolizer.h+108 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stackwalker.h+235 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/symbol_supplier.h+99 TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/system_info.h+98 TMessagesProj/jni/third_party/breakpad/src/processor/address_map-inl.h+93 TMessagesProj/jni/third_party/breakpad/src/processor/address_map.h+85 TMessagesProj/jni/third_party/breakpad/src/processor/address_map_unittest.cc+196 TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_module.h+109 TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_modules.cc+128 TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_modules.h+88 TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver.cc+609 TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver_types.h+177 TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver_unittest.cc+680 TMessagesProj/jni/third_party/breakpad/src/processor/binarystream.cc+124 TMessagesProj/jni/third_party/breakpad/src/processor/binarystream.h+92 TMessagesProj/jni/third_party/breakpad/src/processor/binarystream_unittest.cc+432 TMessagesProj/jni/third_party/breakpad/src/processor/call_stack.cc+53 TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info-inl.h+119 TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info.cc+186 TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info.h+275 TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info_unittest.cc+546 TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map-inl.h+197 TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map.h+150 TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map_unittest.cc+263 TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86.cc+241 TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86.h+127 TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86_unittest.cc+233 TMessagesProj/jni/third_party/breakpad/src/processor/dump_context.cc+614 TMessagesProj/jni/third_party/breakpad/src/processor/dump_object.cc+39 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability.cc+110 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_linux.cc+86 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_linux.h+55 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_unittest.cc+117 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_win.cc+287 TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_win.h+55 TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver.cc+275 TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver_types.h+185 TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver_unittest.cc+489 TMessagesProj/jni/third_party/breakpad/src/processor/linked_ptr.h+193 TMessagesProj/jni/third_party/breakpad/src/processor/logging.cc+115 TMessagesProj/jni/third_party/breakpad/src/processor/logging.h+186 TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers-inl.h+266 TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers.h+168 TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers_unittest.cc+386 TMessagesProj/jni/third_party/breakpad/src/processor/microdump.cc+306 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_processor.cc+100 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_processor_unittest.cc+197 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk.cc+151 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_machine_readable_test+43 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_test+43 TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_test_vars+1 TMessagesProj/jni/third_party/breakpad/src/processor/minidump.cc+4631 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_dump.cc+213 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_dump_test+36 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_processor.cc+1536 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_processor_unittest.cc+644 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk.cc+162 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk_machine_readable_test+37 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk_test+37 TMessagesProj/jni/third_party/breakpad/src/processor/minidump_unittest.cc+1266 TMessagesProj/jni/third_party/breakpad/src/processor/module_comparer.cc+302 TMessagesProj/jni/third_party/breakpad/src/processor/module_comparer.h+98 TMessagesProj/jni/third_party/breakpad/src/processor/module_factory.h+72 TMessagesProj/jni/third_party/breakpad/src/processor/module_serializer.cc+207 TMessagesProj/jni/third_party/breakpad/src/processor/module_serializer.h+127 TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper.cc+56 TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper.h+53 TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper_unittest.cc+87 TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator-inl.h+363 TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator.h+179 TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator_unittest.cc+403 TMessagesProj/jni/third_party/breakpad/src/processor/process_state.cc+69 TMessagesProj/jni/third_party/breakpad/src/processor/processor.gyp+183 TMessagesProj/jni/third_party/breakpad/src/processor/processor_tools.gypi+57 TMessagesProj/jni/third_party/breakpad/src/processor/range_map-inl.h+220 TMessagesProj/jni/third_party/breakpad/src/processor/range_map.h+132 TMessagesProj/jni/third_party/breakpad/src/processor/range_map_unittest.cc+552 TMessagesProj/jni/third_party/breakpad/src/processor/simple_serializer-inl.h+260 TMessagesProj/jni/third_party/breakpad/src/processor/simple_serializer.h+63 TMessagesProj/jni/third_party/breakpad/src/processor/simple_symbol_supplier.cc+204 TMessagesProj/jni/third_party/breakpad/src/processor/simple_symbol_supplier.h+140 TMessagesProj/jni/third_party/breakpad/src/processor/source_line_resolver_base.cc+341 TMessagesProj/jni/third_party/breakpad/src/processor/source_line_resolver_base_types.h+158 TMessagesProj/jni/third_party/breakpad/src/processor/stack_frame_cpu.cc+79 TMessagesProj/jni/third_party/breakpad/src/processor/stack_frame_symbolizer.cc+138 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalk_common.cc+929 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalk_common.h+49 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker.cc+295 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list.cc+92 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list.h+72 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list_unittest.cc+197 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64.cc+307 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64.h+108 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64_unittest.cc+699 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm.cc+296 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm.h+107 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64.cc+278 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64.h+104 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64_unittest.cc+880 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm_unittest.cc+974 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips.cc+300 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips.h+85 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips_unittest.cc+697 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc.cc+146 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc.h+79 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc64.cc+137 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc64.h+77 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_selftest.cc+433 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_selftest_sol.s+111 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_sparc.cc+139 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_sparc.h+78 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_unittest_utils.h+211 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86.cc+672 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86.h+117 TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86_unittest.cc+2128 TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map-inl.h+71 TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map.h+78 TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map_unittest.cc+236 TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map-inl.h+92 TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map.h+96 TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map_unittest.cc+320 TMessagesProj/jni/third_party/breakpad/src/processor/static_map-inl.h+176 TMessagesProj/jni/third_party/breakpad/src/processor/static_map.h+144 TMessagesProj/jni/third_party/breakpad/src/processor/static_map_iterator-inl.h+147 TMessagesProj/jni/third_party/breakpad/src/processor/static_map_iterator.h+112 TMessagesProj/jni/third_party/breakpad/src/processor/static_map_unittest.cc+386 TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map-inl.h+130 TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map.h+106 TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map_unittest.cc+421 TMessagesProj/jni/third_party/breakpad/src/processor/symbolic_constants_win.cc+6417 TMessagesProj/jni/third_party/breakpad/src/processor/symbolic_constants_win.h+50 TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump.cc+391 TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump.h+372 TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump_unittest.cc+336 TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump_unittest_data.h+418 TMessagesProj/jni/third_party/breakpad/src/processor/tokenize.cc+79 TMessagesProj/jni/third_party/breakpad/src/processor/tokenize.h+63 TMessagesProj/jni/third_party/breakpad/src/processor/windows_frame_info.h+209 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/COPYING+22 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curl.h+1936 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlbuild.h+202 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlrules.h+249 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlver.h+70 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/easy.h+103 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/mprintf.h+82 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/multi.h+346 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/stdcheaders.h+34 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/typecheck-gcc.h+551 TMessagesProj/jni/third_party/breakpad/src/third_party/curl/types.h+1 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/libglog.pc.in+10 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/commandlineflags.h+132 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/googleinit.h+51 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/mutex.h+325 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/config.h.in+165 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/config_for_unittests.h+66 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle.cc+1307 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle.h+84 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.cc+142 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.sh+95 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.txt+137 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/log_severity.h+84 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/logging.h.in+1506 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/raw_logging.h.in+185 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/stl_logging.h.in+154 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/vlog_is_on.h.in+129 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/googletest.h+604 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging.cc+1808 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striplog_test.sh+72 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest10.cc+35 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest2.cc+35 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest_main.cc+68 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_unittest.cc+1210 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_unittest.err+305 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/mock-log.h+155 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/mock-log_test.cc+106 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/raw_logging.cc+172 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler.cc+350 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler_unittest.cc+97 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler_unittest.sh+131 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace.h+60 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_generic-inl.h+59 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_libunwind-inl.h+87 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_powerpc-inl.h+130 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_unittest.cc+157 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_x86-inl.h+139 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_x86_64-inl.h+105 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stl_logging_unittest.cc+191 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize.cc+681 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize.h+116 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize_unittest.cc+365 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities.cc+346 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities.h+226 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities_unittest.cc+54 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/vlog_is_on.cc+249 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/config.h+136 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/log_severity.h+88 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/logging.h+1510 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/raw_logging.h+189 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/stl_logging.h+158 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/vlog_is_on.h+133 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/port.cc+64 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/port.h+149 TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/preprocess.sh+118 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/Makefile.am+43 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/TODO+43 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_implicit.c+422 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_implicit.h+13 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_insn.c+623 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_insn.h+506 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_invariant.c+313 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_invariant.h+11 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_modrm.c+310 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_modrm.h+13 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_opcode_tables.c+2939 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_opcode_tables.h+57 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_operand.c+425 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_operand.h+11 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_reg.c+234 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_reg.h+41 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_settings.c+13 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_settings.h+27 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/libdis.h+836 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/libdisasm.gyp+64 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/qword.h+14 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/Makefile+70 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/README+128 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/libdisasm.i+508 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/libdisasm_oop.i+1114 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/perl/Makefile-swig+65 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/perl/Makefile.PL+7 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/python/Makefile-swig+64 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/ruby/Makefile-swig+68 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/ruby/extconf.rb+4 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/tcl/Makefile-swig+63 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_disasm.c+210 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_format.c+1430 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_imm.c+70 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_imm.h+18 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_insn.c+182 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_misc.c+71 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_operand_list.c+191 TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_operand_list.h+8 TMessagesProj/jni/third_party/breakpad/src/third_party/linux/include/gflags/gflags.h+533 TMessagesProj/jni/third_party/breakpad/src/third_party/linux/include/gflags/gflags_completions.h+121 TMessagesProj/jni/third_party/breakpad/src/third_party/linux/lib/gflags/libgflags.a TMessagesProj/jni/third_party/breakpad/src/third_party/linux/lib/glog/libglog.a TMessagesProj/jni/third_party/breakpad/src/third_party/lss/linux_syscall_support.h+4029 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/Makefile.am+363 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/SEBS+240 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.cc+80 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.h+142 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.cc+1357 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.h+318 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc+1452 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc+158 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc+258 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h+99 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc+361 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h+103 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc+210 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h+85 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc+139 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h+167 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc+611 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h+98 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc+122 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h+72 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc+347 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h+159 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc+1933 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h+170 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc+277 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h+102 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc+121 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc+382 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h+103 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc+334 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h+118 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc+453 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h+104 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto+113 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc+1281 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.cc+459 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.h+303 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer_unittest.cc+600 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.cc+243 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.h+84 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc+537 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.h+121 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.cc+216 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.h+77 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.cc+137 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.h+108 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.cc+428 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.h+101 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.cc+128 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.h+72 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.cc+478 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.h+213 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.cc+1287 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.h+109 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.cc+884 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.h+134 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc+122 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc+719 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h+121 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.cc+444 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.h+113 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.cc+610 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.h+120 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/main.cc+61 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.cc+231 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.h+113 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/package_info.h+64 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.cc+1473 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.h+434 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser_unittest.cc+2122 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.cc+163 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.h+73 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc+1082 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.h+790 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.proto+145 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.cc+1006 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.h+156 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc+116 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.cc+460 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.h+108 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/test_plugin.cc+51 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh+91 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.cc+218 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.h+93 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.cc+4497 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.h+1367 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.cc+7708 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.h+5223 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.proto+538 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.cc+541 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.h+366 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database_unittest.cc+748 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_unittest.cc+4034 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.cc+558 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.h+136 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message_unittest.cc+162 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.cc+1464 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.h+904 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_heavy.cc+457 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_unittest.cc+642 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc+1228 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.h+424 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc+384 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.cc+55 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.h+82 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.cc+839 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.h+1102 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_inl.h+64 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_unittest.cc+1131 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.cc+335 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.h+207 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh+44 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/package_info.h+54 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.cc+199 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.h+136 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer_unittest.cc+261 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.cc+694 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.h+313 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer_unittest.cc+766 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.cc+48 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.h+238 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc+470 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h+357 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc+393 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h+340 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc+850 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/lite_unittest.cc+112 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message.cc+318 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message.h+692 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.cc+334 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.h+239 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_unittest.cc+281 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/package_info.h+64 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.cc+262 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.h+80 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops_unittest.cc+405 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.cc+98 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.h+1295 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field_unittest.cc+1086 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/service.cc+46 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/service.h+291 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.cc+377 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.h+1211 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common_unittest.cc+357 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/hash.h+220 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/map-util.h+119 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.cc+88 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.h+123 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once_unittest.cc+253 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/stl_util-inl.h+121 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid.cc+536 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc+40 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.cc+1173 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.h+457 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil_unittest.cc+83 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.cc+134 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.h+170 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.cc+2854 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.h+174 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.cc+1502 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.h+101 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_message TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_packed_fields_message TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt+116 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt+116 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.cc+176 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.h+83 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.cc+254 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.h+98 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgunzip.cc+73 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgzip.cc+79 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.cc+1285 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.h+285 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format_unittest.cc+1141 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest.proto+630 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_custom_options.proto+366 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto+50 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_empty.proto+37 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto+1046 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import.proto+61 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import_lite.proto+49 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite.proto+312 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto+43 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_mset.proto+72 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_no_generic_services.proto+52 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_optimize_for.proto+61 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.cc+204 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.h+268 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set_unittest.cc+512 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.cc+1069 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.h+304 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.cc+359 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.h+620 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite_inl.h+774 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_unittest.cc+905 TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/solaris/libstdc++.la+51 TMessagesProj/jni/third_party/dav1d+1 TMessagesProj/jni/third_party/ffmpeg+1 TMessagesProj/jni/third_party/libsrtp/CHANGES+227 TMessagesProj/jni/third_party/libsrtp/LIBSRTP_VERSION+1 TMessagesProj/jni/third_party/libsrtp/LICENSE+35 TMessagesProj/jni/third_party/libsrtp/OWNERS+2 TMessagesProj/jni/third_party/libsrtp/README.chromium+15 TMessagesProj/jni/third_party/libsrtp/README.md+487 TMessagesProj/jni/third_party/libsrtp/crypto/cipher/aes_gcm_ossl.c+578 TMessagesProj/jni/third_party/libsrtp/crypto/cipher/aes_icm_ossl.c+538 TMessagesProj/jni/third_party/libsrtp/crypto/cipher/cipher.c+677 TMessagesProj/jni/third_party/libsrtp/crypto/cipher/null_cipher.c+151 TMessagesProj/jni/third_party/libsrtp/crypto/hash/auth.c+185 TMessagesProj/jni/third_party/libsrtp/crypto/hash/hmac_ossl.c+271 TMessagesProj/jni/third_party/libsrtp/crypto/hash/null_auth.c+166 TMessagesProj/jni/third_party/libsrtp/crypto/include/aes.h+83 TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_gcm_ossl.h+62 TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_icm.h+62 TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_icm_ossl.h+61 TMessagesProj/jni/third_party/libsrtp/crypto/include/alloc.h+76 TMessagesProj/jni/third_party/libsrtp/crypto/include/auth.h+173 TMessagesProj/jni/third_party/libsrtp/crypto/include/cipher.h+248 TMessagesProj/jni/third_party/libsrtp/crypto/include/cipher_types.h+81 TMessagesProj/jni/third_party/libsrtp/crypto/include/config.h+30 TMessagesProj/jni/third_party/libsrtp/crypto/include/crypto_kernel.h+215 TMessagesProj/jni/third_party/libsrtp/crypto/include/crypto_types.h+116 TMessagesProj/jni/third_party/libsrtp/crypto/include/datatypes.h+379 TMessagesProj/jni/third_party/libsrtp/crypto/include/err.h+134 TMessagesProj/jni/third_party/libsrtp/crypto/include/integers.h+146 TMessagesProj/jni/third_party/libsrtp/crypto/include/key.h+88 TMessagesProj/jni/third_party/libsrtp/crypto/include/null_auth.h+73 TMessagesProj/jni/third_party/libsrtp/crypto/include/null_cipher.h+57 TMessagesProj/jni/third_party/libsrtp/crypto/include/rdb.h+125 TMessagesProj/jni/third_party/libsrtp/crypto/include/rdbx.h+209 TMessagesProj/jni/third_party/libsrtp/crypto/include/stat.h+66 TMessagesProj/jni/third_party/libsrtp/crypto/kernel/alloc.c+99 TMessagesProj/jni/third_party/libsrtp/crypto/kernel/crypto_kernel.c+559 TMessagesProj/jni/third_party/libsrtp/crypto/kernel/err.c+106 TMessagesProj/jni/third_party/libsrtp/crypto/kernel/key.c+120 TMessagesProj/jni/third_party/libsrtp/crypto/math/datatypes.c+488 TMessagesProj/jni/third_party/libsrtp/crypto/math/stat.c+211 TMessagesProj/jni/third_party/libsrtp/crypto/replay/rdb.c+135 TMessagesProj/jni/third_party/libsrtp/crypto/replay/rdbx.c+384 TMessagesProj/jni/third_party/libsrtp/crypto/replay/ut_sim.c+101 TMessagesProj/jni/third_party/libsrtp/crypto/test/cipher_driver.c+608 TMessagesProj/jni/third_party/libsrtp/crypto/test/datatypes_driver.c+228 TMessagesProj/jni/third_party/libsrtp/crypto/test/kernel_driver.c+125 TMessagesProj/jni/third_party/libsrtp/include/config.h+30 TMessagesProj/jni/third_party/libsrtp/include/ekt.h+181 TMessagesProj/jni/third_party/libsrtp/include/getopt_s.h+67 TMessagesProj/jni/third_party/libsrtp/include/srtp.h+1759 TMessagesProj/jni/third_party/libsrtp/include/srtp_priv.h+280 TMessagesProj/jni/third_party/libsrtp/include/ut_sim.h+83 TMessagesProj/jni/third_party/libsrtp/srtp/ekt.c+281 TMessagesProj/jni/third_party/libsrtp/srtp/srtp.c+4732 TMessagesProj/jni/third_party/libvpx+1 TMessagesProj/jni/third_party/libyuv+1 TMessagesProj/jni/third_party/openh264+1 TMessagesProj/jni/third_party/pffft/LICENSE+45 TMessagesProj/jni/third_party/pffft/OWNERS+4 TMessagesProj/jni/third_party/pffft/README.chromium+41 TMessagesProj/jni/third_party/pffft/README.md+69 TMessagesProj/jni/third_party/pffft/README.txt+379 TMessagesProj/jni/third_party/pffft/pffft_fuzzer.cc+85 TMessagesProj/jni/third_party/pffft/pffft_unittest.cc+196 TMessagesProj/jni/third_party/pffft/src/fftpack.c+3112 TMessagesProj/jni/third_party/pffft/src/fftpack.h+799 TMessagesProj/jni/third_party/pffft/src/pffft.c+1881 TMessagesProj/jni/third_party/pffft/src/pffft.h+198 TMessagesProj/jni/third_party/rnnoise/BUILD.gn+17 TMessagesProj/jni/third_party/rnnoise/COPYING+31 TMessagesProj/jni/third_party/rnnoise/OWNERS+3 TMessagesProj/jni/third_party/rnnoise/README.chromium+29 TMessagesProj/jni/third_party/rnnoise/src/rnn_activations.h+102 TMessagesProj/jni/third_party/rnnoise/src/rnn_vad_weights.cc+401 TMessagesProj/jni/third_party/rnnoise/src/rnn_vad_weights.h+37 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp.h+666 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_asconf.c+3517 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_asconf.h+94 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_auth.c+2302 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_auth.h+213 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_bsd_addr.c+990 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_bsd_addr.h+72 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_callout.c+249 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_callout.h+119 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_cc_functions.c+2493 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_constants.h+1070 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_crc32.c+831 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_crc32.h+56 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_header.h+595 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_indata.c+5800 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_indata.h+121 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_input.c+6411 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_input.h+66 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_lock_userspace.h+248 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_os.h+89 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_os_userspace.h+1144 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_output.c+15035 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_output.h+240 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_pcb.c+8078 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_pcb.h+882 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_peeloff.c+302 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_peeloff.h+70 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_process_lock.h+692 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sha1.c+347 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sha1.h+94 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_ss_functions.c+1126 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_structs.h+1288 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sysctl.c+1625 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sysctl.h+627 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_timer.c+1641 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_timer.h+103 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_uio.h+1352 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_userspace.c+444 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_usrreq.c+9039 TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_var.h+443 TMessagesProj/jni/third_party/usrsctplib/netinet/sctputil.c+8710 TMessagesProj/jni/third_party/usrsctplib/netinet/sctputil.h+417 TMessagesProj/jni/third_party/usrsctplib/netinet6/sctp6_usrreq.c+1851 TMessagesProj/jni/third_party/usrsctplib/netinet6/sctp6_var.h+81 TMessagesProj/jni/third_party/usrsctplib/user_atomic.h+315 TMessagesProj/jni/third_party/usrsctplib/user_environment.c+384 TMessagesProj/jni/third_party/usrsctplib/user_environment.h+123 TMessagesProj/jni/third_party/usrsctplib/user_inpcb.h+373 TMessagesProj/jni/third_party/usrsctplib/user_ip6_var.h+124 TMessagesProj/jni/third_party/usrsctplib/user_ip_icmp.h+225 TMessagesProj/jni/third_party/usrsctplib/user_malloc.h+203 TMessagesProj/jni/third_party/usrsctplib/user_mbuf.c+1557 TMessagesProj/jni/third_party/usrsctplib/user_mbuf.h+407 TMessagesProj/jni/third_party/usrsctplib/user_queue.h+639 TMessagesProj/jni/third_party/usrsctplib/user_recv_thread.c+1566 TMessagesProj/jni/third_party/usrsctplib/user_recv_thread.h+34 TMessagesProj/jni/third_party/usrsctplib/user_route.h+130 TMessagesProj/jni/third_party/usrsctplib/user_socket.c+3584 TMessagesProj/jni/third_party/usrsctplib/user_socketvar.h+527 TMessagesProj/jni/third_party/usrsctplib/user_uma.h+96 TMessagesProj/jni/third_party/usrsctplib/usrsctp.h+1321 TMessagesProj/jni/third_party/wamr+1 TMessagesProj/jni/third_party/xiph/ogg+1 TMessagesProj/jni/third_party/xiph/opus+1 TMessagesProj/jni/third_party/xiph/opusfile+1 TMessagesProj/jni/tlottie+1 TMessagesProj/jni/utilities.cpp+56 TMessagesProj/jni/voip/CMakeLists.txt+1727 TMessagesProj/jni/voip/ReferenceCoreEmbedded.cpp+5228 TMessagesProj/jni/voip/org_telegram_messenger_voip_Instance.cpp+1401 TMessagesProj/jni/voip/org_telegram_messenger_voip_Instance.h+64 TMessagesProj/jni/voip/rnnoise/AUTHORS+1 TMessagesProj/jni/voip/rnnoise/COPYING+31 TMessagesProj/jni/voip/rnnoise/README+21 TMessagesProj/jni/voip/rnnoise/include/rnnoise.h+114 TMessagesProj/jni/voip/rnnoise/src/_kiss_fft_guts.h+182 TMessagesProj/jni/voip/rnnoise/src/arch.h+261 TMessagesProj/jni/voip/rnnoise/src/celt_lpc.c+279 TMessagesProj/jni/voip/rnnoise/src/celt_lpc.h+59 TMessagesProj/jni/voip/rnnoise/src/common.h+48 TMessagesProj/jni/voip/rnnoise/src/denoise.c+646 TMessagesProj/jni/voip/rnnoise/src/kiss_fft.c+601 TMessagesProj/jni/voip/rnnoise/src/kiss_fft.h+203 TMessagesProj/jni/voip/rnnoise/src/opus_types.h+159 TMessagesProj/jni/voip/rnnoise/src/pitch.c+526 TMessagesProj/jni/voip/rnnoise/src/pitch.h+149 TMessagesProj/jni/voip/rnnoise/src/rnn.c+178 TMessagesProj/jni/voip/rnnoise/src/rnn.h+69 TMessagesProj/jni/voip/rnnoise/src/rnn_data.c+11051 TMessagesProj/jni/voip/rnnoise/src/rnn_data.h+34 TMessagesProj/jni/voip/rnnoise/src/rnn_reader.c+168 TMessagesProj/jni/voip/rnnoise/src/tansig_table.h+45 TMessagesProj/jni/voip/tgcalls/AudioDeviceHelper.cpp+142 TMessagesProj/jni/voip/tgcalls/AudioDeviceHelper.h+17 TMessagesProj/jni/voip/tgcalls/AudioFrame.h+17 TMessagesProj/jni/voip/tgcalls/ChannelManager.cpp+161 TMessagesProj/jni/voip/tgcalls/ChannelManager.h+95 TMessagesProj/jni/voip/tgcalls/CodecSelectHelper.cpp+303 TMessagesProj/jni/voip/tgcalls/CodecSelectHelper.h+32 TMessagesProj/jni/voip/tgcalls/CryptoHelper.cpp+61 TMessagesProj/jni/voip/tgcalls/CryptoHelper.h+69 TMessagesProj/jni/voip/tgcalls/DirectConnectionChannel.h+22 TMessagesProj/jni/voip/tgcalls/EncryptedConnection.cpp+808 TMessagesProj/jni/voip/tgcalls/EncryptedConnection.h+113 TMessagesProj/jni/voip/tgcalls/FakeAudioDeviceModule.cpp+257 TMessagesProj/jni/voip/tgcalls/FakeAudioDeviceModule.h+55 TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.cpp+173 TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.h+36 TMessagesProj/jni/voip/tgcalls/FieldTrialsConfig.cpp+7 TMessagesProj/jni/voip/tgcalls/FieldTrialsConfig.h+12 TMessagesProj/jni/voip/tgcalls/Instance.cpp+66 TMessagesProj/jni/voip/tgcalls/Instance.h+293 TMessagesProj/jni/voip/tgcalls/InstanceImpl.cpp+202 TMessagesProj/jni/voip/tgcalls/InstanceImpl.h+57 TMessagesProj/jni/voip/tgcalls/LogSinkImpl.cpp+71 TMessagesProj/jni/voip/tgcalls/LogSinkImpl.h+31 TMessagesProj/jni/voip/tgcalls/Manager.cpp+465 TMessagesProj/jni/voip/tgcalls/Manager.h+94 TMessagesProj/jni/voip/tgcalls/MediaManager.cpp+1173 TMessagesProj/jni/voip/tgcalls/MediaManager.h+195 TMessagesProj/jni/voip/tgcalls/Message.cpp+406 TMessagesProj/jni/voip/tgcalls/Message.h+149 TMessagesProj/jni/voip/tgcalls/NetworkManager.cpp+397 TMessagesProj/jni/voip/tgcalls/NetworkManager.h+123 TMessagesProj/jni/voip/tgcalls/PlatformContext.h+15 TMessagesProj/jni/voip/tgcalls/SctpDataChannelProviderInterfaceImpl.cpp+160 TMessagesProj/jni/voip/tgcalls/SctpDataChannelProviderInterfaceImpl.h+74 TMessagesProj/jni/voip/tgcalls/StaticThreads.cpp+144 TMessagesProj/jni/voip/tgcalls/StaticThreads.h+31 TMessagesProj/jni/voip/tgcalls/Stats.h+30 TMessagesProj/jni/voip/tgcalls/ThreadLocalObject.cpp+1 TMessagesProj/jni/voip/tgcalls/ThreadLocalObject.h+58 TMessagesProj/jni/voip/tgcalls/TurnCustomizerImpl.cpp+21 TMessagesProj/jni/voip/tgcalls/TurnCustomizerImpl.h+19 TMessagesProj/jni/voip/tgcalls/VideoCaptureInterface.cpp+15 TMessagesProj/jni/voip/tgcalls/VideoCaptureInterface.h+62 TMessagesProj/jni/voip/tgcalls/VideoCaptureInterfaceImpl.cpp+227 TMessagesProj/jni/voip/tgcalls/VideoCaptureInterfaceImpl.h+76 TMessagesProj/jni/voip/tgcalls/VideoCapturerInterface.h+42 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSource.cpp+68 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSource.h+85 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp+461 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.h+56 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp+65 TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceManager.h+49 TMessagesProj/jni/voip/tgcalls/group/AVIOContextImpl.cpp+64 TMessagesProj/jni/voip/tgcalls/group/AVIOContextImpl.h+40 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.cpp+181 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.h+45 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartInternal.cpp+404 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartInternal.h+65 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp+138 TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartPersistentDecoder.h+51 TMessagesProj/jni/voip/tgcalls/group/GroupAudioCapturePostProcessor.cpp+198 TMessagesProj/jni/voip/tgcalls/group/GroupAudioCapturePostProcessor.h+91 TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformer.cpp+574 TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformer.h+156 TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformerTest.cpp+255 TMessagesProj/jni/voip/tgcalls/group/GroupInstanceCustomImpl.cpp+3949 TMessagesProj/jni/voip/tgcalls/group/GroupInstanceCustomImpl.h+60 TMessagesProj/jni/voip/tgcalls/group/GroupInstanceImpl.h+239 TMessagesProj/jni/voip/tgcalls/group/GroupInstanceReferenceImpl.cpp+2538 TMessagesProj/jni/voip/tgcalls/group/GroupInstanceReferenceImpl.h+58 TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayload.h+78 TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayloadInternal.cpp+373 TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayloadInternal.h+32 TMessagesProj/jni/voip/tgcalls/group/GroupNetworkManager.cpp+680 TMessagesProj/jni/voip/tgcalls/group/GroupNetworkManager.h+134 TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRenderer.cpp+53 TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRenderer.h+49 TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRendererTest.cpp+125 TMessagesProj/jni/voip/tgcalls/group/StreamingMediaContext.cpp+1106 TMessagesProj/jni/voip/tgcalls/group/StreamingMediaContext.h+53 TMessagesProj/jni/voip/tgcalls/group/VideoStreamingPart.cpp+925 TMessagesProj/jni/voip/tgcalls/group/VideoStreamingPart.h+78 TMessagesProj/jni/voip/tgcalls/platform/PlatformInterface.h+364 TMessagesProj/jni/voip/tgcalls/platform/android/AndroidContext.cpp+61 TMessagesProj/jni/voip/tgcalls/platform/android/AndroidContext.h+39 TMessagesProj/jni/voip/tgcalls/platform/android/AndroidInterface.cpp+167 TMessagesProj/jni/voip/tgcalls/platform/android/AndroidInterface.h+29 TMessagesProj/jni/voip/tgcalls/platform/android/VideoCameraCapturer.cpp+62 TMessagesProj/jni/voip/tgcalls/platform/android/VideoCameraCapturer.h+45 TMessagesProj/jni/voip/tgcalls/platform/android/VideoCapturerInterfaceImpl.cpp+31 TMessagesProj/jni/voip/tgcalls/platform/android/VideoCapturerInterfaceImpl.h+27 TMessagesProj/jni/voip/tgcalls/platform/darwin/AudioDeviceModuleIOS.h+40 TMessagesProj/jni/voip/tgcalls/platform/darwin/AudioDeviceModuleMacos.h+32 TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomExternalCapturer.h+22 TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomExternalCapturer.mm+90 TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomSimulcastEncoderAdapter.cpp+1017 TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomSimulcastEncoderAdapter.h+201 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinFFMpeg.h+13 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinFFMpeg.mm+45 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinInterface.h+40 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinInterface.mm+158 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinVideoSource.h+57 TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinVideoSource.mm+165 TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopCaptureSourceViewMac.h+55 TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopCaptureSourceViewMac.mm+207 TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopSharingCapturer.h+27 TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopSharingCapturer.mm+117 TMessagesProj/jni/voip/tgcalls/platform/darwin/ExtractCVPixelBuffer.h+12 TMessagesProj/jni/voip/tgcalls/platform/darwin/ExtractCVPixelBuffer.mm+14 TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265+Private.h+25 TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265.h+28 TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265.mm+27 TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCH265ProfileLevelId.h+16 TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCH265ProfileLevelId.mm+18 TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueue.h+19 TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueue.m+124 TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueueLocalObject.h+19 TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueueLocalObject.m+40 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIOCapturer.h+29 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIOCapturer.m+45 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIODevice.h+31 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIODevice.mm+193 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCCVPixelBuffer.h+15 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCCVPixelBuffer.mm+28 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.h+25 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm+116 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.h+32 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm+172 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH264.h+18 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH264.mm+292 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH265.h+23 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH265.mm+359 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH264.h+22 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH264.mm+852 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH265.h+40 TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH265.mm+624 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCMIOCapture.h+18 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCMIOCapture.mm+237 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturer.h+33 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturer.mm+941 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturerMac.h+35 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturerMac.mm+725 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCaptureView.h+33 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCaptureView.mm+264 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCapturerInterfaceImpl.h+41 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCapturerInterfaceImpl.mm+480 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalView.h+37 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalView.mm+459 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalViewMac.h+41 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalViewMac.mm+503 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferView.h+35 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferView.mm+786 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferViewMac.h+36 TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferViewMac.mm+427 TMessagesProj/jni/voip/tgcalls/platform/darwin/h264_encoder_impl.cpp+349 TMessagesProj/jni/voip/tgcalls/platform/darwin/h264_encoder_impl.h+81 TMessagesProj/jni/voip/tgcalls/platform/darwin/h265_nalu_rewriter.cc+406 TMessagesProj/jni/voip/tgcalls/platform/darwin/h265_nalu_rewriter.h+54 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/CallAudioTone.h+48 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession+Configuration.mm+184 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession+Private.h+95 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession.h+266 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession.mm+1000 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSessionConfiguration.h+47 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSessionConfiguration.mm+137 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCNativeAudioSessionDelegateAdapter.h+33 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCNativeAudioSessionDelegateAdapter.mm+89 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_ios.h+329 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_ios.mm+1210 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_module_ios.h+161 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_module_ios.mm+756 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_voice_processing_audio_unit.h+149 TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_voice_processing_audio_unit.mm+544 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLI420Renderer.h+17 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLI420Renderer.mm+111 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer+Private.h+33 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer.h+49 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer.mm+647 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMetalContextHolder.h+25 TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMetalContextHolder.m+136 TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_decoder_factory.h+41 TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_decoder_factory.mm+126 TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_encoder_factory.h+61 TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_encoder_factory.mm+240 TMessagesProj/jni/voip/tgcalls/platform/fake/FakeInterface.cpp+172 TMessagesProj/jni/voip/tgcalls/platform/fake/FakeInterface.h+30 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/DesktopInterface.cpp+56 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/DesktopInterface.h+22 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCameraCapturer.cpp+253 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCameraCapturer.h+57 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerInterfaceImpl.cpp+145 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerInterfaceImpl.h+55 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerTrackSource.cpp+19 TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerTrackSource.h+30 TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpContext.h+28 TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpScreenCapturer.cpp+397 TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpScreenCapturer.h+84 TMessagesProj/jni/voip/tgcalls/third-party/json11.cpp+791 TMessagesProj/jni/voip/tgcalls/third-party/json11.hpp+232 TMessagesProj/jni/voip/tgcalls/utils/gzip.cpp+183 TMessagesProj/jni/voip/tgcalls/utils/gzip.h+16 TMessagesProj/jni/voip/tgcalls/v2/ContentNegotiation.cpp+649 TMessagesProj/jni/voip/tgcalls/v2/ContentNegotiation.h+100 TMessagesProj/jni/voip/tgcalls/v2/CustomDcSctpSocket.cpp+1827 TMessagesProj/jni/voip/tgcalls/v2/CustomDcSctpSocket.h+301 TMessagesProj/jni/voip/tgcalls/v2/CustomParameters.h+48 TMessagesProj/jni/voip/tgcalls/v2/DirectNetworkingImpl.cpp+600 TMessagesProj/jni/voip/tgcalls/v2/DirectNetworkingImpl.h+120 TMessagesProj/jni/voip/tgcalls/v2/ExternalSignalingConnection.cpp+30 TMessagesProj/jni/voip/tgcalls/v2/ExternalSignalingConnection.h+33 TMessagesProj/jni/voip/tgcalls/v2/InstanceNetworking.h+173 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2CompatImpl.cpp+1733 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2CompatImpl.h+62 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2Impl.cpp+2412 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2Impl.h+60 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2ReferenceImpl.cpp+2054 TMessagesProj/jni/voip/tgcalls/v2/InstanceV2ReferenceImpl.h+60 TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransport.cpp+338 TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransport.h+110 TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransportTest.cpp+471 TMessagesProj/jni/voip/tgcalls/v2/NativeNetworkingImpl.cpp+1062 TMessagesProj/jni/voip/tgcalls/v2/NativeNetworkingImpl.h+143 TMessagesProj/jni/voip/tgcalls/v2/RawTcpSocket.cpp+111 TMessagesProj/jni/voip/tgcalls/v2/RawTcpSocket.h+53 TMessagesProj/jni/voip/tgcalls/v2/ReflectorPort.cpp+965 TMessagesProj/jni/voip/tgcalls/v2/ReflectorPort.h+256 TMessagesProj/jni/voip/tgcalls/v2/ReflectorRelayPortFactory.cpp+82 TMessagesProj/jni/voip/tgcalls/v2/ReflectorRelayPortFactory.h+39 TMessagesProj/jni/voip/tgcalls/v2/Signaling.cpp+988 TMessagesProj/jni/voip/tgcalls/v2/Signaling.h+196 TMessagesProj/jni/voip/tgcalls/v2/SignalingConnection.cpp+8 TMessagesProj/jni/voip/tgcalls/v2/SignalingConnection.h+27 TMessagesProj/jni/voip/tgcalls/v2/SignalingEncryption.cpp+22 TMessagesProj/jni/voip/tgcalls/v2/SignalingEncryption.h+24 TMessagesProj/jni/voip/tgcalls/v2/SignalingSctpConnection.cpp+234 TMessagesProj/jni/voip/tgcalls/v2/SignalingSctpConnection.h+85 TMessagesProj/jni/voip/tgcalls/v2/SignalingTranslator.cpp+271 TMessagesProj/jni/voip/tgcalls/v2/SignalingTranslator.h+70 TMessagesProj/jni/voip/tgcalls/v2_4_0_0/Signaling_4_0_0.cpp+703 TMessagesProj/jni/voip/tgcalls/v2_4_0_0/Signaling_4_0_0.h+106 TMessagesProj/jni/voip/tgcalls/v2wasm/CLAUDE.md+157 TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreABI.h+240 TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreBackend.h+28 TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreHost.cpp+1794 TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreHost.h+176 TMessagesProj/jni/voip/tgcalls/v2wasm/CoreBase64.h+98 TMessagesProj/jni/voip/tgcalls/v2wasm/CoreFactory.h+24 TMessagesProj/jni/voip/tgcalls/v2wasm/CoreGzip.cpp+46 TMessagesProj/jni/voip/tgcalls/v2wasm/CoreGzip.h+29 TMessagesProj/jni/voip/tgcalls/v2wasm/EmbeddedCoreModule.h+21 TMessagesProj/jni/voip/tgcalls/v2wasm/HostCompressionService.cpp+44 TMessagesProj/jni/voip/tgcalls/v2wasm/InstanceV2PumpImpl.cpp+148 TMessagesProj/jni/voip/tgcalls/v2wasm/InstanceV2PumpImpl.h+59 TMessagesProj/jni/voip/tgcalls/v2wasm/NativeCoreBackend.cpp+33 TMessagesProj/jni/voip/tgcalls/v2wasm/NativeCoreBackend.h+26 TMessagesProj/jni/voip/tgcalls/v2wasm/ReferenceCallCore.cpp+663 TMessagesProj/jni/voip/tgcalls/v2wasm/ReferenceCallCore.h+111 TMessagesProj/jni/voip/tgcalls/v2wasm/SignalingFraming.cpp+61 TMessagesProj/jni/voip/tgcalls/v2wasm/SignalingFraming.h+42 TMessagesProj/jni/voip/tgcalls/v2wasm/VariantCallCore.cpp+234 TMessagesProj/jni/voip/tgcalls/v2wasm/VariantCallCore.h+51 TMessagesProj/jni/voip/tgcalls/v2wasm/WamrCoreBackend.cpp+223 TMessagesProj/jni/voip/tgcalls/v2wasm/WamrCoreBackend.h+63 TMessagesProj/jni/voip/tgcalls/v2wasm/reference_core_factory.cpp+14 TMessagesProj/jni/voip/tgcalls/v2wasm/variant_core_factory.cpp+15 TMessagesProj/jni/voip/tgcalls/v2wasm/wasm_module_entry.cpp+61 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c.cc+39 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64.cc+123 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64.h+25 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64_check.h+66 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64_unittest.cc+24 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_benchmark.cc+104 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_capi_unittest.c+66 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_extend_unittests.h+112 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_internal.h+23 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_portable.cc+351 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_portable_unittest.cc+20 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_prefetch.h+44 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_prefetch_unittest.cc+9 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_read_le.h+51 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_read_le_unittest.cc+32 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_round_up.h+34 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_round_up_unittest.cc+84 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42.cc+256 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42.h+31 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42_check.h+48 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42_unittest.cc+24 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_test_main.cc+20 TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_unittest.cc+129 TMessagesProj/jni/voip/third_party/crc32c/src/include/crc32c/crc32c.h+89 TMessagesProj/jni/voip/third_party/crc32c/src/include/crc32c/crc32c_config.h+43 TMessagesProj/jni/voip/third_party/jni_zero/LICENSE+27 TMessagesProj/jni/voip/third_party/jni_zero/OWNERS+2 TMessagesProj/jni/voip/third_party/jni_zero/checkdiscard_proguard.flags+12 TMessagesProj/jni/voip/third_party/jni_zero/core.cc+255 TMessagesProj/jni/voip/third_party/jni_zero/core.h+125 TMessagesProj/jni/voip/third_party/jni_zero/generate_jni/JniInit_jni.h+49 TMessagesProj/jni/voip/third_party/jni_zero/generate_jni/JniUtil_jni.h+63 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/AccessedByNative.java+17 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNative.java+28 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNativeForTesting.java+26 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNativeUnchecked.java+29 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CheckDiscard.java+25 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/JNINamespace.java+20 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/JniStaticTestMocker.java+15 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeClassQualifiedName.java+25 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeLibraryLoadedStatus.java+44 TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeMethods.java+20 TMessagesProj/jni/voip/third_party/jni_zero/jni_export.h+24 TMessagesProj/jni/voip/third_party/jni_zero/jni_int_wrapper.h+58 TMessagesProj/jni/voip/third_party/jni_zero/jni_zero_helper.h+117 TMessagesProj/jni/voip/third_party/jni_zero/logging.cc+76 TMessagesProj/jni/voip/third_party/jni_zero/logging.h+90 TMessagesProj/jni/voip/third_party/jni_zero/proguard.flags+14 TMessagesProj/jni/voip/third_party/jni_zero/proguard_for_test.flags+7 TMessagesProj/jni/voip/third_party/jni_zero/scoped_java_ref.cc+93 TMessagesProj/jni/voip/third_party/jni_zero/scoped_java_ref.h+534 TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Arrays_jni.h+4578 TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Collection_jni.h+385 TMessagesProj/jni/voip/third_party/jni_zero/system_jni/List_jni.h+994 TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Map_jni.h+950 TMessagesProj/jni/voip/third_party/libevent/ChangeLog+253 TMessagesProj/jni/voip/third_party/libevent/LICENSE+53 TMessagesProj/jni/voip/third_party/libevent/README+57 TMessagesProj/jni/voip/third_party/libevent/README.chromium+40 TMessagesProj/jni/voip/third_party/libevent/buffer.c+552 TMessagesProj/jni/voip/third_party/libevent/config.h+266 TMessagesProj/jni/voip/third_party/libevent/devpoll.c+416 TMessagesProj/jni/voip/third_party/libevent/epoll.c+376 TMessagesProj/jni/voip/third_party/libevent/epoll_sub.c+52 TMessagesProj/jni/voip/third_party/libevent/evbuffer.c+453 TMessagesProj/jni/voip/third_party/libevent/evdns.3+322 TMessagesProj/jni/voip/third_party/libevent/evdns.c+3196 TMessagesProj/jni/voip/third_party/libevent/evdns.h+528 TMessagesProj/jni/voip/third_party/libevent/event-config.h+281 TMessagesProj/jni/voip/third_party/libevent/event-internal.h+101 TMessagesProj/jni/voip/third_party/libevent/event.3+624 TMessagesProj/jni/voip/third_party/libevent/event.c+998 TMessagesProj/jni/voip/third_party/libevent/event.h+1212 TMessagesProj/jni/voip/third_party/libevent/event_rpcgen.py+1423 TMessagesProj/jni/voip/third_party/libevent/event_tagging.c+441 TMessagesProj/jni/voip/third_party/libevent/evhttp.h+375 TMessagesProj/jni/voip/third_party/libevent/evport.c+517 TMessagesProj/jni/voip/third_party/libevent/evrpc-internal.h+87 TMessagesProj/jni/voip/third_party/libevent/evrpc.c+656 TMessagesProj/jni/voip/third_party/libevent/evrpc.h+486 TMessagesProj/jni/voip/third_party/libevent/evsignal.h+52 TMessagesProj/jni/voip/third_party/libevent/evutil.c+283 TMessagesProj/jni/voip/third_party/libevent/evutil.h+186 TMessagesProj/jni/voip/third_party/libevent/http-internal.h+153 TMessagesProj/jni/voip/third_party/libevent/http.c+2883 TMessagesProj/jni/voip/third_party/libevent/kqueue.c+432 TMessagesProj/jni/voip/third_party/libevent/log.c+185 TMessagesProj/jni/voip/third_party/libevent/log.h+51 TMessagesProj/jni/voip/third_party/libevent/min_heap.h+149 TMessagesProj/jni/voip/third_party/libevent/poll.c+378 TMessagesProj/jni/voip/third_party/libevent/select.c+363 TMessagesProj/jni/voip/third_party/libevent/signal.c+376 TMessagesProj/jni/voip/third_party/libevent/stamp-h.in+1 TMessagesProj/jni/voip/third_party/libevent/strlcpy-internal.h+21 TMessagesProj/jni/voip/third_party/libevent/strlcpy.c+74 TMessagesProj/jni/voip/webrtc/api/OWNERS+14 TMessagesProj/jni/voip/webrtc/api/README.md+37 TMessagesProj/jni/voip/webrtc/api/adaptation/BUILD.gn+23 TMessagesProj/jni/voip/webrtc/api/adaptation/DEPS+7 TMessagesProj/jni/voip/webrtc/api/adaptation/resource.cc+33 TMessagesProj/jni/voip/webrtc/api/adaptation/resource.h+67 TMessagesProj/jni/voip/webrtc/api/array_view.h+334 TMessagesProj/jni/voip/webrtc/api/array_view_unittest.cc+630 TMessagesProj/jni/voip/webrtc/api/async_dns_resolver.h+105 TMessagesProj/jni/voip/webrtc/api/audio/BUILD.gn+93 TMessagesProj/jni/voip/webrtc/api/audio/OWNERS+2 TMessagesProj/jni/voip/webrtc/api/audio/audio_frame.cc+140 TMessagesProj/jni/voip/webrtc/api/audio/audio_frame.h+173 TMessagesProj/jni/voip/webrtc/api/audio/audio_frame_processor.h+43 TMessagesProj/jni/voip/webrtc/api/audio/audio_mixer.h+80 TMessagesProj/jni/voip/webrtc/api/audio/channel_layout.cc+282 TMessagesProj/jni/voip/webrtc/api/audio/channel_layout.h+165 TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_config.cc+278 TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_config.h+250 TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_factory.cc+32 TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_factory.h+41 TMessagesProj/jni/voip/webrtc/api/audio/echo_control.h+75 TMessagesProj/jni/voip/webrtc/api/audio/echo_detector_creator.cc+21 TMessagesProj/jni/voip/webrtc/api/audio/echo_detector_creator.h+26 TMessagesProj/jni/voip/webrtc/api/audio/test/BUILD.gn+29 TMessagesProj/jni/voip/webrtc/api/audio/test/audio_frame_unittest.cc+136 TMessagesProj/jni/voip/webrtc/api/audio/test/echo_canceller3_config_unittest.cc+46 TMessagesProj/jni/voip/webrtc/api/audio_codecs/BUILD.gn+147 TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/BUILD.gn+55 TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_decoder_L16.cc+49 TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_decoder_L16.h+49 TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_encoder_L16.cc+76 TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_encoder_L16.h+54 TMessagesProj/jni/voip/webrtc/api/audio_codecs/OWNERS+3 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_codec_pair_id.cc+91 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_codec_pair_id.h+74 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder.cc+169 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder.h+195 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder_factory.h+53 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder_factory_template.h+145 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder.cc+114 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder.h+269 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder_factory.h+62 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder_factory_template.h+163 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_format.cc+86 TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_format.h+135 TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_decoder_factory.cc+68 TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_decoder_factory.h+28 TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_encoder_factory.cc+74 TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_encoder_factory.h+28 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/BUILD.gn+55 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_decoder_g711.cc+67 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_decoder_g711.h+49 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_encoder_g711.cc+95 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_encoder_g711.h+54 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/BUILD.gn+62 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_decoder_g722.cc+56 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_decoder_g722.h+43 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722.cc+74 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722.h+44 TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722_config.h+29 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/BUILD.gn+58 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.cc+42 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h+39 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.cc+88 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.h+43 TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config.h+28 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/BUILD.gn+110 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus.cc+71 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus.h+42 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus_config.h+66 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_opus.cc+86 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_opus.h+44 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus.cc+75 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus.h+43 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.cc+107 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.h+66 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus.cc+44 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus.h+44 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.cc+75 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h+74 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_decoder_factory.cc+49 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_decoder_factory.h+26 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_encoder_factory.cc+54 TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_encoder_factory.h+26 TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/BUILD.gn+39 TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc+222 TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc+224 TMessagesProj/jni/voip/webrtc/api/audio_options.cc+104 TMessagesProj/jni/voip/webrtc/api/audio_options.h+75 TMessagesProj/jni/voip/webrtc/api/call/audio_sink.h+48 TMessagesProj/jni/voip/webrtc/api/call/bitrate_allocation.h+45 TMessagesProj/jni/voip/webrtc/api/call/transport.cc+23 TMessagesProj/jni/voip/webrtc/api/call/transport.h+58 TMessagesProj/jni/voip/webrtc/api/candidate.cc+219 TMessagesProj/jni/voip/webrtc/api/candidate.h+255 TMessagesProj/jni/voip/webrtc/api/candidate_unittest.cc+56 TMessagesProj/jni/voip/webrtc/api/create_peerconnection_factory.cc+75 TMessagesProj/jni/voip/webrtc/api/create_peerconnection_factory.h+57 TMessagesProj/jni/voip/webrtc/api/crypto/BUILD.gn+49 TMessagesProj/jni/voip/webrtc/api/crypto/crypto_options.cc+89 TMessagesProj/jni/voip/webrtc/api/crypto/crypto_options.h+72 TMessagesProj/jni/voip/webrtc/api/crypto/frame_decryptor_interface.h+76 TMessagesProj/jni/voip/webrtc/api/crypto/frame_encryptor_interface.h+54 TMessagesProj/jni/voip/webrtc/api/data_channel_interface.cc+62 TMessagesProj/jni/voip/webrtc/api/data_channel_interface.h+227 TMessagesProj/jni/voip/webrtc/api/dtls_transport_interface.cc+73 TMessagesProj/jni/voip/webrtc/api/dtls_transport_interface.h+124 TMessagesProj/jni/voip/webrtc/api/dtmf_sender_interface.h+125 TMessagesProj/jni/voip/webrtc/api/enable_media.cc+71 TMessagesProj/jni/voip/webrtc/api/enable_media.h+27 TMessagesProj/jni/voip/webrtc/api/enable_media_with_defaults.cc+46 TMessagesProj/jni/voip/webrtc/api/enable_media_with_defaults.h+28 TMessagesProj/jni/voip/webrtc/api/environment/BUILD.gn+63 TMessagesProj/jni/voip/webrtc/api/environment/OWNERS+15 TMessagesProj/jni/voip/webrtc/api/environment/environment.h+148 TMessagesProj/jni/voip/webrtc/api/environment/environment_factory.cc+123 TMessagesProj/jni/voip/webrtc/api/environment/environment_factory.h+148 TMessagesProj/jni/voip/webrtc/api/environment/environment_unittest.cc+275 TMessagesProj/jni/voip/webrtc/api/fec_controller.h+98 TMessagesProj/jni/voip/webrtc/api/fec_controller_override.h+28 TMessagesProj/jni/voip/webrtc/api/field_trials.cc+107 TMessagesProj/jni/voip/webrtc/api/field_trials.h+59 TMessagesProj/jni/voip/webrtc/api/field_trials_registry.cc+35 TMessagesProj/jni/voip/webrtc/api/field_trials_registry.h+54 TMessagesProj/jni/voip/webrtc/api/field_trials_unittest.cc+152 TMessagesProj/jni/voip/webrtc/api/field_trials_view.h+46 TMessagesProj/jni/voip/webrtc/api/frame_transformer_factory.cc+40 TMessagesProj/jni/voip/webrtc/api/frame_transformer_factory.h+41 TMessagesProj/jni/voip/webrtc/api/frame_transformer_interface.h+125 TMessagesProj/jni/voip/webrtc/api/function_view.h+130 TMessagesProj/jni/voip/webrtc/api/function_view_unittest.cc+176 TMessagesProj/jni/voip/webrtc/api/g3doc/index.md+51 TMessagesProj/jni/voip/webrtc/api/g3doc/threading_design.md+74 TMessagesProj/jni/voip/webrtc/api/ice_transport_factory.cc+67 TMessagesProj/jni/voip/webrtc/api/ice_transport_factory.h+47 TMessagesProj/jni/voip/webrtc/api/ice_transport_interface.h+137 TMessagesProj/jni/voip/webrtc/api/jsep.cc+57 TMessagesProj/jni/voip/webrtc/api/jsep.h+254 TMessagesProj/jni/voip/webrtc/api/jsep_ice_candidate.cc+76 TMessagesProj/jni/voip/webrtc/api/jsep_ice_candidate.h+90 TMessagesProj/jni/voip/webrtc/api/jsep_session_description.h+88 TMessagesProj/jni/voip/webrtc/api/legacy_stats_types.cc+879 TMessagesProj/jni/voip/webrtc/api/legacy_stats_types.h+478 TMessagesProj/jni/voip/webrtc/api/location.h+31 TMessagesProj/jni/voip/webrtc/api/make_ref_counted.h+120 TMessagesProj/jni/voip/webrtc/api/media_stream_interface.cc+39 TMessagesProj/jni/voip/webrtc/api/media_stream_interface.h+376 TMessagesProj/jni/voip/webrtc/api/media_stream_track.h+64 TMessagesProj/jni/voip/webrtc/api/media_types.cc+37 TMessagesProj/jni/voip/webrtc/api/media_types.h+44 TMessagesProj/jni/voip/webrtc/api/metronome/BUILD.gn+19 TMessagesProj/jni/voip/webrtc/api/metronome/metronome.h+47 TMessagesProj/jni/voip/webrtc/api/metronome/test/BUILD.gn+23 TMessagesProj/jni/voip/webrtc/api/metronome/test/fake_metronome.cc+72 TMessagesProj/jni/voip/webrtc/api/metronome/test/fake_metronome.h+62 TMessagesProj/jni/voip/webrtc/api/neteq/BUILD.gn+95 TMessagesProj/jni/voip/webrtc/api/neteq/DEPS+14 TMessagesProj/jni/voip/webrtc/api/neteq/OWNERS+3 TMessagesProj/jni/voip/webrtc/api/neteq/custom_neteq_factory.cc+34 TMessagesProj/jni/voip/webrtc/api/neteq/custom_neteq_factory.h+44 TMessagesProj/jni/voip/webrtc/api/neteq/default_neteq_controller_factory.cc+26 TMessagesProj/jni/voip/webrtc/api/neteq/default_neteq_controller_factory.h+34 TMessagesProj/jni/voip/webrtc/api/neteq/neteq.cc+36 TMessagesProj/jni/voip/webrtc/api/neteq/neteq.h+314 TMessagesProj/jni/voip/webrtc/api/neteq/neteq_controller.h+189 TMessagesProj/jni/voip/webrtc/api/neteq/neteq_controller_factory.h+32 TMessagesProj/jni/voip/webrtc/api/neteq/neteq_factory.h+37 TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer.cc+25 TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer.h+112 TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer_unittest.cc+135 TMessagesProj/jni/voip/webrtc/api/network_state_predictor.h+56 TMessagesProj/jni/voip/webrtc/api/notifier.h+69 TMessagesProj/jni/voip/webrtc/api/numerics/BUILD.gn+41 TMessagesProj/jni/voip/webrtc/api/numerics/DEPS+6 TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter.cc+101 TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter.h+132 TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter_unittest.cc+222 TMessagesProj/jni/voip/webrtc/api/packet_socket_factory.h+84 TMessagesProj/jni/voip/webrtc/api/peer_connection_interface.cc+115 TMessagesProj/jni/voip/webrtc/api/peer_connection_interface.h+1717 TMessagesProj/jni/voip/webrtc/api/priority.h+26 TMessagesProj/jni/voip/webrtc/api/ref_count.h+67 TMessagesProj/jni/voip/webrtc/api/ref_counted_base.h+98 TMessagesProj/jni/voip/webrtc/api/rtc_error.cc+82 TMessagesProj/jni/voip/webrtc/api/rtc_error.h+332 TMessagesProj/jni/voip/webrtc/api/rtc_error_unittest.cc+235 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/BUILD.gn+52 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event.cc+19 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event.h+88 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log.cc+21 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log.h+69 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory.cc+38 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory.h+40 TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory_interface.h+35 TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output.h+44 TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file.cc+85 TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file.h+58 TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file_unittest.cc+168 TMessagesProj/jni/voip/webrtc/api/rtp_headers.cc+53 TMessagesProj/jni/voip/webrtc/api/rtp_headers.h+179 TMessagesProj/jni/voip/webrtc/api/rtp_packet_info.cc+56 TMessagesProj/jni/voip/webrtc/api/rtp_packet_info.h+117 TMessagesProj/jni/voip/webrtc/api/rtp_packet_info_unittest.cc+218 TMessagesProj/jni/voip/webrtc/api/rtp_packet_infos.h+131 TMessagesProj/jni/voip/webrtc/api/rtp_packet_infos_unittest.cc+113 TMessagesProj/jni/voip/webrtc/api/rtp_parameters.cc+306 TMessagesProj/jni/voip/webrtc/api/rtp_parameters.h+665 TMessagesProj/jni/voip/webrtc/api/rtp_parameters_unittest.cc+303 TMessagesProj/jni/voip/webrtc/api/rtp_receiver_interface.cc+44 TMessagesProj/jni/voip/webrtc/api/rtp_receiver_interface.h+123 TMessagesProj/jni/voip/webrtc/api/rtp_sender_interface.cc+22 TMessagesProj/jni/voip/webrtc/api/rtp_sender_interface.h+118 TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_direction.h+27 TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_interface.cc+60 TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_interface.h+176 TMessagesProj/jni/voip/webrtc/api/scoped_refptr.h+227 TMessagesProj/jni/voip/webrtc/api/scoped_refptr_unittest.cc+111 TMessagesProj/jni/voip/webrtc/api/sctp_transport_interface.cc+32 TMessagesProj/jni/voip/webrtc/api/sctp_transport_interface.h+92 TMessagesProj/jni/voip/webrtc/api/sequence_checker.h+140 TMessagesProj/jni/voip/webrtc/api/sequence_checker_unittest.cc+231 TMessagesProj/jni/voip/webrtc/api/set_local_description_observer_interface.h+30 TMessagesProj/jni/voip/webrtc/api/set_remote_description_observer_interface.h+31 TMessagesProj/jni/voip/webrtc/api/stats/OWNERS+3 TMessagesProj/jni/voip/webrtc/api/stats/attribute.h+94 TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats.h+195 TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats_collector_callback.h+30 TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats_report.h+137 TMessagesProj/jni/voip/webrtc/api/stats/rtcstats_objects.h+484 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory.h+25 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_gcd.cc+23 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_libevent.cc+23 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_stdlib.cc+23 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_stdlib_or_libevent_experiment.cc+38 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_unittest.cc+24 TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_win.cc+23 TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag.cc+68 TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag.h+179 TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag_unittest.cc+199 TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_base.cc+81 TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_base.h+198 TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_factory.h+35 TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_test.cc+354 TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_test.h+41 TMessagesProj/jni/voip/webrtc/api/task_queue/test/BUILD.gn+20 TMessagesProj/jni/voip/webrtc/api/task_queue/test/mock_task_queue_base.h+44 TMessagesProj/jni/voip/webrtc/api/test/DEPS+39 TMessagesProj/jni/voip/webrtc/api/test/OWNERS+5 TMessagesProj/jni/voip/webrtc/api/test/audio_quality_analyzer_interface.h+44 TMessagesProj/jni/voip/webrtc/api/test/audioproc_float.cc+44 TMessagesProj/jni/voip/webrtc/api/test/audioproc_float.h+71 TMessagesProj/jni/voip/webrtc/api/test/compile_all_headers.cc+54 TMessagesProj/jni/voip/webrtc/api/test/create_frame_generator.cc+101 TMessagesProj/jni/voip/webrtc/api/test/create_frame_generator.h+85 TMessagesProj/jni/voip/webrtc/api/test/create_network_emulation_manager.cc+29 TMessagesProj/jni/voip/webrtc/api/test/create_network_emulation_manager.h+30 TMessagesProj/jni/voip/webrtc/api/test/create_peer_connection_quality_test_frame_generator.cc+103 TMessagesProj/jni/voip/webrtc/api/test/create_peer_connection_quality_test_frame_generator.h+44 TMessagesProj/jni/voip/webrtc/api/test/create_peerconnection_quality_test_fixture.cc+36 TMessagesProj/jni/voip/webrtc/api/test/create_peerconnection_quality_test_fixture.h+43 TMessagesProj/jni/voip/webrtc/api/test/create_simulcast_test_fixture.cc+31 TMessagesProj/jni/voip/webrtc/api/test/create_simulcast_test_fixture.h+32 TMessagesProj/jni/voip/webrtc/api/test/create_time_controller.cc+77 TMessagesProj/jni/voip/webrtc/api/test/create_time_controller.h+36 TMessagesProj/jni/voip/webrtc/api/test/create_time_controller_unittest.cc+76 TMessagesProj/jni/voip/webrtc/api/test/create_video_quality_test_fixture.cc+40 TMessagesProj/jni/voip/webrtc/api/test/create_video_quality_test_fixture.h+31 TMessagesProj/jni/voip/webrtc/api/test/create_videocodec_test_fixture.cc+38 TMessagesProj/jni/voip/webrtc/api/test/create_videocodec_test_fixture.h+34 TMessagesProj/jni/voip/webrtc/api/test/fake_frame_decryptor.cc+71 TMessagesProj/jni/voip/webrtc/api/test/fake_frame_decryptor.h+70 TMessagesProj/jni/voip/webrtc/api/test/fake_frame_encryptor.cc+66 TMessagesProj/jni/voip/webrtc/api/test/fake_frame_encryptor.h+69 TMessagesProj/jni/voip/webrtc/api/test/frame_generator_interface.cc+34 TMessagesProj/jni/voip/webrtc/api/test/frame_generator_interface.h+62 TMessagesProj/jni/voip/webrtc/api/test/metrics/BUILD.gn+281 TMessagesProj/jni/voip/webrtc/api/test/metrics/DEPS+14 TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter.cc+146 TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter.h+41 TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter_test.cc+248 TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter.cc+42 TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter.h+32 TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter_test.cc+131 TMessagesProj/jni/voip/webrtc/api/test/metrics/metric.cc+48 TMessagesProj/jni/voip/webrtc/api/test/metrics/metric.h+96 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator.cc+132 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator.h+99 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator_test.cc+315 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_exporter.h+33 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger.cc+114 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger.h+112 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger_test.cc+326 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter.cc+166 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter.h+59 TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter_test.cc+172 TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter.cc+157 TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter.h+32 TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter_test.cc+177 TMessagesProj/jni/voip/webrtc/api/test/metrics/proto/metric.proto+89 TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter.cc+101 TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter.h+41 TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter_test.cc+211 TMessagesProj/jni/voip/webrtc/api/test/mock_async_dns_resolver.h+64 TMessagesProj/jni/voip/webrtc/api/test/mock_audio_mixer.h+29 TMessagesProj/jni/voip/webrtc/api/test/mock_audio_sink.h+44 TMessagesProj/jni/voip/webrtc/api/test/mock_data_channel.h+66 TMessagesProj/jni/voip/webrtc/api/test/mock_dtmf_sender.h+56 TMessagesProj/jni/voip/webrtc/api/test/mock_encoder_selector.h+42 TMessagesProj/jni/voip/webrtc/api/test/mock_fec_controller_override.h+26 TMessagesProj/jni/voip/webrtc/api/test/mock_frame_decryptor.h+40 TMessagesProj/jni/voip/webrtc/api/test/mock_frame_encryptor.h+39 TMessagesProj/jni/voip/webrtc/api/test/mock_frame_transformer.h+45 TMessagesProj/jni/voip/webrtc/api/test/mock_media_stream_interface.h+134 TMessagesProj/jni/voip/webrtc/api/test/mock_packet_socket_factory.h+49 TMessagesProj/jni/voip/webrtc/api/test/mock_peer_connection_factory_interface.h+86 TMessagesProj/jni/voip/webrtc/api/test/mock_peerconnectioninterface.h+217 TMessagesProj/jni/voip/webrtc/api/test/mock_rtp_transceiver.h+87 TMessagesProj/jni/voip/webrtc/api/test/mock_rtpreceiver.h+58 TMessagesProj/jni/voip/webrtc/api/test/mock_rtpsender.h+78 TMessagesProj/jni/voip/webrtc/api/test/mock_session_description_interface.h+56 TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_audio_frame.h+54 TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_frame.h+45 TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_video_frame.h+52 TMessagesProj/jni/voip/webrtc/api/test/mock_video_bitrate_allocator.h+28 TMessagesProj/jni/voip/webrtc/api/test/mock_video_bitrate_allocator_factory.h+34 TMessagesProj/jni/voip/webrtc/api/test/mock_video_decoder.h+85 TMessagesProj/jni/voip/webrtc/api/test/mock_video_decoder_factory.h+45 TMessagesProj/jni/voip/webrtc/api/test/mock_video_encoder.h+73 TMessagesProj/jni/voip/webrtc/api/test/mock_video_encoder_factory.h+42 TMessagesProj/jni/voip/webrtc/api/test/mock_video_track.h+69 TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator.cc+26 TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator.h+82 TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator_factory.cc+71 TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator_factory.h+71 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/BUILD.gn+52 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/DEPS+7 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/create_cross_traffic.cc+39 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/create_cross_traffic.h+37 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/cross_traffic.h+85 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/network_emulation_interfaces.cc+46 TMessagesProj/jni/voip/webrtc/api/test/network_emulation/network_emulation_interfaces.h+311 TMessagesProj/jni/voip/webrtc/api/test/network_emulation_manager.cc+149 TMessagesProj/jni/voip/webrtc/api/test/network_emulation_manager.h+361 TMessagesProj/jni/voip/webrtc/api/test/pclf/BUILD.gn+123 TMessagesProj/jni/voip/webrtc/api/test/pclf/DEPS+13 TMessagesProj/jni/voip/webrtc/api/test/pclf/media_configuration.cc+312 TMessagesProj/jni/voip/webrtc/api/test/pclf/media_configuration.h+476 TMessagesProj/jni/voip/webrtc/api/test/pclf/media_quality_test_params.h+187 TMessagesProj/jni/voip/webrtc/api/test/pclf/peer_configurer.cc+281 TMessagesProj/jni/voip/webrtc/api/test/pclf/peer_configurer.h+210 TMessagesProj/jni/voip/webrtc/api/test/peer_network_dependencies.h+32 TMessagesProj/jni/voip/webrtc/api/test/peerconnection_quality_test_fixture.h+140 TMessagesProj/jni/voip/webrtc/api/test/peerconnection_quality_test_fixture_unittest.cc+142 TMessagesProj/jni/voip/webrtc/api/test/simulated_network.h+139 TMessagesProj/jni/voip/webrtc/api/test/simulcast_test_fixture.h+45 TMessagesProj/jni/voip/webrtc/api/test/stats_observer_interface.h+35 TMessagesProj/jni/voip/webrtc/api/test/test_dependency_factory.cc+54 TMessagesProj/jni/voip/webrtc/api/test/test_dependency_factory.h+48 TMessagesProj/jni/voip/webrtc/api/test/time_controller.cc+43 TMessagesProj/jni/voip/webrtc/api/test/time_controller.h+89 TMessagesProj/jni/voip/webrtc/api/test/track_id_stream_info_map.h+44 TMessagesProj/jni/voip/webrtc/api/test/video/BUILD.gn+52 TMessagesProj/jni/voip/webrtc/api/test/video/DEPS+6 TMessagesProj/jni/voip/webrtc/api/test/video/function_video_decoder_factory.h+70 TMessagesProj/jni/voip/webrtc/api/test/video/function_video_encoder_factory.h+60 TMessagesProj/jni/voip/webrtc/api/test/video/test_video_track_source.cc+62 TMessagesProj/jni/voip/webrtc/api/test/video/test_video_track_source.h+97 TMessagesProj/jni/voip/webrtc/api/test/video/video_frame_writer.h+37 TMessagesProj/jni/voip/webrtc/api/test/video_quality_analyzer_interface.h+185 TMessagesProj/jni/voip/webrtc/api/test/video_quality_test_fixture.h+143 TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_fixture.h+178 TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_stats.cc+121 TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_stats.h+157 TMessagesProj/jni/voip/webrtc/api/transport/OWNERS+2 TMessagesProj/jni/voip/webrtc/api/transport/bandwidth_estimation_settings.h+27 TMessagesProj/jni/voip/webrtc/api/transport/bitrate_settings.cc+19 TMessagesProj/jni/voip/webrtc/api/transport/bitrate_settings.h+50 TMessagesProj/jni/voip/webrtc/api/transport/data_channel_transport_interface.h+125 TMessagesProj/jni/voip/webrtc/api/transport/enums.h+49 TMessagesProj/jni/voip/webrtc/api/transport/field_trial_based_config.cc+18 TMessagesProj/jni/voip/webrtc/api/transport/field_trial_based_config.h+27 TMessagesProj/jni/voip/webrtc/api/transport/goog_cc_factory.cc+65 TMessagesProj/jni/voip/webrtc/api/transport/goog_cc_factory.h+61 TMessagesProj/jni/voip/webrtc/api/transport/network_control.h+140 TMessagesProj/jni/voip/webrtc/api/transport/network_types.cc+106 TMessagesProj/jni/voip/webrtc/api/transport/network_types.h+284 TMessagesProj/jni/voip/webrtc/api/transport/rtp/BUILD.gn+38 TMessagesProj/jni/voip/webrtc/api/transport/rtp/dependency_descriptor.cc+54 TMessagesProj/jni/voip/webrtc/api/transport/rtp/dependency_descriptor.h+150 TMessagesProj/jni/voip/webrtc/api/transport/rtp/rtp_source.h+108 TMessagesProj/jni/voip/webrtc/api/transport/sctp_transport_factory_interface.h+42 TMessagesProj/jni/voip/webrtc/api/transport/stun.cc+1525 TMessagesProj/jni/voip/webrtc/api/transport/stun.h+808 TMessagesProj/jni/voip/webrtc/api/transport/stun_unittest.cc+1870 TMessagesProj/jni/voip/webrtc/api/transport/test/create_feedback_generator.cc+23 TMessagesProj/jni/voip/webrtc/api/transport/test/create_feedback_generator.h+21 TMessagesProj/jni/voip/webrtc/api/transport/test/feedback_generator_interface.h+37 TMessagesProj/jni/voip/webrtc/api/transport/test/mock_network_control.h+84 TMessagesProj/jni/voip/webrtc/api/turn_customizer.h+46 TMessagesProj/jni/voip/webrtc/api/uma_metrics.h+184 TMessagesProj/jni/voip/webrtc/api/units/OWNERS+1 TMessagesProj/jni/voip/webrtc/api/units/data_rate.cc+34 TMessagesProj/jni/voip/webrtc/api/units/data_rate.h+155 TMessagesProj/jni/voip/webrtc/api/units/data_rate_unittest.cc+197 TMessagesProj/jni/voip/webrtc/api/units/data_size.cc+30 TMessagesProj/jni/voip/webrtc/api/units/data_size.h+66 TMessagesProj/jni/voip/webrtc/api/units/data_size_unittest.cc+110 TMessagesProj/jni/voip/webrtc/api/units/frequency.cc+29 TMessagesProj/jni/voip/webrtc/api/units/frequency.h+101 TMessagesProj/jni/voip/webrtc/api/units/frequency_unittest.cc+161 TMessagesProj/jni/voip/webrtc/api/units/time_delta.cc+36 TMessagesProj/jni/voip/webrtc/api/units/time_delta.h+110 TMessagesProj/jni/voip/webrtc/api/units/time_delta_unittest.cc+237 TMessagesProj/jni/voip/webrtc/api/units/timestamp.cc+34 TMessagesProj/jni/voip/webrtc/api/units/timestamp.h+139 TMessagesProj/jni/voip/webrtc/api/units/timestamp_unittest.cc+163 TMessagesProj/jni/voip/webrtc/api/video/OWNERS+5 TMessagesProj/jni/voip/webrtc/api/video/builtin_video_bitrate_allocator_factory.cc+52 TMessagesProj/jni/voip/webrtc/api/video/builtin_video_bitrate_allocator_factory.h+25 TMessagesProj/jni/voip/webrtc/api/video/color_space.cc+263 TMessagesProj/jni/voip/webrtc/api/video/color_space.h+181 TMessagesProj/jni/voip/webrtc/api/video/encoded_frame.cc+134 TMessagesProj/jni/voip/webrtc/api/video/encoded_frame.h+106 TMessagesProj/jni/voip/webrtc/api/video/encoded_image.cc+104 TMessagesProj/jni/voip/webrtc/api/video/encoded_image.h+267 TMessagesProj/jni/voip/webrtc/api/video/frame_buffer.cc+280 TMessagesProj/jni/voip/webrtc/api/video/frame_buffer.h+106 TMessagesProj/jni/voip/webrtc/api/video/frame_buffer_unittest.cc+393 TMessagesProj/jni/voip/webrtc/api/video/hdr_metadata.cc+21 TMessagesProj/jni/voip/webrtc/api/video/hdr_metadata.h+105 TMessagesProj/jni/voip/webrtc/api/video/i010_buffer.cc+213 TMessagesProj/jni/voip/webrtc/api/video/i010_buffer.h+84 TMessagesProj/jni/voip/webrtc/api/video/i210_buffer.cc+211 TMessagesProj/jni/voip/webrtc/api/video/i210_buffer.h+84 TMessagesProj/jni/voip/webrtc/api/video/i410_buffer.cc+221 TMessagesProj/jni/voip/webrtc/api/video/i410_buffer.h+104 TMessagesProj/jni/voip/webrtc/api/video/i420_buffer.cc+232 TMessagesProj/jni/voip/webrtc/api/video/i420_buffer.h+118 TMessagesProj/jni/voip/webrtc/api/video/i422_buffer.cc+237 TMessagesProj/jni/voip/webrtc/api/video/i422_buffer.h+114 TMessagesProj/jni/voip/webrtc/api/video/i444_buffer.cc+211 TMessagesProj/jni/voip/webrtc/api/video/i444_buffer.h+104 TMessagesProj/jni/voip/webrtc/api/video/nv12_buffer.cc+155 TMessagesProj/jni/voip/webrtc/api/video/nv12_buffer.h+85 TMessagesProj/jni/voip/webrtc/api/video/recordable_encoded_frame.h+61 TMessagesProj/jni/voip/webrtc/api/video/render_resolution.h+46 TMessagesProj/jni/voip/webrtc/api/video/resolution.h+38 TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler.cc+344 TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler.h+76 TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler_unittests.cc+586 TMessagesProj/jni/voip/webrtc/api/video/test/BUILD.gn+56 TMessagesProj/jni/voip/webrtc/api/video/test/color_space_unittest.cc+83 TMessagesProj/jni/voip/webrtc/api/video/test/i210_buffer_unittest.cc+126 TMessagesProj/jni/voip/webrtc/api/video/test/i410_buffer_unittest.cc+120 TMessagesProj/jni/voip/webrtc/api/video/test/i422_buffer_unittest.cc+128 TMessagesProj/jni/voip/webrtc/api/video/test/i444_buffer_unittest.cc+112 TMessagesProj/jni/voip/webrtc/api/video/test/mock_recordable_encoded_frame.h+34 TMessagesProj/jni/voip/webrtc/api/video/test/nv12_buffer_unittest.cc+119 TMessagesProj/jni/voip/webrtc/api/video/test/video_adaptation_counters_unittest.cc+32 TMessagesProj/jni/voip/webrtc/api/video/test/video_bitrate_allocation_unittest.cc+64 TMessagesProj/jni/voip/webrtc/api/video/test/video_frame_matchers.h+34 TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_counters.cc+42 TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_counters.h+46 TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_reason.h+20 TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocation.cc+185 TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocation.h+96 TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator.cc+54 TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator.h+60 TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator_factory.h+33 TMessagesProj/jni/voip/webrtc/api/video/video_codec_constants.h+24 TMessagesProj/jni/voip/webrtc/api/video/video_codec_type.h+30 TMessagesProj/jni/voip/webrtc/api/video/video_content_type.cc+43 TMessagesProj/jni/voip/webrtc/api/video/video_content_type.h+36 TMessagesProj/jni/voip/webrtc/api/video/video_frame.cc+334 TMessagesProj/jni/voip/webrtc/api/video/video_frame.h+331 TMessagesProj/jni/voip/webrtc/api/video/video_frame_buffer.cc+242 TMessagesProj/jni/voip/webrtc/api/video/video_frame_buffer.h+325 TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata.cc+174 TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata.h+127 TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata_unittest.cc+123 TMessagesProj/jni/voip/webrtc/api/video/video_frame_type.h+43 TMessagesProj/jni/voip/webrtc/api/video/video_layers_allocation.h+77 TMessagesProj/jni/voip/webrtc/api/video/video_rotation.h+26 TMessagesProj/jni/voip/webrtc/api/video/video_sink_interface.h+39 TMessagesProj/jni/voip/webrtc/api/video/video_source_interface.cc+19 TMessagesProj/jni/voip/webrtc/api/video/video_source_interface.h+135 TMessagesProj/jni/voip/webrtc/api/video/video_stream_encoder_settings.h+60 TMessagesProj/jni/voip/webrtc/api/video/video_timing.cc+122 TMessagesProj/jni/voip/webrtc/api/video/video_timing.h+150 TMessagesProj/jni/voip/webrtc/api/video_codecs/OWNERS+4 TMessagesProj/jni/voip/webrtc/api/video_codecs/av1_profile.cc+67 TMessagesProj/jni/voip/webrtc/api/video_codecs/av1_profile.h+54 TMessagesProj/jni/voip/webrtc/api/video_codecs/bitstream_parser.h+37 TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_decoder_factory.cc+23 TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_decoder_factory.h+27 TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_encoder_factory.cc+73 TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_encoder_factory.h+28 TMessagesProj/jni/voip/webrtc/api/video_codecs/h264_profile_level_id.cc+257 TMessagesProj/jni/voip/webrtc/api/video_codecs/h264_profile_level_id.h+92 TMessagesProj/jni/voip/webrtc/api/video_codecs/h265_profile_tier_level.cc+248 TMessagesProj/jni/voip/webrtc/api/video_codecs/h265_profile_tier_level.h+109 TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode.cc+91 TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode.h+111 TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode_helper.cc+42 TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode_helper.h+37 TMessagesProj/jni/voip/webrtc/api/video_codecs/sdp_video_format.cc+209 TMessagesProj/jni/voip/webrtc/api/video_codecs/sdp_video_format.h+77 TMessagesProj/jni/voip/webrtc/api/video_codecs/simulcast_stream.cc+37 TMessagesProj/jni/voip/webrtc/api/video_codecs/simulcast_stream.h+39 TMessagesProj/jni/voip/webrtc/api/video_codecs/spatial_layer.cc+25 TMessagesProj/jni/voip/webrtc/api/video_codecs/spatial_layer.h+32 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/BUILD.gn+89 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/builtin_video_encoder_factory_unittest.cc+39 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/h264_profile_level_id_unittest.cc+171 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/h265_profile_tier_level_unittest.cc+248 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/sdp_video_format_unittest.cc+155 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_decoder_factory_template_tests.cc+123 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc+309 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_encoder_factory_template_tests.cc+173 TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc+1144 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_codec.cc+219 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_codec.h+246 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder.cc+65 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder.h+147 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory.cc+45 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory.h+66 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template.h+95 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_dav1d_adapter.h+38 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_libvpx_vp8_adapter.h+33 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_libvpx_vp9_adapter.h+32 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_open_h264_adapter.h+44 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc+300 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.h+39 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder.cc+348 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder.h+430 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory.h+127 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template.h+145 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter.h+42 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h+45 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h+36 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter.h+50 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc+548 TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_software_fallback_wrapper.h+47 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_buffer_controller.h+192 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_config.cc+78 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_config.h+110 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers.cc+108 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers.h+77 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers_factory.cc+59 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers_factory.h+34 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp9_profile.cc+73 TMessagesProj/jni/voip/webrtc/api/video_codecs/vp9_profile.h+54 TMessagesProj/jni/voip/webrtc/api/video_track_source_constraints.h+32 TMessagesProj/jni/voip/webrtc/api/video_track_source_proxy_factory.h+29 TMessagesProj/jni/voip/webrtc/api/voip/test/compile_all_headers.cc+14 TMessagesProj/jni/voip/webrtc/api/voip/test/mock_voip_engine.h+124 TMessagesProj/jni/voip/webrtc/api/voip/test/voip_engine_factory_unittest.cc+52 TMessagesProj/jni/voip/webrtc/api/voip/voip_base.h+114 TMessagesProj/jni/voip/webrtc/api/voip/voip_codec.h+56 TMessagesProj/jni/voip/webrtc/api/voip/voip_dtmf.h+74 TMessagesProj/jni/voip/webrtc/api/voip/voip_engine.h+99 TMessagesProj/jni/voip/webrtc/api/voip/voip_engine_factory.cc+37 TMessagesProj/jni/voip/webrtc/api/voip/voip_engine_factory.h+68 TMessagesProj/jni/voip/webrtc/api/voip/voip_network.h+46 TMessagesProj/jni/voip/webrtc/api/voip/voip_statistics.h+98 TMessagesProj/jni/voip/webrtc/api/voip/voip_volume_control.h+64 TMessagesProj/jni/voip/webrtc/api/webrtc_key_value_config.h+17 TMessagesProj/jni/voip/webrtc/api/wrapping_async_dns_resolver.cc+31 TMessagesProj/jni/voip/webrtc/audio/OWNERS+5 TMessagesProj/jni/voip/webrtc/audio/audio_level.cc+98 TMessagesProj/jni/voip/webrtc/audio/audio_level.h+75 TMessagesProj/jni/voip/webrtc/audio/audio_receive_stream.cc+475 TMessagesProj/jni/voip/webrtc/audio/audio_receive_stream.h+173 TMessagesProj/jni/voip/webrtc/audio/audio_send_stream.cc+891 TMessagesProj/jni/voip/webrtc/audio/audio_send_stream.h+225 TMessagesProj/jni/voip/webrtc/audio/audio_state.cc+212 TMessagesProj/jni/voip/webrtc/audio/audio_state.h+92 TMessagesProj/jni/voip/webrtc/audio/audio_transport_impl.cc+285 TMessagesProj/jni/voip/webrtc/audio/audio_transport_impl.h+117 TMessagesProj/jni/voip/webrtc/audio/channel_receive.cc+1135 TMessagesProj/jni/voip/webrtc/audio/channel_receive.h+194 TMessagesProj/jni/voip/webrtc/audio/channel_receive_frame_transformer_delegate.cc+167 TMessagesProj/jni/voip/webrtc/audio/channel_receive_frame_transformer_delegate.h+81 TMessagesProj/jni/voip/webrtc/audio/channel_send.cc+908 TMessagesProj/jni/voip/webrtc/audio/channel_send.h+135 TMessagesProj/jni/voip/webrtc/audio/channel_send_frame_transformer_delegate.cc+213 TMessagesProj/jni/voip/webrtc/audio/channel_send_frame_transformer_delegate.h+90 TMessagesProj/jni/voip/webrtc/audio/conversion.h+30 TMessagesProj/jni/voip/webrtc/audio/mock_voe_channel_proxy.h+188 TMessagesProj/jni/voip/webrtc/audio/remix_resample.cc+91 TMessagesProj/jni/voip/webrtc/audio/remix_resample.h+44 TMessagesProj/jni/voip/webrtc/audio/utility/audio_frame_operations.cc+294 TMessagesProj/jni/voip/webrtc/audio/utility/audio_frame_operations.h+107 TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixer.cc+99 TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixer.h+86 TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixing_matrix.cc+333 TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixing_matrix.h+76 TMessagesProj/jni/voip/webrtc/audio/voip/audio_channel.cc+173 TMessagesProj/jni/voip/webrtc/audio/voip/audio_channel.h+131 TMessagesProj/jni/voip/webrtc/audio/voip/audio_egress.cc+190 TMessagesProj/jni/voip/webrtc/audio/voip/audio_egress.h+158 TMessagesProj/jni/voip/webrtc/audio/voip/audio_ingress.cc+290 TMessagesProj/jni/voip/webrtc/audio/voip/audio_ingress.h+145 TMessagesProj/jni/voip/webrtc/audio/voip/voip_core.cc+500 TMessagesProj/jni/voip/webrtc/audio/voip/voip_core.h+174 TMessagesProj/jni/voip/webrtc/call/OWNERS+8 TMessagesProj/jni/voip/webrtc/call/adaptation/OWNERS+3 TMessagesProj/jni/voip/webrtc/call/adaptation/adaptation_constraint.cc+17 TMessagesProj/jni/voip/webrtc/call/adaptation/adaptation_constraint.h+41 TMessagesProj/jni/voip/webrtc/call/adaptation/broadcast_resource_listener.cc+122 TMessagesProj/jni/voip/webrtc/call/adaptation/broadcast_resource_listener.h+75 TMessagesProj/jni/voip/webrtc/call/adaptation/degradation_preference_provider.cc+14 TMessagesProj/jni/voip/webrtc/call/adaptation/degradation_preference_provider.h+27 TMessagesProj/jni/voip/webrtc/call/adaptation/encoder_settings.cc+54 TMessagesProj/jni/voip/webrtc/call/adaptation/encoder_settings.h+48 TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor.cc+378 TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor.h+167 TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor_interface.cc+20 TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor_interface.h+67 TMessagesProj/jni/voip/webrtc/call/adaptation/video_source_restrictions.cc+173 TMessagesProj/jni/voip/webrtc/call/adaptation/video_source_restrictions.h+89 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_adapter.cc+753 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_adapter.h+271 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state.cc+80 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state.h+53 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state_provider.cc+54 TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state_provider.h+41 TMessagesProj/jni/voip/webrtc/call/audio_receive_stream.cc+24 TMessagesProj/jni/voip/webrtc/call/audio_receive_stream.h+207 TMessagesProj/jni/voip/webrtc/call/audio_send_stream.cc+108 TMessagesProj/jni/voip/webrtc/call/audio_send_stream.h+201 TMessagesProj/jni/voip/webrtc/call/audio_sender.h+30 TMessagesProj/jni/voip/webrtc/call/audio_state.cc+18 TMessagesProj/jni/voip/webrtc/call/audio_state.h+69 TMessagesProj/jni/voip/webrtc/call/bitrate_allocator.cc+593 TMessagesProj/jni/voip/webrtc/call/bitrate_allocator.h+170 TMessagesProj/jni/voip/webrtc/call/call.cc+1424 TMessagesProj/jni/voip/webrtc/call/call.h+149 TMessagesProj/jni/voip/webrtc/call/call_config.cc+38 TMessagesProj/jni/voip/webrtc/call/call_config.h+83 TMessagesProj/jni/voip/webrtc/call/create_call.cc+98 TMessagesProj/jni/voip/webrtc/call/create_call.h+25 TMessagesProj/jni/voip/webrtc/call/degraded_call.cc+380 TMessagesProj/jni/voip/webrtc/call/degraded_call.h+202 TMessagesProj/jni/voip/webrtc/call/fake_network_pipe.cc+382 TMessagesProj/jni/voip/webrtc/call/fake_network_pipe.h+230 TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream.cc+26 TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream.h+79 TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream_impl.cc+201 TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream_impl.h+99 TMessagesProj/jni/voip/webrtc/call/packet_receiver.h+45 TMessagesProj/jni/voip/webrtc/call/receive_stream.h+72 TMessagesProj/jni/voip/webrtc/call/receive_time_calculator.cc+120 TMessagesProj/jni/voip/webrtc/call/receive_time_calculator.h+63 TMessagesProj/jni/voip/webrtc/call/rtp_bitrate_configurator.cc+135 TMessagesProj/jni/voip/webrtc/call/rtp_bitrate_configurator.h+77 TMessagesProj/jni/voip/webrtc/call/rtp_config.cc+203 TMessagesProj/jni/voip/webrtc/call/rtp_config.h+175 TMessagesProj/jni/voip/webrtc/call/rtp_demuxer.cc+452 TMessagesProj/jni/voip/webrtc/call/rtp_demuxer.h+221 TMessagesProj/jni/voip/webrtc/call/rtp_packet_sink_interface.h+26 TMessagesProj/jni/voip/webrtc/call/rtp_payload_params.cc+795 TMessagesProj/jni/voip/webrtc/call/rtp_payload_params.h+134 TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller.cc+71 TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller.h+80 TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller_interface.h+43 TMessagesProj/jni/voip/webrtc/call/rtp_transport_config.h+44 TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send.cc+761 TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send.h+218 TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_factory.h+32 TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_factory_interface.h+29 TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_interface.h+171 TMessagesProj/jni/voip/webrtc/call/rtp_video_sender.cc+986 TMessagesProj/jni/voip/webrtc/call/rtp_video_sender.h+218 TMessagesProj/jni/voip/webrtc/call/rtp_video_sender_interface.h+65 TMessagesProj/jni/voip/webrtc/call/rtx_receive_stream.cc+88 TMessagesProj/jni/voip/webrtc/call/rtx_receive_stream.h+59 TMessagesProj/jni/voip/webrtc/call/simulated_network.cc+276 TMessagesProj/jni/voip/webrtc/call/simulated_network.h+134 TMessagesProj/jni/voip/webrtc/call/simulated_packet_receiver.h+42 TMessagesProj/jni/voip/webrtc/call/syncable.cc+17 TMessagesProj/jni/voip/webrtc/call/syncable.h+46 TMessagesProj/jni/voip/webrtc/call/version.cc+25 TMessagesProj/jni/voip/webrtc/call/version.h+25 TMessagesProj/jni/voip/webrtc/call/video_receive_stream.cc+168 TMessagesProj/jni/voip/webrtc/call/video_receive_stream.h+328 TMessagesProj/jni/voip/webrtc/call/video_send_stream.cc+127 TMessagesProj/jni/voip/webrtc/call/video_send_stream.h+260 TMessagesProj/jni/voip/webrtc/common_audio/OWNERS+3 TMessagesProj/jni/voip/webrtc/common_audio/audio_converter.cc+219 TMessagesProj/jni/voip/webrtc/common_audio/audio_converter.h+72 TMessagesProj/jni/voip/webrtc/common_audio/audio_util.cc+54 TMessagesProj/jni/voip/webrtc/common_audio/channel_buffer.cc+80 TMessagesProj/jni/voip/webrtc/common_audio/channel_buffer.h+215 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter.h+30 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_avx2.cc+88 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_avx2.h+41 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_c.cc+61 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_c.h+38 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_factory.cc+55 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_factory.h+32 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_neon.cc+73 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_neon.h+39 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_sse.cc+82 TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_sse.h+41 TMessagesProj/jni/voip/webrtc/common_audio/include/audio_util.h+214 TMessagesProj/jni/voip/webrtc/common_audio/mocks/mock_smoothing_filter.h+28 TMessagesProj/jni/voip/webrtc/common_audio/real_fourier.cc+51 TMessagesProj/jni/voip/webrtc/common_audio/real_fourier.h+76 TMessagesProj/jni/voip/webrtc/common_audio/real_fourier_ooura.cc+91 TMessagesProj/jni/voip/webrtc/common_audio/real_fourier_ooura.h+45 TMessagesProj/jni/voip/webrtc/common_audio/resampler/include/push_resampler.h+59 TMessagesProj/jni/voip/webrtc/common_audio/resampler/include/resampler.h+99 TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_resampler.cc+123 TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_sinc_resampler.cc+102 TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_sinc_resampler.h+81 TMessagesProj/jni/voip/webrtc/common_audio/resampler/resampler.cc+923 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler.cc+363 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler.h+181 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_avx2.cc+66 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_neon.cc+48 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_sse.cc+63 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.cc+57 TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h+56 TMessagesProj/jni/voip/webrtc/common_audio/ring_buffer.c+232 TMessagesProj/jni/voip/webrtc/common_audio/ring_buffer.h+79 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c+103 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/auto_correlation.c+65 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse.c+108 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S+119 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse_mips.c+176 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft.c+299 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft_mips.c+328 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft_tables.h+132 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/copy_set_operations.c+82 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation.c+30 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation_mips.c+104 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation_neon.c+88 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/division_operations.c+140 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/dot_product_with_scale.cc+34 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/dot_product_with_scale.h+40 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast.c+65 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast_mips.c+169 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast_neon.c+217 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/energy.c+39 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar.c+95 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c+47 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S+218 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12_mips.c+140 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c+55 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/get_hanning_window.c+77 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/get_scaling_square.c+46 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/ilbc_specific_functions.c+90 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/real_fft.h+96 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/signal_processing_library.h+1635 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl.h+155 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h+138 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl_mips.h+204 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/levinson_durbin.c+249 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c+56 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations.c+256 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations_mips.c+375 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations_neon.c+333 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/randomization_functions.c+115 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/real_fft.c+102 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c+59 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample.c+505 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_48khz.c+186 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2.c+183 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_internal.c+689 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_internal.h+60 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_mips.c+292 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_fractional.c+239 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_init.c+69 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_inl.c+24 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_sqrt.c+194 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/splitting_filter.c+211 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c+35 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/vector_scaling_operations.c+165 TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/vector_scaling_operations_mips.c+57 TMessagesProj/jni/voip/webrtc/common_audio/smoothing_filter.cc+147 TMessagesProj/jni/voip/webrtc/common_audio/smoothing_filter.h+75 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/LICENSE+8 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/README.chromium+13 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc+548 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft.h+64 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc+1245 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc+351 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc+439 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h+54 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h+98 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_256/fft4g.cc+866 TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_256/fft4g.h+21 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/LICENSE+27 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/README.chromium+12 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c+77 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.h+29 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S+110 TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_mips.c+207 TMessagesProj/jni/voip/webrtc/common_audio/vad/include/vad.h+50 TMessagesProj/jni/voip/webrtc/common_audio/vad/include/webrtc_vad.h+87 TMessagesProj/jni/voip/webrtc/common_audio/vad/mock/mock_vad.h+33 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad.cc+66 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_core.c+685 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_core.h+123 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_filterbank.c+329 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_filterbank.h+45 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_gmm.c+82 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_gmm.h+39 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_sp.c+176 TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_sp.h+54 TMessagesProj/jni/voip/webrtc/common_audio/vad/webrtc_vad.c+114 TMessagesProj/jni/voip/webrtc/common_audio/wav_file.cc+290 TMessagesProj/jni/voip/webrtc/common_audio/wav_file.h+115 TMessagesProj/jni/voip/webrtc/common_audio/wav_header.cc+435 TMessagesProj/jni/voip/webrtc/common_audio/wav_header.h+90 TMessagesProj/jni/voip/webrtc/common_audio/window_generator.cc+71 TMessagesProj/jni/voip/webrtc/common_audio/window_generator.h+31 TMessagesProj/jni/voip/webrtc/common_types.h+85 TMessagesProj/jni/voip/webrtc/common_video/OWNERS+4 TMessagesProj/jni/voip/webrtc/common_video/bitrate_adjuster.cc+159 TMessagesProj/jni/voip/webrtc/common_video/frame_counts.h+34 TMessagesProj/jni/voip/webrtc/common_video/frame_rate_estimator.cc+55 TMessagesProj/jni/voip/webrtc/common_video/frame_rate_estimator.h+60 TMessagesProj/jni/voip/webrtc/common_video/framerate_controller.cc+88 TMessagesProj/jni/voip/webrtc/common_video/framerate_controller.h+46 TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/OWNERS+2 TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/generic_frame_info.cc+46 TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/generic_frame_info.h+63 TMessagesProj/jni/voip/webrtc/common_video/h264/OWNERS+1 TMessagesProj/jni/voip/webrtc/common_video/h264/h264_bitstream_parser.cc+299 TMessagesProj/jni/voip/webrtc/common_video/h264/h264_bitstream_parser.h+58 TMessagesProj/jni/voip/webrtc/common_video/h264/h264_common.cc+116 TMessagesProj/jni/voip/webrtc/common_video/h264/h264_common.h+92 TMessagesProj/jni/voip/webrtc/common_video/h264/pps_parser.cc+160 TMessagesProj/jni/voip/webrtc/common_video/h264/pps_parser.h+60 TMessagesProj/jni/voip/webrtc/common_video/h264/sps_parser.cc+227 TMessagesProj/jni/voip/webrtc/common_video/h264/sps_parser.h+53 TMessagesProj/jni/voip/webrtc/common_video/h264/sps_vui_rewriter.cc+611 TMessagesProj/jni/voip/webrtc/common_video/h264/sps_vui_rewriter.h+72 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_bitstream_parser.cc+401 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_bitstream_parser.h+72 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_common.cc+67 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_common.h+115 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_inline.cc+24 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_inline.h+47 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_pps_parser.cc+217 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_pps_parser.h+68 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_sps_parser.cc+408 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_sps_parser.h+86 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_vps_parser.cc+60 TMessagesProj/jni/voip/webrtc/common_video/h265/h265_vps_parser.h+43 TMessagesProj/jni/voip/webrtc/common_video/h265/legacy_bit_buffer.cc+227 TMessagesProj/jni/voip/webrtc/common_video/h265/legacy_bit_buffer.h+104 TMessagesProj/jni/voip/webrtc/common_video/include/bitrate_adjuster.h+92 TMessagesProj/jni/voip/webrtc/common_video/include/quality_limitation_reason.h+26 TMessagesProj/jni/voip/webrtc/common_video/include/video_frame_buffer.h+115 TMessagesProj/jni/voip/webrtc/common_video/include/video_frame_buffer_pool.h+84 TMessagesProj/jni/voip/webrtc/common_video/libyuv/include/webrtc_libyuv.h+166 TMessagesProj/jni/voip/webrtc/common_video/libyuv/webrtc_libyuv.cc+461 TMessagesProj/jni/voip/webrtc/common_video/video_frame_buffer.cc+388 TMessagesProj/jni/voip/webrtc/common_video/video_frame_buffer_pool.cc+343 TMessagesProj/jni/voip/webrtc/experiments/registered_field_trials.h+303 TMessagesProj/jni/voip/webrtc/logging/OWNERS+2 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/dependency_descriptor_encoder_decoder.cc+221 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/dependency_descriptor_encoder_decoder.h+35 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/bit_writer.cc+49 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/bit_writer.h+61 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/blob_encoding.cc+92 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/blob_encoding.h+53 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/delta_encoding.cc+839 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/delta_encoding.h+49 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/optional_blob_encoding.cc+117 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/optional_blob_encoding.h+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder.h+36 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_common.cc+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_common.h+93 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc+806 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h+110 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc+1964 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.h+168 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_v3.cc+164 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_v3.h+46 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/var_int.cc+77 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/var_int.h+50 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.cc+137 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h+96 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/logged_rtp_rtcp.h+261 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_alr_state.cc+38 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_alr_state.h+78 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc+39 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h+78 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_playout.cc+32 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_playout.h+88 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h+76 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h+74 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_begin_log.cc+73 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_begin_log.h+74 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc+43 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h+136 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.cc+39 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h+89 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_definition.h+152 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_transport_state.cc+33 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h+72 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_writable_state.cc+32 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h+72 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_end_log.cc+58 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_end_log.h+64 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding.cc+299 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding.h+179 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc+399 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h+214 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_extraction.cc+60 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_extraction.h+84 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_frame_decoded.cc+44 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_frame_decoded.h+93 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_ack_received.cc+55 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_ack_received.h+118 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_received.cc+32 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_received.h+84 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_sent.cc+36 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h+110 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.cc+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h+98 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.cc+65 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h+143 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_log_parse_status.h+153 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_neteq_set_minimum_delay.cc+31 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_neteq_set_minimum_delay.h+70 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_cluster_created.cc+40 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h+95 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.cc+34 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.h+87 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.cc+33 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.h+80 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_remote_estimate.h+68 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_route_change.cc+31 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_route_change.h+75 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.cc+34 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h+64 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.cc+34 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h+64 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.cc+35 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h+93 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.cc+38 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h+97 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc+39 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h+76 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc+36 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h+75 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log.cc+38 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log.h+42 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log_factory.cc+27 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log_factory.h+39 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/ice_logger.cc+53 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/ice_logger.h+56 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/output/rtc_event_log_output_file.h+19 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log.pb.cc+8235 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log.pb.h+8906 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log2.pb.cc+16384 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log2.pb.h+20923 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc+331 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_impl.h+123 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc+3646 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_parser.h+947 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor.cc+57 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor.h+181 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor_order.h+442 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_stream_config.cc+49 TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_stream_config.h+62 TMessagesProj/jni/voip/webrtc/media/OWNERS+13 TMessagesProj/jni/voip/webrtc/media/base/adapted_video_track_source.cc+126 TMessagesProj/jni/voip/webrtc/media/base/adapted_video_track_source.h+104 TMessagesProj/jni/voip/webrtc/media/base/audio_source.h+58 TMessagesProj/jni/voip/webrtc/media/base/codec.cc+522 TMessagesProj/jni/voip/webrtc/media/base/codec.h+230 TMessagesProj/jni/voip/webrtc/media/base/fake_frame_source.cc+88 TMessagesProj/jni/voip/webrtc/media/base/fake_frame_source.h+50 TMessagesProj/jni/voip/webrtc/media/base/fake_media_engine.cc+705 TMessagesProj/jni/voip/webrtc/media/base/fake_media_engine.h+876 TMessagesProj/jni/voip/webrtc/media/base/fake_network_interface.h+232 TMessagesProj/jni/voip/webrtc/media/base/fake_rtp.cc+71 TMessagesProj/jni/voip/webrtc/media/base/fake_rtp.h+301 TMessagesProj/jni/voip/webrtc/media/base/fake_video_renderer.cc+87 TMessagesProj/jni/voip/webrtc/media/base/fake_video_renderer.h+73 TMessagesProj/jni/voip/webrtc/media/base/media_channel.h+1006 TMessagesProj/jni/voip/webrtc/media/base/media_channel_impl.cc+303 TMessagesProj/jni/voip/webrtc/media/base/media_channel_impl.h+181 TMessagesProj/jni/voip/webrtc/media/base/media_config.h+98 TMessagesProj/jni/voip/webrtc/media/base/media_constants.cc+149 TMessagesProj/jni/voip/webrtc/media/base/media_constants.h+170 TMessagesProj/jni/voip/webrtc/media/base/media_engine.cc+291 TMessagesProj/jni/voip/webrtc/media/base/media_engine.h+239 TMessagesProj/jni/voip/webrtc/media/base/rid_description.cc+28 TMessagesProj/jni/voip/webrtc/media/base/rid_description.h+93 TMessagesProj/jni/voip/webrtc/media/base/rtp_utils.cc+401 TMessagesProj/jni/voip/webrtc/media/base/rtp_utils.h+80 TMessagesProj/jni/voip/webrtc/media/base/sdp_video_format_utils.cc+180 TMessagesProj/jni/voip/webrtc/media/base/sdp_video_format_utils.h+62 TMessagesProj/jni/voip/webrtc/media/base/stream_params.cc+240 TMessagesProj/jni/voip/webrtc/media/base/stream_params.h+321 TMessagesProj/jni/voip/webrtc/media/base/test_utils.cc+55 TMessagesProj/jni/voip/webrtc/media/base/test_utils.h+56 TMessagesProj/jni/voip/webrtc/media/base/turn_utils.cc+126 TMessagesProj/jni/voip/webrtc/media/base/turn_utils.h+30 TMessagesProj/jni/voip/webrtc/media/base/video_adapter.cc+470 TMessagesProj/jni/voip/webrtc/media/base/video_adapter.h+172 TMessagesProj/jni/voip/webrtc/media/base/video_broadcaster.cc+214 TMessagesProj/jni/voip/webrtc/media/base/video_broadcaster.h+82 TMessagesProj/jni/voip/webrtc/media/base/video_common.cc+97 TMessagesProj/jni/voip/webrtc/media/base/video_common.h+224 TMessagesProj/jni/voip/webrtc/media/base/video_source_base.cc+104 TMessagesProj/jni/voip/webrtc/media/base/video_source_base.h+83 TMessagesProj/jni/voip/webrtc/media/engine/adm_helpers.cc+82 TMessagesProj/jni/voip/webrtc/media/engine/adm_helpers.h+25 TMessagesProj/jni/voip/webrtc/media/engine/fake_video_codec_factory.cc+69 TMessagesProj/jni/voip/webrtc/media/engine/fake_video_codec_factory.h+53 TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_call.cc+763 TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_call.h+518 TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_video_engine.cc+304 TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_video_engine.h+144 TMessagesProj/jni/voip/webrtc/media/engine/internal_decoder_factory.cc+105 TMessagesProj/jni/voip/webrtc/media/engine/internal_decoder_factory.h+35 TMessagesProj/jni/voip/webrtc/media/engine/internal_encoder_factory.cc+66 TMessagesProj/jni/voip/webrtc/media/engine/internal_encoder_factory.h+34 TMessagesProj/jni/voip/webrtc/media/engine/multiplex_codec_factory.cc+117 TMessagesProj/jni/voip/webrtc/media/engine/multiplex_codec_factory.h+80 TMessagesProj/jni/voip/webrtc/media/engine/null_webrtc_video_engine.h+54 TMessagesProj/jni/voip/webrtc/media/engine/payload_type_mapper.cc+160 TMessagesProj/jni/voip/webrtc/media/engine/payload_type_mapper.h+57 TMessagesProj/jni/voip/webrtc/media/engine/simulcast_encoder_adapter.cc+995 TMessagesProj/jni/voip/webrtc/media/engine/simulcast_encoder_adapter.h+200 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_media_engine.cc+185 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_media_engine.h+45 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_video_engine.cc+3930 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_video_engine.h+901 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_voice_engine.cc+2714 TMessagesProj/jni/voip/webrtc/media/engine/webrtc_voice_engine.h+516 TMessagesProj/jni/voip/webrtc/media/sctp/OWNERS+3 TMessagesProj/jni/voip/webrtc/media/sctp/dcsctp_transport.cc+668 TMessagesProj/jni/voip/webrtc/media/sctp/dcsctp_transport.h+141 TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_factory.cc+38 TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_factory.h+35 TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_internal.h+150 TMessagesProj/jni/voip/webrtc/modules/async_audio_processing/async_audio_processing.cc+101 TMessagesProj/jni/voip/webrtc/modules/async_audio_processing/async_audio_processing.h+109 TMessagesProj/jni/voip/webrtc/modules/audio_coding/OWNERS+4 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receive_test.cc+161 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receive_test.h+97 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver.cc+358 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver.h+245 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver_unittest.cc+412 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing.cc+114 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing_unittest.cc+191 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_resampler.cc+61 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_resampler.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_send_test.cc+169 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_send_test.h+91 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/audio_coding_module.cc+532 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest.cc+1264 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics.cc+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics.h+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics_unittest.cc+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_coding.gni+25 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_config.cc+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc+171 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h+89 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc+304 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.cc+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.h+59 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc+236 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.cc+62 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h+58 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc+101 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/config.proto+196 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller.cc+19 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc+452 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h+124 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc+483 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump.proto+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc+160 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h+52 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.cc+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.h+52 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc+82 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer.cc+78 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc+240 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc+113 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h+74 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc+489 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.cc+201 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h+93 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc+444 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2.cc+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2_unittest.cc+121 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h+49 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/parse_ana_dump.py+149 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve.h+118 TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc+632 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/audio_decoder.h+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/audio_encoder.h+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc+164 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc+178 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc+322 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h+49 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc+520 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc+252 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc+436 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h+99 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc+112 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h+85 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc+126 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h+128 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/g711_interface.c+59 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/g711_interface.h+136 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/test/testG711.cc+168 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc+183 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h+88 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc+156 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h+71 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/g722_interface.c+104 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/g722_interface.h+174 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/test/testG722.cc+155 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c+82 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.c+89 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc+110 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h+54 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc+151 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h+61 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.c+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c+80 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c+81 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c+69 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c+67 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c+405 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h+40 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c+115 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.c+89 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.c+76 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.c+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/complexityMeasures.m+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/constants.c+667 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/constants.h+95 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.c+83 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode.c+261 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c+185 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h+45 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c+85 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/defines.h+225 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c+309 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/encode.c+517 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/encode.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.c+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.c+112 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.h+33 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer.c+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer.h+40 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c+382 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.c+50 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c+90 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.c+47 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.c+105 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.c+126 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h+40 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c+84 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.c+111 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_input.c+90 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_input.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_output.c+91 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_output.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c+288 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc.h+251 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc_unittest.cc+140 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.c+40 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.h+27 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.c+45 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.h+31 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c+98 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate.c+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.c+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c+62 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.c+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.h+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.c+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.c+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.c+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.c+88 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.h+33 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.c+86 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c+56 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/my_corr.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.c+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.c+253 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.c+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.h+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.c+159 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/refiner.c+141 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/refiner.h+44 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c+133 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c+96 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.c+62 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.h+34 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.c+49 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.h+37 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth.c+212 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.c+56 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.h+33 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.c+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/split_vq.c+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/split_vq.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_construct.c+116 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_construct.h+38 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_search.c+121 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_search.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.c+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/empty.cc TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c+238 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c+215 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c+343 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.c+241 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq3.c+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq3.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq4.c+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq4.h+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.c+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c+142 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h+54 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t_impl.h+85 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h+108 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h+225 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h+24 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/empty.cc TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h+22 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h+22 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/isacfix.h+486 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines.c+122 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c+401 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c+413 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h+149 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_encoder_isacfix.cc+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c+1021 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h+128 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h+212 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c+221 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c+69 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c+805 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c+635 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c+2056 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h+177 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c+249 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding_neon.c+217 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c+415 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h+87 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.c+62 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h+52 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c+297 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c+242 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c+278 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters.c+112 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_mips.c+365 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_neon.c+114 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c+173 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/isac_fix_type.h+106 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c+1230 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c+321 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_armv7.S+77 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_mips.c+329 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_neon.c+195 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c+949 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h+69 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_mips.c+237 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c+1281 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h+99 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c+435 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h+67 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c+114 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_mips.c+193 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c+248 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_armv6.S+143 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_mips.c+133 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c+149 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c+306 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h+99 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h+211 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c+193 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h+97 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h+345 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c+214 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_mips.c+1294 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_neon.c+479 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c+110 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h+22 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h+22 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/isac.h+617 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.c+60 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h+67 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c+291 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c+303 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/audio_decoder_isac.cc+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac.cc+20 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c+1013 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h+165 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h+223 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c+111 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/decode.c+303 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/decode_bwe.c+89 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c+1260 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c+706 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h+246 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c+2066 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h+347 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.c+195 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.h+25 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filterbanks.c+114 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/intialize.c+72 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c+2307 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_float_type.h+100 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_vad.c+409 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_vad.h+45 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lattice.c+219 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c+496 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c+136 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h+50 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c+158 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h+66 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c+247 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h+81 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.c+601 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.h+99 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c+695 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.c+388 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.h+42 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c+104 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c+277 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h+116 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/settings.h+196 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c+139 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h+79 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h+448 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/transform.c+126 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/util/utility.c+179 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/util/utility.h+108 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame.cc+88 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame.h+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc+179 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/DEPS+5 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_coder_opus_common.cc+52 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_coder_opus_common.h+89 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.cc+182 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h+74 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc+148 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.cc+149 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h+67 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc+366 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.h+92 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_unittest.cc+156 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc+824 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h+184 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc+914 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_bandwidth_unittest.cc+152 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc+105 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc+248 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_inst.h+43 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_interface.cc+880 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_interface.h+547 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_speed_test.cc+147 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc+979 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/BUILD.gn+55 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer.cc+76 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer.h+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc+111 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker.cc+215 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker.h+127 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker_unittest.cc+293 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform.cc+100 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform.h+175 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform_unittest.cc+203 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc+75 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h+54 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc+39 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc+29 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.h+22 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc+279 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h+102 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc+658 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.cc+126 TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h+93 TMessagesProj/jni/voip/webrtc/modules/audio_coding/include/audio_coding_module.h+146 TMessagesProj/jni/voip/webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h+137 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/accelerate.cc+105 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/accelerate.h+79 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc+526 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc+221 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector.h+138 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector_unittest.cc+323 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector.cc+380 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector.h+172 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector_unittest.cc+384 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise.cc+300 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise.h+138 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise_unittest.cc+26 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter.h+54 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter_unittest.cc+116 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise.cc+129 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise.h+72 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise_unittest.cc+31 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/cross_correlation.cc+55 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/cross_correlation.h+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic.cc+469 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic.h+183 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic_unittest.cc+204 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database.cc+285 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database.h+204 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc+227 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/default_neteq_factory.cc+31 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/default_neteq_factory.h+41 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager.cc+207 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager.h+121 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc+246 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper.cc+373 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper.h+161 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper_unittest.cc+88 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc+242 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer.h+104 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer_unittest.cc+297 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc+215 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc+180 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand.cc+888 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand.h+153 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_uma_logger.cc+71 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_uma_logger.h+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_unittest.cc+203 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/g3doc/index.md+102 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram.cc+149 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram.h+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram_unittest.cc+73 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge.cc+385 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge.h+101 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge_unittest.cc+121 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h+28 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h+50 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h+29 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h+35 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h+33 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_expand.h+60 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_histogram.h+30 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_neteq_controller.h+59 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_packet_arrival_history.h+31 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h+30 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_statistics_calculator.h+30 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker.cc+246 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker.h+206 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker_unittest.cc+552 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc+321 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl.cc+2133 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl.h+405 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc+1915 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc+346 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc+424 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_unittest.cc+1007 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_unittest.proto+31 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal.cc+194 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal.h+76 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal_unittest.cc+147 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet.cc+36 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet.h+128 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history.cc+132 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history.h+110 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history_unittest.cc+171 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer.cc+275 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer.h+144 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer_unittest.cc+644 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/preemptive_expand.cc+117 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/preemptive_expand.h+85 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector.cc+63 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector_unittest.cc+25 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter.cc+183 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter.h+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter_unittest.cc+389 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer.cc+75 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer.h+43 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer_unittest.cc+70 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator.cc+395 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator.h+210 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator_unittest.cc+206 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer.cc+118 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer.h+110 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer_unittest.cc+174 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/delay_tool/parse_delay_file.m+201 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/delay_tool/plot_neteq_delay.m+197 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_decoding_test.cc+423 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_decoding_test.h+96 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc+81 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc+183 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc+81 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc+80 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_performance_unittest.cc+61 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_speed_test.cc+58 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/result_sink.cc+108 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/result_sink.h+50 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch.cc+216 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch.h+113 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch_unittest.cc+124 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc+87 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler.h+67 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc+324 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/DEPS+3 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/README.md+17 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h+64 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_loop.cc+61 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_loop.h+57 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_sink.cc+26 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_sink.h+70 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.cc+71 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h+55 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc+94 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h+75 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc+122 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h+77 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/initial_packet_inserter_neteq_input.cc+88 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/initial_packet_inserter_neteq_input.h+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file.cc+96 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file.h+62 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc+59 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc+307 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.h+76 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_event_log_input.cc+167 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_event_log_input.h+28 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_input.cc+105 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_input.h+135 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc+128 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.h+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc+482 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h+176 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc+126 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.h+53 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtp_dump_input.cc+109 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtp_dump_input.h+32 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc+406 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay_test.sh+183 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_getter.cc+139 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_getter.h+106 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc+113 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_plotter.h+47 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test.cc+341 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test.h+129 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test_factory.cc+354 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test_factory.h+172 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h+51 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h+46 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet.cc+133 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet.h+104 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_source.cc+25 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_source.h+43 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_unittest.cc+226 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc+48 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h+55 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc+166 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_encode.cc+354 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc+99 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h+68 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_generator.cc+59 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h+83 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_jitter.cc+148 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc+45 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer.cc+71 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer.h+50 TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer_unittest.cc+42 TMessagesProj/jni/voip/webrtc/modules/audio_device/OWNERS+2 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_player.cc+216 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_player.h+141 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_recorder.cc+205 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_recorder.h+124 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_wrapper.cc+499 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_wrapper.h+127 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_common.h+28 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_device_template.h+441 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_manager.cc+318 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_manager.h+225 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_merged_screen_record_jni.cc+283 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_merged_screen_record_jni.h+169 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_record_jni.cc+280 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_record_jni.h+168 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_screen_record_jni.cc+278 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_screen_record_jni.h+167 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_track_jni.cc+296 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_track_jni.h+161 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/build_info.cc+59 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/build_info.h+86 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/ensure_initialized.cc+42 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/ensure_initialized.h+17 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_common.cc+103 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_common.h+62 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_player.cc+434 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_player.h+195 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_recorder.cc+431 TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_recorder.h+193 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_buffer.cc+539 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_buffer.h+253 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_config.h+30 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_data_observer.cc+373 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_generic.cc+66 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_generic.h+145 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_impl.cc+986 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_impl.h+191 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_name.cc+27 TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_name.h+50 TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/audio_device_dummy.cc+226 TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/audio_device_dummy.h+117 TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device.cc+508 TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device.h+163 TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc+62

11182 more files changed are not listed.

.github/workflows/build.ymldeleted−137
@@ -1,137 +0,0 @@
1−name: Build MultiGram
2−run-name: Build ${{ inputs.ref }}${{ inputs.apk && ' (APK)' || '' }}
3−
4−on:
5− workflow_dispatch:
6− inputs:
7− ref:
8− description: Branch, tag or commit to build
9− default: multigram
10− required: true
11− apk:
12− description: Also build a full release APK (slow, compiles the native code)
13− type: boolean
14− default: false
15− workflow_call:
16− inputs:
17− ref:
18− type: string
19− required: true
20− apk:
21− type: boolean
22− default: false
23− build_number:
24− description: MultiGram build number (0 to 9), the fourth part of the version (release.yml sets it)
25− type: string
26− default: '0'
27−
28−permissions:
29− contents: read
30−
31−jobs:
32− compile:
33− name: Compile Java and Kotlin
34− runs-on: ubuntu-latest
35− timeout-minutes: 60
36− steps:
37− - uses: actions/checkout@v4
38− with:
39− ref: ${{ inputs.ref }}
40− - name: Fetch the submodules the Java build needs
41− run: git submodule update --init --depth 1 TMessagesProj/lib/jlatexmath TMessagesProj_Modules/media
42− - uses: actions/setup-java@v4
43− with:
44− distribution: temurin
45− java-version: '17'
46− - uses: gradle/actions/setup-gradle@v4
47− - name: Compile
48− run: |
49− echo "org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g" >> gradle.properties
50− # buildNativeDeps compiles ffmpeg, libvpx, dav1d and friends; the Java and Kotlin
51− # compile does not need them, so skip it here (the apk job builds them).
52− ./gradlew --no-daemon --stacktrace -x :TMessagesProj:buildNativeDeps \
53− :TMessagesProj:compileReleaseJavaWithJavac \
54− :TMessagesProj_App:compileAfatReleaseJavaWithJavac
55− - name: Run MultiGram tool checks
56− if: hashFiles('multigram/tools/check.sh') != ''
57− run: bash multigram/tools/check.sh
58−
59− apk:
60− name: Release APK
61− if: ${{ inputs.apk }}
62− needs: compile
63− runs-on: ubuntu-latest
64− timeout-minutes: 300
65− steps:
66− - uses: actions/checkout@v4
67− with:
68− ref: ${{ inputs.ref }}
69− submodules: true
70− - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
71− with:
72− tool-cache: false
73− android: false
74− - name: Add swap space
75− # Runners for private repositories have about 8 GB of memory; the native build and the
76− # Gradle and Kotlin daemons together can use more, and the runner dies without a log.
77− run: |
78− sudo fallocate -l 8G /multigram-swap
79− sudo chmod 600 /multigram-swap
80− sudo mkswap /multigram-swap
81− sudo swapon /multigram-swap
82− free -h
83− - uses: actions/setup-java@v4
84− with:
85− distribution: temurin
86− java-version: '17'
87− - uses: nttld/setup-ndk@v1.4.2
88− with:
89− ndk-version: r27c
90− link-to-sdk: true
91− - name: Install NDK for the JNI build
92− run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;27.2.12479018"
93− - name: Build
94− env:
95− APP_ID: ${{ secrets.MULTIGRAM_APP_ID }}
96− APP_HASH: ${{ secrets.MULTIGRAM_APP_HASH }}
97− KEYSTORE_BASE64: ${{ secrets.MULTIGRAM_KEYSTORE_BASE64 }}
98− KEYSTORE_PASSWORD: ${{ secrets.MULTIGRAM_KEYSTORE_PASSWORD }}
99− KEY_ALIAS: ${{ secrets.MULTIGRAM_KEY_ALIAS }}
100− KEY_PASSWORD: ${{ secrets.MULTIGRAM_KEY_PASSWORD }}
101− BUILD_NUMBER: ${{ inputs.build_number }}
102− run: |
103− vars=gradle.properties
104− # Forkgram's versioning: versionName APP_VERSION_NAME.N and versionCode
105− # (APP_VERSION_CODE * 10 + N) * 10 + the flavor's ABI code, with N = ADDITIONAL_BUILD_NUMBER.
106− case "${BUILD_NUMBER:-0}" in [0-9]) ;; *) echo "::error::build_number must be one digit"; exit 1;; esac
107− echo "ADDITIONAL_BUILD_NUMBER=${BUILD_NUMBER:-0}" >> $vars
108− echo "org.gradle.workers.max=1" >> $vars
109− # Forkgram asks for an 8 GB heap, sized for the bigger runners of public repositories.
110− echo "org.gradle.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8" >> $vars
111− echo "kotlin.daemon.jvmargs=-Xmx2g" >> $vars
112− echo "org.gradle.parallel=false" >> $vars
113− [ -n "$APP_ID" ] && echo "APP_ID=$APP_ID" >> $vars
114− [ -n "$APP_HASH" ] && echo "APP_HASH=$APP_HASH" >> $vars
115− signing=()
116− if [ -n "$KEYSTORE_BASE64" ]; then
117− # Your own release key, from the MULTIGRAM_KEYSTORE_* secrets; it never touches the repository.
118− echo "$KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.keystore"
119− signing=(
120− "-PRELEASE_KEYSTORE_FILE=$RUNNER_TEMP/release.keystore"
121− "-PRELEASE_STORE_PASSWORD=$KEYSTORE_PASSWORD"
122− "-PRELEASE_KEY_ALIAS=$KEY_ALIAS"
123− "-PRELEASE_KEY_PASSWORD=${KEY_PASSWORD:-$KEYSTORE_PASSWORD}"
124− )
125− else
126− # Without RELEASE_KEYSTORE_FILE the build signs with the public test key in
127− # TMessagesProj/config/test.keystore: fine for testing, not for an APK you give out.
128− echo "::warning::No MULTIGRAM_KEYSTORE_BASE64 secret: the APK is signed with the public test key."
129− fi
130− sudo apt update
131− sudo apt -y install ninja-build meson nasm gperf pkg-config unzip
132− rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
133− ./gradlew "${signing[@]}" :TMessagesProj_App:assembleAfatRelease
134− - uses: actions/upload-artifact@v4
135− with:
136− name: multigram-apk
137− path: TMessagesProj_App/build/outputs/apk/afat/release/*.apk
.github/workflows/release.ymldeleted−242
@@ -1,242 +0,0 @@
1−name: Release MultiGram
2−run-name: Release ${{ inputs.ref }}${{ inputs.dry_run && ' (dry run)' || '' }}
3−
4−# Builds the release APK of a MultiGram commit and publishes it as a GitHub Release.
5−#
6−# Version: Forkgram's own scheme, APP_VERSION_NAME.N (for example 12.10.6.1), where APP_VERSION_NAME
7−# comes from gradle.properties of the Forkgram snapshot and N (1 to 9) counts MultiGram releases on
8−# that Forkgram version. The Android versionCode is (APP_VERSION_CODE * 10 + N) * 10 + 9, so every
9−# release installs as an update over the one before, and a new Forkgram version starts again at N = 1.
10−# The tag is the version itself, like Forkgram's tags.
11−
12−on:
13− workflow_dispatch:
14− inputs:
15− ref:
16− description: Branch, tag or commit to release
17− default: multigram
18− required: true
19− number:
20− description: MultiGram build number for this Forkgram version (1 to 9). Empty picks the next free one.
21− required: false
22− default: ''
23− prerelease:
24− description: Mark it as a pre-release (always the case without your own signing key)
25− type: boolean
26− default: false
27− dry_run:
28− description: Only work out the version and the release notes; build and publish nothing
29− type: boolean
30− default: false
31−
32−permissions:
33− contents: read
34−
35−concurrency:
36− group: release
37− cancel-in-progress: false
38−
39−jobs:
40− check_secrets:
41− # A job of its own, so that no secret value is registered in the job that writes the release
42− # notes: the runner drops any job output that contains a secret's value (a key alias like
43− # "release" would otherwise blank the notes).
44− name: Check the secrets
45− runs-on: ubuntu-latest
46− outputs:
47− signed: ${{ steps.s.outputs.signed }}
48− steps:
49− - name: Check the secrets
50− id: s
51− env:
52− DRY_RUN: ${{ inputs.dry_run }}
53− APP_ID: ${{ secrets.MULTIGRAM_APP_ID }}
54− APP_HASH: ${{ secrets.MULTIGRAM_APP_HASH }}
55− KEYSTORE_BASE64: ${{ secrets.MULTIGRAM_KEYSTORE_BASE64 }}
56− KEYSTORE_PASSWORD: ${{ secrets.MULTIGRAM_KEYSTORE_PASSWORD }}
57− KEY_ALIAS: ${{ secrets.MULTIGRAM_KEY_ALIAS }}
58− run: |
59− set -euo pipefail
60− # Stop here, in seconds, rather than after the long build. A dry run only warns.
61− problem() { if [ "$DRY_RUN" = true ]; then echo "::warning::$1"; else echo "::error::$1"; exit 1; fi; }
62− if [ -z "$APP_ID" ] || [ -z "$APP_HASH" ]; then
63− problem "The MULTIGRAM_APP_ID and MULTIGRAM_APP_HASH secrets are not set, so the APK could not log in. Add them (Settings > Secrets and variables > Actions) and run this again."
64− fi
65− if [ -n "$KEYSTORE_BASE64" ]; then
66− if [ -z "$KEYSTORE_PASSWORD" ] || [ -z "$KEY_ALIAS" ]; then
67− problem "MULTIGRAM_KEYSTORE_BASE64 is set, but MULTIGRAM_KEYSTORE_PASSWORD or MULTIGRAM_KEY_ALIAS is not: signing would fail at the end of the build. Add both."
68− fi
69− echo "signed=true" >> "$GITHUB_OUTPUT"
70− else
71− echo "::warning::No MULTIGRAM_KEYSTORE_BASE64 secret: the release will be signed with Forkgram's public test key and published as a pre-release."
72− echo "signed=false" >> "$GITHUB_OUTPUT"
73− fi
74−
75− prepare:
76− name: Work out the version
77− needs: check_secrets
78− runs-on: ubuntu-latest
79− outputs:
80− sha: ${{ steps.v.outputs.sha }}
81− number: ${{ steps.v.outputs.number }}
82− version: ${{ steps.v.outputs.version }}
83− version_code: ${{ steps.v.outputs.version_code }}
84− prerelease: ${{ steps.v.outputs.prerelease }}
85− notes: ${{ steps.v.outputs.notes }}
86− steps:
87− - uses: actions/checkout@v4
88− with:
89− ref: ${{ inputs.ref }}
90− fetch-depth: 0
91− - name: Version, secrets and release notes
92− id: v
93− env:
94− NUMBER: ${{ inputs.number }}
95− PRERELEASE: ${{ inputs.prerelease }}
96− DRY_RUN: ${{ inputs.dry_run }}
97− SIGNED: ${{ needs.check_secrets.outputs.signed }}
98− run: |
99− set -euo pipefail
100− fail() { echo "::error::$1"; exit 1; }
101− sha=$(git rev-parse HEAD)
102− name=$(sed -n 's/^APP_VERSION_NAME=//p' gradle.properties | tail -n 1)
103− code=$(sed -n 's/^APP_VERSION_CODE=//p' gradle.properties | tail -n 1)
104− [[ "$name" =~ ^[0-9]+(\.[0-9]+)*$ ]] || fail "APP_VERSION_NAME in gradle.properties is '$name', not a version number."
105− [[ "$code" =~ ^[0-9]+$ ]] || fail "APP_VERSION_CODE in gradle.properties is '$code', not a number."
106−
107− # The next free N for this Forkgram version, from the tags that already exist.
108− last=$(git tag -l "$name.*" | sed -n "s/^${name//./\\.}\.\([0-9]\)$/\1/p" | sort -n | tail -n 1)
109− if [ -n "$NUMBER" ]; then
110− n=$NUMBER
111− else
112− n=$(( ${last:-0} + 1 ))
113− fi
114− [[ "$n" =~ ^[1-9]$ ]] || fail "The MultiGram build number must be 1 to 9 (got '$n'). Nine releases on Forkgram $name are the most its version codes allow; wait for the next Forkgram version."
115− version="$name.$n"
116− if git rev-parse -q --verify "refs/tags/$version" >/dev/null; then
117− fail "Tag $version already exists: MultiGram $version is already released. Leave the number empty to take the next free one."
118− fi
119− if [ -n "$last" ] && [ "$n" -le "$last" ]; then
120− echo "::warning::$name.$last is already released, so $version has a lower version code and will not install as an update over it."
121− fi
122− version_code=$(( (code * 10 + n) * 10 + 9 ))
123−
124− # What it is built on, from the snapshot commit the sync made.
125− snap=$(git log -n 1 --format=%H --grep='^Forkgram-Version: ' HEAD || true)
126− fg_version=unknown; tg_version=unknown
127− if [ -n "$snap" ]; then
128− msg=$(git log -1 --format=%B "$snap")
129− fg_version=$(printf '%s\n' "$msg" | sed -n 's/^Forkgram-Version: //p' | head -n 1)
130− tg_version=$(printf '%s\n' "$msg" | sed -n 's/^Telegram-Base: .*(update to \([0-9.]*\).*/\1/p' | head -n 1)
131− fg_version=${fg_version:-unknown}; tg_version=${tg_version:-unknown}
132− fi
133−
134− signed=${SIGNED:-false}
135− prerelease=$PRERELEASE
136− [ "$signed" = true ] || prerelease=true
137−
138− notes=$(mktemp)
139− {
140− echo "MultiGram $version is Forkgram $fg_version (Telegram $tg_version) with the MultiGram changes listed below."
141− echo
142− if [ "$signed" = true ]; then
143− echo "**Signing:** signed with the MultiGram release key. It installs as an update over earlier MultiGram releases signed with the same key."
144− else
145− echo "**Signing: public test key.** This APK is signed with Forkgram's public test key (\`TMessagesProj/config/test.keystore\`), because the repository has no \`MULTIGRAM_KEYSTORE_BASE64\` secret. Anyone can sign an \"update\" for it, and a later release signed with a real key cannot update it. Use it for testing only."
146− fi
147− echo
148− echo "**Version:** $version (Android version code $version_code). Built from $sha."
149− echo
150− echo "**MultiGram changes on top of Forkgram $fg_version:**"
151− echo
152− if [ -n "$snap" ]; then
153− git log --reverse --format='- %s (%h)' "$snap..HEAD"
154− else
155− echo "- (no Forkgram snapshot found in the history)"
156− fi
157− } > "$notes"
158−
159− {
160− echo "sha=$sha"
161− echo "number=$n"
162− echo "version=$version"
163− echo "version_code=$version_code"
164− echo "prerelease=$prerelease"
165− echo "notes<<MULTIGRAM_NOTES_EOF"
166− cat "$notes"
167− echo "MULTIGRAM_NOTES_EOF"
168− } >> "$GITHUB_OUTPUT"
169− {
170− if [ "$DRY_RUN" = true ]; then echo "## MultiGram $version (dry run: nothing built or published)"; else echo "## MultiGram $version"; fi
171− echo
172− echo "Pre-release: $prerelease"
173− echo
174− cat "$notes"
175− } >> "$GITHUB_STEP_SUMMARY"
176− cat "$notes"
177−
178− build:
179− name: Build
180− needs: [check_secrets, prepare]
181− if: ${{ !inputs.dry_run }}
182− uses: ./.github/workflows/build.yml
183− with:
184− ref: ${{ needs.prepare.outputs.sha }}
185− apk: true
186− build_number: ${{ needs.prepare.outputs.number }}
187− secrets: inherit
188−
189− publish:
190− name: Publish the release
191− needs: [prepare, build]
192− runs-on: ubuntu-latest
193− permissions:
194− contents: write
195− steps:
196− - uses: actions/download-artifact@v4
197− with:
198− name: multigram-apk
199− path: apk
200− - name: Check the APK and publish it
201− env:
202− GH_TOKEN: ${{ github.token }}
203− SHA: ${{ needs.prepare.outputs.sha }}
204− VERSION: ${{ needs.prepare.outputs.version }}
205− VERSION_CODE: ${{ needs.prepare.outputs.version_code }}
206− PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
207− NOTES: ${{ needs.prepare.outputs.notes }}
208− run: |
209− set -euo pipefail
210− fail() { echo "::error::$1"; exit 1; }
211− shopt -s nullglob
212− apks=(apk/*.apk)
213− [ "${#apks[@]}" -eq 1 ] || fail "Expected one APK in the build artifact, found ${#apks[@]}."
214− file="MultiGram-$VERSION.apk"
215− mv "${apks[0]}" "$file"
216−
217− tools=$(ls -d "$ANDROID_HOME"/build-tools/* | sort -V | tail -n 1)
218− badging=$("$tools/aapt2" dump badging "$file" | head -n 1)
219− echo "$badging"
220− got_name=$(printf '%s' "$badging" | sed -n "s/.* versionName='\([^']*\)'.*/\1/p")
221− got_code=$(printf '%s' "$badging" | sed -n "s/.* versionCode='\([^']*\)'.*/\1/p")
222− [ "$got_name" = "$VERSION" ] || fail "The APK says versionName $got_name, expected $VERSION."
223− [ "$got_code" = "$VERSION_CODE" ] || fail "The APK says versionCode $got_code, expected $VERSION_CODE."
224− cert=$("$tools/apksigner" verify --print-certs "$file" | sed -n 's/^Signer #1 certificate SHA-256 digest: //p' | head -n 1)
225− [ -n "$cert" ] || fail "apksigner could not verify the APK's signature."
226− sha256sum "$file" > SHA256SUMS
227−
228− {
229− printf '%s\n' "$NOTES"
230− echo
231− echo "**Checksums:** \`$(cut -d' ' -f1 SHA256SUMS)\` ($file, SHA-256). Signing certificate SHA-256: \`$cert\`."
232− } > notes.md
233−
234− flags=()
235− if [ "$PRERELEASE" = true ]; then flags+=(--prerelease); fi
236− gh release create "$VERSION" "$file" SHA256SUMS \
237− --repo "$GITHUB_REPOSITORY" \
238− --target "$SHA" \
239− --title "MultiGram $VERSION" \
240− --notes-file notes.md \
241− "${flags[@]}"
242− echo "Published https://github.com/$GITHUB_REPOSITORY/releases/tag/$VERSION" | tee -a "$GITHUB_STEP_SUMMARY"
.github/workflows/sync-forkgram.ymldeleted−177
@@ -1,177 +0,0 @@
1−name: Sync with Forkgram
2−run-name: Sync with Forkgram${{ inputs.use_next && ' (use multigram-next)' || '' }}${{ inputs.allow_drop && ' (allow drop)' || '' }}${{ inputs.force && ' (force)' || '' }}
3−
4−# Every 6 hours: snapshot a new Forkgram release onto "forkgram", replay the MultiGram
5−# stack onto it as "multigram-next", compile that, and only if it compiles move "multigram"
6−# to it. Conflicts and failures go to an issue labelled forkgram-sync; multigram stays as
7−# it was. A multigram-next changed by hand is never replaced. See README.md and
8−# scripts/sync-forkgram.sh.
9−on:
10− schedule:
11− - cron: '23 */6 * * *'
12− workflow_dispatch:
13− inputs:
14− force:
15− description: Rebuild multigram-next even without a new Forkgram release (tests the pipeline, or retries after a failed compile)
16− type: boolean
17− default: false
18− use_next:
19− description: Skip the rebase; compile and promote the multigram-next branch you fixed by hand
20− type: boolean
21− default: false
22− allow_drop:
23− description: Only with use_next. Accept a multigram-next that leaves out some of multigram's commits (Forkgram has them now, or you dropped them on purpose)
24− type: boolean
25− default: false
26−
27−permissions: {}
28−
29−concurrency:
30− group: forkgram-sync
31− cancel-in-progress: false
32−
33−jobs:
34− sync:
35− name: Snapshot Forkgram and replay the stack
36− runs-on: ubuntu-latest
37− timeout-minutes: 60
38− permissions:
39− contents: write # push forkgram, multigram-next and refs/multigram-sync/next
40− issues: read # see whether the report job has anything to do
41− outputs:
42− status: ${{ steps.sync.outputs.status }}
43− message: ${{ steps.sync.outputs.message }}
44− error: ${{ steps.sync.outputs.error }}
45− new_snapshot: ${{ steps.sync.outputs.new_snapshot }}
46− forkgram_commit: ${{ steps.sync.outputs.forkgram_commit }}
47− forkgram_version: ${{ steps.sync.outputs.forkgram_version }}
48− snapshot: ${{ steps.sync.outputs.snapshot }}
49− previous_snapshot: ${{ steps.sync.outputs.previous_snapshot }}
50− multigram: ${{ steps.sync.outputs.multigram }}
51− multigram_base: ${{ steps.sync.outputs.multigram_base }}
52− candidate: ${{ steps.sync.outputs.candidate }}
53− tag_version: ${{ steps.sync.outputs.tag_version }}
54− conflict_commit: ${{ steps.sync.outputs.conflict_commit }}
55− conflict_subject: ${{ steps.sync.outputs.conflict_subject }}
56− conflict_position: ${{ steps.sync.outputs.conflict_position }}
57− conflict_files: ${{ steps.sync.outputs.conflict_files }}
58− conflict_details: ${{ steps.sync.outputs.conflict_details }}
59− dropped: ${{ steps.sync.outputs.dropped }}
60− existing_next: ${{ steps.sync.outputs.existing_next }}
61− forkgram_tip: ${{ steps.sync.outputs.forkgram_tip }}
62− report: ${{ steps.need.outputs.report }}
63− steps:
64− # Blobless: the history and trees of forkgram and multigram come cheap, and file
65− # contents are fetched only when the rebase needs them.
66− - uses: actions/checkout@v4
67− with:
68− fetch-depth: 1
69− filter: blob:none
70− - name: Sync
71− id: sync
72− env:
73− FORCE: ${{ inputs.force }}
74− USE_NEXT: ${{ inputs.use_next }}
75− ALLOW_DROP: ${{ inputs.allow_drop }}
76− run: |
77− git config user.name 'github-actions[bot]'
78− git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
79− args=(--remote origin --push)
80− if [ "$FORCE" = true ]; then args+=(--force); fi
81− if [ "$USE_NEXT" = true ]; then args+=(--use-next); fi
82− if [ "$ALLOW_DROP" = true ]; then args+=(--allow-drop); fi
83− bash scripts/sync-forkgram.sh "${args[@]}"
84− # Most scheduled runs find nothing new. Skip the report job then, since every job
85− # costs at least a billed minute: it only has work when an issue is open to close
86− # (up-to-date), or none is open yet (behind).
87− - name: Check whether the report job has anything to do
88− id: need
89− if: steps.sync.outputs.status == 'up-to-date' || steps.sync.outputs.status == 'behind'
90− env:
91− GH_TOKEN: ${{ github.token }}
92− GH_REPO: ${{ github.repository }}
93− STATUS: ${{ steps.sync.outputs.status }}
94− run: |
95− open=$(gh issue list --label forkgram-sync --state open --json number --jq length) || open=unknown
96− echo "Open forkgram-sync issues: $open"
97− case "$STATUS:$open" in
98− up-to-date:0 | behind:[1-9]*) echo report=no >>"$GITHUB_OUTPUT" ;;
99− *) echo report=yes >>"$GITHUB_OUTPUT" ;;
100− esac
101−
102− compile:
103− name: Compile multigram-next
104− needs: sync
105− if: needs.sync.outputs.candidate != ''
106− permissions:
107− contents: read
108− uses: ./.github/workflows/build.yml
109− with:
110− ref: ${{ needs.sync.outputs.candidate }}
111−
112− promote:
113− name: Move multigram to multigram-next
114− needs: [sync, compile]
115− if: needs.compile.result == 'success'
116− runs-on: ubuntu-latest
117− timeout-minutes: 15
118− permissions:
119− contents: write # move multigram, tag its old tip, delete multigram-next
120− outputs:
121− status: ${{ steps.promote.outputs.status }}
122− tag: ${{ steps.promote.outputs.tag }}
123− steps:
124− - uses: actions/checkout@v4
125− with:
126− fetch-depth: 1
127− filter: blob:none
128− - name: Promote
129− id: promote
130− env:
131− CANDIDATE: ${{ needs.sync.outputs.candidate }}
132− PREVIOUS: ${{ needs.sync.outputs.multigram }}
133− VERSION: ${{ needs.sync.outputs.tag_version }}
134− run: |
135− bash scripts/sync-forkgram.sh promote --remote origin --shallow \
136− --candidate "$CANDIDATE" --previous "$PREVIOUS" --version "$VERSION"
137−
138− report:
139− name: Report on the forkgram-sync issue
140− needs: [sync, compile, promote]
141− if: ${{ !cancelled() && needs.sync.outputs.report != 'no' }}
142− runs-on: ubuntu-latest
143− timeout-minutes: 10
144− permissions:
145− contents: read # the report script
146− issues: write # open, comment on and close the forkgram-sync issue
147− steps:
148− - uses: actions/checkout@v4
149− with:
150− sparse-checkout: scripts
151− - name: Open, update or close the issue
152− env:
153− GH_TOKEN: ${{ github.token }}
154− GH_REPO: ${{ github.repository }}
155− RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
156− SYNC_RESULT: ${{ needs.sync.result }}
157− COMPILE_RESULT: ${{ needs.compile.result }}
158− PROMOTE_RESULT: ${{ needs.promote.result }}
159− PROMOTE_TAG: ${{ needs.promote.outputs.tag }}
160− SYNC_STATUS: ${{ needs.sync.outputs.status }}
161− SYNC_MESSAGE: ${{ needs.sync.outputs.message }}
162− SYNC_ERROR: ${{ needs.sync.outputs.error }}
163− SYNC_FORKGRAM_COMMIT: ${{ needs.sync.outputs.forkgram_commit }}
164− SYNC_FORKGRAM_VERSION: ${{ needs.sync.outputs.forkgram_version }}
165− SYNC_SNAPSHOT: ${{ needs.sync.outputs.snapshot }}
166− SYNC_PREVIOUS_SNAPSHOT: ${{ needs.sync.outputs.previous_snapshot }}
167− SYNC_MULTIGRAM_BASE: ${{ needs.sync.outputs.multigram_base }}
168− SYNC_CANDIDATE: ${{ needs.sync.outputs.candidate }}
169− SYNC_CONFLICT_COMMIT: ${{ needs.sync.outputs.conflict_commit }}
170− SYNC_CONFLICT_SUBJECT: ${{ needs.sync.outputs.conflict_subject }}
171− SYNC_CONFLICT_POSITION: ${{ needs.sync.outputs.conflict_position }}
172− SYNC_CONFLICT_FILES: ${{ needs.sync.outputs.conflict_files }}
173− SYNC_CONFLICT_DETAILS: ${{ needs.sync.outputs.conflict_details }}
174− SYNC_DROPPED: ${{ needs.sync.outputs.dropped }}
175− SYNC_EXISTING_NEXT: ${{ needs.sync.outputs.existing_next }}
176− SYNC_FORKGRAM_TIP: ${{ needs.sync.outputs.forkgram_tip }}
177− run: python3 scripts/sync-report.py
.gitignorenew file+25
@@ -0,0 +1,25 @@
1+.idea/
2+.gradle/
3+.cxx/
4+build/
5+obj/
6+*.iml
7+local.properties
8+TMessagesProj/.cxx/
9+TMessagesProj/jniLibs/
10+TMessagesProj/jniRes/
11+**/.DS_Store
12+TMessagesProj/afat/
13+TMessagesProj_App/afat/
14+TMessagesProj_AppHockeyApp/afat/
15+TMessagesProj_AppStandalone/afat/
16+TMessagesProj_AppHuawei/afat/
17+API_KEYS
18+*.hprof
19+TMessagesProj/jni/cache_keys/
20+TMessagesProj/.externalNativeBuild/
21+TMessagesProj/jni/prebuild/build/
22+TMessagesProj/jni/prebuild/lib/
23+TMessagesProj/jni/prebuild/include/
24+TMessagesProj/jni/prebuild/pkgconfig/
25+TMessagesProj/jni/prebuild/build_env.txt
.gitmodulesnew file+48
@@ -0,0 +1,48 @@
1+[submodule "TMessagesProj/jni/tlottie"]
2+ path = TMessagesProj/jni/tlottie
3+ url = https://github.com/dkaraush/tlottie.git
4+[submodule "TMessagesProj/jni/third_party/libvpx"]
5+ path = TMessagesProj/jni/third_party/libvpx
6+ url = https://github.com/webmproject/libvpx.git
7+[submodule "TMessagesProj/jni/third_party/dav1d"]
8+ path = TMessagesProj/jni/third_party/dav1d
9+ url = https://github.com/videolan/dav1d.git
10+[submodule "TMessagesProj/jni/third_party/ffmpeg"]
11+ path = TMessagesProj/jni/third_party/ffmpeg
12+ url = https://github.com/FFmpeg/FFmpeg.git
13+[submodule "TMessagesProj/lib/jlatexmath"]
14+ path = TMessagesProj/lib/jlatexmath
15+ url = https://github.com/dkaraush/jlatexmath-android.git
16+[submodule "TMessagesProj/jni/third_party/xiph/ogg"]
17+ path = TMessagesProj/jni/third_party/xiph/ogg
18+ url = https://github.com/xiph/ogg.git
19+[submodule "TMessagesProj/jni/third_party/xiph/opusfile"]
20+ path = TMessagesProj/jni/third_party/xiph/opusfile
21+ url = https://github.com/xiph/opusfile.git
22+[submodule "TMessagesProj/jni/third_party/xiph/opus"]
23+ path = TMessagesProj/jni/third_party/xiph/opus
24+ url = https://github.com/xiph/opus.git
25+[submodule "TMessagesProj/jni/third_party/libyuv"]
26+ path = TMessagesProj/jni/third_party/libyuv
27+ url = https://chromium.googlesource.com/libyuv/libyuv
28+[submodule "TMessagesProj/jni/third_party/openh264"]
29+ path = TMessagesProj/jni/third_party/openh264
30+ url = https://github.com/cisco/openh264.git
31+[submodule "TMessagesProj/jni/third_party/boringssl"]
32+ path = TMessagesProj/jni/third_party/boringssl
33+ url = https://github.com/google/boringssl.git
34+[submodule "TMessagesProj/jni/td"]
35+ path = TMessagesProj/jni/td
36+ url = https://github.com/tdlib/td.git
37+[submodule "TMessagesProj_Modules/media"]
38+ path = TMessagesProj_Modules/media
39+ url = https://github.com/Arseny271/media.git
40+[submodule "TMessagesProj/jni/third_party/absl"]
41+ path = TMessagesProj/jni/third_party/absl
42+ url = https://github.com/abseil/abseil-cpp.git
43+[submodule "TMessagesProj/jni/third_party/wamr"]
44+ path = TMessagesProj/jni/third_party/wamr
45+ url = https://github.com/wasm-micro-runtime/wasm-micro-runtime.git
46+[submodule "TMessagesProj/jni/libwebp"]
47+ path = TMessagesProj/jni/libwebp
48+ url = https://github.com/webmproject/libwebp
.vscode/keybindings.jsonnew file+7
@@ -0,0 +1,7 @@
1+[
2+ {
3+ "key": "f16",
4+ "command": "workbench.action.tasks.runTask",
5+ "args": "Deploy (sync + build + install)"
6+ }
7+]
.vscode/tasks.jsonnew file+76
@@ -0,0 +1,76 @@
1+{
2+ "version": "2.0.0",
3+ "tasks": [
4+ {
5+ "label": "Deploy (sync + build + install)",
6+ "type": "shell",
7+ "command": "${workspaceFolder}/scripts/remote-build.sh",
8+ "args": ["deploy"],
9+ "group": {
10+ "kind": "build",
11+ "isDefault": true
12+ },
13+ "presentation": {
14+ "reveal": "always",
15+ "panel": "shared",
16+ "clear": true
17+ },
18+ "problemMatcher": []
19+ },
20+ {
21+ "label": "Build only (sync + build)",
22+ "type": "shell",
23+ "command": "${workspaceFolder}/scripts/remote-build.sh",
24+ "args": ["build"],
25+ "presentation": {
26+ "reveal": "always",
27+ "panel": "shared"
28+ },
29+ "problemMatcher": []
30+ },
31+ {
32+ "label": "Install last APK",
33+ "type": "shell",
34+ "command": "${workspaceFolder}/scripts/remote-build.sh",
35+ "args": ["install"],
36+ "presentation": {
37+ "reveal": "always",
38+ "panel": "shared"
39+ },
40+ "problemMatcher": []
41+ },
42+ {
43+ "label": "Sync files only",
44+ "type": "shell",
45+ "command": "${workspaceFolder}/scripts/remote-build.sh",
46+ "args": ["sync"],
47+ "presentation": {
48+ "reveal": "always",
49+ "panel": "shared"
50+ },
51+ "problemMatcher": []
52+ },
53+ {
54+ "label": "Setup Docker image (one-time)",
55+ "type": "shell",
56+ "command": "${workspaceFolder}/scripts/remote-build.sh",
57+ "args": ["setup"],
58+ "presentation": {
59+ "reveal": "always",
60+ "panel": "shared"
61+ },
62+ "problemMatcher": []
63+ },
64+ {
65+ "label": "Check prerequisites",
66+ "type": "shell",
67+ "command": "${workspaceFolder}/scripts/remote-build.sh",
68+ "args": ["check"],
69+ "presentation": {
70+ "reveal": "always",
71+ "panel": "shared"
72+ },
73+ "problemMatcher": []
74+ }
75+ ]
76+}
BUILDING.mdnew file+95
@@ -0,0 +1,95 @@
1+## Building instructions for Debian 13
2+
3+1. Install necessary software
4+ - `sudo apt install cmake golang gperf meson nasm ninja-build pkg-config rustup sdkmanager wget yasm`
5+ - `rustup default stable && rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android`
6+ - `sudo apt install google-android-platform-36-installer google-android-build-tools-36.0.0-installer google-android-ndk-r27c-installer openjdk-21-jdk-headless`
7+
8+2. Don't forget to include the submodules when you clone:
9+ - `git clone --recursive https://github.com/forkgram/TelegramAndroid.git`
10+
11+3. Build the native dependencies (BoringSSL, OpenH264, Opus, libvpx, dav1d, FFmpeg, tlottie and TDLib):
12+ - Go to the `TMessagesProj/jni` folder and execute the following (define the paths to your NDK and SDK):
13+
14+ ```
15+ export ANDROID_NDK_HOME=/usr/lib/android-sdk/ndk/27.2.12479018
16+ export ANDROID_SDK_ROOT=/usr/lib/android-sdk
17+ export ABIS="arm64-v8a armeabi-v7a"
18+ sudo sdkmanager "cmake;3.22.1" "ndk;27.2.12479018" --sdk_root /usr/lib/android-sdk
19+ ./prebuild/build_all.sh
20+ ```
21+
22+ The archives land in `TMessagesProj/jni/prebuild/lib/<abi>/`; drop `ABIS` to build all four.
23+
24+ Gradle runs the same steps automatically through `TMessagesProj/jni/prepare.py`.
25+
26+4. If you want to publish a modified version of Telegram:
27+ - You should get **your own API key** here: https://core.telegram.org/api/obtaining_api_id and edit a file called `gradle.properties` in the source root directory.
28+ The contents should look like this:
29+ ```
30+ APP_ID = 12345
31+ APP_HASH = aaaaaaaabbbbbbccccccfffffff001122
32+ ```
33+ - Do not use the name Telegram and the standard logo (white paper plane in a blue circle) for your app — or make sure your users understand that it is unofficial
34+ - Take good care of your users' data and privacy
35+ - **Please remember to publish your code too in order to comply with the licenses**
36+
37+The project can be built with Android Studio or from the command line with gradle:
38+
39+`./gradlew assembleAfatRelease`
40+
41+## Reproducible builds
42+
43+The repository ships a pinned Docker image and a build script that produce
44+byte-for-byte identical APKs across machines, given the same git revision and
45+signing key.
46+
47+Pinned in [docker/Dockerfile](docker/Dockerfile):
48+
49+- Ubuntu 22.04, JDK 17, UTC timezone, `C.UTF-8` locale
50+- Android command-line tools `11076708`
51+- SDK platform 36, Build Tools 36.0.0
52+- NDK `27.2.12479018` (native dependency scripts and gradle `externalNativeBuild`)
53+- CMake `3.22.1`
54+
55+### Building
56+
57+```
58+scripts/reproducible-build.sh
59+```
60+
61+`SOURCE_DATE_EPOCH` is taken from `git log -1 --format=%ct HEAD`, then exported
62+into the container. The script applies [reproducible.gradle](reproducible.gradle)
63+as an init script, which forces `preserveFileTimestamps = false` and
64+`reproducibleFileOrder = true` on every archive task (AGP 8 already does this
65+for APKs and AABs; the init script covers custom Zip/Jar tasks).
66+
67+To build a non-default target:
68+
69+```
70+scripts/reproducible-build.sh :TMessagesProj_App:bundleBundleAfatRelease
71+```
72+
73+### Verifying a published APK
74+
75+```
76+scripts/verify-apk.sh path/to/published.apk \
77+ TMessagesProj_App/build/outputs/apk/afat/release/app.apk
78+```
79+
80+The script delegates to [apkdiff.py](apkdiff.py) which ignores the v1 signature
81+block (`META-INF/MANIFEST.MF`, `META-INF/CERT.RSA`, `META-INF/CERT.SF`) since
82+those depend on the signing key, not on the source.
83+
84+### Known caveats
85+
86+- **Build host OS leaks into the APK.** `Utilities.parseInt` branches on
87+ `BuildConfig.BUILD_HOST_IS_WINDOWS`, which is set at build time. The
88+ reproducible image is Linux, so the canonical value is always `false`.
89+ Builds run directly on Windows will diverge.
90+- **Signing key.** Two builds signed with different keys will differ in the
91+ signature blocks. Use `scripts/verify-apk.sh` to compare ignoring those
92+ entries, or sign the rebuilt APK with the same key before comparing.
93+- **NDK / AGP upgrades.** Bumping `ndkVersion`, `buildToolsVersion`, or the
94+ AGP/Kotlin plugin versions invalidates the reproducibility baseline. Update
95+ the Docker image in the same commit and rebuild the reference APK.
Dockerfilenew file+50
@@ -0,0 +1,50 @@
1+FROM gradle:8.13-jdk17
2+
3+ENV ANDROID_CMDLINE_TOOLS_VERSION=15859902
4+ENV ANDROID_SDK_URL=https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_CMDLINE_TOOLS_VERSION}_latest.zip
5+
6+ENV ANDROID_HOME=/usr/local/android-sdk-linux
7+
8+ENV ANDROID_API_LEVEL=android-36
9+ENV ANDROID_VERSION=36
10+ENV ANDROID_BUILD_TOOLS_VERSION=36.0.0
11+
12+ENV ANDROID_NDK_VERSION=27.2.12479018
13+ENV ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}
14+
15+ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools
16+ENV PATH=${PATH}:${ANDROID_NDK_HOME}
17+ENV PATH=${PATH}:${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin
18+
19+RUN mkdir -p "${ANDROID_HOME}/cmdline-tools" /home/gradle/.android && \
20+ cd /tmp && \
21+ curl -fL "${ANDROID_SDK_URL}" -o commandlinetools.zip && \
22+ unzip commandlinetools.zip && \
23+ mv cmdline-tools "${ANDROID_HOME}/cmdline-tools/latest" && \
24+ rm commandlinetools.zip
25+
26+RUN yes | sdkmanager --sdk_root="${ANDROID_HOME}" --licenses
27+RUN sdkmanager \
28+ --sdk_root="${ANDROID_HOME}" \
29+ "build-tools;36.0.0" \
30+ "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
31+ "platforms;android-${ANDROID_VERSION}" \
32+ "platform-tools" \
33+ "ndk;${ANDROID_NDK_VERSION}" \
34+ "cmake;3.22.1"
35+
36+CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && \
37+ mkdir -p /home/gradle/TMessagesProj/build/outputs/bundle && \
38+ mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && \
39+ cp -R /home/source/. /home/gradle && \
40+ cd /home/gradle && \
41+ gradle --parallel \
42+ :TMessagesProj_App:bundleBundleAfat_SDK23Release \
43+ :TMessagesProj_App:bundleBundleAfatRelease \
44+ :TMessagesProj_AppStandalone:assembleAfatStandalone \
45+ :TMessagesProj_App:assembleAfatRelease \
46+ :TMessagesProj_AppHuawei:assembleAfatRelease --stacktrace && \
47+ cp -R /home/gradle/TMessagesProj_App/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && \
48+ cp -R /home/gradle/TMessagesProj_AppHuawei/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && \
49+ cp -R /home/gradle/TMessagesProj_AppStandalone/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && \
50+ cp -R /home/gradle/TMessagesProj_App/build/outputs/bundle/. /home/source/TMessagesProj/build/outputs/bundle
LICENSEnew file+339
@@ -0,0 +1,339 @@
1+ GNU GENERAL PUBLIC LICENSE
2+ Version 2, June 1991
3+
4+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6+ Everyone is permitted to copy and distribute verbatim copies
7+ of this license document, but changing it is not allowed.
8+
9+ Preamble
10+
11+ The licenses for most software are designed to take away your
12+freedom to share and change it. By contrast, the GNU General Public
13+License is intended to guarantee your freedom to share and change free
14+software--to make sure the software is free for all its users. This
15+General Public License applies to most of the Free Software
16+Foundation's software and to any other program whose authors commit to
17+using it. (Some other Free Software Foundation software is covered by
18+the GNU Lesser General Public License instead.) You can apply it to
19+your programs, too.
20+
21+ When we speak of free software, we are referring to freedom, not
22+price. Our General Public Licenses are designed to make sure that you
23+have the freedom to distribute copies of free software (and charge for
24+this service if you wish), that you receive source code or can get it
25+if you want it, that you can change the software or use pieces of it
26+in new free programs; and that you know you can do these things.
27+
28+ To protect your rights, we need to make restrictions that forbid
29+anyone to deny you these rights or to ask you to surrender the rights.
30+These restrictions translate to certain responsibilities for you if you
31+distribute copies of the software, or if you modify it.
32+
33+ For example, if you distribute copies of such a program, whether
34+gratis or for a fee, you must give the recipients all the rights that
35+you have. You must make sure that they, too, receive or can get the
36+source code. And you must show them these terms so they know their
37+rights.
38+
39+ We protect your rights with two steps: (1) copyright the software, and
40+(2) offer you this license which gives you legal permission to copy,
41+distribute and/or modify the software.
42+
43+ Also, for each author's protection and ours, we want to make certain
44+that everyone understands that there is no warranty for this free
45+software. If the software is modified by someone else and passed on, we
46+want its recipients to know that what they have is not the original, so
47+that any problems introduced by others will not reflect on the original
48+authors' reputations.
49+
50+ Finally, any free program is threatened constantly by software
51+patents. We wish to avoid the danger that redistributors of a free
52+program will individually obtain patent licenses, in effect making the
53+program proprietary. To prevent this, we have made it clear that any
54+patent must be licensed for everyone's free use or not licensed at all.
55+
56+ The precise terms and conditions for copying, distribution and
57+modification follow.
58+
59+ GNU GENERAL PUBLIC LICENSE
60+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61+
62+ 0. This License applies to any program or other work which contains
63+a notice placed by the copyright holder saying it may be distributed
64+under the terms of this General Public License. The "Program", below,
65+refers to any such program or work, and a "work based on the Program"
66+means either the Program or any derivative work under copyright law:
67+that is to say, a work containing the Program or a portion of it,
68+either verbatim or with modifications and/or translated into another
69+language. (Hereinafter, translation is included without limitation in
70+the term "modification".) Each licensee is addressed as "you".
71+
72+Activities other than copying, distribution and modification are not
73+covered by this License; they are outside its scope. The act of
74+running the Program is not restricted, and the output from the Program
75+is covered only if its contents constitute a work based on the
76+Program (independent of having been made by running the Program).
77+Whether that is true depends on what the Program does.
78+
79+ 1. You may copy and distribute verbatim copies of the Program's
80+source code as you receive it, in any medium, provided that you
81+conspicuously and appropriately publish on each copy an appropriate
82+copyright notice and disclaimer of warranty; keep intact all the
83+notices that refer to this License and to the absence of any warranty;
84+and give any other recipients of the Program a copy of this License
85+along with the Program.
86+
87+You may charge a fee for the physical act of transferring a copy, and
88+you may at your option offer warranty protection in exchange for a fee.
89+
90+ 2. You may modify your copy or copies of the Program or any portion
91+of it, thus forming a work based on the Program, and copy and
92+distribute such modifications or work under the terms of Section 1
93+above, provided that you also meet all of these conditions:
94+
95+ a) You must cause the modified files to carry prominent notices
96+ stating that you changed the files and the date of any change.
97+
98+ b) You must cause any work that you distribute or publish, that in
99+ whole or in part contains or is derived from the Program or any
100+ part thereof, to be licensed as a whole at no charge to all third
101+ parties under the terms of this License.
102+
103+ c) If the modified program normally reads commands interactively
104+ when run, you must cause it, when started running for such
105+ interactive use in the most ordinary way, to print or display an
106+ announcement including an appropriate copyright notice and a
107+ notice that there is no warranty (or else, saying that you provide
108+ a warranty) and that users may redistribute the program under
109+ these conditions, and telling the user how to view a copy of this
110+ License. (Exception: if the Program itself is interactive but
111+ does not normally print such an announcement, your work based on
112+ the Program is not required to print an announcement.)
113+
114+These requirements apply to the modified work as a whole. If
115+identifiable sections of that work are not derived from the Program,
116+and can be reasonably considered independent and separate works in
117+themselves, then this License, and its terms, do not apply to those
118+sections when you distribute them as separate works. But when you
119+distribute the same sections as part of a whole which is a work based
120+on the Program, the distribution of the whole must be on the terms of
121+this License, whose permissions for other licensees extend to the
122+entire whole, and thus to each and every part regardless of who wrote it.
123+
124+Thus, it is not the intent of this section to claim rights or contest
125+your rights to work written entirely by you; rather, the intent is to
126+exercise the right to control the distribution of derivative or
127+collective works based on the Program.
128+
129+In addition, mere aggregation of another work not based on the Program
130+with the Program (or with a work based on the Program) on a volume of
131+a storage or distribution medium does not bring the other work under
132+the scope of this License.
133+
134+ 3. You may copy and distribute the Program (or a work based on it,
135+under Section 2) in object code or executable form under the terms of
136+Sections 1 and 2 above provided that you also do one of the following:
137+
138+ a) Accompany it with the complete corresponding machine-readable
139+ source code, which must be distributed under the terms of Sections
140+ 1 and 2 above on a medium customarily used for software interchange; or,
141+
142+ b) Accompany it with a written offer, valid for at least three
143+ years, to give any third party, for a charge no more than your
144+ cost of physically performing source distribution, a complete
145+ machine-readable copy of the corresponding source code, to be
146+ distributed under the terms of Sections 1 and 2 above on a medium
147+ customarily used for software interchange; or,
148+
149+ c) Accompany it with the information you received as to the offer
150+ to distribute corresponding source code. (This alternative is
151+ allowed only for noncommercial distribution and only if you
152+ received the program in object code or executable form with such
153+ an offer, in accord with Subsection b above.)
154+
155+The source code for a work means the preferred form of the work for
156+making modifications to it. For an executable work, complete source
157+code means all the source code for all modules it contains, plus any
158+associated interface definition files, plus the scripts used to
159+control compilation and installation of the executable. However, as a
160+special exception, the source code distributed need not include
161+anything that is normally distributed (in either source or binary
162+form) with the major components (compiler, kernel, and so on) of the
163+operating system on which the executable runs, unless that component
164+itself accompanies the executable.
165+
166+If distribution of executable or object code is made by offering
167+access to copy from a designated place, then offering equivalent
168+access to copy the source code from the same place counts as
169+distribution of the source code, even though third parties are not
170+compelled to copy the source along with the object code.
171+
172+ 4. You may not copy, modify, sublicense, or distribute the Program
173+except as expressly provided under this License. Any attempt
174+otherwise to copy, modify, sublicense or distribute the Program is
175+void, and will automatically terminate your rights under this License.
176+However, parties who have received copies, or rights, from you under
177+this License will not have their licenses terminated so long as such
178+parties remain in full compliance.
179+
180+ 5. You are not required to accept this License, since you have not
181+signed it. However, nothing else grants you permission to modify or
182+distribute the Program or its derivative works. These actions are
183+prohibited by law if you do not accept this License. Therefore, by
184+modifying or distributing the Program (or any work based on the
185+Program), you indicate your acceptance of this License to do so, and
186+all its terms and conditions for copying, distributing or modifying
187+the Program or works based on it.
188+
189+ 6. Each time you redistribute the Program (or any work based on the
190+Program), the recipient automatically receives a license from the
191+original licensor to copy, distribute or modify the Program subject to
192+these terms and conditions. You may not impose any further
193+restrictions on the recipients' exercise of the rights granted herein.
194+You are not responsible for enforcing compliance by third parties to
195+this License.
196+
197+ 7. If, as a consequence of a court judgment or allegation of patent
198+infringement or for any other reason (not limited to patent issues),
199+conditions are imposed on you (whether by court order, agreement or
200+otherwise) that contradict the conditions of this License, they do not
201+excuse you from the conditions of this License. If you cannot
202+distribute so as to satisfy simultaneously your obligations under this
203+License and any other pertinent obligations, then as a consequence you
204+may not distribute the Program at all. For example, if a patent
205+license would not permit royalty-free redistribution of the Program by
206+all those who receive copies directly or indirectly through you, then
207+the only way you could satisfy both it and this License would be to
208+refrain entirely from distribution of the Program.
209+
210+If any portion of this section is held invalid or unenforceable under
211+any particular circumstance, the balance of the section is intended to
212+apply and the section as a whole is intended to apply in other
213+circumstances.
214+
215+It is not the purpose of this section to induce you to infringe any
216+patents or other property right claims or to contest validity of any
217+such claims; this section has the sole purpose of protecting the
218+integrity of the free software distribution system, which is
219+implemented by public license practices. Many people have made
220+generous contributions to the wide range of software distributed
221+through that system in reliance on consistent application of that
222+system; it is up to the author/donor to decide if he or she is willing
223+to distribute software through any other system and a licensee cannot
224+impose that choice.
225+
226+This section is intended to make thoroughly clear what is believed to
227+be a consequence of the rest of this License.
228+
229+ 8. If the distribution and/or use of the Program is restricted in
230+certain countries either by patents or by copyrighted interfaces, the
231+original copyright holder who places the Program under this License
232+may add an explicit geographical distribution limitation excluding
233+those countries, so that distribution is permitted only in or among
234+countries not thus excluded. In such case, this License incorporates
235+the limitation as if written in the body of this License.
236+
237+ 9. The Free Software Foundation may publish revised and/or new versions
238+of the General Public License from time to time. Such new versions will
239+be similar in spirit to the present version, but may differ in detail to
240+address new problems or concerns.
241+
242+Each version is given a distinguishing version number. If the Program
243+specifies a version number of this License which applies to it and "any
244+later version", you have the option of following the terms and conditions
245+either of that version or of any later version published by the Free
246+Software Foundation. If the Program does not specify a version number of
247+this License, you may choose any version ever published by the Free Software
248+Foundation.
249+
250+ 10. If you wish to incorporate parts of the Program into other free
251+programs whose distribution conditions are different, write to the author
252+to ask for permission. For software which is copyrighted by the Free
253+Software Foundation, write to the Free Software Foundation; we sometimes
254+make exceptions for this. Our decision will be guided by the two goals
255+of preserving the free status of all derivatives of our free software and
256+of promoting the sharing and reuse of software generally.
257+
258+ NO WARRANTY
259+
260+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268+REPAIR OR CORRECTION.
269+
270+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278+POSSIBILITY OF SUCH DAMAGES.
279+
280+ END OF TERMS AND CONDITIONS
281+
282+ How to Apply These Terms to Your New Programs
283+
284+ If you develop a new program, and you want it to be of the greatest
285+possible use to the public, the best way to achieve this is to make it
286+free software which everyone can redistribute and change under these terms.
287+
288+ To do so, attach the following notices to the program. It is safest
289+to attach them to the start of each source file to most effectively
290+convey the exclusion of warranty; and each file should have at least
291+the "copyright" line and a pointer to where the full notice is found.
292+
293+ <one line to give the program's name and a brief idea of what it does.>
294+ Copyright (C) <year> <name of author>
295+
296+ This program is free software; you can redistribute it and/or modify
297+ it under the terms of the GNU General Public License as published by
298+ the Free Software Foundation; either version 2 of the License, or
299+ (at your option) any later version.
300+
301+ This program is distributed in the hope that it will be useful,
302+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304+ GNU General Public License for more details.
305+
306+ You should have received a copy of the GNU General Public License along
307+ with this program; if not, write to the Free Software Foundation, Inc.,
308+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309+
310+Also add information on how to contact you by electronic and paper mail.
311+
312+If the program is interactive, make it output a short notice like this
313+when it starts in an interactive mode:
314+
315+ Gnomovision version 69, Copyright (C) year name of author
316+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317+ This is free software, and you are welcome to redistribute it
318+ under certain conditions; type `show c' for details.
319+
320+The hypothetical commands `show w' and `show c' should show the appropriate
321+parts of the General Public License. Of course, the commands you use may
322+be called something other than `show w' and `show c'; they could even be
323+mouse-clicks or menu items--whatever suits your program.
324+
325+You should also get your employer (if you work as a programmer) or your
326+school, if any, to sign a "copyright disclaimer" for the program, if
327+necessary. Here is a sample; alter the names:
328+
329+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331+
332+ <signature of Ty Coon>, 1 April 1989
333+ Ty Coon, President of Vice
334+
335+This General Public License does not permit incorporating your program into
336+proprietary programs. If your program is a subroutine library, you may
337+consider it more useful to permit linking proprietary applications with the
338+library. If this is what you want to do, use the GNU Lesser General
339+Public License instead of this License.
Notifications.mdnew file+11
@@ -0,0 +1,11 @@
1+# Notifications
2+
3+Since [Android 8.0 Oreo, Google doesn't allow apps to run in the background anymore](https://developer.android.com/about/versions/oreo/background#services), requiring all apps which were previously keeping background connection to exclusively use its Firebase push messaging service.
4+
5+As one can't use Google's push messaging in a FOSS app, Telegram-FOSS has to show you a notification to keep the background service running. Otherwise, you wouldn't be notified about new messages.
6+
7+Sadly, if the app would set the notification to lower priority (to hide it a bit in the lower part of the notification screen), you would immediately get a system notification about Telegram "using battery", which is confusing and is the reason for this not being the default. Despite Google's misleading warnings, there is no difference in battery usage between v4.6 in "true background" and v4.9+ with notification.
8+
9+## Make it better
10+
11+You may still lower the priority of the notification channel or even hide it altogether manually (make a long tap on the notification). You will then receive the misleading system notification, which [may be disabled as well with another long tap](https://9to5google.com/2017/10/26/how-to-disable-android-oreo-using-battery-notification-android-basics/).
README.md+61−140
@@ -1,140 +1,61 @@
1−# MultiGram
2−
3−MultiGram is Forkgram (https://github.com/forkgram/TelegramAndroid) plus a small stack of MultiGram changes.
4−
5−| Branch | What it holds |
6−|---|---|
7−| `forkgram` | Snapshots of Forkgram's `dev` branch, one commit per Forkgram release (the `.github` folder is left out). |
8−| `multigram` | The app: the latest `forkgram` snapshot plus the MultiGram commits on top. Build this branch. |
9−| `main` | This README, the automation that keeps `multigram` in step with Forkgram, and helper scripts. |
10−
11−The sync also uses `multigram-next` (the next `multigram`, while it is being checked) and tags
12−the `multigram` it replaces as `multigram-before-<version>`.
13−
14−[PATCH.md](https://github.com/iko-soy/Multigram/blob/docs/PATCH.md) on the `docs` branch says what
15−to do after a Telegram update when the sync needs a hand, and lists every MultiGram change with
16−the exact code, so the stack can be re-applied by hand.
17−
18−## Build
19−
20−**Actions > Build MultiGram > Run workflow**, ref `multigram`. It compiles the Java and Kotlin
21−code (a few minutes). Tick **APK** to also build a release APK; it compiles the native code
22−too, so it takes much longer, and the APK is attached to the run as `multigram-apk`.
23−
24−## Releases
25−
26−**Actions > Release MultiGram > Run workflow** builds the release APK of `multigram` and publishes
27−it on the Releases page (about 80 minutes; tick **dry_run** to see only the version and notes).
28−Versions follow Forkgram's scheme: `12.10.6.1` is the first MultiGram release on Forkgram 12.10.6,
29−`12.10.6.2` the second, and after a Forkgram update the count starts again at 1 (at most 9 per
30−Forkgram version). The tag is the version. It needs the API id and hash secrets below. Without the
31−signing secrets the APK is signed with Forkgram's public test key and published as a pre-release
32−that says so. Details: section 10.6 of
33−[PATCH.md](https://github.com/iko-soy/Multigram/blob/docs/PATCH.md).
34−
35−## Secrets
36−
37−Set these in **Settings > Secrets and variables > Actions**:
38−
39−- `MULTIGRAM_APP_ID` and `MULTIGRAM_APP_HASH`: your own API id and hash from
40− https://my.telegram.org (API development tools). Without them the APK cannot log in.
41−- Signing (optional): `MULTIGRAM_KEYSTORE_BASE64` (your release keystore, `base64 -w0 release.keystore`),
42− `MULTIGRAM_KEYSTORE_PASSWORD`, `MULTIGRAM_KEY_ALIAS` and `MULTIGRAM_KEY_PASSWORD` (if it differs
43− from the store password). Without them the APK is signed with Forkgram's public test key
44− (`TMessagesProj/config/test.keystore`), which is fine for testing but lets anyone sign an
45− "update" for it. Keep the same key for every build you give out, or phones can't update. The
46− rebrand toolkit can make a key for you (see "Signing and updates" in `multigram/rebrand/README.md`).
47−
48−## How the sync works
49−
50−The **Sync with Forkgram** workflow runs every 6 hours (and by hand):
51−
52−1. If Forkgram's `dev` has a new tip (Forkgram rebases `dev` onto every Telegram release, so each
53− new tip is a release candidate), it adds a snapshot commit to `forkgram`: that tree without
54− `.github`, with `Forkgram-Commit`, `Forkgram-Version` and `Telegram-Base` lines in the message.
55−2. It replays the MultiGram commits (`forkgram..multigram`) onto the snapshot as `multigram-next`
56− (`git rebase --onto`).
57−3. It compiles `multigram-next` with the Build MultiGram workflow.
58−4. If that passes, it tags the old `multigram` as `multigram-before-<version>`, moves `multigram`
59− to `multigram-next`, deletes `multigram-next` and closes the sync issue.
60−5. On a conflict or a failed compile it opens an issue labelled `forkgram-sync` (or comments on the
61− open one) with the details; `multigram` stays as it was.
62−
63−It never replaces a `multigram-next` that has commits it did not make (your fix, say): it then
64−changes nothing, not even `forkgram`, and says so on the issue until you run **use_next** or
65−delete `multigram-next`. It records the `multigram-next` it built last in the ref
66−`refs/multigram-sync/next`. Keep `multigram` linear (rebase, do not merge): the replay flattens
67−merges, so a merge commit with changes of its own stops the sync.
68−
69−Run it by hand with **force** to rebuild `multigram-next` without a new release (to test the
70−pipeline, or to retry), or with **use_next** to compile and promote a `multigram-next` you fixed
71−yourself. **use_next** checks that `multigram-next` still has every commit on `multigram` (a
72−commit pushed to `multigram` after you started the fix would otherwise be lost); tick
73−**allow_drop** as well if it leaves some out on purpose.
74−
75−The work is done by `scripts/sync-forkgram.sh` (see `--help`). It also runs locally without
76−pushing anything: from a checkout of `main`, `bash scripts/sync-forkgram.sh --remote origin`
77−leaves the results in your local `forkgram` and `multigram-next` branches.
78−`bash scripts/selftest-sync.sh` tests it against fake repositories.
79−
80−rerere (git's memory of conflict fixes) only knows the fixes recorded in the clone it runs in.
81−It helps when you redo a rebase or run the script in your own clone; the scheduled sync starts
82−from a fresh clone every time, so it reports a conflict again until `multigram` carries the fix.
83−
84−## When the sync issue opens
85−
86−The issue has the exact commands; in short:
87−
88−**Conflict.** Replay the stack yourself, fix the files, push the result to `multigram-next`:
89−
90−```sh
91−git fetch origin
92−git switch -C multigram-next origin/multigram
93−git config rerere.enabled true # reuses your fixes if you redo this rebase here
94−git rebase origin/forkgram
95−# fix the files git names, then: git add <files> && git rebase --continue (repeat)
96−git push --force origin multigram-next
97−```
98−
99−**Compile failure.** Fix the build on top of `multigram-next` and fold the fix into the commit it
100−belongs to:
101−
102−```sh
103−git fetch origin
104−git switch -C multigram-next origin/multigram-next
105−# edit, then, once per MultiGram commit your fix touches (name only that commit's files):
106−git commit --fixup=<the MultiGram commit it belongs to> -- <its files>
107−GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash origin/forkgram
108−git push --force origin multigram-next
109−```
110−
111−Then **Actions > Sync with Forkgram > Run workflow** with **use_next** ticked: it compiles
112−`multigram-next` and, if that passes, moves `multigram` to it and closes the issue. If the
113−compile failed because of a runner or network hiccup, **Re-run failed jobs** on the run page
114−is enough. Until then the sync leaves your `multigram-next` alone; if you give up on it, delete
115−it (`git push origin --delete multigram-next`) and the next sync starts over from `multigram`.
116−
117−## Patches
118−
119−`bash scripts/export-patches.sh --base origin/forkgram --head origin/multigram` writes the stack
120−as numbered patches to `multigram-patches/`, with `APPLY.txt` saying how to apply them onto a
121−plain Forkgram checkout (`git am -3`).
122−
123−## What is on the multigram branch
124−
125−- `multigram/rebrand/`: the rebrand toolkit that gives a build its own name, applicationId,
126− launcher icon and signing key (instructions in its `README.md`).
127−- `multigram/hide-search-bar/`: the "Hide chat list search" option in Fork Client Settings >
128− Chat list view (off by default), which removes the search bar and search icon from the chat list.
129−- `multigram/`: the other MultiGram tools and notes, such as the per-install random style and
130− its palette check; the app code is in
131− `TMessagesProj/src/main/java/org/telegram/messenger/multigram/`.
132−
133−## Repository settings
134−
135−- `main` must be the default branch: scheduled workflows only run from it.
136−- The workflows ask for the token permissions they need, so the default workflow permissions
137− can stay read-only.
138−- Issues must be enabled: the sync reports on an issue labelled `forkgram-sync`.
139−- If you protect `forkgram`, `multigram`, `multigram-next` or `multigram-before-*` tags with
140− branch protection or rulesets, let GitHub Actions push and force-push them.
1+# Fork Client — Unofficial Telegram Messenger for Android
2+![image](https://raw.githubusercontent.com/Forkgram/TelegramAndroid/58938f6bbe4159b90c38d9b94c9a70d57bedf3e0/TMessagesProj/src/main/res/drawable-xxhdpi/ic_launcher.png)
3+Fork Client is a fork of the official Telegram for Android application.
4+[<img src="https://f-droid.org/badge/get-it-on.png"
5+ alt="Get it on F-Droid"
6+ height="80">](https://f-droid.org/app/org.forkgram.messenger)
7+
8+![Build Status](https://travis-ci.org//Forkgram/TelegramAndroid.svg?branch=dev)
9+[![Github All Releases](https://img.shields.io/github/downloads/Forkgram/TelegramAndroid/total.svg)](https://github.com/Forkgram/TelegramAndroid/releases)
10+
11+## Features:
12+
13+- `Delete for everyone` option enabled by default.
14+- Removed pencil floating icon.
15+- Original message date for forwarded messages.
16+- Smaller header in the sidebar.
17+- Option to disable in-app camera.
18+- Option to keep unmuted unread chats right after pinned dialogs.
19+- See the correct full number of subscribers in groups/channels.
20+- Option to go to the first message of a chat.
21+- Quick share button for every media in private chats.
22+- Option to start recording video messages with the rear camera.
23+- Unlimited unarchived pinned chats (turns their sync off).
24+- Option to disable big emojis.
25+- Forward messages without quoting the original sender.
26+- Added a lot of self-destruct timer's options in secret chats.
27+ - Added 2, 3, 4, 5, 10, 15, 20, 30, 40 minutes.
28+ - Added 2, 3, 5, 8, 12, 16 hours.
29+ - Added 2, 3, 7 and 32 days.
30+- Tap on cloud GIF with pre-written text will send GIF with this text as caption.
31+- Tap on sticker with pre-written text will send both.
32+- Added upload date for profile photos.
33+- Added ability to see the profile info from the dialogs list via context menu.
34+- Added ability to see unread count when you want to mark as read multiple dialogs.
35+- Option to directly open the archive on pulldown
36+- PiP mode for YouTube's in-app player
37+- Added an option to show colored dots to quickly see when a person was last online
38+ - Yellow dot: last seen 15 minutes ago or less
39+ - Orange dot: last seen 30 minutes ago or less
40+ - Red dot: last seen 60 minutes ago or less
41+
42+### Privacy Features:
43+
44+- Hidden `Connecting to proxy...` string.
45+- Accounts names hidden from the side drawer.
46+- Menus to edit username/bio/name moved in the debug menu (two long tap on version section).
47+- Option to hide avatar/title of a chat from the dialogs list.
48+- Option to not send stickers information in photos.
49+- Some features are taken from the [Telegram FOSS](https://github.com/Telegram-FOSS-Team/Telegram-FOSS).
50+
51+### Privacy:
52+
53+Forkgram adds no telemetry, no analytics, no crash-reporting, and no third-party network endpoints on top of upstream Telegram for Android. All traffic goes only to Telegram's official servers.
54+
55+
56+
57+## Downloads:
58+You can download binaries from Releases or from my [Telegram channel Forkgram](https://t.me/forkgram).
59+
60+## Building instructions for Debian 13:
61+[BUILDING.md](BUILDING.md)
TMessagesProj/build.gradlenew file+319
@@ -0,0 +1,319 @@
1+import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
2+
3+apply plugin: 'com.android.library'
4+apply plugin: 'org.telegram.build-plugin'
5+apply plugin: 'idea'
6+apply from: '../utils.gradle'
7+apply plugin: 'kotlin-android'
8+
9+idea {
10+ module {
11+ excludeDirs += [
12+ file('jni/td'),
13+ file('jni/third_party/absl'),
14+ file('jni/third_party/boringssl'),
15+ file('jni/third_party/dav1d'),
16+ file('jni/third_party/ffmpeg'),
17+ file('jni/third_party/libvpx'),
18+ file('jni/third_party/libyuv'),
19+ file('jni/third_party/openh264'),
20+ file('jni/third_party/xiph'),
21+ file('jni/tlottie'),
22+ file('jni/voip/webrtc'),
23+ file('jni/sqlite')
24+ ]
25+ }
26+}
27+
28+repositories {
29+ mavenCentral()
30+ google()
31+}
32+
33+configurations {
34+ compile.exclude module: 'support-v4'
35+}
36+
37+configurations.all {
38+ exclude group: 'androidx.recyclerview', module: 'recyclerview'
39+}
40+
41+dependencies {
42+ coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
43+
44+ implementation 'androidx.core:core:1.16.0'
45+ implementation 'androidx.interpolator:interpolator:1.0.0'
46+ implementation 'androidx.fragment:fragment:1.2.0'
47+ implementation 'androidx.palette:palette:1.0.0'
48+ implementation 'androidx.exifinterface:exifinterface:1.3.6'
49+ implementation 'androidx.viewpager:viewpager:1.0.0'
50+ implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
51+ implementation "androidx.sharetarget:sharetarget:1.2.0"
52+ implementation 'androidx.interpolator:interpolator:1.0.0'
53+ implementation 'androidx.biometric:biometric:1.1.0'
54+ implementation 'androidx.webkit:webkit:1.14.0'
55+
56+ implementation "androidx.mediarouter:mediarouter:1.7.0"
57+ implementation 'com.google.zxing:core:3.5.4'
58+
59+ implementation 'androidx.car.app:app:1.4.0'
60+ implementation 'androidx.car.app:app-projected:1.4.0'
61+ implementation 'org.nanohttpd:nanohttpd:2.3.1'
62+ implementation "androidx.core:core-ktx:1.9.0"
63+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
64+
65+ compileOnly 'org.checkerframework:checker-qual:2.5.2'
66+ compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
67+ implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
68+ implementation 'com.stripe:stripe-android:2.0.2'
69+ implementation 'com.google.code.gson:gson:2.11.0'
70+ implementation 'com.google.guava:guava:31.1-android'
71+ implementation 'com.google.android.play:integrity:1.3.0'
72+ implementation 'com.google.android.gms:play-services-safetynet:18.0.1'
73+
74+ implementation 'co.nstant.in:cbor:0.8'
75+ implementation "androidx.credentials:credentials:1.6.0-alpha04"
76+ implementation "androidx.credentials:credentials-play-services-auth:1.6.0-alpha04"
77+
78+ implementation "io.noties.markwon:core:4.6.2"
79+ implementation "io.noties.markwon:ext-strikethrough:4.6.2"
80+ implementation "io.noties.markwon:ext-tables:4.6.2"
81+ implementation "io.noties.markwon:html:4.6.2"
82+ implementation "io.noties.markwon:inline-parser:4.6.2"
83+ implementation("io.noties.markwon:ext-latex:4.6.2") {
84+ exclude group: 'ru.noties', module: 'jlatexmath-android'
85+ }
86+
87+ api project(":TMessagesProj_Modules:media3:media-lib-exoplayer")
88+ api project(":TMessagesProj_Modules:media3:media-lib-exoplayer-dash")
89+ api project(":TMessagesProj_Modules:media3:media-lib-exoplayer-hls")
90+ api project(":TMessagesProj_Modules:media3:media-lib-decoder-ffmpeg")
91+ api project(":TMessagesProj_Modules:media3:media-lib-session")
92+ api project(':jlatexmath')
93+
94+ constraints {
95+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
96+ because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
97+ }
98+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
99+ because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
100+ }
101+ }
102+ implementation 'org.unifiedpush.android:connector:3.1.2'
103+ implementation 'org.osmdroid:osmdroid-android:6.1.20'
104+}
105+
106+def getStringForConfig(String s) {
107+ return "\"" + s + "\""
108+}
109+
110+def isWindows = String.valueOf(DefaultNativePlatform.currentOperatingSystem.toFamilyName() == OperatingSystemFamily.WINDOWS)
111+android {
112+ compileSdkVersion 36
113+ buildToolsVersion '36.0.0'
114+ ndkVersion "27.2.12479018"
115+
116+ sourceSets.main.jniLibs.srcDirs = ['./jni/']
117+
118+ externalNativeBuild {
119+ cmake {
120+ path 'jni/CMakeLists.txt'
121+ }
122+ }
123+
124+ buildFeatures {
125+ aidl true
126+ }
127+
128+ lintOptions {
129+ disable 'MissingTranslation'
130+ disable 'ExtraTranslation'
131+ disable 'BlockedPrivateApi'
132+ }
133+
134+ compileOptions {
135+ sourceCompatibility JavaVersion.VERSION_17
136+ targetCompatibility JavaVersion.VERSION_17
137+
138+ coreLibraryDesugaringEnabled true
139+ }
140+
141+ kotlinOptions {
142+ jvmTarget = JavaVersion.VERSION_17
143+ }
144+
145+ defaultConfig.versionCode = Integer.parseInt(Utils['getVersionCode']())
146+
147+ defaultConfig {
148+ minSdkVersion 21
149+ targetSdkVersion 36
150+
151+ vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
152+
153+ multiDexEnabled true
154+
155+ //obtain your own keys at https://core.telegram.org/api/obtaining_api_id
156+ buildConfigField 'int', 'APP_ID', APP_ID
157+ buildConfigField 'String', 'APP_HASH', getStringForConfig(APP_HASH)
158+ buildConfigField 'int', 'USER_ID_OWNER', USER_ID_OWNER
159+ buildConfigField 'String', 'USER_REPO', getStringForConfig(USER_REPO)
160+ buildConfigField 'int', 'CHECK_UPDATES', CHECK_UPDATES
161+ buildConfigField 'String', 'UPDATE_CHANNEL_USERNAME', getStringForConfig(UPDATE_CHANNEL_USERNAME)
162+ buildConfigField 'String', 'LASTFM_API_KEY', getStringForConfig(LASTFM_API_KEY)
163+ buildConfigField 'String', 'LASTFM_API_SECRET', getStringForConfig(LASTFM_API_SECRET)
164+
165+ vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
166+
167+ versionName = Utils['getVersionName']()
168+ buildConfigField 'int', 'ADDITIONAL_BUILD_NUMBER', ADDITIONAL_BUILD_NUMBER
169+ buildConfigField 'String', 'VERSION_NAME', getStringForConfig(versionName)
170+ buildConfigField 'int', 'VERSION_CODE', Utils['getVersionCode']()
171+
172+ buildConfigField 'boolean', 'SKIP_DNS_RESOLVER', (Utils['isFdroid']() ? 'true' : 'false')
173+ buildConfigField 'boolean', 'SKIP_INTERNAL_BROWSER_BY_DEFAULT', (Utils['isFdroid']() ? 'true' : 'false')
174+ manifestPlaceholders = [appLabel: Utils['isFdroid']() ? "@string/AppNameFdroid" : "@string/AppName"]
175+
176+ externalNativeBuild {
177+ cmake {
178+ version '3.22.1'
179+ arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
180+ targets 'tmessages.49'
181+ if (project.hasProperty("armeabi-v7a")) {
182+ abiFilters 'armeabi-v7a'
183+ } else if (project.hasProperty("arm64-v8a")) {
184+ abiFilters 'arm64-v8a'
185+ } else {
186+ abiFilters 'armeabi-v7a', 'arm64-v8a'
187+ }
188+ }
189+ }
190+ }
191+
192+ buildTypes {
193+ debug {
194+ jniDebuggable true
195+ shrinkResources false
196+ multiDexEnabled true
197+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
198+ buildConfigField "String", "BETA_URL", "\"" + getProps("BETA_PRIVATE_URL") + "\""
199+ buildConfigField "boolean", "DEBUG_VERSION", "true"
200+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "true"
201+ buildConfigField "boolean", "BUNDLE", "false"
202+ buildConfigField "int", "VERSION_NUM", "0"
203+ }
204+
205+ HA_private {
206+ matchingFallbacks = ['release']
207+ jniDebuggable false
208+ multiDexEnabled true
209+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
210+ buildConfigField "String", "BETA_URL", "\"" + getProps("BETA_PRIVATE_URL") + "\""
211+ buildConfigField "boolean", "DEBUG_VERSION", "true"
212+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "true"
213+ buildConfigField "boolean", "BUNDLE", "false"
214+ buildConfigField "int", "VERSION_NUM", "1"
215+ }
216+
217+ HA_public {
218+ matchingFallbacks = ['release']
219+ jniDebuggable false
220+ multiDexEnabled true
221+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
222+ buildConfigField "String", "BETA_URL", "\"" + getProps("BETA_PUBLIC_URL") + "\""
223+ buildConfigField "boolean", "DEBUG_VERSION", "true"
224+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
225+ buildConfigField "boolean", "BUNDLE", "false"
226+ buildConfigField "int", "VERSION_NUM", "4"
227+ }
228+
229+ HA_hardcore {
230+ matchingFallbacks = ['release']
231+ jniDebuggable false
232+ multiDexEnabled true
233+ ndk.debugSymbolLevel = 'FULL'
234+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
235+ buildConfigField "String", "BETA_URL", "\"" + getProps("BETA_HARDCORE_URL") + "\""
236+ buildConfigField "boolean", "DEBUG_VERSION", "true"
237+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "true"
238+ buildConfigField "boolean", "BUNDLE", "false"
239+ buildConfigField "int", "VERSION_NUM", "5"
240+ }
241+
242+ standalone {
243+ matchingFallbacks = ['release']
244+ jniDebuggable false
245+ multiDexEnabled true
246+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
247+ buildConfigField "String", "BETA_URL", "\"\""
248+ buildConfigField "boolean", "DEBUG_VERSION", "false"
249+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
250+ buildConfigField "boolean", "BUNDLE", "false"
251+ buildConfigField "int", "VERSION_NUM", "6"
252+ }
253+
254+ release {
255+ jniDebuggable false
256+ shrinkResources false
257+ multiDexEnabled true
258+ buildConfigField "String", "BUILD_VERSION_STRING", "\"" + APP_VERSION_NAME + "\""
259+ buildConfigField "String", "BETA_URL", "\"\""
260+ buildConfigField "boolean", "DEBUG_VERSION", "false"
261+ buildConfigField "boolean", "DEBUG_PRIVATE_VERSION", "false"
262+ buildConfigField "boolean", "BUNDLE", "false"
263+ buildConfigField "int", "VERSION_NUM", "7"
264+ }
265+ }
266+
267+ namespace 'org.telegram.messenger'
268+}
269+
270+
271+def getProps(String propName) {
272+ def propsFile = rootProject.file('local.properties')
273+ if (propsFile.exists()) {
274+ def props = new Properties()
275+ props.load(new FileInputStream(propsFile))
276+ return props[propName]
277+ } else {
278+ return "";
279+ }
280+}
281+
282+task buildNativeDeps(description: 'Build native dependencies.') {
283+ doFirst {
284+ exec {
285+ def depsNdk = getProps('NATIVE_DEPS_NDK_DIR')
286+ if (depsNdk == null || depsNdk.toString().isEmpty()) {
287+ depsNdk = project.hasProperty('NATIVE_DEPS_NDK_DIR') ? project.property('NATIVE_DEPS_NDK_DIR') : System.getenv('NATIVE_DEPS_NDK_DIR')
288+ }
289+ def ndkDir = (depsNdk != null && !depsNdk.toString().isEmpty()) ? depsNdk : android.ndkDirectory
290+ println "NDK Directory: ${ndkDir}"
291+ println "Working Directory: ${projectDir}/jni"
292+ workingDir "${projectDir}/jni"
293+ commandLine 'python3', 'prepare.py', 'silent', 'ndk=' + ndkDir, 'arm', 'arm64'
294+ }
295+ }
296+}
297+
298+task checkVisibility {
299+ doFirst {
300+ def isPrivateBuild = project.gradle.startParameter.taskNames.find {
301+ it.contains("HA_private") || it.contains("HA_hardcore") || it.contains("Debug") || it.contains("Release")
302+ }
303+ def isPublicAllowed = !project.hasProperty("IS_PRIVATE") || !project.property("IS_PRIVATE").toBoolean()
304+ if (!isPrivateBuild && !isPublicAllowed) {
305+ throw new GradleException("Building public version of private code!")
306+ }
307+ }
308+ doLast {
309+ if (project.gradle.startParameter.taskNames.find { it.contains("HA_public") }) {
310+ def privateBuild = file("${projectDir}_AppHockeyApp/afat/HA_private/Telegram-Beta.apk")
311+ if (privateBuild.exists()) {
312+ privateBuild.delete()
313+ }
314+ }
315+ }
316+}
317+
318+preBuild.dependsOn buildNativeDeps
319+preBuild.dependsOn checkVisibility
TMessagesProj/config/debug/AndroidManifest.xmlnew file+30
@@ -0,0 +1,30 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ xmlns:tools="http://schemas.android.com/tools"
4+ android:installLocation="auto">
5+
6+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
7+ <uses-feature android:name="android.hardware.location.network" android:required="false" />
8+ <uses-feature android:name="android.hardware.location" android:required="false" />
9+ <uses-feature android:name="android.hardware.LOCATION" android:required="false" />
10+
11+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
12+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
13+ <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
14+ <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
15+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
16+
17+ <application
18+ android:icon="@mipmap/ic_launcher"
19+ android:roundIcon="@mipmap/ic_launcher_round"
20+ android:label="@string/AppNameBeta"
21+ android:theme="@style/Theme.TMessages.Start"
22+ android:hardwareAccelerated="true"
23+ android:largeHeap="true"
24+ android:supportsRtl="false"
25+ android:requestLegacyExternalStorage="true"
26+ tools:replace="android:supportsRtl, android:label">
27+
28+ </application>
29+
30+</manifest>
TMessagesProj/config/debug/AndroidManifest_SDK23.xmlnew file+38
@@ -0,0 +1,38 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ xmlns:tools="http://schemas.android.com/tools"
4+ android:installLocation="auto">
5+
6+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
7+ <uses-feature android:name="android.hardware.location.network" android:required="false" />
8+ <uses-feature android:name="android.hardware.location" android:required="false" />
9+ <uses-feature android:name="android.hardware.LOCATION" android:required="false" />
10+
11+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
12+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
13+ <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
14+ <uses-permission android:name="android.permission.CALL_PHONE" />
15+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
16+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
17+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
18+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
19+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
20+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
21+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
22+ <uses-permission android:name="android.permission.READ_CALL_LOG" />
23+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
24+
25+ <application
26+ android:icon="@mipmap/ic_launcher"
27+ android:roundIcon="@mipmap/ic_launcher_round"
28+ android:label="@string/AppNameBeta"
29+ android:theme="@style/Theme.TMessages.Start"
30+ android:hardwareAccelerated="true"
31+ android:largeHeap="true"
32+ android:supportsRtl="false"
33+ android:requestLegacyExternalStorage="true"
34+ tools:replace="android:supportsRtl, android:label">
35+
36+ </application>
37+
38+</manifest>
TMessagesProj/config/release.keystorenew file

Binary file not shown.

TMessagesProj/config/release/AndroidManifest.xmlnew file+30
@@ -0,0 +1,30 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ xmlns:tools="http://schemas.android.com/tools"
4+ android:installLocation="auto">
5+
6+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
7+ <uses-feature android:name="android.hardware.location.network" android:required="false" />
8+ <uses-feature android:name="android.hardware.location" android:required="false" />
9+ <uses-feature android:name="android.hardware.LOCATION" android:required="false" />
10+
11+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
12+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
13+ <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
14+ <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
15+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
16+
17+ <application
18+ android:icon="@mipmap/ic_launcher"
19+ android:roundIcon="@mipmap/ic_launcher_round"
20+ android:label="@string/AppName"
21+ android:theme="@style/Theme.TMessages.Start"
22+ android:hardwareAccelerated="true"
23+ android:largeHeap="true"
24+ android:supportsRtl="false"
25+ android:requestLegacyExternalStorage="true"
26+ tools:replace="android:supportsRtl, android:label">
27+
28+ </application>
29+
30+</manifest>
TMessagesProj/config/release/AndroidManifest_SDK23.xmlnew file+38
@@ -0,0 +1,38 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ xmlns:tools="http://schemas.android.com/tools"
4+ android:installLocation="auto">
5+
6+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
7+ <uses-feature android:name="android.hardware.location.network" android:required="false" />
8+ <uses-feature android:name="android.hardware.location" android:required="false" />
9+ <uses-feature android:name="android.hardware.LOCATION" android:required="false" />
10+
11+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
12+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
13+ <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
14+ <uses-permission android:name="android.permission.CALL_PHONE" />
15+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
16+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
17+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
18+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
19+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
20+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
21+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
22+ <uses-permission android:name="android.permission.READ_CALL_LOG" />
23+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
24+
25+ <application
26+ android:icon="@mipmap/ic_launcher"
27+ android:roundIcon="@mipmap/ic_launcher_round"
28+ android:label="@string/AppName"
29+ android:theme="@style/Theme.TMessages.Start"
30+ android:hardwareAccelerated="true"
31+ android:largeHeap="true"
32+ android:supportsRtl="false"
33+ android:requestLegacyExternalStorage="true"
34+ tools:replace="android:supportsRtl, android:label">
35+
36+ </application>
37+
38+</manifest>
TMessagesProj/config/release/AndroidManifest_standalone.xmlnew file+127
@@ -0,0 +1,127 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ xmlns:tools="http://schemas.android.com/tools"
4+ android:installLocation="auto">
5+
6+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
7+ <uses-feature android:name="android.hardware.location.network" android:required="false" />
8+ <uses-feature android:name="android.hardware.location" android:required="false" />
9+ <uses-feature android:name="android.hardware.LOCATION" android:required="false" />
10+
11+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
12+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
13+ <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
14+ <uses-permission android:name="android.permission.CALL_PHONE" />
15+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
16+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
17+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />
18+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
19+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
20+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
21+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
22+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
23+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
24+ <uses-permission android:name="android.permission.READ_CALL_LOG" />
25+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
26+
27+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
28+ <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
29+ <uses-permission android:name="android.permission.SEND_SMS" />
30+
31+ <application
32+ android:icon="@mipmap/ic_launcher_sa"
33+ android:roundIcon="@mipmap/ic_launcher_sa"
34+ android:label="@string/AppName"
35+ android:theme="@style/Theme.TMessages.Start"
36+ android:hardwareAccelerated="true"
37+ android:largeHeap="true"
38+ android:supportsRtl="false"
39+ android:requestLegacyExternalStorage="true"
40+ tools:replace="android:supportsRtl, android:label">
41+
42+ <activity-alias
43+ android:enabled="false"
44+ android:name="org.telegram.messenger.VintageIcon"
45+ android:targetActivity="org.telegram.ui.LaunchActivity"
46+ android:icon="@mipmap/icon_6_launcher_sa"
47+ android:roundIcon="@mipmap/icon_6_launcher_sa"
48+ android:exported="true"
49+ tools:node="replace">
50+
51+ <intent-filter>
52+ <action android:name="android.intent.action.MAIN" />
53+ <category android:name="android.intent.category.LAUNCHER" />
54+ <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
55+ </intent-filter>
56+ </activity-alias>
57+
58+ <activity-alias
59+ android:enabled="false"
60+ android:name="org.telegram.messenger.AquaIcon"
61+ android:targetActivity="org.telegram.ui.LaunchActivity"
62+ android:icon="@mipmap/icon_4_launcher_sa"
63+ android:roundIcon="@mipmap/icon_4_launcher_sa"
64+ android:exported="true"
65+ tools:node="replace">
66+
67+ <intent-filter>
68+ <action android:name="android.intent.action.MAIN" />
69+ <category android:name="android.intent.category.LAUNCHER" />
70+ <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
71+ </intent-filter>
72+ </activity-alias>
73+
74+ <activity-alias
75+ android:enabled="false"
76+ android:name="org.telegram.messenger.PremiumIcon"
77+ android:targetActivity="org.telegram.ui.LaunchActivity"
78+ android:icon="@mipmap/icon_3_launcher_sa"
79+ android:roundIcon="@mipmap/icon_3_launcher_sa"
80+ android:exported="true"
81+ tools:node="replace">
82+
83+ <intent-filter>
84+ <action android:name="android.intent.action.MAIN" />
85+ <category android:name="android.intent.category.LAUNCHER" />
86+ <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
87+ </intent-filter>
88+ </activity-alias>
89+
90+ <activity-alias
91+ android:enabled="false"
92+ android:name="org.telegram.messenger.TurboIcon"
93+ android:targetActivity="org.telegram.ui.LaunchActivity"
94+ android:icon="@mipmap/icon_5_launcher_sa"
95+ android:roundIcon="@mipmap/icon_5_launcher_sa"
96+ android:exported="true"
97+ tools:node="replace">
98+
99+ <intent-filter>
100+ <action android:name="android.intent.action.MAIN" />
101+ <category android:name="android.intent.category.LAUNCHER" />
102+ <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
103+ </intent-filter>
104+ </activity-alias>
105+
106+ <activity-alias
107+ android:enabled="false"
108+ android:name="org.telegram.messenger.NoxIcon"
109+ android:targetActivity="org.telegram.ui.LaunchActivity"
110+ android:icon="@mipmap/icon_2_launcher_sa"
111+ android:roundIcon="@mipmap/icon_2_launcher_sa"
112+ android:exported="true"
113+ tools:node="replace">
114+
115+ <intent-filter>
116+ <action android:name="android.intent.action.MAIN" />
117+ <category android:name="android.intent.category.LAUNCHER" />
118+ <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
119+ </intent-filter>
120+ </activity-alias>
121+ <receiver
122+ android:name="org.telegram.messenger.SMSResultService"
123+ android:exported="false">
124+ </receiver>
125+ </application>
126+
127+</manifest>
TMessagesProj/config/test.keystorenew file

Binary file not shown.

TMessagesProj/emoji/FORMAT.mdnew file+117
@@ -0,0 +1,117 @@
1+# EPK3 version 3
2+
3+All integers are little endian. No global compression. Images and index maps are 64×64, row-major. Emoji records precede internal mask records; keys are strictly increasing within each section. The public loader returns a complete Bitmap; none of these storage details are public API.
4+
5+## Header: 32 bytes
6+
7+| Offset | Type | Value |
8+|---:|---|---|
9+| 0 | char[4] | EPK3 |
10+| 4 | u16 | Version 3 |
11+| 6 | u16 | Record size 20 |
12+| 8 | u32 | Width 64 |
13+| 12 | u32 | Height 64 |
14+| 16 | u32 | Total record count |
15+| 20 | u32 | Emoji record count |
16+| 24 | u32 | File size |
17+| 28 | u32 | Reserved, zero |
18+
19+## Record: 20 bytes
20+
21+| Offset | Type | Meaning |
22+|---:|---|---|
23+| 0 | u16 | Emoji key `x*4096+y`, or internal mask ID |
24+| 2 | u16 | Internal mask ID, or 65535 |
25+| 4 | u32 | Absolute payload offset |
26+| 8 | u16 | Payload length in bytes |
27+| 10 | u16 | First parent record index, or 65535 |
28+| 12 | u16 | Second parent record index, or 65535 |
29+| 14 | u16 | Palette size 1…256; zero for whole images |
30+| 16 | u8 | Codec |
31+| 17 | u8 | Prediction |
32+| 18 | u8 | Low 7 bits: palette channels 0, 1, 3 or 4; bit 7: compressed palette |
33+| 19 | u8 | Flags, described below |
34+
35+Parent values are indices in the entire record table, not emoji keys or mask IDs. A parent must be an independent indexed record: codec 0 or 1, prediction 0, no parents. Dependency chains are forbidden. A record may reference the same root for both halves, with independent transforms and remapping tables. Internal mask records cannot themselves reference a mask.
36+
37+Flags:
38+
39+- Bit 0: palette components packed into seven bits.
40+- Bits 1…3: transform of the first parent map.
41+- Bits 4…6: transform of the second parent map.
42+- Bit 7: selected with the visual quality gate; informational to the runtime.
43+
44+Whole-image records have no palette, no parents and prediction 0. Their only permitted flag is bit 7. Unused transform fields written by the builder are zero.
45+
46+## Palettes
47+
48+Indexed payloads start with their palette, optionally compressed as described below. Channels 0 means implicit opaque gray: `palette[i] = (i,i,i,255)`, palette size must be 256, no stored bytes. Channels 1 stores opaque grayscale. Channels 3 stores RGB with alpha 255. Channels 4 stores RGBA, unpremultiplied.
49+
50+If flag bit 0 is clear, components are ordinary bytes. Otherwise each component `v` is representable as `v = (q << 1) | (q >> 6)` for a seven-bit `q`. Store q as a continuous LSB-first bitstream; pad unused final bits with zero. Stored palette length is `ceil(colors * channels * 7 / 8)`. This packing itself is reversible, without extra posterization.
51+
52+If bit 7 of the channel byte is set, the stored palette prefix is `u16(compressedLength)` followed by a raw DEFLATE stream of exactly compressedLength bytes. Its output is the ordinary stored palette representation described above, including seven-bit packing when flag bit 0 is set. The expected output length is therefore either `colors * channels` or `ceil(colors * channels * 7 / 8)`. No dictionary, zlib header or checksum is used. Channel count zero cannot have a compressed palette.
53+
54+This palette stream is independent of the index/residual stream. It is inflated only when the palette is actually used for color expansion; loading a parent index map skips its palette without inflating it. The same Inflater and scratch arrays are reused.
55+
56+## Codecs
57+
58+| Codec | Payload after palette |
59+|---:|---|
60+| 0 | Raw DEFLATE, without zlib header/checksum; decoded bytes are concatenated LUTs, then 4096 residual/index bytes |
61+| 1 | Concatenated uncompressed LUTs, then a VP8L chunk payload; decode to an opaque grayscale index/residual image |
62+| 2 | Whole RGBA VP8L chunk payload; no palette or prediction |
63+| 3 | Complete standard PNG or WebP file; no palette or prediction |
64+| 4 | No stream: payload contains only the palette; prediction must be 4 |
65+
66+For codecs 1 and 2, the 20-byte RIFF/WEBP/VP8L wrapper and final RIFF padding byte are omitted. Before BitmapFactory decoding, rebuild `RIFF`, `u32(12 + payloadLength + padding)`, `WEBPVP8L`, `u32(payloadLength)`, payload, and a zero padding byte if payloadLength is odd. Encoded stream bytes are otherwise unchanged. For codec 1 the LUTs are not included in payloadLength here.
67+
68+Codec 3 stores the entire image file unchanged, including its container. The current pack uses it for one original PNG and 16 lossy WebP images. Codec 4 requires the same palette size as its parent; its palette may contain different colors.
69+
70+## Prediction and geometry
71+
72+| Prediction | Reconstruction |
73+|---:|---|
74+| 0 | No LUTs or parents; decoded byte is the palette index |
75+| 1 | `index = residual XOR lut[parentIndex]` |
76+| 2 | `index = (residual + lut[parentIndex]) & 255` |
77+| 3 | Same addition, first LUT/parent for destination x < 32, second LUT/parent for x ≥ 32 |
78+| 4 | Copy indices from the transformed parent; no residual stream and no LUT |
79+| 5 | Addition as in prediction 3; vertical split at the stored column |
80+| 6 | Addition as in prediction 3; horizontal split at the stored row |
81+
82+Predictions 5 and 6 store one cut byte, in the range 1…63, immediately after the palette prefix and before the codec payload. This byte is outside both compressed streams. Prediction 3 stores no cut byte and keeps its fixed split at column 32. Prediction 6 samples parent A above the cut and parent B below it; prediction 5 samples A to the left and B to the right.
83+
84+Each LUT contains exactly one byte per palette entry of its parent. For two halves, store the first LUT followed by the second. All split positions are in destination coordinates. There is no scaling, blending or positional offset.
85+
86+A three-bit transform maps each destination pixel to the source position in the parent map:
87+
88+```text
89+x = destinationIndex & 63
90+y = destinationIndex >> 6
91+if transform & 1: x = 63 - x
92+if transform & 2: y = 63 - y
93+if transform & 4: swap(x, y)
94+sourceIndex = y * 64 + x
95+```
96+
97+Thus transform 1 is a horizontal reflection and transform 2 is a vertical reflection. Transform 4 transposes the square. The eight combinations cover the symmetries of the square. They affect parent sampling only, not the current residual stream or palette. No transformed Bitmap needs to be allocated.
98+
99+The restored index must be smaller than the current palette size. Final palette expansion produces straight ARGB components.
100+
101+## Complete emoji reconstruction
102+
103+`getEmoji(x, y)` privately looks up the emoji key and decodes its color record. If an internal mask is present, the loader decodes that grayscale record and combines alpha before creating the final Bitmap:
104+
105+```text
106+finalAlpha = (colorAlpha * maskGray + 127) / 255 // integer division
107+```
108+
109+RGB components stay straight until Bitmap creation. Android Bitmap creation performs its normal premultiplication. For full images used with a mask, decoding requests unpremultiplied pixels first. A native full image with no separate mask may be returned directly as a premultiplied Bitmap.
110+
111+The caller receives one complete ARGB_8888 Bitmap and owns it. The loader does not cache the returned Bitmap. Internal mask IDs and mask accessors are not exposed. The root-map cache is independent of Bitmap ownership and bounded to eight 4096-byte maps. All decode operations on one loader are synchronized.
112+
113+## Validation and integrity
114+
115+The loader checks the header, record bounds, references, independent roots, palette indices, dimensions and stream lengths. It does not decompress all images at startup. The pack has no per-record checksum and is intended to be shipped as a trusted application asset. The independent verifier and supplied SHA-256 hashes establish build integrity.
116+
117+Version 3 adds variable horizontal/vertical splits (predictions 5/6) and optional palette compression (bit 7 of the channel byte). Header and record sizes remain unchanged. The supplied Java reader supports both versions 2 and 3. The old v2 reader cannot read v3; replace the pack and loader together. The public getEmoji contract continues to return a complete Bitmap.
TMessagesProj/emoji/base_builder.pynew file+174
@@ -0,0 +1,174 @@
1+#!/usr/bin/env python3
2+"""Build an EPK3/v2 pack. getEmoji() in EmojiPack.java returns complete RGBA.
3+
4+Inputs: the original PNG-based emoji.pack and original 64x64 texture ZIP.
5+The existing mask decomposition is a build input, never part of the public API.
6+Use --lossless to disable fitted palettes and lossy WebP candidates.
7+"""
8+import argparse, hashlib, io, json, pickle, struct, time, zipfile, zlib
9+from pathlib import Path
10+from collections import Counter
11+import numpy as np
12+from scipy.ndimage import uniform_filter
13+from PIL import Image, features
14+import optimizer_core as old
15+import optimizer_visual as visual
16+
17+def custom(i,codec,pred,parents,ts,data,pal=None,approx=False):
18+ if pal is None:o=old.option(i,codec,pred,parents,data)
19+ else:
20+ flags=0;pb=pal.astype(np.uint8).tobytes()
21+ if all(v==((v>>1)*2+(v>>7)) for v in pb):pb=old.pack7(pb);flags=1
22+ o=dict(i=i,codec=codec,pred=pred,parents=parents,data=pb+data,colors=len(pal),channels=3,flags=flags,paletteLength=len(pb),cost=len(pb)+len(data))
23+ o['flags'] |= ((ts[0] if ts else 0)<<1)|((ts[1] if len(ts)>1 else 0)<<4)|(128 if approx else 0)
24+ o['transforms']=ts;o['approx']=approx
25+ return o
26+def pixels(o):
27+ i=o['i'];b=o['data'];ch=o['channels'];n=o['colors'];plen=o['paletteLength']
28+ if o['codec']==3:a=np.array(Image.open(io.BytesIO(b)).convert('RGBA'))
29+ else:
30+ if o['flags']&1:
31+ vals=[]
32+ for j in range(n*ch):
33+ bit=j*7;p=bit>>3;s=bit&7;v=b[p]>>s
34+ if s>1:v|=b[p+1]<<(8-s)
35+ v&=127;vals.append(v*2+(v>>6))
36+ pal=np.array(vals,np.uint8).reshape(n,ch)
37+ else:pal=np.frombuffer(b[:plen],np.uint8).reshape(n,ch)
38+ maps=[visual.trans(R[p]['idx'],t) for p,t in zip(o['parents'],o['transforms'])]
39+ if o['codec']==4:idx=maps[0]
40+ else:
41+ lens=[len(R[p]['pal']) for p in o['parents']];raw=zlib.decompress(b[plen:],-15);lut=np.frombuffer(raw[:sum(lens)],np.uint8)
42+ lm=lut[:lens[0]][maps[0]][:,:32];rm=lut[lens[0]:][maps[1]][:,32:];idx=np.concatenate([lm,rm],axis=1)
43+ a=np.empty((64,64,4),np.uint8);a[:,:,:3]=pal[idx];a[:,:,3]=255
44+ if R[i]['mask']!=65535:a[:,:,3]=BASE[i,:,:,3]
45+ return a
46+
47+
48+def assemble(base_half, mirrors, templates, half_templates, native, lossless=False):
49+ roots, ind, edges = old.prepare()
50+ for i, options in enumerate(base_half):
51+ for _, a, b, codec, data in options:
52+ edges[i].append(custom(i, codec, 3, (a, b), (0, 0), data[2:-4] if codec == 0 else data))
53+ if i < NE and R[i]['mask'] != 65535:
54+ ln = len(R[a]['pal']) + len(R[b]['pal'])
55+ if codec == 0:
56+ raw = visual.zlib.decompress(data); lut = raw[:ln]
57+ delta = np.frombuffer(raw[ln:], np.uint8).reshape(64, 64).copy()
58+ else:
59+ lut = data[:ln]
60+ delta = np.array(Image.open(io.BytesIO(data[ln:])).convert('L'))
61+ delta[BASE[i, :, :, 3] == 0] = 0
62+ zz = visual.zlib.compress(lut + delta.tobytes(), 9)[2:-4]
63+ edges[i].append(custom(i, 0, 3, (a, b), (0, 0), zz))
64+ for i, options in enumerate(mirrors):
65+ for o in options:
66+ j, t, pred = o['parent'], o['transform'], o['pred']
67+ edges[i].append(custom(i, 0, pred, (j,), (t,), o['zlib'][2:-4]))
68+ edges[i].append(custom(i, 1, pred, (j,), (t,), o['lut'] + o['webp']))
69+ if not lossless:
70+ for i, (options, _) in enumerate(templates):
71+ for _, j, t, pal, quality in options:
72+ o = custom(i, 4, 4, (j,), (t,), b'', pal, True)
73+ o['quality'] = quality; edges[i].append(o)
74+ for i, options in enumerate(half_templates):
75+ if not options: continue
76+ ref = visual.metrics(BASE[i], O[i])
77+ for _, a, b, ta, tb, pal, zz, lm, rm in options:
78+ o = custom(i, 0, 3, (a, b), (ta, tb), zz[2:-4], pal, True)
79+ if visual.passes_global(pixels(o), O[i], ref): edges[i].append(o)
80+ for i, (choice, ref, attempts) in enumerate(native):
81+ options = [o for o in edges[i] if o.get('approx')]
82+ if choice:
83+ q, b, quality = choice
84+ o = old.option(i, 3, 0, (), b)
85+ o.update(approx=True, flags=128, native_webp_quality=q, quality=quality)
86+ options.append(o)
87+ if not options: continue
88+ e0 = uniform_filter(visual.error(BASE[i], O[i]), size=5)
89+ s0 = visual.structure(BASE[i], O[i])
90+ kept = [o for o in edges[i] if not o.get('approx')]
91+ for o in options:
92+ if visual.passes_local(pixels(o), O[i], e0, s0):
93+ if 'native_webp_quality' in o:
94+ if o['cost'] < ind[i]['cost']: ind[i] = o
95+ else: kept.append(o)
96+ edges[i] = kept
97+ return old.select(roots, ind, edges, False)
98+
99+
100+def main():
101+ global R, O, NE, N, BASE
102+ parser = argparse.ArgumentParser(description=__doc__)
103+ parser.add_argument('--reference', required=True, help='Original PNG-based pack, not the EPK3 result')
104+ parser.add_argument('--textures', required=True)
105+ parser.add_argument('--output', default='emoji.pack')
106+ parser.add_argument('--workers', type=int, default=4)
107+ parser.add_argument('--cache', help='Optional trusted directory for resumable intermediate stages')
108+ parser.add_argument('--lossless', action='store_true', help='Keep the old visual result exactly; hidden RGB may differ')
109+ args = parser.parse_args()
110+ if args.workers < 1: parser.error('--workers must be positive')
111+ if Path(args.reference).resolve() == Path(args.output).resolve(): parser.error('Use a separate output path')
112+ start = time.monotonic()
113+ R, NE, lookup, original_size = old.read_reference(args.reference, args.textures)
114+ N = len(R)
115+ with zipfile.ZipFile(args.textures) as archive:
116+ O = np.array([np.array(Image.open(archive.open(f"{d['id']//4096}_{d['id']%4096}.png")).convert('RGBA')) for d in R[:NE]])
117+ old.R = R; old.N = N; old.NE = NE; old.MASK_LOOKUP = lookup
118+ old.IDX = old.I = np.array([d['idx'] for d in R])
119+ visual.initialize(R, O); BASE = visual.RGBA
120+ fingerprint = hashlib.sha256()
121+ for f in [Path(args.reference), Path(args.textures), Path(__file__), Path(old.__file__), Path(visual.__file__)]:
122+ fingerprint.update(f.read_bytes())
123+ fingerprint.update((Image.__version__ + str(features.version('webp'))).encode())
124+ key = fingerprint.hexdigest()
125+ cache = Path(args.cache) if args.cache else None
126+ if cache: cache.mkdir(parents=True, exist_ok=True)
127+ def stage(name, fn, jobs):
128+ path = cache / (name + '.pkl') if cache else None
129+ if path and path.exists():
130+ # This cache is produced by this tool. Do not use untrusted pickle files.
131+ with path.open('rb') as stream: saved = pickle.load(stream)
132+ if saved['key'] == key:
133+ print(name + ': cache', flush=True); return saved['value']
134+ value = old.map_jobs(fn, jobs, args.workers, name)
135+ if path:
136+ temp = path.with_suffix('.tmp')
137+ with temp.open('wb') as stream: pickle.dump({'key': key, 'value': value}, stream, protocol=5)
138+ temp.replace(path)
139+ return value
140+ old.B = stage('base-webp', old.baseline, R)
141+ old.C = old.candidates()
142+ old.D = stage('base-delta', old.encode_delta, range(N))
143+ old.W = stage('base-delta-webp', old.encode_delta_webp, range(N))
144+ old.features = old.half_candidates()
145+ base_half = stage('base-halves', old.encode_half, range(N))
146+ visual.make_candidates(); visual.D = old.D
147+ mirrors = stage('mirrors', visual.mirror_job, range(N))
148+ templates = half_templates = native = []
149+ if not args.lossless:
150+ templates = stage('fitted-palettes', visual.template_job, range(NE))
151+ visual.make_half_candidates()
152+ half_templates = stage('fitted-halves', visual.half_template_job, range(NE))
153+ native = stage('native-webp', visual.native_webp_job, range(NE))
154+ selected = assemble(base_half, mirrors, templates, half_templates, native, args.lossless)
155+ output = Path(args.output); output.parent.mkdir(parents=True, exist_ok=True)
156+ data = bytearray(old.pack(selected, output)); struct.pack_into('<H', data, 4, 2)
157+ output.write_bytes(data)
158+ stats = dict(reference_bytes=original_size, previous_pack_bytes=3670504, pack_bytes=len(data),
159+ saving_percent=100*(1-len(data)/original_size),
160+ emoji_count=NE, mask_count=N-NE,
161+ fitted_records=sum(o.get('approx',False) and 'native_webp_quality' not in o for o in selected),
162+ native_lossy_records=sum('native_webp_quality' in o for o in selected),
163+ horizontal_mirror_references=sum(t==1 for o in selected for t in o.get('transforms',())),
164+ transformed_references=sum(t!=0 for o in selected for t in o.get('transforms',())),
165+ mode_counts=dict(Counter(f"codec={o['codec']},prediction={o['pred']}" for o in selected)),
166+ sha256=hashlib.sha256(data).hexdigest(),build_seconds=round(time.monotonic()-start,2))
167+ output.with_suffix('.stats.json').write_text(json.dumps(stats,indent=2)+'\n')
168+ print(json.dumps(stats,indent=2),flush=True)
169+ # Validate the actual serialized bytes and the completed RGBA, including private masks.
170+ from verify_emoji_pack import validate
171+ verification = validate(output, args.reference, args.textures)
172+ output.with_suffix('.verification.json').write_text(json.dumps(verification,indent=2)+'\n')
173+
174+if __name__ == '__main__': main()
TMessagesProj/emoji/build_emoji_pack.pynew file+87
@@ -0,0 +1,87 @@
1+#!/usr/bin/env python3
2+"""Reproduce the EPK3 v3 research build from the original PNG pack and textures.
3+
4+All heavy optimization runs offline. Android needs only the supplied Java reader.
5+Use --base-pack to reuse the verified EPK3 v2 input and skip its build stage.
6+"""
7+import argparse,hashlib,importlib.util,json,os,pickle,shlex,shutil,subprocess,sys,time,zipfile
8+from pathlib import Path
9+import numpy as np
10+from PIL import Image
11+
12+ROOT=Path(__file__).resolve().parent
13+
14+def run(argv,cwd,env):
15+ print('+ '+' '.join(str(x)for x in argv),flush=True)
16+ subprocess.run([str(x)for x in argv],cwd=cwd,env=env,check=True)
17+
18+def materialize(source,dest):
19+ if source.resolve()==dest.resolve():return
20+ dest.parent.mkdir(parents=True,exist_ok=True)
21+ shutil.copyfile(source,dest)
22+
23+def main():
24+ ap=argparse.ArgumentParser(description=__doc__)
25+ ap.add_argument('--reference',required=True,help='Original PNG-based emoji.pack, not EPK3')
26+ ap.add_argument('--textures',required=True,help='Original 64x64 PNG ZIP')
27+ ap.add_argument('--output',default='emoji.pack')
28+ ap.add_argument('--base-pack',help='Optional verified EPK3 v2 pack (3,608,212 bytes)')
29+ ap.add_argument('--work-dir',help='Reusable build directory; contains large intermediate files')
30+ ap.add_argument('--workers',type=int,default=8)
31+ ap.add_argument('--all-experiments',action='store_true',help='Also reproduce the rejected mask/dictionary experiments')
32+ args=ap.parse_args()
33+ if args.workers<1:ap.error('--workers must be positive')
34+ reference=Path(args.reference).resolve();textures=Path(args.textures).resolve();output=Path(args.output).resolve()
35+ if reference==output:ap.error('Do not overwrite the original input')
36+ if reference.read_bytes()[:4]==b'EPK3':ap.error('--reference must be the original PNG-based pack')
37+ work=Path(args.work_dir).resolve()if args.work_dir else output.parent/'emoji_build'
38+ if work==ROOT:ap.error('Use a separate --work-dir')
39+ for d in ['upload','out/emoji-v2','work/v2','work/v3']:(work/d).mkdir(parents=True,exist_ok=True)
40+ env=os.environ.copy();env.update(OPENBLAS_NUM_THREADS='1',OMP_NUM_THREADS='1',EMOJI_WORKERS=str(args.workers))
41+ started=time.monotonic()
42+ for name in ['optimizer_core.py','optimizer_visual.py','verify_emoji_pack.py','quality_seams.py']:
43+ materialize(ROOT/name,work/'out/emoji-v2'/name)
44+ materialize(reference,work/'upload/emoji.pack');materialize(textures,work/'upload/emoji_textures-5.zip')
45+ base=work/'out/emoji-v2/emoji.pack'
46+ if args.base_pack:materialize(Path(args.base_pack).resolve(),base)
47+ else:
48+ run([sys.executable,ROOT/'base_builder.py','--reference',reference,'--textures',textures,
49+ '--output',base,'--workers',args.workers,'--cache',work/'base-cache'],work,env)
50+ expected='258a9d78bb1a097377bca9355531403a83b71303222fa81b0bee111baec4186e'
51+ actual=hashlib.sha256(base.read_bytes()).hexdigest()
52+ if actual!=expected:
53+ raise ValueError('This measured research build expects the supplied v2 baseline. Check inputs and pinned Pillow/libwebp versions.')
54+ # Prepare exactly the same records consumed by every independent experiment.
55+ sys.path.insert(0,str(ROOT))
56+ import optimizer_core as core
57+ from verify_emoji_pack import Pack
58+ records,ne,lookup,_=core.read_reference(reference,textures)
59+ with open(work/'work/records.pkl','wb')as f:pickle.dump(records,f,protocol=5)
60+ with zipfile.ZipFile(textures)as z:
61+ originals=np.array([np.array(Image.open(z.open(f"{r['id']//4096}_{r['id']%4096}.png")).convert('RGBA'))for r in records[:ne]])
62+ np.savez_compressed(work/'work/originals.npz',rgba=originals)
63+ pack=Pack(base);selected=[]
64+ for i,e in enumerate(pack.entries):
65+ parents=tuple(p for p in e[4:6]if p!=65535)
66+ selected.append(dict(i=i,codec=e[7],pred=e[8],parents=parents,data=pack.blob(i),colors=e[6],channels=e[9],flags=e[10],paletteLength=pack.palette_length(e),cost=e[3],approx=bool(e[10]&128),transforms=tuple((e[10]>>(1+3*j))&7 for j in range(len(parents)))))
67+ with open(work/'work/v2/final_selected.pkl','wb')as f:pickle.dump(selected,f,protocol=5)
68+ current=np.array([pack.emoji(i)for i in range(ne)]);pack.close()
69+ np.savez_compressed(work/'work/v2/final_images.npz',rgba=current)
70+ for source in (ROOT/'experiments').iterdir():
71+ if source.is_file():materialize(source,work/'work/v3'/source.name)
72+ run(shlex.split(os.environ.get('CXX','c++'))+['-O3','-shared','-fPIC','work/v3/joint.cpp','-o','work/v3/joint.so'],work,env)
73+ stages=['joint_bench.py','joint_extra.py','select_joint.py','assemble_pack.py',
74+ 'flexible_bench.py','flexible_extra.py','refit_halves.py','select_final.py']
75+ if args.all_experiments:stages+=['mask_bench.py','mask_select.py','dict_bench.py']
76+ for stage in stages:run([sys.executable,'work/v3/'+stage],work,env)
77+ output.parent.mkdir(parents=True,exist_ok=True)
78+ materialize(work/'work/v3/final.pack',output)
79+ run([sys.executable,ROOT/'verify_emoji_pack.py',output,'--reference',reference,'--textures',textures,
80+ '--compare-pack',base,'--json',output.with_suffix('.verification.json')],work,env)
81+ result=dict(pack_bytes=output.stat().st_size,v2_bytes=base.stat().st_size,
82+ saving_from_v2_bytes=base.stat().st_size-output.stat().st_size,
83+ sha256=hashlib.sha256(output.read_bytes()).hexdigest(),build_seconds=round(time.monotonic()-started,2))
84+ output.with_suffix('.stats.json').write_text(json.dumps(result,indent=2)+'\n')
85+ print(json.dumps(result,indent=2),flush=True)
86+
87+if __name__=='__main__':main()
TMessagesProj/emoji/emoji.stats.jsonnew file+36
@@ -0,0 +1,36 @@
1+{
2+ "pack_bytes": 3492338,
3+ "original_bytes": 4553463,
4+ "previous_bytes": 3608212,
5+ "saving_from_original_bytes": 1061125,
6+ "saving_from_original_percent": 23.30369215693638,
7+ "saving_from_previous_bytes": 115874,
8+ "saving_from_previous_percent": 3.2113966695970193,
9+ "emoji_count": 3606,
10+ "internal_mask_count": 363,
11+ "codec_counts": {
12+ "1": 2254,
13+ "2": 836,
14+ "0": 252,
15+ "4": 610,
16+ "3": 17
17+ },
18+ "prediction_counts": {
19+ "0": 2353,
20+ "2": 513,
21+ "1": 251,
22+ "6": 95,
23+ "3": 77,
24+ "4": 610,
25+ "5": 70
26+ },
27+ "joint_records": 575,
28+ "joint_roots": 163,
29+ "refitted_split_records": 123,
30+ "exact_flexible_records": 56,
31+ "compressed_palette_records": 149,
32+ "native_lossy_records": 16,
33+ "max_record_bytes": 3248,
34+ "sha256": "c4200fd8b0efbf2267297c084f23f8f490d03a1c55d76c87ea2f844328769652",
35+ "rebuild_identical": true
36+}
TMessagesProj/emoji/optimizer_core.pynew file+294
@@ -0,0 +1,294 @@
1+#!/usr/bin/env python3
2+"""Internal lossless candidate search used by build_emoji_pack.py.
3+
4+Build dependencies: Python 3.11+, numpy, scipy, Pillow with WebP support.
5+Runtime dependencies on Android: BitmapFactory and java.util.zip.Inflater only.
6+This tool retains the existing quantization and dithering exactly. It does not
7+run a new lossy quantizer. --textures optionally validates the original ZIP IDs.
8+"""
9+import argparse, hashlib, heapq, io, json, multiprocessing, struct, time, zipfile, zlib
10+from pathlib import Path
11+from collections import Counter
12+from concurrent.futures import ProcessPoolExecutor
13+import numpy as np
14+from scipy.spatial import cKDTree
15+from PIL import Image, features as pil_features
16+NONE = 65535
17+
18+def png_read(b):
19+ im=Image.open(io.BytesIO(b));a=np.array(im.convert('RGBA'))
20+ if im.mode=='P':
21+ idx=np.array(im);n=int(idx.max())+1;pal=np.zeros((n,4),np.uint8);pal[:,:3]=np.array(im.getpalette()[:n*3]).reshape(n,3);pal[:,3]=255
22+ tr=im.info.get('transparency',b'')
23+ if isinstance(tr,int):pal[tr,3]=0
24+ else:pal[:len(tr),3]=np.frombuffer(tr,dtype=np.uint8)
25+ elif im.mode=='L':
26+ idx=np.array(im);pal=np.arange(256,dtype=np.uint8)[:,None].repeat(4,axis=1);pal[:,3]=255
27+ else:
28+ pal,inv=np.unique(a.reshape(-1,4),axis=0,return_inverse=True);assert len(pal)<=256;idx=inv.reshape(64,64).astype(np.uint8)
29+ assert np.array_equal(pal[idx],a)
30+ return {'rgba':a,'idx':idx,'pal':pal,'png':b,'mode':im.mode}
31+
32+
33+def read_reference(path, textures=None):
34+ data = Path(path).read_bytes()
35+ def take(pos, count):
36+ if pos < 0 or count < 0 or pos + count > len(data):
37+ raise ValueError("Truncated reference pack")
38+ return data[pos:pos + count]
39+ n = struct.unpack('<I', take(0, 4))[0]
40+ if n % 12: raise ValueError("Invalid reference emoji table")
41+ n //= 12
42+ em = [struct.unpack('<HHII', take(4 + i * 12, 12)) for i in range(n)]
43+ pos = 4 + n * 12
44+ m = struct.unpack('<I', take(pos, 4))[0]
45+ if m % 10: raise ValueError("Invalid reference mask table")
46+ m //= 10
47+ masks = [struct.unpack('<HII', take(pos + 4 + i * 10, 10)) for i in range(m)]
48+ records = []
49+ for eid, mid, off, length in sorted(em):
50+ d = png_read(take(off, length))
51+ d.update(id=eid, mask=mid, kind='emoji')
52+ records.append(d)
53+ for mid, off, length in sorted(masks):
54+ d = png_read(take(off, length))
55+ d.update(id=mid, mask=NONE, kind='mask')
56+ records.append(d)
57+ if not records or len(records) >= NONE:
58+ raise ValueError("Invalid record count")
59+ for d in records:
60+ if d['rgba'].shape != (64, 64, 4):
61+ raise ValueError("This format requires 64x64 textures")
62+ if len({d['id'] for d in records[:n]}) != n or len({d['id'] for d in records[n:]}) != m:
63+ raise ValueError("Duplicate IDs")
64+ lookup = {d['id']: n + i for i, d in enumerate(records[n:])}
65+ for d in records[:n]:
66+ if d['mask'] != NONE and d['mask'] not in lookup:
67+ raise ValueError("Unknown mask ID")
68+ if textures:
69+ with zipfile.ZipFile(textures) as archive:
70+ for d in records[:n]:
71+ name = f"{d['id'] // 4096}_{d['id'] % 4096}.png"
72+ with Image.open(archive.open(name)) as image:
73+ if image.size != (64, 64): raise ValueError(name)
74+ pngs = [x for x in archive.namelist() if x.lower().endswith('.png')]
75+ if len(pngs) != n: raise ValueError("ZIP/reference emoji count mismatch")
76+ return records, n, lookup, len(data)
77+
78+
79+def baseline(d):
80+ b = io.BytesIO()
81+ Image.fromarray(d['rgba']).save(b, format='WEBP', lossless=True,
82+ quality=100, method=6, exact=True)
83+ return {'webp': b.getvalue()}
84+def candidates():
85+ # Coarse luma/alpha features and nearest exact silhouettes, plus local variant sequences.
86+ fs=[]
87+ for d in R:
88+ a=d['rgba'].astype(np.float32);al=a[:,:,3:]/255
89+ if d['kind']=='emoji' and d['mask']!=65535:al=R[MASK_LOOKUP[d['mask']]]['rgba'][:,:,:1]/255
90+ c=a[:,:,:3]*al
91+ gray=c.mean(axis=2);gray=gray/(gray.std()+10)
92+ feat=np.concatenate([gray.reshape(16,4,16,4).mean(axis=(1,3)).ravel(),al.reshape(16,4,16,4).mean(axis=(1,3)).ravel()*2])
93+ fs.append(feat)
94+ tree=cKDTree(np.array(fs));near=tree.query(fs,k=25)[1]
95+ out=[]
96+ for i,d in enumerate(R):
97+ ids=set(near[i]);ids.update(range(max(0,i-6),min(N,i+7)));ids.discard(i)
98+ out.append(sorted(j for j in ids if R[j]['kind']==d['kind']))
99+ return out
100+
101+def encode_delta(i):
102+ a=IDX[i];d=R[i];ch=4 if np.any(d['pal'][:,3]!=255) else 3;pal=len(d['pal'])*ch if d['kind']=='emoji' else 0
103+ raw=a.tobytes();best={'cost':len(zlib.compress(raw,9))+pal,'parent':-1,'mode':0,'data':zlib.compress(raw,9),'lut':b''}
104+ options=[]
105+ for j in C[i]:
106+ base=IDX[j];nb=len(R[j]['pal'])
107+ cnt=np.bincount((base.astype(np.int32)*256+a).ravel(),minlength=65536).reshape(256,256)
108+ lut=cnt.argmax(axis=1).astype(np.uint8)[:nb]
109+ pred=lut[base]
110+ # One data stream: LUT + mapped-palette residual. Original indices always restored exactly.
111+ for mode,delta in [(1,np.bitwise_xor(a,pred)),(2,a-pred)]:
112+ zz=zlib.compress(lut.tobytes()+delta.tobytes(),9);cost=len(zz)+pal+2
113+ options.append((cost,j,mode,zz,lut.tobytes()))
114+ options.sort(key=lambda x:x[0]);best3=options[:3]
115+ if best3 and best3[0][0]<best['cost']:
116+ co,j,mo,zz,lut=best3[0];best={'cost':co,'parent':j,'mode':mo,'data':zz,'lut':lut}
117+ return best,best3
118+def webp(a):
119+ b=io.BytesIO();Image.fromarray(a).save(b,format='WEBP',lossless=True,quality=100,method=6,exact=True);return b.getvalue()
120+def encode_delta_webp(i):
121+ d=R[i];res=[];pal=len(d['pal'])*(4 if np.any(d['pal'][:,3]!=255) else 3) if d['kind']=='emoji' else 0
122+ direct=webp(d['idx'])
123+ for co,j,mo,zz,lut in D[i][1]:
124+ data=zlib.decompress(zz);a=np.frombuffer(data[len(lut):],np.uint8).reshape(64,64);b=webp(a)
125+ res.append((len(b)+len(lut)+pal+2,j,mo,b,lut))
126+ return direct,sorted(res,key=lambda x:x[0])
127+
128+def half_candidates():
129+ features=[]
130+ for side in range(2):
131+ f=[]
132+ for d in R:
133+ a=d['rgba'].astype(np.float32)[:,side*32:(side+1)*32];al=a[:,:,3:]/255
134+ if d['kind']=='emoji' and d['mask']!=65535:al=R[MASK_LOOKUP[d['mask']]]['idx'][:,side*32:(side+1)*32,None]/255
135+ g=(a[:,:,:3]*al).mean(axis=2);g=g/(g.std()+10)
136+ f.append(np.concatenate([g.reshape(16,4,8,4).mean(axis=(1,3)).ravel(),al.reshape(16,4,8,4).mean(axis=(1,3)).ravel()*2]))
137+ features.append(cKDTree(f).query(f,k=13)[1])
138+ return features
139+
140+def encode_half(i):
141+ if R[i]['kind']=='mask':return []
142+ opts=[]
143+ for side in range(2):
144+ candidates=set(int(j) for j in features[side][i] if j!=i and j<NE)
145+ candidates.update(x[1] for x in D[i][1] if x[1]<NE)
146+ a=I[i,:,side*32:(side+1)*32];out=[]
147+ for j in candidates:
148+ base=I[j,:,side*32:(side+1)*32];cnt=np.bincount((base.astype(np.int32)*256+a).ravel(),minlength=65536).reshape(256,256);lut=cnt.argmax(axis=1).astype(np.uint8)[:len(R[j]['pal'])];p=lut[base];delta=a-p
149+ zz=zlib.compress(lut.tobytes()+delta.tobytes(),9)
150+ out.append((len(zz),j,lut,delta))
151+ out.sort(key=lambda x:x[0]);opts.append(out[:3])
152+ candidates=[]
153+ for a in opts[0]:
154+ for b in opts[1]:
155+ lut=a[2].tobytes()+b[2].tobytes();delta=np.concatenate([a[3],b[3]],axis=1)
156+ zz=zlib.compress(lut+delta.tobytes(),9);wb=io.BytesIO();Image.fromarray(delta).save(wb,format='WEBP',lossless=True,quality=100,method=6,exact=True);wb=wb.getvalue()
157+ codec,data=(0,zz) if len(zz)<=len(lut)+len(wb) else (1,lut+wb)
158+ candidates.append((len(data)+4,a[1],b[1],codec,data))
159+ return sorted(candidates)[:4]
160+def palette(d):
161+ if d['kind']=='mask':
162+ if len(d['pal'])==256 and np.array_equal(d['pal'][:,0],np.arange(256,dtype=np.uint8)):
163+ return 0,b'' # implicit grayscale 0..255
164+ return 1,d['pal'][:,0].tobytes()
165+ c=4 if np.any(d['pal'][:,3]!=255) else 3
166+ return c,d['pal'][:,:c].tobytes()
167+
168+def strip_webp(b):
169+ assert b[:4]==b'RIFF' and b[8:16]==b'WEBPVP8L'
170+ n=struct.unpack_from('<I',b,16)[0]
171+ assert len(b)==20+n+(n&1)
172+ return b[20:20+n]
173+
174+def wrap_webp(b):
175+ return b'RIFF'+struct.pack('<I',12+len(b)+(len(b)&1))+b'WEBPVP8L'+struct.pack('<I',len(b))+b+(b'\0' if len(b)&1 else b'')
176+
177+def pack7(b):
178+ acc=0;bits=0;out=bytearray()
179+ for v in b:
180+ acc|=(v>>1)<<bits;bits+=7
181+ while bits>=8:out.append(acc&255);acc>>=8;bits-=8
182+ if bits:out.append(acc)
183+ return bytes(out)
184+
185+def option(i,codec,pred,parents,data):
186+ ch,pal=palette(R[i]);pcount=len(R[i]['pal']) if ch else 256
187+ flags=0
188+ if pal and all(v==((v>>1)*2+(v>>7)) for v in pal):pal=pack7(pal);flags=1
189+ if codec>=2:pal=b'';ch=0;pcount=0;flags=0
190+ if codec==1:
191+ ln=sum(len(R[p]['pal']) for p in parents);data=data[:ln]+strip_webp(data[ln:])
192+ elif codec==2:data=strip_webp(data)
193+ return dict(i=i,codec=codec,pred=pred,parents=parents,data=pal+data,colors=pcount,channels=ch,flags=flags,paletteLength=len(pal),cost=len(pal)+len(data))
194+
195+def prepare():
196+ roots=[];ind=[];edges=[]
197+ for i in range(N):
198+ r=R[i];raw=zlib.compress(r['idx'].tobytes(),9)[2:-4]
199+ root=min([option(i,0,0,(),raw),option(i,1,0,(),W[i][0])],key=lambda x:x['cost']);roots.append(root)
200+ full=[option(i,2,0,(),B[i]['webp']),option(i,3,0,(),r['png'])]
201+ ind.append(min(full+[root],key=lambda x:x['cost']))
202+ oo=[]
203+ for _,j,mode,zz,lut in D[i][1]:oo.append(option(i,0,mode,(j,),zz[2:-4]))
204+ for _,j,mode,wb,lut in W[i][1]:oo.append(option(i,1,mode,(j,),lut+wb))
205+ edges.append(sorted(oo,key=lambda x:x['cost']))
206+ return roots,ind,edges
207+
208+def select(roots,ind,edges,allow_half=True):
209+ if allow_half:
210+ for i,oo in enumerate(H):
211+ for _,a,b,codec,data in oo:
212+ if codec==0:data=data[2:-4]
213+ edges[i].append(option(i,codec,3,(a,b),data))
214+ incoming=[[] for _ in range(N)]
215+ for i,oo in enumerate(edges):
216+ for o in oo:
217+ for j in set(o['parents']):incoming[j].append(o)
218+ costs=[o['cost'] for o in ind];choice=ind.copy();opened=set();heap=[]
219+ def gain(j):
220+ if j in opened:return -1e9
221+ changes={}
222+ for o in incoming[j]:
223+ i=o['i']
224+ if i in opened or i==j:continue
225+ if all(p==j or p in opened for p in o['parents']):changes[i]=min(changes.get(i,costs[i]),o['cost'])
226+ return sum(costs[i]-c for i,c in changes.items())-(roots[j]['cost']-costs[j])
227+ for j in range(N):heapq.heappush(heap,(-gain(j),j))
228+ while heap:
229+ ng,j=heapq.heappop(heap)
230+ if j in opened:continue
231+ g=gain(j)
232+ if heap and g < -heap[0][0]-.01:
233+ heapq.heappush(heap,(-g,j));continue
234+ if g<=0:break
235+ opened.add(j);costs[j]=roots[j]['cost'];choice[j]=roots[j]
236+ for o in incoming[j]:
237+ i=o['i']
238+ if i not in opened and all(p in opened for p in o['parents']) and o['cost']<costs[i]:costs[i]=o['cost'];choice[i]=o
239+ # Half options become available as soon as one of the two roots is open.
240+ for o in incoming[j]:
241+ for p in o['parents']:
242+ if p not in opened:heapq.heappush(heap,(-gain(p),p))
243+ # Prune facilities no longer used by anyone.
244+ used={p for o in choice for p in o['parents']}
245+ for j in opened-used:choice[j]=ind[j]
246+ return choice
247+
248+def pack(choice,path):
249+ hsize=32;esize=20;off=hsize+N*esize;entries=[];payload=[]
250+ for i,o in enumerate(choice):
251+ r=R[i];p=o['parents'];data=o['data'];assert len(data)<65536
252+ entries.append(struct.pack('<HHIHHHHBBBB',r['id'],r['mask'],off,len(data),p[0] if p else NONE,p[1] if len(p)>1 else NONE,o['colors'],o['codec'],o['pred'],o['channels'],o['flags']));payload.append(data);off+=len(data)
253+ header=struct.pack('<4sHHIIIIII',b'EPK3',1,esize,64,64,N,NE,off,0)
254+ b=header+b''.join(entries)+b''.join(payload);assert len(b)==off;path.write_bytes(b)
255+ return b
256+
257+def verify(choice):
258+ roots={}
259+ def idx(i):
260+ o=choice[i];data=o['data'];n=o['paletteLength'];data=data[n:];ps=o['parents'];maps=[idx(p) for p in ps]
261+ ls=[choice[p]['colors'] for p in ps];ln=sum(ls)
262+ if o['codec']==0:
263+ raw=zlib.decompress(data,-15);lut=raw[:ln];a=np.frombuffer(raw[ln:],np.uint8).copy().reshape(64,64)
264+ elif o['codec']==1:
265+ lut=data[:ln];a=np.array(Image.open(io.BytesIO(wrap_webp(data[ln:]))).convert('L'))
266+ else:raise ValueError('not indexed')
267+ if ps:
268+ if o['pred']==3:
269+ l=np.frombuffer(lut[:ls[0]],np.uint8)[maps[0]][:,:32];r=np.frombuffer(lut[ls[0]:],np.uint8)[maps[1]][:,32:];p=np.concatenate([l,r],axis=1)
270+ else:p=np.frombuffer(lut,np.uint8)[maps[0]]
271+ a=(a^p) if o['pred']==1 else (a+p).astype(np.uint8)
272+ assert np.array_equal(a,R[i]['idx']),(i,'indices')
273+ return a
274+ for i,o in enumerate(choice):
275+ if o['codec']>=2:a=np.array(Image.open(io.BytesIO(wrap_webp(o['data']) if o['codec']==2 else o['data'])).convert('RGBA'))
276+ else:
277+ ix=idx(i);a=R[i]['pal'][ix]
278+ assert np.array_equal(a,R[i]['rgba']),(i,'rgba')
279+ print('verified all',len(choice),'images and masks exactly',flush=True)
280+
281+
282+def map_jobs(fn, jobs, workers, label):
283+ start = time.monotonic()
284+ out = []
285+ # Workers inherit read-only arrays. Explicit fork avoids Python 3.14's
286+ # changed default; this build tool targets Linux/macOS, not Android.
287+ ctx = multiprocessing.get_context('fork')
288+ with ProcessPoolExecutor(max_workers=workers, mp_context=ctx) as pool:
289+ for i, result in enumerate(pool.map(fn, jobs, chunksize=8)):
290+ out.append(result)
291+ if (i + 1) % 500 == 0:
292+ print(f'{label}: {i + 1}; {time.monotonic() - start:.1f}s', flush=True)
293+ return out
294+
TMessagesProj/emoji/optimizer_visual.pynew file+179
@@ -0,0 +1,179 @@
1+"""Offline geometric candidates, palette fitting and perceptual quality checks."""
2+import io, zlib
3+import numpy as np
4+from scipy.ndimage import uniform_filter, distance_transform_edt
5+from scipy.spatial import cKDTree
6+from PIL import Image
7+
8+def initialize(records, originals):
9+ global R, O, NE, N, M, RGBA, IDX, ALPHA
10+ R = records; O = originals; NE = len(O); N = len(R)
11+ M = {d['id']: NE + i for i, d in enumerate(R[NE:])}
12+ RGBA = np.array([d['rgba'] for d in R[:NE]])
13+ for i, d in enumerate(R[:NE]):
14+ if d['mask'] != 65535: RGBA[i, :, :, 3] = R[M[d['mask']]]['rgba'][:, :, 0]
15+ IDX = np.array([d['idx'] for d in R]); ALPHA = RGBA[:, :, :, 3]
16+
17+def trans(a,t):
18+ if t&4:a=a.swapaxes(0,1)
19+ if t&2:a=a[::-1]
20+ if t&1:a=a[:,::-1]
21+ return a
22+
23+def features(a):
24+ alpha=a[:,:,3:]/255.;rgb=a[:,:,:3]*alpha
25+ g=rgb.mean(axis=2);g=g/(g.std()+10)
26+ return np.concatenate([g.reshape(16,4,16,4).mean(axis=(1,3)).ravel(),alpha.reshape(16,4,16,4).mean(axis=(1,3)).ravel()*2]).astype(np.float32)
27+
28+def make_candidates():
29+ global C
30+ F=np.array([features(a) for a in RGBA]);TREE=cKDTree(F)
31+ C=[[] for _ in range(NE)]
32+ for t in [0,1,2,3,4,5,6,7]:
33+ f=np.array([features(trans(a,t)) for a in RGBA]);_,js=TREE.query(f,k=9)
34+ for j,row in enumerate(js):
35+ for i in row:
36+ if i!=j:C[i].append((j,t))
37+ # Add direct near candidates; mirror query inversion above is exact involution only for 0..4,7.
38+ # Here the candidate is transformed j, queried against normal i, so all eight are correct.
39+ return C
40+
41+def metrics(a,o):
42+ a=a.astype(np.float32)/255;o=o.astype(np.float32)/255
43+ ms=ss=p99=0.
44+ for bg in [0,1]:
45+ x=a[:,:,:3]*a[:,:,3:]+bg*(1-a[:,:,3:]);y=o[:,:,:3]*o[:,:,3:]+bg*(1-o[:,:,3:]);err=(x-y)**2
46+ ms+=float(np.mean(err));p99+=float(np.quantile(err,.99))
47+ mx=uniform_filter(x,size=(7,7,1));my=uniform_filter(y,size=(7,7,1));vx=uniform_filter(x*x,size=(7,7,1))-mx*mx;vy=uniform_filter(y*y,size=(7,7,1))-my*my;cv=uniform_filter(x*y,size=(7,7,1))-mx*my
48+ ss+=float(np.mean(((2*mx*my+.0001)*(2*cv+.0009))/((mx*mx+my*my+.0001)*(vx+vy+.0009))))
49+ return ms/2,ss/2,p99/2
50+
51+def fit(i,j,t):
52+ ix=trans(IDX[j],t);n=len(R[j]['pal']);a=ALPHA[i].astype(np.float32)/255;o=O[i].astype(np.float32);ao=o[:,:,3]/255
53+ weight=a*a;wanted=np.zeros((64,64,3),np.float32);valid=a>0
54+ wanted[valid]=(o[valid,:3]*ao[valid,None]+127.5*(a[valid,None]-ao[valid,None]))/a[valid,None]
55+ den=np.bincount(ix.ravel(),weight.ravel(),minlength=n)
56+ pal=np.array([np.bincount(ix.ravel(),(wanted[:,:,c]*weight).ravel(),minlength=n)/np.maximum(den,1e-6) for c in range(3)]).T
57+ pal=np.clip(np.round(pal),0,255).astype(np.uint8)
58+ output=np.empty((64,64,4),np.uint8);output[:,:,:3]=pal[ix];output[:,:,3]=ALPHA[i]
59+ return output,pal
60+
61+def template_job(i):
62+ if R[i]['mask']==65535:return [],None
63+ ref=metrics(RGBA[i],O[i]);options=[]
64+ for j,t in C[i]:
65+ if len(R[j]['pal'])>150:continue
66+ a,pal=fit(i,j,t);met=metrics(a,O[i]);good=(met[0]<=ref[0] and met[1]>=ref[1] and met[2]<=ref[2])
67+ if good:options.append((len(pal)*3,j,t,pal,met))
68+ options.sort(key=lambda x:x[0]);return options[:8],ref
69+
70+def half_features(a):
71+ alpha=a[:,:,3:]/255.;g=(a[:,:,:3]*alpha).mean(axis=2);g/=g.std()+10
72+ return np.concatenate([g.reshape(16,4,8,4).mean(axis=(1,3)).ravel(),alpha.reshape(16,4,8,4).mean(axis=(1,3)).ravel()*2]).astype(np.float32)
73+def make_half_candidates():
74+ global HC
75+ HC=[[[] for _ in range(NE)] for _ in range(2)]
76+ for side in [0,1]:
77+ target=np.array([half_features(a[:,side*32:(side+1)*32]) for a in RGBA]);tree=cKDTree(target)
78+ for t in [0,1]:
79+ f=np.array([half_features(trans(a,t)[:,side*32:(side+1)*32]) for a in RGBA]);_,js=tree.query(f,k=12)
80+ for j,row in enumerate(js):
81+ for i in row:
82+ if i!=j:HC[side][i].append((j,t))
83+ return HC
84+
85+def fit_half(i,j,t,side):
86+ x=side*32;ix=trans(IDX[j],t)[:,x:x+32];n=len(R[j]['pal']);a=ALPHA[i,:,x:x+32].astype(np.float32)/255;o=O[i,:,x:x+32].astype(np.float32);ao=o[:,:,3]/255
87+ wt=a*a;valid=a>0;wanted=np.zeros((64,32,3),np.float32)
88+ wanted[valid]=(o[valid,:3]*ao[valid,None]+127.5*(a[valid,None]-ao[valid,None]))/a[valid,None]
89+ den=np.bincount(ix.ravel(),wt.ravel(),minlength=n)
90+ pal=np.array([np.bincount(ix.ravel(),(wanted[:,:,c]*wt).ravel(),minlength=n)/np.maximum(den,1e-6) for c in range(3)]).T
91+ pal=np.clip(np.round(pal),0,255).astype(np.uint8)
92+ out=np.empty((64,32,4),np.uint8);out[:,:,:3]=pal[ix];out[:,:,3]=ALPHA[i,:,x:x+32]
93+ return out,pal
94+
95+def half_template_job(i):
96+ if R[i]['mask']==65535:return []
97+ halves=[]
98+ for side in [0,1]:
99+ x=side*32;original=O[i,:,x:x+32];ref=metrics(RGBA[i,:,x:x+32],original);opts=[]
100+ for j,t in HC[side][i]:
101+ if len(R[j]['pal'])>150:continue
102+ out,pal=fit_half(i,j,t,side);met=metrics(out,original)
103+ if met[0]<=ref[0] and met[1]>=ref[1] and met[2]<=ref[2]:opts.append((len(np.unique(pal,axis=0)),j,t,pal,met))
104+ opts.sort(key=lambda x:x[0]);halves.append(opts[:4])
105+ if not halves[0] or not halves[1]:return []
106+ options=[]
107+ for l in halves[0]:
108+ for r in halves[1]:
109+ pal,inv=np.unique(np.concatenate([l[3],r[3]]),axis=0,return_inverse=True)
110+ if len(pal)>256:continue
111+ raw=inv.astype(np.uint8).tobytes()+bytes(4096);zz=zlib.compress(raw,9)
112+ options.append((len(pal)*3+len(zz),l[1],r[1],l[2],r[2],pal,zz,l[4],r[4]))
113+ return sorted(options,key=lambda x:x[0])[:6]
114+
115+def webp(a):
116+ b=io.BytesIO();Image.fromarray(a).save(b,format='WEBP',lossless=True,quality=100,method=6,exact=True);return b.getvalue()
117+
118+def mirror_job(i):
119+ a=IDX[i];visible=ALPHA[i]>0 if i<NE and R[i]['mask']!=65535 else np.ones((64,64),bool)
120+ cand=set(C[i]) if i<NE else set()
121+ cand.update((x[1],t) for x in D[i][1] for t in range(8))
122+ options=[]
123+ for j,t in cand:
124+ base=trans(IDX[j],t);nb=len(R[j]['pal'])
125+ cnt=np.bincount((base[visible].astype(np.int32)*256+a[visible]).ravel(),minlength=65536).reshape(256,256)
126+ lut=cnt.argmax(axis=1).astype(np.uint8)[:nb];p=lut[base]
127+ for mode in [1,2]:
128+ delta=(a^p) if mode==1 else (a-p);delta[~visible]=0
129+ zz=zlib.compress(lut.tobytes()+delta.tobytes(),9)
130+ options.append((len(zz),j,t,mode,zz,lut.tobytes(),delta))
131+ options.sort(key=lambda x:x[0]);out=[]
132+ for _,j,t,mode,zz,lut,delta in options[:6]:
133+ wb=webp(delta)
134+ out.append(dict(parent=j,transform=t,pred=mode,zlib=zz,webp=wb,lut=lut))
135+ return out
136+
137+def native_webp_job(i):
138+ d=R[i];src=O[i].copy();ref=d['rgba'].copy()
139+ if d['mask']!=65535:ref[:,:,3]=R[M[d['mask']]]['idx']
140+ # Keep alpha exactly as current reference. Recover source RGB gradients before WebP.
141+ src[:,:,3]=ref[:,:,3]
142+ m=src[:,:,3]<16
143+ if np.any(~m):
144+ iy,ix=distance_transform_edt(m,return_distances=False,return_indices=True);src[m,:3]=src[iy[m],ix[m],:3]
145+ encode=src.copy()
146+ if d['mask']!=65535:encode[:,:,3]=255
147+ rr=metrics(ref,O[i]);out=[];chosen=None
148+ for q in [10,20,30,40,50,60,70,80,90,95,100]:
149+ b=io.BytesIO();Image.fromarray(encode).save(b,format='WEBP',quality=q,method=6,alpha_quality=100);b=b.getvalue();a=np.array(Image.open(io.BytesIO(b)).convert('RGBA'));a[:,:,3]=ref[:,:,3]
150+ sc=metrics(a,O[i]);good=sc[0]<=rr[0] and sc[1]>=rr[1] and sc[2]<=rr[2]
151+ out.append((q,len(b),sc,good))
152+ if good:
153+ chosen=(q,b,sc);break
154+ return chosen,rr,out
155+def error(a,o):
156+ a=a.astype(np.float32)/255;o=o.astype(np.float32)/255
157+ da=a[:,:,3:]-o[:,:,3:];rgb=a[:,:,:3]*a[:,:,3:]-o[:,:,:3]*o[:,:,3:]
158+ return ((rgb*rgb+(rgb-da)*(rgb-da))/2).mean(axis=2)
159+
160+def structure(a,o):
161+ a=a.astype(np.float32)/255;o=o.astype(np.float32)/255;s=0
162+ for bg in [0,1]:
163+ x=a[:,:,:3]*a[:,:,3:]+bg*(1-a[:,:,3:]);y=o[:,:,:3]*o[:,:,3:]+bg*(1-o[:,:,3:])
164+ mx=uniform_filter(x,size=(5,5,1));my=uniform_filter(y,size=(5,5,1));vx=uniform_filter(x*x,size=(5,5,1))-mx*mx;vy=uniform_filter(y*y,size=(5,5,1))-my*my;cv=uniform_filter(x*y,size=(5,5,1))-mx*my
165+ s+=(((2*mx*my+.0001)*(2*cv+.0009))/((mx*mx+my*my+.0001)*(vx+vy+.0009))).mean(axis=2)
166+ return s/2
167+
168+
169+
170+def passes_global(image, original, reference_metrics):
171+ m = metrics(image, original)
172+ return m[0] <= reference_metrics[0] and m[1] >= reference_metrics[1] and m[2] <= reference_metrics[2]
173+
174+
175+def passes_local(image, original, reference_error, reference_structure):
176+ e = uniform_filter(error(image, original), size=5)
177+ s = structure(image, original)
178+ return bool(np.all(e <= np.maximum(reference_error * 3, (8 / 255) ** 2))
179+ and np.all(s >= reference_structure - 0.1))
TMessagesProj/emoji/quality_seams.pynew file+19
@@ -0,0 +1,19 @@
1+"""Additional seam check for smooth, opaque parts of fitted split images."""
2+import numpy as np
3+from scipy.ndimage import uniform_filter1d, maximum_filter, minimum_filter
4+
5+def passes_seam(image,baseline,original,axis,cut):
6+ # Look only for coherent seam errors inside smooth, opaque source regions.
7+ src=original[:,:,:3].astype(np.float32)
8+ spread=maximum_filter(src,size=(5,5,1))-minimum_filter(src,size=(5,5,1))
9+ smooth=np.all(spread<16,axis=2)&(original[:,:,3]>=250)&(baseline[:,:,3]>=250)
10+ mask=(smooth[cut]&smooth[cut-1])if axis==1 else(smooth[:,cut]&smooth[:,cut-1])
11+ if not np.any(mask):return True
12+ for bg in [0.,255.]:
13+ def sample(a):
14+ v=a[:,:,:3].astype(np.float32)*(a[:,:,3:]/255.)+bg*(1-a[:,:,3:]/255.)
15+ return v[cut]-v[cut-1]if axis==1 else v[:,cut]-v[:,cut-1]
16+ source=sample(original);a=np.abs(uniform_filter1d(sample(image)-source,5,axis=0));b=np.abs(uniform_filter1d(sample(baseline)-source,5,axis=0))
17+ if np.any(a[mask]>np.maximum(b[mask]*2.,4.)):return False
18+ return True
19+
TMessagesProj/emoji/requirements.txtnew file+3
@@ -0,0 +1,3 @@
1+numpy==2.3.5
2+scipy==1.17.0
3+Pillow==12.3.0
TMessagesProj/emoji/research_results.jsonnew file+186
@@ -0,0 +1,186 @@
1+{
2+ "stages": [
3+ {
4+ "name": "joint_quantization",
5+ "gain_bytes": 61148,
6+ "result_bytes": 3547064
7+ },
8+ {
9+ "name": "fitted_parts_after_seam_gate",
10+ "gain_bytes": 45869,
11+ "result_bytes": 3501195
12+ },
13+ {
14+ "name": "other_exact_splits",
15+ "gain_bytes": 3225,
16+ "result_bytes": 3497970
17+ },
18+ {
19+ "name": "unused_roots",
20+ "gain_bytes": 1568,
21+ "result_bytes": 3496402
22+ },
23+ {
24+ "name": "palette_deflate_without_dictionary",
25+ "gain_bytes": 4064,
26+ "result_bytes": 3492338
27+ }
28+ ],
29+ "quantization": {
30+ "groups_tested": 443,
31+ "palette_sizes": [
32+ 32,
33+ 40,
34+ 48,
35+ 56,
36+ 64,
37+ 80,
38+ 96,
39+ 112,
40+ 128,
41+ 160,
42+ 192
43+ ],
44+ "dither_error_factors": [
45+ 0.8,
46+ 1.0
47+ ],
48+ "maps_selected_at_first_stage": 163,
49+ "emoji_selected_at_first_stage": 579
50+ },
51+ "split_positions": [
52+ 8,
53+ 12,
54+ 16,
55+ 20,
56+ 24,
57+ 28,
58+ 32,
59+ 36,
60+ 40,
61+ 44,
62+ 48,
63+ 52,
64+ 56
65+ ],
66+ "mask_experiments": {
67+ "merged_rgba_records_tested": 2161,
68+ "positive_complete_mask_group_saving": 0,
69+ "separated_rgba_best_net_saving": 2,
70+ "adopted": false
71+ },
72+ "dictionary_experiments": [
73+ {
74+ "mode": "stream",
75+ "dictionary_limit": 0,
76+ "dictionary_bytes": 0,
77+ "record_count": 0,
78+ "net_saving_bytes": 0
79+ },
80+ {
81+ "mode": "stream",
82+ "dictionary_limit": 4096,
83+ "dictionary_bytes": 4096,
84+ "record_count": 66,
85+ "net_saving_bytes": -3939
86+ },
87+ {
88+ "mode": "stream",
89+ "dictionary_limit": 16384,
90+ "dictionary_bytes": 16384,
91+ "record_count": 72,
92+ "net_saving_bytes": -16132
93+ },
94+ {
95+ "mode": "stream",
96+ "dictionary_limit": 32768,
97+ "dictionary_bytes": 32768,
98+ "record_count": 59,
99+ "net_saving_bytes": -32583
100+ },
101+ {
102+ "mode": "all",
103+ "dictionary_limit": 0,
104+ "dictionary_bytes": 0,
105+ "record_count": 0,
106+ "net_saving_bytes": 0
107+ },
108+ {
109+ "mode": "all",
110+ "dictionary_limit": 4096,
111+ "dictionary_bytes": 4096,
112+ "record_count": 28,
113+ "net_saving_bytes": -4070
114+ },
115+ {
116+ "mode": "all",
117+ "dictionary_limit": 16384,
118+ "dictionary_bytes": 16384,
119+ "record_count": 32,
120+ "net_saving_bytes": -16278
121+ },
122+ {
123+ "mode": "all",
124+ "dictionary_limit": 32768,
125+ "dictionary_bytes": 32768,
126+ "record_count": 44,
127+ "net_saving_bytes": -32633
128+ },
129+ {
130+ "mode": "palette",
131+ "dictionary_limit": 0,
132+ "dictionary_bytes": 0,
133+ "record_count": 145,
134+ "net_saving_bytes": 3996
135+ },
136+ {
137+ "mode": "palette",
138+ "dictionary_limit": 4096,
139+ "dictionary_bytes": 2192,
140+ "record_count": 360,
141+ "net_saving_bytes": 3351
142+ },
143+ {
144+ "mode": "palette",
145+ "dictionary_limit": 16384,
146+ "dictionary_bytes": 2192,
147+ "record_count": 360,
148+ "net_saving_bytes": 3351
149+ },
150+ {
151+ "mode": "palette",
152+ "dictionary_limit": 32768,
153+ "dictionary_bytes": 2192,
154+ "record_count": 360,
155+ "net_saving_bytes": 3351
156+ }
157+ ],
158+ "seam_filter": {
159+ "retained_records": 123,
160+ "lost_gain_bytes": 950,
161+ "affected_records": [
162+ 376,
163+ 441,
164+ 545,
165+ 825,
166+ 1743,
167+ 1817,
168+ 1825,
169+ 1840,
170+ 1866,
171+ 1872,
172+ 1894,
173+ 1922,
174+ 2556,
175+ 3276
176+ ]
177+ },
178+ "verification": {
179+ "alpha_exact": true,
180+ "compared_with_both_prior_packs": true,
181+ "all_emojis": 3606,
182+ "changed_from_v2": 698
183+ },
184+ "rebuild_identical": true,
185+ "sha256": "c4200fd8b0efbf2267297c084f23f8f490d03a1c55d76c87ea2f844328769652"
186+}
TMessagesProj/emoji/test_java_loader.pynew file+41
@@ -0,0 +1,41 @@
1+#!/usr/bin/env python3
2+"""Host JVM logic test. BitmapFactory is stubbed with exact libwebp fixtures.
3+
4+This is deliberately not an Android performance/premultiplication test.
5+Requires the build Python dependencies and a JDK with com.sun.tools.javac.Main.
6+"""
7+import argparse,hashlib,io,shutil,struct,subprocess,tempfile
8+from pathlib import Path
9+import numpy as np
10+from PIL import Image
11+from verify_emoji_pack import Pack,wrap_webp
12+ROOT=Path(__file__).resolve().parent
13+
14+def main():
15+ ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('pack');ap.add_argument('--work-dir')
16+ args=ap.parse_args();work=Path(args.work_dir).resolve()if args.work_dir else Path(tempfile.mkdtemp(prefix='emoji-java-test-'))
17+ work.mkdir(parents=True,exist_ok=True);fixtures=work/'fixtures';fixtures.mkdir(exist_ok=True)
18+ p=Pack(args.pack)
19+ for i,e in enumerate(p.entries):
20+ if e[7]in (0,4):continue
21+ b=p.blob(i)
22+ if e[7]==1:
23+ n=sum(p.entries[j][6]for j in e[4:6]if j!=65535)
24+ b=wrap_webp(b[p.palette_length(e)+(1 if e[8]in(5,6)else 0)+n:])
25+ elif e[7]==2:b=wrap_webp(b)
26+ rgba=np.array(Image.open(io.BytesIO(b)).convert('RGBA')).tobytes()
27+ (fixtures/hashlib.sha256(b).hexdigest()).write_bytes(rgba)
28+ expected=work/'expected.bin'
29+ with expected.open('wb')as f:
30+ f.write(struct.pack('>II',p.ne,p.ne))
31+ for i in range(p.ne):
32+ key,mask=p.entries[i][:2];a=p.emoji(i).astype(np.uint32)
33+ argb=(a[:,:,3]<<24)|(a[:,:,0]<<16)|(a[:,:,1]<<8)|a[:,:,2]
34+ f.write(struct.pack('>HH',key,mask));f.write(argb.astype('>u4').tobytes())
35+ asset=work/'asset.bin';asset.write_bytes(b'X'*137+bytes(p.data)+b'TRAILER');p.close()
36+ sources=sorted((ROOT/'tests/src').rglob('*.java'))+[ROOT/'EmojiPack.java']
37+ classes=work/'classes';classes.mkdir(exist_ok=True)
38+ subprocess.run(['java','com.sun.tools.javac.Main','-source','8','-target','8','-d',str(classes)]+[str(s)for s in sources],check=True)
39+ subprocess.run(['java','-Dfixture.dir='+str(fixtures),'-Dfixture.asset='+str(asset),'-cp',str(classes),'Test',str(expected)],check=True)
40+ print('Fixtures:',work)
41+if __name__=='__main__':main()
TMessagesProj/emoji/verification.jsonnew file+955
@@ -0,0 +1,955 @@
1+{
2+ "pack_bytes": 3492338,
3+ "verified_emojis": 3606,
4+ "changed_emojis": 924,
5+ "alpha_changed_pixels": 0,
6+ "unmarked_visible_changes": 0,
7+ "quality_gate_failures": 0,
8+ "max_cold_streams": 5,
9+ "max_cold_compressed_bytes": 5634,
10+ "average_cold_streams": 1.9963948973932335,
11+ "max_cold_palette_inflations": 1,
12+ "average_cold_palette_inflations": 0.04132002218524681,
13+ "sha256": "c4200fd8b0efbf2267297c084f23f8f490d03a1c55d76c87ea2f844328769652",
14+ "changed_ids": [
15+ 129,
16+ 131,
17+ 132,
18+ 133,
19+ 134,
20+ 135,
21+ 137,
22+ 138,
23+ 139,
24+ 140,
25+ 144,
26+ 145,
27+ 146,
28+ 147,
29+ 150,
30+ 152,
31+ 153,
32+ 155,
33+ 157,
34+ 158,
35+ 161,
36+ 162,
37+ 163,
38+ 164,
39+ 165,
40+ 167,
41+ 168,
42+ 169,
43+ 170,
44+ 171,
45+ 173,
46+ 174,
47+ 175,
48+ 176,
49+ 177,
50+ 182,
51+ 183,
52+ 185,
53+ 186,
54+ 187,
55+ 189,
56+ 190,
57+ 191,
58+ 192,
59+ 193,
60+ 194,
61+ 195,
62+ 196,
63+ 199,
64+ 201,
65+ 203,
66+ 206,
67+ 207,
68+ 209,
69+ 211,
70+ 213,
71+ 214,
72+ 216,
73+ 218,
74+ 219,
75+ 221,
76+ 223,
77+ 224,
78+ 225,
79+ 228,
80+ 229,
81+ 230,
82+ 231,
83+ 233,
84+ 234,
85+ 235,
86+ 236,
87+ 237,
88+ 240,
89+ 241,
90+ 242,
91+ 243,
92+ 245,
93+ 246,
94+ 247,
95+ 248,
96+ 249,
97+ 250,
98+ 252,
99+ 253,
100+ 254,
101+ 255,
102+ 259,
103+ 260,
104+ 261,
105+ 264,
106+ 265,
107+ 266,
108+ 267,
109+ 270,
110+ 271,
111+ 272,
112+ 273,
113+ 274,
114+ 275,
115+ 276,
116+ 278,
117+ 279,
118+ 282,
119+ 283,
120+ 284,
121+ 285,
122+ 288,
123+ 289,
124+ 290,
125+ 291,
126+ 294,
127+ 295,
128+ 296,
129+ 297,
130+ 300,
131+ 301,
132+ 302,
133+ 303,
134+ 304,
135+ 306,
136+ 307,
137+ 308,
138+ 309,
139+ 310,
140+ 311,
141+ 314,
142+ 315,
143+ 316,
144+ 319,
145+ 320,
146+ 321,
147+ 323,
148+ 325,
149+ 326,
150+ 327,
151+ 330,
152+ 331,
153+ 332,
154+ 333,
155+ 335,
156+ 336,
157+ 337,
158+ 338,
159+ 339,
160+ 341,
161+ 342,
162+ 343,
163+ 344,
164+ 345,
165+ 347,
166+ 348,
167+ 349,
168+ 350,
169+ 351,
170+ 354,
171+ 355,
172+ 356,
173+ 357,
174+ 358,
175+ 361,
176+ 367,
177+ 368,
178+ 369,
179+ 370,
180+ 372,
181+ 375,
182+ 377,
183+ 379,
184+ 381,
185+ 382,
186+ 383,
187+ 385,
188+ 386,
189+ 387,
190+ 388,
191+ 394,
192+ 395,
193+ 397,
194+ 398,
195+ 399,
196+ 400,
197+ 401,
198+ 402,
199+ 404,
200+ 405,
201+ 406,
202+ 407,
203+ 411,
204+ 413,
205+ 431,
206+ 433,
207+ 434,
208+ 438,
209+ 440,
210+ 441,
211+ 442,
212+ 444,
213+ 446,
214+ 447,
215+ 448,
216+ 458,
217+ 459,
218+ 460,
219+ 464,
220+ 465,
221+ 466,
222+ 491,
223+ 492,
224+ 493,
225+ 494,
226+ 495,
227+ 496,
228+ 500,
229+ 501,
230+ 512,
231+ 513,
232+ 535,
233+ 536,
234+ 537,
235+ 539,
236+ 540,
237+ 541,
238+ 543,
239+ 545,
240+ 546,
241+ 547,
242+ 548,
243+ 549,
244+ 552,
245+ 554,
246+ 555,
247+ 556,
248+ 576,
249+ 578,
250+ 579,
251+ 580,
252+ 581,
253+ 582,
254+ 583,
255+ 585,
256+ 589,
257+ 591,
258+ 592,
259+ 605,
260+ 606,
261+ 608,
262+ 609,
263+ 613,
264+ 614,
265+ 615,
266+ 617,
267+ 620,
268+ 621,
269+ 622,
270+ 631,
271+ 632,
272+ 633,
273+ 634,
274+ 648,
275+ 649,
276+ 659,
277+ 660,
278+ 661,
279+ 663,
280+ 665,
281+ 666,
282+ 667,
283+ 668,
284+ 669,
285+ 702,
286+ 704,
287+ 705,
288+ 707,
289+ 708,
290+ 711,
291+ 745,
292+ 746,
293+ 747,
294+ 752,
295+ 753,
296+ 754,
297+ 764,
298+ 765,
299+ 766,
300+ 768,
301+ 769,
302+ 770,
303+ 771,
304+ 772,
305+ 775,
306+ 777,
307+ 792,
308+ 793,
309+ 794,
310+ 795,
311+ 796,
312+ 799,
313+ 800,
314+ 801,
315+ 802,
316+ 805,
317+ 807,
318+ 808,
319+ 822,
320+ 823,
321+ 824,
322+ 825,
323+ 826,
324+ 840,
325+ 842,
326+ 843,
327+ 844,
328+ 847,
329+ 848,
330+ 849,
331+ 850,
332+ 865,
333+ 866,
334+ 867,
335+ 868,
336+ 905,
337+ 906,
338+ 907,
339+ 929,
340+ 931,
341+ 933,
342+ 934,
343+ 969,
344+ 970,
345+ 972,
346+ 974,
347+ 975,
348+ 976,
349+ 978,
350+ 979,
351+ 980,
352+ 981,
353+ 985,
354+ 986,
355+ 987,
356+ 988,
357+ 990,
358+ 992,
359+ 993,
360+ 994,
361+ 1003,
362+ 1004,
363+ 1005,
364+ 1006,
365+ 1010,
366+ 1011,
367+ 1012,
368+ 1014,
369+ 1016,
370+ 1017,
371+ 1018,
372+ 1027,
373+ 1028,
374+ 1029,
375+ 1030,
376+ 1037,
377+ 1038,
378+ 1039,
379+ 1040,
380+ 1041,
381+ 1042,
382+ 1046,
383+ 1047,
384+ 1048,
385+ 1052,
386+ 1053,
387+ 1058,
388+ 1059,
389+ 1060,
390+ 1061,
391+ 1062,
392+ 1063,
393+ 1064,
394+ 1065,
395+ 1066,
396+ 1074,
397+ 1076,
398+ 1077,
399+ 1078,
400+ 1079,
401+ 1081,
402+ 1085,
403+ 1086,
404+ 1088,
405+ 1089,
406+ 1090,
407+ 1094,
408+ 1096,
409+ 1097,
410+ 1098,
411+ 1100,
412+ 1101,
413+ 1106,
414+ 1107,
415+ 1108,
416+ 1111,
417+ 1112,
418+ 1113,
419+ 1114,
420+ 1115,
421+ 1116,
422+ 1117,
423+ 1118,
424+ 1119,
425+ 1120,
426+ 1165,
427+ 1166,
428+ 1167,
429+ 1168,
430+ 1170,
431+ 1171,
432+ 1172,
433+ 1173,
434+ 1174,
435+ 1175,
436+ 1176,
437+ 1177,
438+ 1178,
439+ 1180,
440+ 1182,
441+ 1183,
442+ 1184,
443+ 1185,
444+ 1186,
445+ 1188,
446+ 1189,
447+ 1190,
448+ 1191,
449+ 1192,
450+ 1193,
451+ 1202,
452+ 1203,
453+ 1204,
454+ 1205,
455+ 1206,
456+ 1207,
457+ 1208,
458+ 1209,
459+ 1210,
460+ 1211,
461+ 1212,
462+ 1213,
463+ 1214,
464+ 1215,
465+ 1216,
466+ 1217,
467+ 1219,
468+ 1221,
469+ 1222,
470+ 1223,
471+ 1225,
472+ 1227,
473+ 1228,
474+ 1229,
475+ 1231,
476+ 1232,
477+ 1233,
478+ 1234,
479+ 1235,
480+ 1237,
481+ 1238,
482+ 1239,
483+ 1240,
484+ 1241,
485+ 1243,
486+ 1244,
487+ 1245,
488+ 1246,
489+ 1247,
490+ 1248,
491+ 1250,
492+ 1251,
493+ 1252,
494+ 1257,
495+ 1258,
496+ 1259,
497+ 1275,
498+ 1276,
499+ 1285,
500+ 1287,
501+ 1288,
502+ 1299,
503+ 1300,
504+ 1315,
505+ 1317,
506+ 1321,
507+ 1322,
508+ 1323,
509+ 1324,
510+ 1334,
511+ 1335,
512+ 1336,
513+ 1345,
514+ 1346,
515+ 1348,
516+ 1349,
517+ 1353,
518+ 1354,
519+ 1355,
520+ 1365,
521+ 1366,
522+ 1367,
523+ 1382,
524+ 1383,
525+ 1384,
526+ 1385,
527+ 1399,
528+ 1400,
529+ 1401,
530+ 1403,
531+ 1412,
532+ 1413,
533+ 1447,
534+ 1449,
535+ 1450,
536+ 1453,
537+ 1455,
538+ 1456,
539+ 1457,
540+ 1476,
541+ 1478,
542+ 1479,
543+ 1480,
544+ 1481,
545+ 1484,
546+ 1487,
547+ 1494,
548+ 1495,
549+ 1496,
550+ 1497,
551+ 1498,
552+ 1499,
553+ 1500,
554+ 1501,
555+ 1503,
556+ 1504,
557+ 1505,
558+ 1516,
559+ 1518,
560+ 1519,
561+ 1520,
562+ 1522,
563+ 1523,
564+ 1524,
565+ 1525,
566+ 1526,
567+ 1528,
568+ 1529,
569+ 1530,
570+ 1531,
571+ 1532,
572+ 1535,
573+ 1536,
574+ 1537,
575+ 1538,
576+ 1543,
577+ 1544,
578+ 1545,
579+ 1546,
580+ 1547,
581+ 1548,
582+ 1549,
583+ 1550,
584+ 1551,
585+ 1554,
586+ 1555,
587+ 1556,
588+ 1563,
589+ 1564,
590+ 1565,
591+ 1566,
592+ 1567,
593+ 1568,
594+ 1569,
595+ 1570,
596+ 1571,
597+ 1572,
598+ 1573,
599+ 1574,
600+ 1576,
601+ 1577,
602+ 1578,
603+ 1579,
604+ 1580,
605+ 1584,
606+ 1586,
607+ 1587,
608+ 1588,
609+ 1589,
610+ 1590,
611+ 1591,
612+ 1592,
613+ 1599,
614+ 1600,
615+ 1601,
616+ 1603,
617+ 1605,
618+ 1606,
619+ 1607,
620+ 1608,
621+ 1609,
622+ 1610,
623+ 1611,
624+ 1612,
625+ 1618,
626+ 1619,
627+ 1621,
628+ 1622,
629+ 1624,
630+ 1625,
631+ 1626,
632+ 1627,
633+ 1638,
634+ 1639,
635+ 1640,
636+ 1644,
637+ 1650,
638+ 1651,
639+ 1655,
640+ 1656,
641+ 1659,
642+ 1660,
643+ 1661,
644+ 1665,
645+ 1666,
646+ 1671,
647+ 1673,
648+ 1675,
649+ 1677,
650+ 1678,
651+ 1679,
652+ 1681,
653+ 1682,
654+ 1683,
655+ 1684,
656+ 1687,
657+ 1688,
658+ 1691,
659+ 1695,
660+ 1702,
661+ 1704,
662+ 1705,
663+ 1709,
664+ 1712,
665+ 1714,
666+ 1718,
667+ 1725,
668+ 1731,
669+ 1733,
670+ 1734,
671+ 1735,
672+ 1737,
673+ 1739,
674+ 1740,
675+ 1741,
676+ 1743,
677+ 1782,
678+ 1783,
679+ 1785,
680+ 1786,
681+ 1788,
682+ 1789,
683+ 1791,
684+ 1792,
685+ 1793,
686+ 1794,
687+ 1795,
688+ 1796,
689+ 1799,
690+ 1800,
691+ 1802,
692+ 1807,
693+ 1808,
694+ 1809,
695+ 1811,
696+ 1812,
697+ 1813,
698+ 1814,
699+ 1815,
700+ 1816,
701+ 1817,
702+ 1819,
703+ 1820,
704+ 1821,
705+ 1822,
706+ 1824,
707+ 1825,
708+ 1826,
709+ 1828,
710+ 1829,
711+ 1832,
712+ 1833,
713+ 1834,
714+ 1835,
715+ 1836,
716+ 1837,
717+ 1838,
718+ 1839,
719+ 1840,
720+ 1841,
721+ 1842,
722+ 1843,
723+ 1844,
724+ 1845,
725+ 1846,
726+ 1847,
727+ 1848,
728+ 1850,
729+ 1852,
730+ 1853,
731+ 1854,
732+ 1860,
733+ 1864,
734+ 1868,
735+ 1870,
736+ 1872,
737+ 1873,
738+ 1874,
739+ 1876,
740+ 1877,
741+ 1878,
742+ 1880,
743+ 1881,
744+ 1882,
745+ 1883,
746+ 1885,
747+ 1886,
748+ 1887,
749+ 1889,
750+ 1890,
751+ 1893,
752+ 1894,
753+ 1895,
754+ 1896,
755+ 1899,
756+ 1900,
757+ 1903,
758+ 1907,
759+ 1909,
760+ 1912,
761+ 1913,
762+ 1914,
763+ 1917,
764+ 1919,
765+ 1920,
766+ 1921,
767+ 1922,
768+ 1923,
769+ 1924,
770+ 1925,
771+ 1926,
772+ 1928,
773+ 1930,
774+ 1931,
775+ 1932,
776+ 1933,
777+ 1934,
778+ 1935,
779+ 1936,
780+ 1937,
781+ 1938,
782+ 1939,
783+ 1940,
784+ 1941,
785+ 1943,
786+ 1945,
787+ 1946,
788+ 1947,
789+ 1948,
790+ 1949,
791+ 1950,
792+ 1951,
793+ 4177,
794+ 4183,
795+ 4190,
796+ 4192,
797+ 4213,
798+ 8234,
799+ 8253,
800+ 12333,
801+ 12334,
802+ 12335,
803+ 12349,
804+ 12350,
805+ 12351,
806+ 12353,
807+ 12354,
808+ 12355,
809+ 12356,
810+ 12360,
811+ 12362,
812+ 12363,
813+ 12366,
814+ 12367,
815+ 12368,
816+ 12369,
817+ 12370,
818+ 12371,
819+ 12372,
820+ 12373,
821+ 12374,
822+ 12375,
823+ 12401,
824+ 12402,
825+ 12403,
826+ 12404,
827+ 12405,
828+ 12406,
829+ 12407,
830+ 12408,
831+ 12410,
832+ 12411,
833+ 12413,
834+ 12414,
835+ 12415,
836+ 12416,
837+ 12417,
838+ 12418,
839+ 12425,
840+ 12426,
841+ 12427,
842+ 12428,
843+ 12429,
844+ 12430,
845+ 12432,
846+ 12434,
847+ 12435,
848+ 12436,
849+ 12437,
850+ 12438,
851+ 12441,
852+ 12442,
853+ 12443,
854+ 12444,
855+ 12447,
856+ 12448,
857+ 12450,
858+ 12451,
859+ 12452,
860+ 12453,
861+ 12455,
862+ 12456,
863+ 12457,
864+ 12458,
865+ 12459,
866+ 12460,
867+ 12479,
868+ 12481,
869+ 12482,
870+ 12483,
871+ 12484,
872+ 12486,
873+ 12492,
874+ 12494,
875+ 12495,
876+ 12496,
877+ 12497,
878+ 12498,
879+ 12499,
880+ 12500,
881+ 12501,
882+ 12502,
883+ 12510,
884+ 12511,
885+ 12512,
886+ 12513,
887+ 12514,
888+ 12517,
889+ 12518,
890+ 12519,
891+ 12533,
892+ 12535,
893+ 12536,
894+ 12538,
895+ 12545,
896+ 12546,
897+ 12547,
898+ 12549,
899+ 12550,
900+ 12563,
901+ 12564,
902+ 12565,
903+ 12566,
904+ 12567,
905+ 12568,
906+ 20493,
907+ 20494,
908+ 20524,
909+ 20593,
910+ 20598,
911+ 20599,
912+ 20601,
913+ 20602,
914+ 20657,
915+ 20658,
916+ 20674,
917+ 24578,
918+ 24582,
919+ 24584,
920+ 24585,
921+ 24586,
922+ 24587,
923+ 24801,
924+ 24802,
925+ 24823,
926+ 24824,
927+ 24825,
928+ 24827,
929+ 24828,
930+ 24831,
931+ 28672,
932+ 28723,
933+ 28735,
934+ 28758,
935+ 28775,
936+ 28787,
937+ 28790,
938+ 28841
939+ ],
940+ "changed_metrics_mean": {
941+ "reference": [
942+ 0.0003338018094447242,
943+ 0.9801064921599446,
944+ 0.004828861369256251
945+ ],
946+ "result": [
947+ 0.0001530669297210598,
948+ 0.9914927178131038,
949+ 0.0023004944993744807
950+ ]
951+ },
952+ "compared_pack_sha256": "258a9d78bb1a097377bca9355531403a83b71303222fa81b0bee111baec4186e",
953+ "changed_vs_compared_pack": 698,
954+ "compared_pack_quality_failures": 0
955+}
TMessagesProj/emoji/verify_emoji_pack.pynew file+247
@@ -0,0 +1,247 @@
1+#!/usr/bin/env python3
2+"""Independent reader/checker for EPK3 versions 2 and 3. Includes complete emoji composition."""
3+import argparse, collections, hashlib, io, json, mmap, struct, time
4+from pathlib import Path
5+import numpy as np
6+from PIL import Image
7+NONE = 65535
8+
9+
10+def wrap_webp(b):
11+ return b'RIFF' + struct.pack('<I', 12 + len(b) + (len(b) & 1)) + b'WEBPVP8L' + struct.pack('<I', len(b)) + b + (b'\0' if len(b) & 1 else b'')
12+
13+
14+def transform(a, t):
15+ if t & 4: a = a.swapaxes(0, 1)
16+ if t & 2: a = a[::-1]
17+ if t & 1: a = a[:, ::-1]
18+ return a
19+
20+
21+class Pack:
22+ def __init__(self, path):
23+ import zlib
24+ self.zlib = zlib
25+ self.file = open(path, 'rb')
26+ self.data = mmap.mmap(self.file.fileno(), 0, access=mmap.ACCESS_READ)
27+ magic, version, size, width, height, self.n, self.ne, length, flags = struct.unpack_from('<4sHHIIIIII', self.data)
28+ assert version in (2, 3)
29+ self.version = version
30+ assert (magic, size, width, height, length, flags) == (b'EPK3', 20, 64, 64, len(self.data), 0)
31+ self.entries = [struct.unpack_from('<HHIHHHHBBBB', self.data, 32 + i * 20) for i in range(self.n)]
32+ self.cache = collections.OrderedDict()
33+ self.native_calls = 0
34+ self.palette_calls = 0
35+ self.input_bytes = 0
36+ for i, (key, mask, offset, length, a, b, colors, codec, pred, ch, flags) in enumerate(self.entries):
37+ assert offset >= 32 + 20 * self.n and length and offset + length <= len(self.data)
38+ assert codec in range(5) and pred in range(7) and flags in range(256)
39+ assert all(p == NONE or 0 <= p < self.n for p in (a, b))
40+ assert pred == 0 or a != NONE
41+ assert (pred in (3, 5, 6)) == (b != NONE)
42+ if pred:
43+ for p in (a, b):
44+ if p != NONE:
45+ e = self.entries[p]
46+ assert p != i and e[7] <= 1 and e[8] == 0 and e[4] == NONE and e[5] == NONE
47+ if codec in (2, 3): assert colors == ch == pred == (flags & 127) == 0
48+ else: assert 1 <= colors <= 256 and (ch & 127) in (0, 1, 3, 4)
49+
50+ def palette_length(self, e):
51+ if e[9] & 128:
52+ return 2 + struct.unpack_from('<H', self.data, e[2])[0]
53+ n = e[6] * (e[9] & 127)
54+ return (n * 7 + 7) // 8 if e[10] & 1 else n
55+
56+ def blob(self, i):
57+ e = self.entries[i]
58+ self.input_bytes += e[3]
59+ return self.data[e[2]:e[2] + e[3]]
60+
61+ def root(self, i):
62+ if i not in self.cache:
63+ a = self.indices(i)
64+ self.cache[i] = a
65+ if len(self.cache) > 8: self.cache.popitem(last=False)
66+ self.cache.move_to_end(i)
67+ return self.cache[i]
68+
69+ def indices(self, i):
70+ e = self.entries[i]
71+ parents = [p for p in e[4:6] if p != NONE]
72+ maps = [transform(self.root(p), (e[10] >> (1 + j * 3)) & 7)
73+ for j, p in enumerate(parents)]
74+ if e[7] == 4:
75+ assert e[8] == 4 and len(parents) == 1 and self.entries[parents[0]][6] == e[6]
76+ assert self.palette_length(e) == e[3]
77+ return maps[0].copy()
78+ sizes = [self.entries[p][6] for p in parents]
79+ ln = sum(sizes)
80+ b = self.blob(i)[self.palette_length(e):]
81+ cut = 32
82+ if e[8] in (5, 6):
83+ cut = b[0]; b = b[1:]
84+ assert 1 <= cut < 64
85+ self.native_calls += 1
86+ if e[7] == 0:
87+ dz = self.zlib.decompressobj(-15)
88+ raw = dz.decompress(b)
89+ assert dz.eof and not dz.unused_data and len(raw) == ln + 4096
90+ lut = np.frombuffer(raw[:ln], np.uint8)
91+ arr = np.frombuffer(raw[ln:], np.uint8).reshape(64, 64).copy()
92+ else:
93+ lut = np.frombuffer(b[:ln], np.uint8)
94+ arr = np.array(Image.open(io.BytesIO(wrap_webp(b[ln:]))).convert('L'))
95+ if parents:
96+ if e[8] in (3, 5, 6):
97+ axis = 0 if e[8] == 6 else 1
98+ region = np.indices((64, 64))[axis] < cut
99+ predicted = np.where(region, lut[:sizes[0]][maps[0]], lut[sizes[0]:][maps[1]])
100+ else: predicted = lut[maps[0]]
101+ arr = arr ^ predicted if e[8] == 1 else arr + predicted
102+ assert arr.shape == (64, 64) and int(arr.max()) < e[6]
103+ return arr
104+
105+ def decode(self, i):
106+ e = self.entries[i]
107+ if e[7] in (2, 3):
108+ self.native_calls += 1
109+ b = self.blob(i)
110+ if e[7] == 2: b = wrap_webp(b)
111+ return np.array(Image.open(io.BytesIO(b)).convert('RGBA'))
112+ idx = self.indices(i)
113+ n, ch = e[6], e[9] & 127
114+ if ch == 0:
115+ palette = np.arange(256, dtype=np.uint8)[:, None].repeat(4, axis=1)
116+ palette[:, 3] = 255
117+ else:
118+ b = self.data[e[2]:e[2] + self.palette_length(e)]
119+ if e[9] & 128:
120+ dz = self.zlib.decompressobj(-15); b = dz.decompress(b[2:])
121+ expected = (n * ch * 7 + 7) // 8 if e[10] & 1 else n * ch
122+ assert dz.eof and not dz.unused_data and len(b) == expected
123+ self.palette_calls += 1
124+ if e[10] & 1:
125+ values = []
126+ for j in range(n * ch):
127+ bit = j * 7; pos = bit >> 3; shift = bit & 7
128+ v = b[pos] >> shift
129+ if shift > 1: v |= b[pos + 1] << (8 - shift)
130+ v &= 127
131+ values.append((v << 1) | (v >> 6))
132+ a = np.array(values, np.uint8).reshape(n, ch)
133+ else: a = np.frombuffer(b, np.uint8).reshape(n, ch)
134+ palette = np.full((n, 4), 255, np.uint8)
135+ if ch == 1: palette[:, :3] = a
136+ else: palette[:, :ch] = a
137+ return palette[idx]
138+
139+ def emoji(self, i):
140+ assert 0 <= i < self.ne
141+ out = self.decode(i)
142+ mask = self.entries[i][1]
143+ if mask != NONE:
144+ j = next(j for j in range(self.ne, self.n) if self.entries[j][0] == mask)
145+ alpha = self.decode(j)[:, :, 0]
146+ out[:, :, 3] = ((out[:, :, 3].astype(np.uint16) * alpha + 127) // 255).astype(np.uint8)
147+ return out
148+
149+ def close(self):
150+ self.data.close()
151+ self.file.close()
152+
153+
154+def reference(path):
155+ b = Path(path).read_bytes()
156+ ne = struct.unpack_from('<I', b)[0] // 12
157+ emojis = [struct.unpack_from('<HHII', b, 4 + 12 * i) for i in range(ne)]
158+ p = 4 + 12 * ne
159+ nm = struct.unpack_from('<I', b, p)[0] // 10
160+ masks = [struct.unpack_from('<HII', b, p + 4 + 10 * i) for i in range(nm)]
161+ return b, sorted(emojis), sorted(masks)
162+
163+
164+def validate(pack_path, reference_path, textures_path, compare_pack_path=None):
165+ import zipfile
166+ import optimizer_visual as quality
167+ from scipy.ndimage import uniform_filter
168+ pack = Pack(pack_path)
169+ previous = Pack(compare_pack_path) if compare_pack_path else None
170+ compared_changes = []
171+ raw, emojis, masks = reference(reference_path)
172+ assert pack.ne == len(emojis) and pack.n == len(emojis) + len(masks)
173+ mask_images = {key: np.array(Image.open(io.BytesIO(raw[off:off+length])).convert('L'))
174+ for key, off, length in masks}
175+ changed = []; before = []; after = []; max_streams = max_input = 0; total_streams = 0; total_palettes = max_palettes = 0
176+ with zipfile.ZipFile(textures_path) as archive:
177+ for i, (key, mask, off, length) in enumerate(emojis):
178+ assert pack.entries[i][:2] == (key, mask)
179+ baseline = np.array(Image.open(io.BytesIO(raw[off:off+length])).convert('RGBA'))
180+ if mask != NONE:
181+ baseline[:, :, 3] = ((baseline[:, :, 3].astype(np.uint16) * mask_images[mask] + 127) // 255).astype(np.uint8)
182+ pack.cache.clear(); pack.native_calls = pack.input_bytes = pack.palette_calls = 0
183+ actual = pack.emoji(i)
184+ max_streams = max(max_streams, pack.native_calls); max_input = max(max_input, pack.input_bytes)
185+ total_streams += pack.native_calls
186+ total_palettes += pack.palette_calls; max_palettes = max(max_palettes, pack.palette_calls)
187+ assert np.array_equal(actual[:, :, 3], baseline[:, :, 3]), f'Alpha changed: {key}'
188+ a = actual.copy(); b = baseline.copy()
189+ a[a[:, :, 3] == 0, :3] = 0; b[b[:, :, 3] == 0, :3] = 0
190+ if not np.array_equal(a, b):
191+ assert pack.entries[i][10] & 128, f'Unmarked visual change: {key}'
192+ original = np.array(Image.open(archive.open(f'{key//4096}_{key%4096}.png')).convert('RGBA'))
193+ m0 = quality.metrics(baseline, original); m1 = quality.metrics(actual, original)
194+ assert m1[0] <= m0[0]+1e-10 and m1[1] >= m0[1]-1e-7 and m1[2] <= m0[2]+1e-10, f'Global quality gate: {key}'
195+ e0 = uniform_filter(quality.error(baseline, original), size=5)
196+ s0 = quality.structure(baseline, original)
197+ assert quality.passes_local(actual, original, e0, s0), f'Local quality gate: {key}'
198+ changed.append(key); before.append(m0); after.append(m1)
199+ if previous is not None:
200+ assert previous.ne == pack.ne and previous.entries[i][0] == key
201+ prev = previous.emoji(i)
202+ assert np.array_equal(actual[:, :, 3], prev[:, :, 3])
203+ visible = actual[:, :, 3] > 0
204+ if not np.array_equal(actual[visible, :3], prev[visible, :3]):
205+ original = np.array(Image.open(archive.open(f'{key//4096}_{key%4096}.png')).convert('RGBA'))
206+ m0 = quality.metrics(prev, original); m1 = quality.metrics(actual, original)
207+ assert m1[0] <= m0[0]+1e-10 and m1[1] >= m0[1]-1e-7 and m1[2] <= m0[2]+1e-10, f'Previous-pack global gate: {key}'
208+ assert quality.passes_local(actual, original, uniform_filter(quality.error(prev, original), size=5), quality.structure(prev, original)), f'Previous-pack local gate: {key}'
209+ entry = pack.entries[i]
210+ if entry[8] in (3, 5, 6) and entry[10] & 128:
211+ from quality_seams import passes_seam
212+ cut = 32 if entry[8] == 3 else pack.data[entry[2] + pack.palette_length(entry)]
213+ axis = 1 if entry[8] == 6 else 0
214+ assert passes_seam(actual, prev, original, axis, cut), f'Seam quality gate: {key}'
215+ compared_changes.append(key)
216+ stats = dict(pack_bytes=len(pack.data), verified_emojis=pack.ne,
217+ changed_emojis=len(changed), alpha_changed_pixels=0,
218+ unmarked_visible_changes=0, quality_gate_failures=0,
219+ max_cold_streams=max_streams, max_cold_compressed_bytes=max_input,
220+ average_cold_streams=total_streams/pack.ne,
221+ max_cold_palette_inflations=max_palettes, average_cold_palette_inflations=total_palettes/pack.ne,
222+ sha256=hashlib.sha256(pack.data).hexdigest(), changed_ids=changed)
223+ if changed:
224+ stats['changed_metrics_mean'] = dict(reference=np.mean(before,axis=0).tolist(), result=np.mean(after,axis=0).tolist())
225+ if previous is not None:
226+ stats['compared_pack_sha256'] = hashlib.sha256(previous.data).hexdigest()
227+ stats['changed_vs_compared_pack'] = len(compared_changes)
228+ stats['compared_pack_quality_failures'] = 0
229+ previous.close()
230+ pack.close()
231+ return stats
232+
233+
234+def main():
235+ parser = argparse.ArgumentParser(description=__doc__)
236+ parser.add_argument('pack')
237+ parser.add_argument('--reference', required=True)
238+ parser.add_argument('--textures', required=True)
239+ parser.add_argument('--compare-pack', help='Also require no quality regression against this prior EPK3 pack')
240+ parser.add_argument('--json', help='Write the full machine-readable report')
241+ args = parser.parse_args()
242+ result = validate(args.pack, args.reference, args.textures, args.compare_pack)
243+ if args.json: Path(args.json).write_text(json.dumps(result,indent=2)+'\n')
244+ print(json.dumps({k:v for k,v in result.items() if k != 'changed_ids'},indent=2))
245+
246+
247+if __name__ == '__main__': main()
TMessagesProj/google-services.jsonnew file+98
@@ -0,0 +1,98 @@
1+{
2+ "project_info": {
3+ "project_number": "760348033671",
4+ "firebase_url": "https://tmessages2.firebaseio.com",
5+ "project_id": "tmessages2",
6+ "storage_bucket": "tmessages2.appspot.com"
7+ },
8+ "client": [
9+ {
10+ "client_info": {
11+ "mobilesdk_app_id": "1:760348033671:android:f6afd7b67eae3860",
12+ "android_client_info": {
13+ "package_name": "org.telegram.messenger"
14+ }
15+ },
16+ "oauth_client": [
17+ {
18+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
19+ "client_type": 3
20+ }
21+ ],
22+ "api_key": [
23+ {
24+ "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k"
25+ }
26+ ],
27+ "services": {
28+ "appinvite_service": {
29+ "other_platform_oauth_client": [
30+ {
31+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
32+ "client_type": 3
33+ }
34+ ]
35+ }
36+ }
37+ },
38+ {
39+ "client_info": {
40+ "mobilesdk_app_id": "1:760348033671:android:dc022572c167a16c",
41+ "android_client_info": {
42+ "package_name": "org.telegram.messenger.beta"
43+ }
44+ },
45+ "oauth_client": [
46+ {
47+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
48+ "client_type": 3
49+ }
50+ ],
51+ "api_key": [
52+ {
53+ "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k"
54+ }
55+ ],
56+ "services": {
57+ "appinvite_service": {
58+ "other_platform_oauth_client": [
59+ {
60+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
61+ "client_type": 3
62+ }
63+ ]
64+ }
65+ }
66+ },
67+ {
68+ "client_info": {
69+ "mobilesdk_app_id": "1:760348033671:android:7396e651423888c3f66e22",
70+ "android_client_info": {
71+ "package_name": "org.telegram.messenger.web"
72+ }
73+ },
74+ "oauth_client": [
75+ {
76+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
77+ "client_type": 3
78+ }
79+ ],
80+ "api_key": [
81+ {
82+ "current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k"
83+ }
84+ ],
85+ "services": {
86+ "appinvite_service": {
87+ "other_platform_oauth_client": [
88+ {
89+ "client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
90+ "client_type": 3
91+ }
92+ ]
93+ }
94+ }
95+ }
96+ ],
97+ "configuration_version": "1"
98+}
TMessagesProj/jni/Application.mknew file+7
@@ -0,0 +1,7 @@
1+APP_PLATFORM := android-21
2+APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
3+NDK_TOOLCHAIN_VERSION := clang
4+APP_STL := c++_static
5+
6+LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
7+LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
TMessagesProj/jni/CMakeLists.txtnew file+291
@@ -0,0 +1,291 @@
1+cmake_minimum_required(VERSION 3.16)
2+
3+set(CMAKE_CXX_STANDARD 17)
4+set(CMAKE_CXX_STANDARD_REQUIRED ON)
5+set(CMAKE_CXX_EXTENSIONS OFF)
6+
7+set(CMAKE_CXX_FLAGS "-DANDROID -g")
8+set(CMAKE_C_FLAGS "-w -std=c11 -DANDROID -D_LARGEFILE_SOURCE=1 -g -Wno-error=implicit-function-declaration")
9+set(CMAKE_ASM_FLAGS "${CFLAGS} -x assembler-with-cpp")
10+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -fvisibility=hidden -flto=full")
11+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -flto=full")
12+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto=full -Wl,--gc-sections -Wl,--icf=safe -Wl,-Bsymbolic")
13+
14+if (${ANDROID_ABI} STREQUAL "armeabi-v7a" OR ${ANDROID_ABI} STREQUAL "arm64-v8a")
15+ enable_language(ASM)
16+else()
17+ enable_language(ASM_NASM)
18+endif()
19+
20+set(CAN_COMPILE_SME FALSE CACHE INTERNAL "Disable libyuv SME" FORCE)
21+add_subdirectory(
22+ third_party/libyuv
23+ ${CMAKE_CURRENT_BINARY_DIR}/libyuv
24+ EXCLUDE_FROM_ALL)
25+
26+# Abseil
27+set(ABSL_PROPAGATE_CXX_STD ON)
28+set(ABSL_BUILD_TESTING OFF)
29+set(ABSL_ENABLE_INSTALL OFF)
30+add_subdirectory(
31+ third_party/absl
32+ ${CMAKE_CURRENT_BINARY_DIR}/absl
33+ EXCLUDE_FROM_ALL)
34+
35+add_library(webrtc_absl INTERFACE)
36+target_link_libraries(webrtc_absl INTERFACE
37+ absl::base
38+ absl::strings
39+ absl::str_format
40+ absl::cord
41+ absl::synchronization
42+ absl::time
43+ absl::status
44+ absl::statusor
45+ absl::hash
46+ absl::flat_hash_map
47+ absl::flat_hash_set
48+ absl::flags
49+ absl::flags_parse
50+ absl::random_random
51+ absl::random_distributions
52+ absl::crc32c
53+ absl::log
54+ absl::check
55+)
56+
57+add_library(avutil STATIC IMPORTED)
58+set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libavutil.a)
59+
60+add_library(avformat STATIC IMPORTED)
61+set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libavformat.a)
62+
63+add_library(avcodec STATIC IMPORTED)
64+set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libavcodec.a)
65+
66+add_library(swresample STATIC IMPORTED)
67+set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libswresample.a)
68+
69+add_library(swscale STATIC IMPORTED)
70+set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libswscale.a)
71+
72+add_library(crypto STATIC IMPORTED)
73+set_target_properties(crypto PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libcrypto.a)
74+
75+add_library(ssl STATIC IMPORTED)
76+set_target_properties(ssl PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libssl.a)
77+
78+
79+#aesige
80+#add_library(aesige STATIC openssl/aes_ige.c)
81+#target_compile_options(aesige PUBLIC -Wall -frtti -finline-functions -ffast-math -Oz)
82+#target_include_directories(aesige PUBLIC third_party/boringssl/include openssl/include)
83+#target_link_libraries(aesige crypto)
84+
85+
86+add_library(libvpx STATIC IMPORTED)
87+set_target_properties(libvpx PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libvpx.a)
88+
89+add_library(libdav1d STATIC IMPORTED)
90+set_target_properties(libdav1d PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libdav1d.a)
91+
92+add_library(libopus STATIC IMPORTED)
93+set_target_properties(libopus PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libopus.a)
94+
95+add_library(tde2e STATIC IMPORTED)
96+set_target_properties(tde2e PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libtde2e.a)
97+
98+add_library(tdutils STATIC IMPORTED)
99+set_target_properties(tdutils PROPERTIES IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libtdutils.a)
100+
101+#tgnet
102+add_library(tgnet STATIC
103+ openssl/aes_ige.c
104+ tgnet/ApiScheme.cpp
105+ tgnet/BuffersStorage.cpp
106+ tgnet/ByteArray.cpp
107+ tgnet/ByteStream.cpp
108+ tgnet/Connection.cpp
109+ tgnet/ConnectionSession.cpp
110+ tgnet/ConnectionsManager.cpp
111+ tgnet/TLSHello.cpp
112+ tgnet/ConnectionSocket.cpp
113+ tgnet/Datacenter.cpp
114+ tgnet/EventObject.cpp
115+ tgnet/FileLog.cpp
116+ tgnet/MTProtoScheme.cpp
117+ tgnet/NativeByteBuffer.cpp
118+ tgnet/Request.cpp
119+ tgnet/Timer.cpp
120+ tgnet/TLObject.cpp
121+ tgnet/ProxyCheckInfo.cpp
122+ tgnet/Handshake.cpp
123+ tgnet/Config.cpp)
124+target_compile_options(tgnet PUBLIC
125+ -Wall -frtti -finline-functions -ffast-math -Oz)
126+set_target_properties(tgnet PROPERTIES
127+ ANDROID_ARM_MODE arm)
128+target_compile_definitions(tgnet PUBLIC
129+ HAVE_PTHREAD)
130+target_include_directories(tgnet PUBLIC
131+ third_party/boringssl/include
132+ openssl/include)
133+target_link_libraries(tgnet
134+ ssl
135+ crypto)
136+
137+# tlottie (prebuilt Rust static library)
138+add_library(tlottie STATIC IMPORTED)
139+set_target_properties(tlottie PROPERTIES
140+ IMPORTED_LOCATION ${CMAKE_HOME_DIRECTORY}/prebuild/lib/${ANDROID_ABI}/libtlottie.a)
141+
142+#sqlite
143+add_library(sqlite STATIC
144+ sqlite/sqlite3.c)
145+target_compile_options(sqlite PUBLIC
146+ -fno-strict-aliasing -Oz)
147+set_target_properties(sqlite PROPERTIES
148+ ANDROID_ARM_MODE arm)
149+target_compile_definitions(sqlite PUBLIC
150+ NULL=0 SOCKLEN_T=socklen_t LOCALE_NOT_USED ANDROID_NDK DISABLE_IMPORTGL AVOID_TABLES ANDROID_TILE_BASED_DECODE HAVE_STRCHRNUL=0 ANDROID_ARMV6_IDCT)
151+
152+#breakpad
153+add_library(breakpad STATIC
154+ third_party/breakpad/src/client/linux/crash_generation/crash_generation_client.cc
155+ third_party/breakpad/src/client/linux/handler/exception_handler.cc
156+ third_party/breakpad/src/client/linux/handler/minidump_descriptor.cc
157+ third_party/breakpad/src/client/linux/log/log.cc
158+ third_party/breakpad/src/client/linux/dump_writer_common/thread_info.cc
159+ third_party/breakpad/src/client/linux/dump_writer_common/seccomp_unwinder.cc
160+ third_party/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
161+ third_party/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
162+ third_party/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
163+ third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
164+ third_party/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
165+ third_party/breakpad/src/client/minidump_file_writer.cc
166+ third_party/breakpad/src/common/android/breakpad_getcontext.S
167+ third_party/breakpad/src/common/convert_UTF.c
168+ third_party/breakpad/src/common/md5.cc
169+ third_party/breakpad/src/common/string_conversion.cc
170+ third_party/breakpad/src/common/linux/elfutils.cc
171+ third_party/breakpad/src/common/linux/file_id.cc
172+ third_party/breakpad/src/common/linux/guid_creator.cc
173+ third_party/breakpad/src/common/linux/linux_libc_support.cc
174+ third_party/breakpad/src/common/linux/memory_mapped_file.cc
175+ third_party/breakpad/src/common/linux/safe_readlink.cc)
176+set_target_properties(breakpad PROPERTIES ANDROID_ARM_MODE arm)
177+set_property(SOURCE third_party/breakpad/src/common/android/breakpad_getcontext.S PROPERTY LANGUAGE C)
178+target_include_directories(breakpad PUBLIC
179+ third_party/breakpad/src/common/android/include
180+ third_party/breakpad/src)
181+
182+
183+#voip
184+include(${CMAKE_HOME_DIRECTORY}/voip/CMakeLists.txt)
185+
186+set(NATIVE_LIB "tmessages.49")
187+
188+#tmessages
189+add_library(${NATIVE_LIB} SHARED
190+ jni.c
191+ audio.c
192+ webm_encoder.c
193+ image.cpp
194+ intro/IntroRenderer.c
195+ SqliteWrapper.cpp
196+ utilities.cpp
197+ gifvideo.cpp
198+ lottie.cpp
199+ TgNetWrapper.cpp
200+ ffmpeg_jni.cc
201+ fast-edge.cpp
202+ genann.c
203+ secureid_ocr.cpp
204+ tde2e/bridge.cpp
205+ tests.cpp
206+)
207+
208+target_compile_options(${NATIVE_LIB} PUBLIC
209+ -ffast-math -Oz -funroll-loops -ffast-math -fno-strict-aliasing -fno-math-errno)
210+
211+target_compile_definitions(${NATIVE_LIB} PUBLIC
212+ BSD=1 NULL=0 SOCKLEN_T=socklen_t ANDROID_NDK DISABLE_IMPORTGL AVOID_TABLES ANDROID_TILE_BASED_DECODE __STDC_CONSTANT_MACROS ANDROID_ARMV6_IDCT OPUS_BUILD FIXED_POINT USE_ALLOCA restrict= __EMX__ LOCALE_NOT_USED HAVE_LRINT HAVE_LRINTF)
213+
214+target_sources(${NATIVE_LIB} PRIVATE
215+
216+ third_party/xiph/opusfile/src/info.c
217+ third_party/xiph/opusfile/src/internal.c
218+ third_party/xiph/opusfile/src/opusfile.c
219+ third_party/xiph/opusfile/src/stream.c
220+ third_party/xiph/ogg/src/bitwise.c
221+ third_party/xiph/ogg/src/framing.c)
222+
223+target_include_directories(${NATIVE_LIB} PUBLIC
224+ third_party/xiph/opus/include
225+ third_party/xiph/opus/silk
226+ third_party/xiph/opus/silk/fixed
227+ third_party/xiph/opus/celt
228+ third_party/xiph/opus
229+ third_party/xiph/opusfile/include
230+ third_party/xiph/ogg/include
231+ third_party/libyuv/include
232+ third_party/absl
233+ third_party/boringssl/include
234+ openssl/include
235+ prebuild/include/${ANDROID_ABI}
236+ third_party/ffmpeg
237+ third_party/libvpx
238+ third_party/dav1d/include
239+ emoji
240+ exoplayer/include
241+ intro
242+ tlottie/include
243+ tgcalls/
244+ webrtc/
245+ td/tde2e
246+ td/tde2e/td/e2e
247+)
248+
249+target_link_options(${NATIVE_LIB} PRIVATE "-Wl,-z,max-page-size=16384")
250+target_link_options(${NATIVE_LIB} PRIVATE "-Wl,-z,common-page-size=16384")
251+target_link_options(${NATIVE_LIB} PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports.map")
252+target_link_libraries(${NATIVE_LIB}
253+ -Wl,--whole-archive rnnoise openh264 voipandroid -Wl,--no-whole-archive
254+ webrtc_absl
255+ tgcalls
256+ wasm
257+ tgcalls_tp
258+ tgnet
259+ tlottie
260+ sqlite
261+ swscale
262+ avformat
263+ avcodec
264+ swresample
265+ libvpx
266+ libdav1d
267+ libopus
268+ tde2e
269+ tdutils
270+ yuv
271+ avutil
272+ ssl
273+ crypto
274+ jnigraphics
275+ log
276+ z
277+ GLESv2
278+ EGL
279+ android
280+ OpenSLES
281+ cpufeatures
282+ breakpad)
283+
284+#if (${ANDROID_ABI} STREQUAL "x86" OR ${ANDROID_ABI} STREQUAL "x86_64")
285+# target_link_libraries(${NATIVE_LIB}
286+# -Wl,--whole-archive vpxasm -Wl,--no-whole-archive
287+# c)
288+#endif()
289+
290+include(AndroidNdkModules)
291+android_ndk_import_module_cpufeatures()
TMessagesProj/jni/SqliteWrapper.cppnew file+249
@@ -0,0 +1,249 @@
1+#include <cstring>
2+#include <jni.h>
3+#include "sqlite/sqlite3.h"
4+#include "tgnet/NativeByteBuffer.h"
5+#include "tgnet/BuffersStorage.h"
6+
7+void throw_sqlite3_exception(JNIEnv *env, sqlite3 *handle, int errcode) {
8+ const char *errmsg = sqlite3_errmsg(handle);
9+ jclass exClass = env->FindClass("org/telegram/SQLite/SQLiteException");
10+ env->ThrowNew(exClass, errmsg);
11+}
12+
13+extern "C" {
14+
15+JNIEXPORT jint Java_org_telegram_SQLite_SQLitePreparedStatement_step(JNIEnv *env, jobject object, jlong statementHandle) {
16+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
17+
18+ int errcode = sqlite3_step(handle);
19+ if (errcode == SQLITE_ROW) {
20+ return 0;
21+ } else if (errcode == SQLITE_DONE) {
22+ return 1;
23+ } else if (errcode == SQLITE_BUSY) {
24+ return -1;
25+ }
26+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
27+
28+ return 0;
29+}
30+
31+JNIEXPORT jlong Java_org_telegram_SQLite_SQLitePreparedStatement_prepare(JNIEnv *env, jobject object, jlong sqliteHandle, jstring sql) {
32+ sqlite3 *handle = (sqlite3 *) (intptr_t) sqliteHandle;
33+
34+ char const *sqlStr = env->GetStringUTFChars(sql, 0);
35+
36+ sqlite3_stmt *stmt_handle;
37+
38+ int errcode = sqlite3_prepare_v2(handle, sqlStr, -1, &stmt_handle, 0);
39+ if (SQLITE_OK != errcode) {
40+ throw_sqlite3_exception(env, handle, errcode);
41+ }
42+
43+ if (sqlStr != 0) {
44+ env->ReleaseStringUTFChars(sql, sqlStr);
45+ }
46+
47+ return (jlong) stmt_handle;
48+}
49+
50+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_reset(JNIEnv *env, jobject object, jlong statementHandle) {
51+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
52+
53+ int errcode = sqlite3_reset(handle);
54+ if (SQLITE_OK != errcode) {
55+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
56+ }
57+}
58+
59+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_finalize(JNIEnv *env, jobject object, jlong statementHandle) {
60+ sqlite3_finalize((sqlite3_stmt *) (intptr_t) statementHandle);
61+}
62+
63+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindByteBuffer(JNIEnv *env, jobject object, jlong statementHandle, jint index, jobject value, jint length) {
64+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
65+ void *buf = env->GetDirectBufferAddress(value);
66+
67+ int errcode = sqlite3_bind_blob(handle, index, buf, length, SQLITE_STATIC);
68+ if (SQLITE_OK != errcode) {
69+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
70+ }
71+}
72+
73+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindString(JNIEnv *env, jobject object, jlong statementHandle, jint index, jstring value) {
74+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
75+
76+ char const *valueStr = env->GetStringUTFChars(value, 0);
77+
78+ int errcode = sqlite3_bind_text(handle, index, valueStr, -1, SQLITE_TRANSIENT);
79+ if (SQLITE_OK != errcode) {
80+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
81+ }
82+
83+ if (valueStr != 0) {
84+ env->ReleaseStringUTFChars(value, valueStr);
85+ }
86+}
87+
88+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindInt(JNIEnv *env, jobject object, jlong statementHandle, jint index, jint value) {
89+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
90+
91+ int errcode = sqlite3_bind_int(handle, index, value);
92+ if (SQLITE_OK != errcode) {
93+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
94+ }
95+}
96+
97+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindLong(JNIEnv *env, jobject object, jlong statementHandle, jint index, jlong value) {
98+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
99+
100+ int errcode = sqlite3_bind_int64(handle, index, value);
101+ if (SQLITE_OK != errcode) {
102+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
103+ }
104+}
105+
106+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindDouble(JNIEnv *env, jobject object, jlong statementHandle, jint index, double value) {
107+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
108+
109+ int errcode = sqlite3_bind_double(handle, index, value);
110+ if (SQLITE_OK != errcode) {
111+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
112+ }
113+}
114+
115+JNIEXPORT void Java_org_telegram_SQLite_SQLitePreparedStatement_bindNull(JNIEnv *env, jobject object, jlong statementHandle, jint index) {
116+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
117+
118+ int errcode = sqlite3_bind_null(handle, index);
119+ if (SQLITE_OK != errcode) {
120+ throw_sqlite3_exception(env, sqlite3_db_handle(handle), errcode);
121+ }
122+}
123+
124+JNIEXPORT void Java_org_telegram_SQLite_SQLiteDatabase_closedb(JNIEnv *env, jobject object, jlong sqliteHandle) {
125+ sqlite3 *handle = (sqlite3 *) (intptr_t) sqliteHandle;
126+ int err = sqlite3_close(handle);
127+ if (SQLITE_OK != err) {
128+ throw_sqlite3_exception(env, handle, err);
129+ }
130+}
131+
132+JNIEXPORT void Java_org_telegram_SQLite_SQLiteDatabase_beginTransaction(JNIEnv *env, jobject object, jlong sqliteHandle) {
133+ sqlite3 *handle = (sqlite3 *) (intptr_t) sqliteHandle;
134+ sqlite3_exec(handle, "BEGIN", 0, 0, 0);
135+}
136+
137+JNIEXPORT void Java_org_telegram_SQLite_SQLiteDatabase_commitTransaction(JNIEnv *env, jobject object, jlong sqliteHandle) {
138+ sqlite3 *handle = (sqlite3 *) (intptr_t) sqliteHandle;
139+ sqlite3_exec(handle, "COMMIT", 0, 0, 0);
140+}
141+
142+JNIEXPORT jlong Java_org_telegram_SQLite_SQLiteDatabase_opendb(JNIEnv *env, jobject object, jstring fileName, jstring tempDir) {
143+ char const *fileNameStr = env->GetStringUTFChars(fileName, 0);
144+ char const *tempDirStr = env->GetStringUTFChars(tempDir, 0);
145+
146+ if (sqlite3_temp_directory != 0 && strcmp(sqlite3_temp_directory, tempDirStr)) {
147+ sqlite3_free(sqlite3_temp_directory);
148+ }
149+ if (sqlite3_temp_directory == 0) {
150+ sqlite3_temp_directory = sqlite3_mprintf("%s", tempDirStr);
151+ }
152+
153+ sqlite3 *handle = 0;
154+ int err = sqlite3_open(fileNameStr, &handle);
155+ if (SQLITE_OK != err) {
156+ throw_sqlite3_exception(env, handle, err);
157+ }
158+ if (fileNameStr != 0) {
159+ env->ReleaseStringUTFChars(fileName, fileNameStr);
160+ }
161+ if (tempDirStr != 0) {
162+ env->ReleaseStringUTFChars(tempDir, tempDirStr);
163+ }
164+ return (jlong) handle;
165+}
166+
167+JNIEXPORT jint Java_org_telegram_SQLite_SQLiteCursor_columnCount(JNIEnv *env, jobject object, jlong statementHandle) {
168+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
169+ return sqlite3_column_count(handle);
170+}
171+
172+JNIEXPORT jint Java_org_telegram_SQLite_SQLiteCursor_columnType(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
173+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
174+ return sqlite3_column_type(handle, columnIndex);
175+}
176+
177+JNIEXPORT jint Java_org_telegram_SQLite_SQLiteCursor_columnIsNull(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
178+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
179+ int valType = sqlite3_column_type(handle, columnIndex);
180+ return SQLITE_NULL == valType ? 1 : 0;
181+}
182+
183+JNIEXPORT jint Java_org_telegram_SQLite_SQLiteCursor_columnIntValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
184+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
185+ int valType = sqlite3_column_type(handle, columnIndex);
186+ if (SQLITE_NULL == valType) {
187+ return 0;
188+ }
189+ return sqlite3_column_int(handle, columnIndex);
190+}
191+
192+JNIEXPORT jlong Java_org_telegram_SQLite_SQLiteCursor_columnLongValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
193+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
194+ int valType = sqlite3_column_type(handle, columnIndex);
195+ if (SQLITE_NULL == valType) {
196+ return 0;
197+ }
198+ return sqlite3_column_int64(handle, columnIndex);
199+}
200+
201+JNIEXPORT jdouble Java_org_telegram_SQLite_SQLiteCursor_columnDoubleValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
202+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
203+ int valType = sqlite3_column_type(handle, columnIndex);
204+ if (SQLITE_NULL == valType) {
205+ return 0;
206+ }
207+ return sqlite3_column_double(handle, columnIndex);
208+}
209+
210+JNIEXPORT jstring Java_org_telegram_SQLite_SQLiteCursor_columnStringValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
211+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
212+ const char *str = (const char *) sqlite3_column_text(handle, columnIndex);
213+ if (str != 0) {
214+ return env->NewStringUTF(str);
215+ }
216+ return 0;
217+}
218+
219+JNIEXPORT jbyteArray Java_org_telegram_SQLite_SQLiteCursor_columnByteArrayValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
220+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
221+ const jbyte *buf = (const jbyte *) sqlite3_column_blob(handle, columnIndex);
222+ int length = sqlite3_column_bytes(handle, columnIndex);
223+ if (buf != nullptr && length > 0) {
224+ jbyteArray result = env->NewByteArray(length);
225+ env->SetByteArrayRegion(result, 0, length, buf);
226+ return result;
227+ }
228+ return nullptr;
229+}
230+
231+JNIEXPORT jlong Java_org_telegram_SQLite_SQLiteCursor_columnByteBufferValue(JNIEnv *env, jobject object, jlong statementHandle, jint columnIndex) {
232+ sqlite3_stmt *handle = (sqlite3_stmt *) (intptr_t) statementHandle;
233+ uint32_t length = (uint32_t) sqlite3_column_bytes(handle, columnIndex);
234+ if (length <= 0) {
235+ return 0;
236+ }
237+ NativeByteBuffer *buffer = BuffersStorage::getInstance().getFreeBuffer(length);
238+ if (buffer == nullptr) {
239+ return 0;
240+ }
241+ const char *buf = (const char *) sqlite3_column_blob(handle, columnIndex);
242+ if (buf == nullptr) {
243+ return 0;
244+ }
245+ memcpy(buffer->bytes(), buf, length);
246+ return (jlong) buffer;
247+}
248+
249+}
TMessagesProj/jni/TgNetWrapper.cppnew file+778
@@ -0,0 +1,778 @@
1+#include <jni.h>
2+#include "tgnet/ApiScheme.h"
3+#include "tgnet/BuffersStorage.h"
4+#include "tgnet/NativeByteBuffer.h"
5+#include "tgnet/ConnectionsManager.h"
6+#include "tgnet/MTProtoScheme.h"
7+#include "tgnet/ConnectionSocket.h"
8+#include "tgnet/FileLog.h"
9+#include "tgnet/Handshake.h"
10+#include <openssl/rand.h>
11+#include <openssl/sha.h>
12+#include <openssl/bn.h>
13+#include <openssl/pem.h>
14+#include <openssl/aes.h>
15+
16+JavaVM *java;
17+
18+jclass jclass_RequestTimeDelegate;
19+jmethodID jclass_RequestTimeDelegate_run;
20+
21+jclass jclass_ConnectionsManager;
22+jmethodID jclass_ConnectionsManager_onRequestClear;
23+jmethodID jclass_ConnectionsManager_onRequestComplete;
24+jmethodID jclass_ConnectionsManager_onRequestQuickAck;
25+jmethodID jclass_ConnectionsManager_onRequestWriteToSocket;
26+jmethodID jclass_ConnectionsManager_onUnparsedMessageReceived;
27+jmethodID jclass_ConnectionsManager_onUpdate;
28+jmethodID jclass_ConnectionsManager_onSessionCreated;
29+jmethodID jclass_ConnectionsManager_onLogout;
30+jmethodID jclass_ConnectionsManager_onConnectionStateChanged;
31+jmethodID jclass_ConnectionsManager_onInternalPushReceived;
32+jmethodID jclass_ConnectionsManager_onUpdateConfig;
33+jmethodID jclass_ConnectionsManager_onBytesSent;
34+jmethodID jclass_ConnectionsManager_onBytesReceived;
35+jmethodID jclass_ConnectionsManager_onRequestNewServerIpAndPort;
36+jmethodID jclass_ConnectionsManager_onProxyError;
37+jmethodID jclass_ConnectionsManager_getHostByName;
38+jmethodID jclass_ConnectionsManager_getInitFlags;
39+jmethodID jclass_ConnectionsManager_onPremiumFloodWait;
40+jmethodID jclass_ConnectionsManager_onIntegrityCheckClassic;
41+jmethodID jclass_ConnectionsManager_onCaptchaCheck;
42+
43+bool check_utf8(const char *data, size_t len);
44+
45+jlong getFreeBuffer(JNIEnv *env, jclass c, jint length) {
46+ return (jlong) (intptr_t) BuffersStorage::getInstance().getFreeBuffer((uint32_t) length);
47+}
48+
49+jint limit(JNIEnv *env, jclass c, jlong address) {
50+ NativeByteBuffer *buffer = (NativeByteBuffer *) (intptr_t) address;
51+ return buffer->limit();
52+}
53+
54+jint position(JNIEnv *env, jclass c, jlong address) {
55+ NativeByteBuffer *buffer = (NativeByteBuffer *) (intptr_t) address;
56+ return buffer->position();
57+}
58+
59+void reuse(JNIEnv *env, jclass c, jlong address) {
60+ NativeByteBuffer *buffer = (NativeByteBuffer *) (intptr_t) address;
61+ buffer->reuse();
62+}
63+
64+jobject getJavaByteBuffer(JNIEnv *env, jclass c, jlong address) {
65+ NativeByteBuffer *buffer = (NativeByteBuffer *) (intptr_t) address;
66+ if (buffer == nullptr) {
67+ return nullptr;
68+ }
69+ return buffer->getJavaByteBuffer();
70+}
71+
72+static const char *NativeByteBufferClassPathName = "org/telegram/tgnet/NativeByteBuffer";
73+static JNINativeMethod NativeByteBufferMethods[] = {
74+ {"native_getFreeBuffer", "(I)J", (void *) getFreeBuffer},
75+ {"native_limit", "(J)I", (void *) limit},
76+ {"native_position", "(J)I", (void *) position},
77+ {"native_reuse", "(J)V", (void *) reuse},
78+ {"native_getJavaByteBuffer", "(J)Ljava/nio/ByteBuffer;", (void *) getJavaByteBuffer}
79+};
80+
81+jlong getCurrentTimeMillis(JNIEnv *env, jclass c, jint instanceNum) {
82+ return ConnectionsManager::getInstance(instanceNum).getCurrentTimeMillis() + ((jlong) ConnectionsManager::getInstance(instanceNum).getTimeDifference()) * 1000;
83+}
84+
85+jint getCurrentTime(JNIEnv *env, jclass c, jint instanceNum) {
86+ return ConnectionsManager::getInstance(instanceNum).getCurrentTime();
87+}
88+
89+jint getCurrentPingTime(JNIEnv *env, jclass c, jint instanceNum) {
90+ return ConnectionsManager::getInstance(instanceNum).getCurrentPingTime();
91+}
92+
93+jint getCurrentDatacenterId(JNIEnv *env, jclass c, jint instanceNum) {
94+ return ConnectionsManager::getInstance(instanceNum).getCurrentDatacenterId();
95+}
96+
97+jlong getCurrentAuthKeyId(JNIEnv *env, jclass c, jint instanceNum) {
98+ return ConnectionsManager::getInstance(instanceNum).getCurrentAuthKeyId();
99+}
100+
101+jint isTestBackend(JNIEnv *env, jclass c, jint instanceNum) {
102+ return ConnectionsManager::getInstance(instanceNum).isTestBackend() ? 1 : 0;
103+}
104+
105+jint getTimeDifference(JNIEnv *env, jclass c, jint instanceNum) {
106+ return ConnectionsManager::getInstance(instanceNum).getTimeDifference();
107+}
108+
109+void sendRequest(JNIEnv *env, jclass c, jint instanceNum, jlong object, jint flags, jint datacenterId, jint connectionType, jboolean immediate, jint token) {
110+ TL_api_request *request = new TL_api_request();
111+ request->request = (NativeByteBuffer *) (intptr_t) object;
112+ ConnectionsManager::getInstance(instanceNum).sendRequest(request, ([instanceNum, token](TLObject *response, TL_error *error, int32_t networkType, int64_t responseTime, int64_t msgId, int32_t dcId) {
113+ TL_api_response *resp = (TL_api_response *) response;
114+ jlong ptr = 0;
115+ jint errorCode = 0;
116+ jstring errorText = nullptr;
117+ if (resp != nullptr) {
118+ ptr = (jlong) resp->response.get();
119+ } else if (error != nullptr) {
120+ errorCode = error->code;
121+ const char *text = error->text.c_str();
122+ size_t size = error->text.size();
123+ if (check_utf8(text, size)) {
124+ errorText = jniEnv[instanceNum]->NewStringUTF(text);
125+ } else {
126+ errorText = jniEnv[instanceNum]->NewStringUTF("UTF-8 ERROR");
127+ }
128+ }
129+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestComplete, instanceNum, token, ptr, errorCode, errorText, networkType, responseTime, msgId, dcId);
130+ if (errorText != nullptr) {
131+ jniEnv[instanceNum]->DeleteLocalRef(errorText);
132+ }
133+ }), ([instanceNum, token] {
134+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestQuickAck, instanceNum, token);
135+ }), ([instanceNum, token] {
136+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestWriteToSocket, instanceNum, token);
137+ }), ([instanceNum, token] {
138+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestClear, instanceNum, token, false);
139+ }), (uint32_t) flags, (uint32_t) datacenterId, (ConnectionType) connectionType, immediate, token);
140+}
141+
142+void cancelRequest(JNIEnv *env, jclass c, jint instanceNum, jint token, jboolean notifyServer) {
143+ return ConnectionsManager::getInstance(instanceNum).cancelRequest(token, notifyServer, ([instanceNum, token]() -> void {
144+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestClear, instanceNum, token, true);
145+ }));
146+}
147+
148+void failNotRunningRequest(JNIEnv *env, jclass c, jint instanceNum, jint token) {
149+ return ConnectionsManager::getInstance(instanceNum).failNotRunningRequest(token);
150+}
151+
152+void receivedIntegrityCheckClassic(JNIEnv *env, jclass c, jint instanceNum, jint requestToken, jstring nonce, jstring token) {
153+ const char* nonceStr = env->GetStringUTFChars(nonce, 0);
154+ const char* tokenStr = env->GetStringUTFChars(token, 0);
155+ std::string nonceString = nonceStr;
156+ std::string tokenString = tokenStr;
157+ ConnectionsManager::getInstance(instanceNum).receivedIntegrityCheckClassic(requestToken, nonceString, tokenString);
158+ if (nonceStr != nullptr) {
159+ env->ReleaseStringUTFChars(nonce, nonceStr);
160+ }
161+ if (tokenStr != nullptr) {
162+ env->ReleaseStringUTFChars(token, tokenStr);
163+ }
164+}
165+
166+void receivedCaptchaResult(JNIEnv *env, jclass c, jint instanceNum, jintArray requestTokens, jstring token) {
167+ const char* tokenStr = env->GetStringUTFChars(token, 0);
168+ jsize requestTokensLength = env->GetArrayLength(requestTokens);
169+ jint *requestTokensJArr = env->GetIntArrayElements(requestTokens, NULL);
170+ int* requestTokensArr = new int[requestTokensLength];
171+ for (int i = 0; i < requestTokensLength; ++i) {
172+ requestTokensArr[i] = requestTokensJArr[i];
173+ }
174+ if (requestTokensJArr != nullptr) {
175+ env->ReleaseIntArrayElements(requestTokens, requestTokensJArr, 0);
176+ }
177+ std::string tokenString = tokenStr;
178+ ConnectionsManager::getInstance(instanceNum).receivedCaptchaResult(requestTokensLength, requestTokensArr, tokenString);
179+ if (tokenStr != nullptr) {
180+ env->ReleaseStringUTFChars(token, tokenStr);
181+ }
182+}
183+
184+jboolean isGoodPrime(JNIEnv *env, jclass c, jbyteArray prime, jint g) {
185+ jsize length = env->GetArrayLength(prime);
186+ jbyte *bytes = env->GetByteArrayElements(prime, NULL);
187+ if (bytes == NULL) {
188+ DEBUG_E("isGoodPrime: failed to get byte array");
189+ return false;
190+ }
191+ unsigned char *unsignedBytes = (unsigned char *)bytes;
192+ BIGNUM *bn = BN_bin2bn(unsignedBytes, length, NULL);
193+ if (bn == NULL) {
194+ env->ReleaseByteArrayElements(prime, bytes, 0);
195+ DEBUG_E("isGoodPrime: failed to convert byte array into BIGNUM");
196+ return false;
197+ }
198+ bool result = Handshake::isGoodPrime(bn, g);
199+ BN_free(bn);
200+ env->ReleaseByteArrayElements(prime, bytes, 0);
201+ return result;
202+}
203+
204+void cleanUp(JNIEnv *env, jclass c, jint instanceNum, jboolean resetKeys) {
205+ return ConnectionsManager::getInstance(instanceNum).cleanUp(resetKeys, -1);
206+}
207+
208+void cancelRequestsForGuid(JNIEnv *env, jclass c, jint instanceNum, jint guid) {
209+ return ConnectionsManager::getInstance(instanceNum).cancelRequestsForGuid(guid);
210+}
211+
212+void bindRequestToGuid(JNIEnv *env, jclass c, jint instanceNum, jint requestToken, jint guid) {
213+ return ConnectionsManager::getInstance(instanceNum).bindRequestToGuid(requestToken, guid);
214+}
215+
216+void applyDatacenterAddress(JNIEnv *env, jclass c, jint instanceNum, jint datacenterId, jstring ipAddress, jint port) {
217+ const char *valueStr = env->GetStringUTFChars(ipAddress, 0);
218+
219+ ConnectionsManager::getInstance(instanceNum).applyDatacenterAddress((uint32_t) datacenterId, std::string(valueStr), (uint32_t) port);
220+
221+ if (valueStr != 0) {
222+ env->ReleaseStringUTFChars(ipAddress, valueStr);
223+ }
224+}
225+
226+void setProxySettings(JNIEnv *env, jclass c, jint instanceNum, jstring address, jint port, jstring username, jstring password, jstring secret) {
227+ const char *addressStr = env->GetStringUTFChars(address, 0);
228+ const char *usernameStr = env->GetStringUTFChars(username, 0);
229+ const char *passwordStr = env->GetStringUTFChars(password, 0);
230+ const char *secretStr = env->GetStringUTFChars(secret, 0);
231+
232+ ConnectionsManager::getInstance(instanceNum).setProxySettings(addressStr, (uint16_t) port, usernameStr, passwordStr, secretStr);
233+
234+ if (addressStr != 0) {
235+ env->ReleaseStringUTFChars(address, addressStr);
236+ }
237+ if (usernameStr != 0) {
238+ env->ReleaseStringUTFChars(username, usernameStr);
239+ }
240+ if (passwordStr != 0) {
241+ env->ReleaseStringUTFChars(password, passwordStr);
242+ }
243+ if (secretStr != 0) {
244+ env->ReleaseStringUTFChars(secret, secretStr);
245+ }
246+}
247+
248+void setWebSocketConfig(JNIEnv *env, jclass c, jint instanceNum, jboolean enabled, jstring userDomain, jstring pool) {
249+ const char *userDomainStr = env->GetStringUTFChars(userDomain, 0);
250+ const char *poolStr = env->GetStringUTFChars(pool, 0);
251+ std::vector<std::string> domains;
252+ if (poolStr != nullptr) {
253+ std::string joined = poolStr;
254+ size_t start = 0;
255+ while (start < joined.size()) {
256+ size_t nl = joined.find('\n', start);
257+ if (nl == std::string::npos) {
258+ nl = joined.size();
259+ }
260+ if (nl > start) {
261+ domains.push_back(joined.substr(start, nl - start));
262+ }
263+ start = nl + 1;
264+ }
265+ }
266+ ConnectionsManager::getInstance(instanceNum).setWebSocketConfig(enabled, userDomainStr != nullptr ? userDomainStr : "", domains);
267+ if (userDomainStr != 0) {
268+ env->ReleaseStringUTFChars(userDomain, userDomainStr);
269+ }
270+ if (poolStr != 0) {
271+ env->ReleaseStringUTFChars(pool, poolStr);
272+ }
273+}
274+
275+jint getConnectionState(JNIEnv *env, jclass c, jint instanceNum) {
276+ return ConnectionsManager::getInstance(instanceNum).getConnectionState();
277+}
278+
279+void setUserId(JNIEnv *env, jclass c, jint instanceNum, int64_t id) {
280+ ConnectionsManager::getInstance(instanceNum).setUserId(id);
281+}
282+
283+void setUserPremium(JNIEnv *env, jclass c, jint instanceNum, bool premium) {
284+ ConnectionsManager::getInstance(instanceNum).setUserPremium(premium);
285+}
286+
287+void switchBackend(JNIEnv *env, jclass c, jint instanceNum, jboolean restart) {
288+ ConnectionsManager::getInstance(instanceNum).switchBackend(restart);
289+}
290+
291+void pauseNetwork(JNIEnv *env, jclass c, jint instanceNum) {
292+ ConnectionsManager::getInstance(instanceNum).pauseNetwork();
293+}
294+
295+void resumeNetwork(JNIEnv *env, jclass c, jint instanceNum, jboolean partial) {
296+ ConnectionsManager::getInstance(instanceNum).resumeNetwork(partial);
297+}
298+
299+void updateDcSettings(JNIEnv *env, jclass c, jint instanceNum) {
300+ ConnectionsManager::getInstance(instanceNum).updateDcSettings(0, false, false);
301+}
302+
303+void moveDatacenter(JNIEnv *env, jclass c, jint instanceNum, jint datacenterId) {
304+ ConnectionsManager::getInstance(instanceNum).moveToDatacenter(datacenterId);
305+}
306+
307+void setIpStrategy(JNIEnv *env, jclass c, jint instanceNum, jbyte value) {
308+ ConnectionsManager::getInstance(instanceNum).setIpStrategy((uint8_t) value);
309+}
310+
311+void setNetworkAvailable(JNIEnv *env, jclass c, jint instanceNum, jboolean value, jint networkType, jboolean slow) {
312+ ConnectionsManager::getInstance(instanceNum).setNetworkAvailable(value, networkType, slow);
313+}
314+
315+void setPushConnectionEnabled(JNIEnv *env, jclass c, jint instanceNum, jboolean value) {
316+ ConnectionsManager::getInstance(instanceNum).setPushConnectionEnabled(value);
317+}
318+
319+void applyDnsConfig(JNIEnv *env, jclass c, jint instanceNum, jlong address, jstring phone, jint date) {
320+ const char *phoneStr = env->GetStringUTFChars(phone, 0);
321+
322+ ConnectionsManager::getInstance(instanceNum).applyDnsConfig((NativeByteBuffer *) (intptr_t) address, phoneStr, date);
323+ if (phoneStr != 0) {
324+ env->ReleaseStringUTFChars(phone, phoneStr);
325+ }
326+}
327+
328+jlong checkProxy(JNIEnv *env, jclass c, jint instanceNum, jstring address, jint port, jstring username, jstring password, jstring secret, jobject requestTimeFunc) {
329+ const char *addressStr = env->GetStringUTFChars(address, 0);
330+ const char *usernameStr = env->GetStringUTFChars(username, 0);
331+ const char *passwordStr = env->GetStringUTFChars(password, 0);
332+ const char *secretStr = env->GetStringUTFChars(secret, 0);
333+
334+ if (requestTimeFunc != nullptr) {
335+ DEBUG_REF("sendRequest requestTimeFunc");
336+ requestTimeFunc = env->NewGlobalRef(requestTimeFunc);
337+ }
338+
339+ jlong result = ConnectionsManager::getInstance(instanceNum).checkProxy(addressStr, (uint16_t) port, usernameStr, passwordStr, secretStr, [instanceNum, requestTimeFunc](int64_t time) {
340+ if (requestTimeFunc != nullptr) {
341+ jniEnv[instanceNum]->CallVoidMethod(requestTimeFunc, jclass_RequestTimeDelegate_run, time);
342+ }
343+ }, requestTimeFunc);
344+
345+ if (addressStr != 0) {
346+ env->ReleaseStringUTFChars(address, addressStr);
347+ }
348+ if (usernameStr != 0) {
349+ env->ReleaseStringUTFChars(username, usernameStr);
350+ }
351+ if (passwordStr != 0) {
352+ env->ReleaseStringUTFChars(password, passwordStr);
353+ }
354+ if (secretStr != 0) {
355+ env->ReleaseStringUTFChars(secret, secretStr);
356+ }
357+
358+ return result;
359+}
360+
361+class Delegate : public ConnectiosManagerDelegate {
362+
363+ void onUpdate(int32_t instanceNum) {
364+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onUpdate, instanceNum);
365+ }
366+
367+ void onSessionCreated(int32_t instanceNum) {
368+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onSessionCreated, instanceNum);
369+ }
370+
371+ void onConnectionStateChanged(ConnectionState state, int32_t instanceNum) {
372+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onConnectionStateChanged, state, instanceNum);
373+ }
374+
375+ void onUnparsedMessageReceived(int64_t reqMessageId, NativeByteBuffer *buffer, ConnectionType connectionType, int32_t instanceNum) {
376+ if (connectionType == ConnectionTypeGeneric) {
377+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onUnparsedMessageReceived, (jlong) (intptr_t) buffer, instanceNum, reqMessageId);
378+ }
379+ }
380+
381+ void onLogout(int32_t instanceNum) {
382+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onLogout, instanceNum);
383+ }
384+
385+ void onUpdateConfig(TL_config *config, int32_t instanceNum) {
386+ NativeByteBuffer *buffer = BuffersStorage::getInstance().getFreeBuffer(config->getObjectSize());
387+ config->serializeToStream(buffer);
388+ buffer->position(0);
389+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onUpdateConfig, (jlong) (intptr_t) buffer, instanceNum);
390+ buffer->reuse();
391+ }
392+
393+ void onInternalPushReceived(int32_t instanceNum) {
394+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onInternalPushReceived, instanceNum);
395+ }
396+
397+ void onBytesReceived(int32_t amount, int32_t networkType, int32_t instanceNum) {
398+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onBytesReceived, amount, networkType, instanceNum);
399+ }
400+
401+ void onBytesSent(int32_t amount, int32_t networkType, int32_t instanceNum) {
402+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onBytesSent, amount, networkType, instanceNum);
403+ }
404+
405+ void onRequestNewServerIpAndPort(int32_t second, int32_t instanceNum) {
406+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onRequestNewServerIpAndPort, second, instanceNum);
407+ }
408+
409+ void onProxyError(int32_t instanceNum) {
410+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onProxyError);
411+ }
412+
413+ void getHostByName(std::string domain, int32_t instanceNum, ConnectionSocket *socket) {
414+ jstring domainName = jniEnv[instanceNum]->NewStringUTF(domain.c_str());
415+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_getHostByName, domainName, (jlong) (intptr_t) socket);
416+ jniEnv[instanceNum]->DeleteLocalRef(domainName);
417+ }
418+
419+ int32_t getInitFlags(int32_t instanceNum) {
420+ return (int32_t) jniEnv[instanceNum]->CallStaticIntMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_getInitFlags);
421+ }
422+
423+ void onPremiumFloodWait(int32_t instanceNum, int32_t requestToken, bool isUpload) {
424+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onPremiumFloodWait, instanceNum, requestToken, isUpload);
425+ }
426+
427+ void onIntegrityCheckClassic(int32_t instanceNum, int32_t requestToken, std::string project, std::string nonce) {
428+ jstring projectStr = jniEnv[instanceNum]->NewStringUTF(project.c_str());
429+ jstring nonceStr = jniEnv[instanceNum]->NewStringUTF(nonce.c_str());
430+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onIntegrityCheckClassic, instanceNum, requestToken, projectStr, nonceStr);
431+ jniEnv[instanceNum]->DeleteLocalRef(projectStr);
432+ jniEnv[instanceNum]->DeleteLocalRef(nonceStr);
433+ }
434+
435+ void onCaptchaCheck(int32_t instanceNum, int32_t requestToken, std::string action, std::string key_id) {
436+ jstring actionStr = jniEnv[instanceNum]->NewStringUTF(action.c_str());
437+ jstring keyIdStr = jniEnv[instanceNum]->NewStringUTF(key_id.c_str());
438+ jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onCaptchaCheck, instanceNum, requestToken, actionStr, keyIdStr);
439+ jniEnv[instanceNum]->DeleteLocalRef(actionStr);
440+ jniEnv[instanceNum]->DeleteLocalRef(keyIdStr);
441+ }
442+
443+};
444+
445+void onHostNameResolved(JNIEnv *env, jclass c, jstring host, jlong address, jstring ip) {
446+ const char *ipStr = env->GetStringUTFChars(ip, 0);
447+ const char *hostStr = env->GetStringUTFChars(host, 0);
448+ std::string i = std::string(ipStr);
449+ std::string h = std::string(hostStr);
450+ if (ipStr != 0) {
451+ env->ReleaseStringUTFChars(ip, ipStr);
452+ }
453+ if (hostStr != 0) {
454+ env->ReleaseStringUTFChars(host, hostStr);
455+ }
456+ ConnectionSocket *socket = (ConnectionSocket *) (intptr_t) address;
457+ socket->onHostNameResolved(h, i, false);
458+}
459+
460+void discardConnection(JNIEnv *env, jclass c, jint instanceNum, jint datacenerId, jint connectionType) {
461+ ConnectionsManager::getInstance(instanceNum).reconnect(datacenerId, connectionType);
462+}
463+
464+void setLangCode(JNIEnv *env, jclass c, jint instanceNum, jstring langCode) {
465+ const char *langCodeStr = env->GetStringUTFChars(langCode, 0);
466+
467+ ConnectionsManager::getInstance(instanceNum).setLangCode(std::string(langCodeStr));
468+
469+ if (langCodeStr != 0) {
470+ env->ReleaseStringUTFChars(langCode, langCodeStr);
471+ }
472+}
473+
474+void setRegId(JNIEnv *env, jclass c, jint instanceNum, jstring regId) {
475+ const char *regIdStr = env->GetStringUTFChars(regId, 0);
476+
477+ ConnectionsManager::getInstance(instanceNum).setRegId(std::string(regIdStr));
478+
479+ if (regIdStr != 0) {
480+ env->ReleaseStringUTFChars(regId, regIdStr);
481+ }
482+}
483+
484+void setSystemLangCode(JNIEnv *env, jclass c, jint instanceNum, jstring langCode) {
485+ const char *langCodeStr = env->GetStringUTFChars(langCode, 0);
486+
487+ ConnectionsManager::getInstance(instanceNum).setSystemLangCode(std::string(langCodeStr));
488+
489+ if (langCodeStr != 0) {
490+ env->ReleaseStringUTFChars(langCode, langCodeStr);
491+ }
492+}
493+
494+void init(JNIEnv *env, jclass c, jint instanceNum, jint version, jint layer, jint apiId, jstring deviceModel, jstring systemVersion, jstring appVersion, jstring langCode, jstring systemLangCode, jstring configPath, jstring logPath, jstring regId, jstring cFingerprint, jstring installerId, jstring packageId, jint timezoneOffset, jlong userId, jboolean userPremium, jboolean enablePushConnection, jboolean hasNetwork, jint networkType, jint performanceClass) {
495+ const char *deviceModelStr = env->GetStringUTFChars(deviceModel, 0);
496+ const char *systemVersionStr = env->GetStringUTFChars(systemVersion, 0);
497+ const char *appVersionStr = env->GetStringUTFChars(appVersion, 0);
498+ const char *langCodeStr = env->GetStringUTFChars(langCode, 0);
499+ const char *systemLangCodeStr = env->GetStringUTFChars(systemLangCode, 0);
500+ const char *configPathStr = env->GetStringUTFChars(configPath, 0);
501+ const char *logPathStr = env->GetStringUTFChars(logPath, 0);
502+ const char *regIdStr = env->GetStringUTFChars(regId, 0);
503+ const char *cFingerprintStr = env->GetStringUTFChars(cFingerprint, 0);
504+ const char *installerIdStr = env->GetStringUTFChars(installerId, 0);
505+ const char *packageIdStr = env->GetStringUTFChars(packageId, 0);
506+
507+ ConnectionsManager::getInstance(instanceNum).init((uint32_t) version, layer, apiId, std::string(deviceModelStr), std::string(systemVersionStr), std::string(appVersionStr), std::string(langCodeStr), std::string(systemLangCodeStr), std::string(configPathStr), std::string(logPathStr), std::string(regIdStr), std::string(cFingerprintStr), std::string(installerIdStr), std::string(packageIdStr), timezoneOffset, userId, userPremium, true, enablePushConnection, hasNetwork, networkType, performanceClass);
508+
509+ if (deviceModelStr != 0) {
510+ env->ReleaseStringUTFChars(deviceModel, deviceModelStr);
511+ }
512+ if (systemVersionStr != 0) {
513+ env->ReleaseStringUTFChars(systemVersion, systemVersionStr);
514+ }
515+ if (appVersionStr != 0) {
516+ env->ReleaseStringUTFChars(appVersion, appVersionStr);
517+ }
518+ if (langCodeStr != 0) {
519+ env->ReleaseStringUTFChars(langCode, langCodeStr);
520+ }
521+ if (systemLangCodeStr != 0) {
522+ env->ReleaseStringUTFChars(systemLangCode, systemLangCodeStr);
523+ }
524+ if (configPathStr != 0) {
525+ env->ReleaseStringUTFChars(configPath, configPathStr);
526+ }
527+ if (logPathStr != 0) {
528+ env->ReleaseStringUTFChars(logPath, logPathStr);
529+ }
530+ if (regIdStr != 0) {
531+ env->ReleaseStringUTFChars(regId, regIdStr);
532+ }
533+ if (cFingerprintStr != 0) {
534+ env->ReleaseStringUTFChars(cFingerprint, cFingerprintStr);
535+ }
536+ if (installerIdStr != 0) {
537+ env->ReleaseStringUTFChars(installerId, installerIdStr);
538+ }
539+ if (packageIdStr != 0) {
540+ env->ReleaseStringUTFChars(packageId, packageIdStr);
541+ }
542+}
543+
544+void setJava(JNIEnv *env, jclass c, jboolean useJavaByteBuffers) {
545+ ConnectionsManager::useJavaVM(java, useJavaByteBuffers);
546+ for (int a = 0; a < MAX_ACCOUNT_COUNT; a++) {
547+ ConnectionsManager::getInstance(a).setDelegate(new Delegate());
548+ }
549+}
550+
551+static const char *ConnectionsManagerClassPathName = "org/telegram/tgnet/ConnectionsManager";
552+static JNINativeMethod ConnectionsManagerMethods[] = {
553+ {"native_getCurrentTimeMillis", "(I)J", (void *) getCurrentTimeMillis},
554+ {"native_getCurrentTime", "(I)I", (void *) getCurrentTime},
555+ {"native_getCurrentPingTime", "(I)I", (void *) getCurrentPingTime},
556+ {"native_getCurrentDatacenterId", "(I)I", (void *) getCurrentDatacenterId},
557+ {"native_getCurrentAuthKeyId", "(I)J", (void *) getCurrentAuthKeyId},
558+ {"native_isTestBackend", "(I)I", (void *) isTestBackend},
559+ {"native_getTimeDifference", "(I)I", (void *) getTimeDifference},
560+ {"native_sendRequest", "(IJIIIZI)V", (void *) sendRequest},
561+ {"native_cancelRequest", "(IIZ)V", (void *) cancelRequest},
562+ {"native_cleanUp", "(IZ)V", (void *) cleanUp},
563+ {"native_cancelRequestsForGuid", "(II)V", (void *) cancelRequestsForGuid},
564+ {"native_bindRequestToGuid", "(III)V", (void *) bindRequestToGuid},
565+ {"native_applyDatacenterAddress", "(IILjava/lang/String;I)V", (void *) applyDatacenterAddress},
566+ {"native_setProxySettings", "(ILjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", (void *) setProxySettings},
567+ {"native_setWebSocketConfig", "(IZLjava/lang/String;Ljava/lang/String;)V", (void *) setWebSocketConfig},
568+ {"native_getConnectionState", "(I)I", (void *) getConnectionState},
569+ {"native_setUserId", "(IJ)V", (void *) setUserId},
570+ {"native_init", "(IIIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IJZZZII)V", (void *) init},
571+ {"native_setLangCode", "(ILjava/lang/String;)V", (void *) setLangCode},
572+ {"native_setRegId", "(ILjava/lang/String;)V", (void *) setRegId},
573+ {"native_setSystemLangCode", "(ILjava/lang/String;)V", (void *) setSystemLangCode},
574+ {"native_switchBackend", "(IZ)V", (void *) switchBackend},
575+ {"native_pauseNetwork", "(I)V", (void *) pauseNetwork},
576+ {"native_resumeNetwork", "(IZ)V", (void *) resumeNetwork},
577+ {"native_updateDcSettings", "(I)V", (void *) updateDcSettings},
578+ {"native_moveDatacenter", "(II)V", (void *) moveDatacenter},
579+ {"native_setIpStrategy", "(IB)V", (void *) setIpStrategy},
580+ {"native_setNetworkAvailable", "(IZIZ)V", (void *) setNetworkAvailable},
581+ {"native_setPushConnectionEnabled", "(IZ)V", (void *) setPushConnectionEnabled},
582+ {"native_setJava", "(Z)V", (void *) setJava},
583+ {"native_applyDnsConfig", "(IJLjava/lang/String;I)V", (void *) applyDnsConfig},
584+ {"native_checkProxy", "(ILjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lorg/telegram/tgnet/RequestTimeDelegate;)J", (void *) checkProxy},
585+ {"native_onHostNameResolved", "(Ljava/lang/String;JLjava/lang/String;)V", (void *) onHostNameResolved},
586+ {"native_discardConnection", "(III)V", (void *) discardConnection},
587+ {"native_failNotRunningRequest", "(II)V", (void *) failNotRunningRequest},
588+ {"native_receivedIntegrityCheckClassic", "(IILjava/lang/String;Ljava/lang/String;)V", (void *) receivedIntegrityCheckClassic},
589+ {"native_receivedCaptchaResult", "(I[ILjava/lang/String;)V", (void *) receivedCaptchaResult},
590+ {"native_isGoodPrime", "([BI)Z", (void *) isGoodPrime},
591+};
592+
593+
594+extern "C"
595+JNIEXPORT jboolean JNICALL
596+Java_org_telegram_tgnet_ConnectionsManager_native_1test_1AuthAuthorization(JNIEnv *env, jclass clazz, jlong address) {
597+ auto *buffer = (NativeByteBuffer *) (intptr_t) address;
598+ bool error = false;
599+
600+ int constructorId = buffer->readInt32(&error);
601+ auth_Authorization::TLdeserialize(buffer, constructorId, 0, error);
602+ return !error;
603+}
604+
605+inline int registerNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods, int methodsCount) {
606+ jclass clazz;
607+ clazz = env->FindClass(className);
608+ if (clazz == NULL) {
609+ return JNI_FALSE;
610+ }
611+ if (env->RegisterNatives(clazz, methods, methodsCount) < 0) {
612+ return JNI_FALSE;
613+ }
614+ return JNI_TRUE;
615+}
616+
617+extern "C" int registerNativeTgNetFunctions(JavaVM *vm, JNIEnv *env) {
618+ java = vm;
619+
620+ if (!registerNativeMethods(env, NativeByteBufferClassPathName, NativeByteBufferMethods, sizeof(NativeByteBufferMethods) / sizeof(NativeByteBufferMethods[0]))) {
621+ return JNI_FALSE;
622+ }
623+
624+ if (!registerNativeMethods(env, ConnectionsManagerClassPathName, ConnectionsManagerMethods, sizeof(ConnectionsManagerMethods) / sizeof(ConnectionsManagerMethods[0]))) {
625+ return JNI_FALSE;
626+ }
627+
628+ DEBUG_REF("RequestTimeDelegate class");
629+ jclass_RequestTimeDelegate = (jclass) env->NewGlobalRef(env->FindClass("org/telegram/tgnet/RequestTimeDelegate"));
630+ if (jclass_RequestTimeDelegate == 0) {
631+ return JNI_FALSE;
632+ }
633+ jclass_RequestTimeDelegate_run = env->GetMethodID(jclass_RequestTimeDelegate, "run", "(J)V");
634+ if (jclass_RequestTimeDelegate_run == 0) {
635+ return JNI_FALSE;
636+ }
637+
638+ DEBUG_REF("ConnectionsManager class");
639+ jclass_ConnectionsManager = (jclass) env->NewGlobalRef(env->FindClass("org/telegram/tgnet/ConnectionsManager"));
640+ if (jclass_ConnectionsManager == 0) {
641+ return JNI_FALSE;
642+ }
643+ jclass_ConnectionsManager_onRequestClear = env->GetStaticMethodID(jclass_ConnectionsManager, "onRequestClear", "(IIZ)V");
644+ if (jclass_ConnectionsManager_onRequestClear == 0) {
645+ return JNI_FALSE;
646+ }
647+ jclass_ConnectionsManager_onRequestComplete = env->GetStaticMethodID(jclass_ConnectionsManager, "onRequestComplete", "(IIJILjava/lang/String;IJJI)V");
648+ if (jclass_ConnectionsManager_onRequestComplete == 0) {
649+ return JNI_FALSE;
650+ }
651+ jclass_ConnectionsManager_onRequestWriteToSocket = env->GetStaticMethodID(jclass_ConnectionsManager, "onRequestWriteToSocket", "(II)V");
652+ if (jclass_ConnectionsManager_onRequestWriteToSocket == 0) {
653+ return JNI_FALSE;
654+ }
655+ jclass_ConnectionsManager_onRequestQuickAck = env->GetStaticMethodID(jclass_ConnectionsManager, "onRequestQuickAck", "(II)V");
656+ if (jclass_ConnectionsManager_onRequestQuickAck == 0) {
657+ return JNI_FALSE;
658+ }
659+ jclass_ConnectionsManager_onUnparsedMessageReceived = env->GetStaticMethodID(jclass_ConnectionsManager, "onUnparsedMessageReceived", "(JIJ)V");
660+ if (jclass_ConnectionsManager_onUnparsedMessageReceived == 0) {
661+ return JNI_FALSE;
662+ }
663+ jclass_ConnectionsManager_onUpdate = env->GetStaticMethodID(jclass_ConnectionsManager, "onUpdate", "(I)V");
664+ if (jclass_ConnectionsManager_onUpdate == 0) {
665+ return JNI_FALSE;
666+ }
667+ jclass_ConnectionsManager_onSessionCreated = env->GetStaticMethodID(jclass_ConnectionsManager, "onSessionCreated", "(I)V");
668+ if (jclass_ConnectionsManager_onSessionCreated == 0) {
669+ return JNI_FALSE;
670+ }
671+ jclass_ConnectionsManager_onLogout = env->GetStaticMethodID(jclass_ConnectionsManager, "onLogout", "(I)V");
672+ if (jclass_ConnectionsManager_onLogout == 0) {
673+ return JNI_FALSE;
674+ }
675+ jclass_ConnectionsManager_onConnectionStateChanged = env->GetStaticMethodID(jclass_ConnectionsManager, "onConnectionStateChanged", "(II)V");
676+ if (jclass_ConnectionsManager_onConnectionStateChanged == 0) {
677+ return JNI_FALSE;
678+ }
679+ jclass_ConnectionsManager_onInternalPushReceived = env->GetStaticMethodID(jclass_ConnectionsManager, "onInternalPushReceived", "(I)V");
680+ if (jclass_ConnectionsManager_onInternalPushReceived == 0) {
681+ return JNI_FALSE;
682+ }
683+ jclass_ConnectionsManager_onUpdateConfig = env->GetStaticMethodID(jclass_ConnectionsManager, "onUpdateConfig", "(JI)V");
684+ if (jclass_ConnectionsManager_onUpdateConfig == 0) {
685+ return JNI_FALSE;
686+ }
687+ jclass_ConnectionsManager_onBytesSent = env->GetStaticMethodID(jclass_ConnectionsManager, "onBytesSent", "(III)V");
688+ if (jclass_ConnectionsManager_onBytesSent == 0) {
689+ return JNI_FALSE;
690+ }
691+ jclass_ConnectionsManager_onBytesReceived = env->GetStaticMethodID(jclass_ConnectionsManager, "onBytesReceived", "(III)V");
692+ if (jclass_ConnectionsManager_onBytesReceived == 0) {
693+ return JNI_FALSE;
694+ }
695+ jclass_ConnectionsManager_onRequestNewServerIpAndPort = env->GetStaticMethodID(jclass_ConnectionsManager, "onRequestNewServerIpAndPort", "(II)V");
696+ if (jclass_ConnectionsManager_onRequestNewServerIpAndPort == 0) {
697+ return JNI_FALSE;
698+ }
699+ jclass_ConnectionsManager_onProxyError = env->GetStaticMethodID(jclass_ConnectionsManager, "onProxyError", "()V");
700+ if (jclass_ConnectionsManager_onProxyError == 0) {
701+ return JNI_FALSE;
702+ }
703+ jclass_ConnectionsManager_getHostByName = env->GetStaticMethodID(jclass_ConnectionsManager, "getHostByName", "(Ljava/lang/String;J)V");
704+ if (jclass_ConnectionsManager_getHostByName == 0) {
705+ return JNI_FALSE;
706+ }
707+ jclass_ConnectionsManager_getInitFlags = env->GetStaticMethodID(jclass_ConnectionsManager, "getInitFlags", "()I");
708+ if (jclass_ConnectionsManager_getInitFlags == 0) {
709+ return JNI_FALSE;
710+ }
711+ jclass_ConnectionsManager_onPremiumFloodWait = env->GetStaticMethodID(jclass_ConnectionsManager, "onPremiumFloodWait", "(IIZ)V");
712+ if (jclass_ConnectionsManager_onPremiumFloodWait == 0) {
713+ return JNI_FALSE;
714+ }
715+ jclass_ConnectionsManager_onIntegrityCheckClassic = env->GetStaticMethodID(jclass_ConnectionsManager, "onIntegrityCheckClassic", "(IILjava/lang/String;Ljava/lang/String;)V");
716+ if (jclass_ConnectionsManager_onIntegrityCheckClassic == 0) {
717+ return JNI_FALSE;
718+ }
719+ //jclass_ConnectionsManager_onCaptchaCheck = env->GetStaticMethodID(jclass_ConnectionsManager, "onCaptchaCheck", "(IILjava/lang/String;Ljava/lang/String;)V");
720+ //if (jclass_ConnectionsManager_onCaptchaCheck == 0) {
721+ // return JNI_FALSE;
722+ //}
723+
724+ return JNI_TRUE;
725+}
726+
727+//
728+// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2018
729+//
730+// Distributed under the Boost Software License, Version 1.0. (See accompanying
731+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
732+//
733+
734+bool check_utf8(const char *data, size_t len) {
735+ const char *data_end = data + len;
736+ do {
737+ unsigned int a = (unsigned char) (*data++);
738+ if ((a & 0x80) == 0) {
739+ if (data == data_end + 1) {
740+ return true;
741+ }
742+ continue;
743+ }
744+
745+#define ENSURE(condition) \
746+if (!(condition)) { \
747+ return false; \
748+}
749+
750+ ENSURE((a & 0x40) != 0);
751+
752+ unsigned int b = (unsigned char) (*data++);
753+ ENSURE((b & 0xc0) == 0x80);
754+ if ((a & 0x20) == 0) {
755+ ENSURE((a & 0x1e) > 0);
756+ continue;
757+ }
758+
759+ unsigned int c = (unsigned char) (*data++);
760+ ENSURE((c & 0xc0) == 0x80);
761+ if ((a & 0x10) == 0) {
762+ int x = (((a & 0x0f) << 6) | (b & 0x20));
763+ ENSURE(x != 0 && x != 0x360);
764+ continue;
765+ }
766+
767+ unsigned int d = (unsigned char) (*data++);
768+ ENSURE((d & 0xc0) == 0x80);
769+ if ((a & 0x08) == 0) {
770+ int t = (((a & 0x07) << 6) | (b & 0x30));
771+ ENSURE(0 < t && t < 0x110);
772+ continue;
773+ }
774+
775+ return false;
776+#undef ENSURE
777+ } while (1);
778+}
TMessagesProj/jni/audio.cnew file+1128
@@ -0,0 +1,1128 @@
1+#include <jni.h>
2+#include <ogg/ogg.h>
3+#include <stdio.h>
4+#include <opus.h>
5+#include <stdlib.h>
6+#include <time.h>
7+#include <opusfile.h>
8+#include <math.h>
9+#include "c_utils.h"
10+#include "libavformat/avformat.h"
11+#include "libavcodec/avcodec.h"
12+
13+typedef struct {
14+ int version;
15+ int channels; /* Number of channels: 1..255 */
16+ int preskip;
17+ ogg_uint32_t input_sample_rate;
18+ int gain; /* in dB S7.8 should be zero whenever possible */
19+ int channel_mapping;
20+ /* The rest is only used if channel_mapping != 0 */
21+ int nb_streams;
22+ int nb_coupled;
23+ unsigned char stream_map[255];
24+} OpusHeader;
25+
26+typedef struct {
27+ unsigned char *data;
28+ int maxlen;
29+ int pos;
30+} Packet;
31+
32+typedef struct {
33+ const unsigned char *data;
34+ int maxlen;
35+ int pos;
36+} ROPacket;
37+
38+typedef struct {
39+ void *readdata;
40+ opus_int64 total_samples_per_channel;
41+ int rawmode;
42+ int channels;
43+ long rate;
44+ int gain;
45+ int samplesize;
46+ int endianness;
47+ char *infilename;
48+ int ignorelength;
49+ int skip;
50+ int extraout;
51+ char *comments;
52+ int comments_length;
53+ int copy_comments;
54+} oe_enc_opt;
55+
56+static int write_uint32(Packet *p, ogg_uint32_t val) {
57+ if (p->pos > p->maxlen - 4) {
58+ return 0;
59+ }
60+ p->data[p->pos ] = (val ) & 0xFF;
61+ p->data[p->pos+1] = (val>> 8) & 0xFF;
62+ p->data[p->pos+2] = (val>>16) & 0xFF;
63+ p->data[p->pos+3] = (val>>24) & 0xFF;
64+ p->pos += 4;
65+ return 1;
66+}
67+
68+static int write_uint16(Packet *p, ogg_uint16_t val) {
69+ if (p->pos > p->maxlen-2) {
70+ return 0;
71+ }
72+ p->data[p->pos ] = (val ) & 0xFF;
73+ p->data[p->pos+1] = (val>> 8) & 0xFF;
74+ p->pos += 2;
75+ return 1;
76+}
77+
78+static int write_chars(Packet *p, const unsigned char *str, int nb_chars)
79+{
80+ int i;
81+ if (p->pos>p->maxlen-nb_chars)
82+ return 0;
83+ for (i=0;i<nb_chars;i++)
84+ p->data[p->pos++] = str[i];
85+ return 1;
86+}
87+
88+static int read_uint32(ROPacket *p, ogg_uint32_t *val)
89+{
90+ if (p->pos>p->maxlen-4)
91+ return 0;
92+ *val = (ogg_uint32_t)p->data[p->pos ];
93+ *val |= (ogg_uint32_t)p->data[p->pos+1]<< 8;
94+ *val |= (ogg_uint32_t)p->data[p->pos+2]<<16;
95+ *val |= (ogg_uint32_t)p->data[p->pos+3]<<24;
96+ p->pos += 4;
97+ return 1;
98+}
99+
100+static int read_uint16(ROPacket *p, ogg_uint16_t *val)
101+{
102+ if (p->pos>p->maxlen-2)
103+ return 0;
104+ *val = (ogg_uint16_t)p->data[p->pos ];
105+ *val |= (ogg_uint16_t)p->data[p->pos+1]<<8;
106+ p->pos += 2;
107+ return 1;
108+}
109+
110+static int read_chars(ROPacket *p, unsigned char *str, int nb_chars)
111+{
112+ int i;
113+ if (p->pos>p->maxlen-nb_chars)
114+ return 0;
115+ for (i=0;i<nb_chars;i++)
116+ str[i] = p->data[p->pos++];
117+ return 1;
118+}
119+
120+int opus_header_to_packet(const OpusHeader *h, unsigned char *packet, int len) {
121+ int i;
122+ Packet p;
123+ unsigned char ch;
124+
125+ p.data = packet;
126+ p.maxlen = len;
127+ p.pos = 0;
128+ if (len < 19) {
129+ return 0;
130+ }
131+ if (!write_chars(&p, (const unsigned char *)"OpusHead", 8)) {
132+ return 0;
133+ }
134+
135+ ch = 1;
136+ if (!write_chars(&p, &ch, 1)) {
137+ return 0;
138+ }
139+
140+ ch = h->channels;
141+ if (!write_chars(&p, &ch, 1)) {
142+ return 0;
143+ }
144+
145+ if (!write_uint16(&p, h->preskip)) {
146+ return 0;
147+ }
148+
149+ if (!write_uint32(&p, h->input_sample_rate)) {
150+ return 0;
151+ }
152+
153+ if (!write_uint16(&p, h->gain)) {
154+ return 0;
155+ }
156+
157+ ch = h->channel_mapping;
158+ if (!write_chars(&p, &ch, 1)) {
159+ return 0;
160+ }
161+
162+ if (h->channel_mapping != 0) {
163+ ch = h->nb_streams;
164+ if (!write_chars(&p, &ch, 1)) {
165+ return 0;
166+ }
167+
168+ ch = h->nb_coupled;
169+ if (!write_chars(&p, &ch, 1)) {
170+ return 0;
171+ }
172+
173+ /* Multi-stream support */
174+ for (i = 0; i < h->channels; i++) {
175+ if (!write_chars(&p, &h->stream_map[i], 1)) {
176+ return 0;
177+ }
178+ }
179+ }
180+
181+ return p.pos;
182+}
183+
184+#define writeint(buf, base, val) do { buf[base + 3] = ((val) >> 24) & 0xff; \
185+buf[base + 2]=((val) >> 16) & 0xff; \
186+buf[base + 1]=((val) >> 8) & 0xff; \
187+buf[base] = (val) & 0xff; \
188+} while(0)
189+
190+static void comment_init(char **comments, int *length, const char *vendor_string) {
191+ // The 'vendor' field should be the actual encoding library used
192+ size_t vendor_length = strlen(vendor_string);
193+ int user_comment_list_length = 0;
194+ size_t len = 8 + 4 + vendor_length + 4;
195+ char *p = (char *)malloc(len);
196+ memcpy(p, "OpusTags", 8);
197+ writeint(p, 8, vendor_length);
198+ memcpy(p + 12, vendor_string, vendor_length);
199+ writeint(p, 12 + vendor_length, user_comment_list_length);
200+ *length = len;
201+ *comments = p;
202+}
203+
204+static void comment_pad(char **comments, int* length, size_t amount) {
205+ if (amount > 0) {
206+ char *p = *comments;
207+ // Make sure there is at least amount worth of padding free, and round up to the maximum that fits in the current ogg segments
208+ size_t newlen = (*length + amount + 255) / 255 * 255 - 1;
209+ p = realloc(p, newlen);
210+ for (int32_t i = *length; i < newlen; i++) {
211+ p[i] = 0;
212+ }
213+ *comments = p;
214+ *length = newlen;
215+ }
216+}
217+
218+static int writeOggPage(ogg_page *page, FILE *os) {
219+ int written = fwrite(page->header, sizeof(unsigned char), (size_t) page->header_len, os);
220+ written += fwrite(page->body, sizeof(unsigned char), (size_t) page->body_len, os);
221+ return written;
222+}
223+
224+opus_int32 bitrate = OPUS_BITRATE_MAX;
225+const opus_int32 frame_size = 960;
226+const int with_cvbr = 1;
227+const int max_ogg_delay = 0;
228+const int comment_padding = 512;
229+
230+opus_int32 rate = 48000;
231+opus_int32 coding_rate = 48000;
232+
233+ogg_int32_t _packetId;
234+OpusEncoder *_encoder = 0;
235+uint8_t *_packet = 0;
236+ogg_stream_state os;
237+const char *_filePath;
238+FILE *_fileOs = 0;
239+oe_enc_opt inopt;
240+OpusHeader header;
241+opus_int32 min_bytes;
242+int max_frame_bytes;
243+ogg_packet op;
244+ogg_page og;
245+opus_int64 bytes_written;
246+opus_int64 pages_out;
247+opus_int64 total_samples;
248+ogg_int64_t enc_granulepos;
249+ogg_int64_t last_granulepos;
250+int size_segments;
251+int last_segments;
252+int serialno;
253+
254+void cleanupRecorder() {
255+
256+ if (_fileOs) {
257+ while (ogg_stream_flush(&os, &og)) {
258+ writeOggPage(&og, _fileOs);
259+ }
260+ } else {
261+ ogg_stream_flush(&os, &og);
262+ }
263+
264+ if (_encoder) {
265+ opus_encoder_destroy(_encoder);
266+ _encoder = 0;
267+ }
268+
269+ ogg_stream_clear(&os);
270+
271+ if (_packet) {
272+ free(_packet);
273+ _packet = 0;
274+ }
275+
276+ if (_fileOs) {
277+ fclose(_fileOs);
278+ _fileOs = 0;
279+ }
280+
281+ _packetId = -1;
282+ bytes_written = 0;
283+ pages_out = 0;
284+ total_samples = 0;
285+ enc_granulepos = 0;
286+ size_segments = 0;
287+ last_segments = 0;
288+ last_granulepos = 0;
289+ if (_filePath) {
290+ free(_filePath);
291+ _filePath = 0;
292+ }
293+ memset(&os, 0, sizeof(ogg_stream_state));
294+ memset(&inopt, 0, sizeof(oe_enc_opt));
295+ memset(&header, 0, sizeof(OpusHeader));
296+ memset(&op, 0, sizeof(ogg_packet));
297+ memset(&og, 0, sizeof(ogg_page));
298+}
299+
300+int initRecorder(const char *path, opus_int32 sampleRate, opus_int32 bitrateParam) {
301+ cleanupRecorder();
302+
303+ coding_rate = sampleRate;
304+ rate = sampleRate;
305+ bitrate = bitrateParam;
306+
307+ if (!path) {
308+ LOGE("path is null");
309+ return 0;
310+ }
311+
312+ int length = strlen(path);
313+ _filePath = (char*) malloc(length + 1);
314+ strcpy(_filePath, path);
315+
316+ _fileOs = fopen(path, "w");
317+ if (!_fileOs) {
318+ LOGE("error cannot open file: %s", path);
319+ return 0;
320+ }
321+
322+ inopt.rate = rate;
323+ inopt.gain = 0;
324+ inopt.endianness = 0;
325+ inopt.copy_comments = 0;
326+ inopt.rawmode = 0;
327+ inopt.ignorelength = 0;
328+ inopt.samplesize = 16;
329+ inopt.channels = 1;
330+ inopt.skip = 0;
331+
332+ comment_init(&inopt.comments, &inopt.comments_length, opus_get_version_string());
333+
334+ if (rate != coding_rate) {
335+ LOGE("Invalid rate");
336+ return 0;
337+ }
338+
339+ header.channels = 1;
340+ header.channel_mapping = 0;
341+ header.input_sample_rate = rate;
342+ header.gain = inopt.gain;
343+ header.nb_streams = 1;
344+
345+ int result = OPUS_OK;
346+ _encoder = opus_encoder_create(coding_rate, 1, OPUS_APPLICATION_VOIP, &result);
347+ if (result != OPUS_OK) {
348+ LOGE("Error cannot create encoder: %s", opus_strerror(result));
349+ return 0;
350+ }
351+
352+ min_bytes = max_frame_bytes = (1275 * 3 + 7) * header.nb_streams;
353+ _packet = malloc(max_frame_bytes);
354+
355+ result = opus_encoder_ctl(_encoder, OPUS_SET_BITRATE(bitrate));
356+ //result = opus_encoder_ctl(_encoder, OPUS_SET_COMPLEXITY(10));
357+ if (result != OPUS_OK) {
358+ LOGE("Error OPUS_SET_BITRATE returned: %s", opus_strerror(result));
359+ return 0;
360+ }
361+
362+#ifdef OPUS_SET_LSB_DEPTH
363+ result = opus_encoder_ctl(_encoder, OPUS_SET_LSB_DEPTH(MAX(8, MIN(24, inopt.samplesize))));
364+ if (result != OPUS_OK) {
365+ LOGE("Warning OPUS_SET_LSB_DEPTH returned: %s", opus_strerror(result));
366+ }
367+#endif
368+
369+ opus_int32 lookahead;
370+ result = opus_encoder_ctl(_encoder, OPUS_GET_LOOKAHEAD(&lookahead));
371+ if (result != OPUS_OK) {
372+ LOGE("Error OPUS_GET_LOOKAHEAD returned: %s", opus_strerror(result));
373+ return 0;
374+ }
375+
376+ inopt.skip += lookahead;
377+ header.preskip = (int)(inopt.skip * (48000.0 / coding_rate));
378+ inopt.extraout = (int)(header.preskip * (rate / 48000.0));
379+
380+ if (ogg_stream_init(&os, serialno = rand()) == -1) {
381+ LOGE("Error: stream init failed");
382+ return 0;
383+ }
384+
385+ unsigned char header_data[100];
386+ int packet_size = opus_header_to_packet(&header, header_data, 100);
387+ op.packet = header_data;
388+ op.bytes = packet_size;
389+ op.b_o_s = 1;
390+ op.e_o_s = 0;
391+ op.granulepos = 0;
392+ op.packetno = 0;
393+ ogg_stream_packetin(&os, &op);
394+
395+ while ((result = ogg_stream_flush(&os, &og))) {
396+ if (!result) {
397+ break;
398+ }
399+
400+ int pageBytesWritten = writeOggPage(&og, _fileOs);
401+ if (pageBytesWritten != og.header_len + og.body_len) {
402+ LOGE("Error: failed writing header to output stream");
403+ return 0;
404+ }
405+ bytes_written += pageBytesWritten;
406+ pages_out++;
407+ }
408+
409+ comment_pad(&inopt.comments, &inopt.comments_length, comment_padding);
410+ op.packet = (unsigned char *)inopt.comments;
411+ op.bytes = inopt.comments_length;
412+ op.b_o_s = 0;
413+ op.e_o_s = 0;
414+ op.granulepos = 0;
415+ op.packetno = 1;
416+ ogg_stream_packetin(&os, &op);
417+
418+ while ((result = ogg_stream_flush(&os, &og))) {
419+ if (result == 0) {
420+ break;
421+ }
422+
423+ int writtenPageBytes = writeOggPage(&og, _fileOs);
424+ if (writtenPageBytes != og.header_len + og.body_len) {
425+ LOGE("Error: failed writing header to output stream");
426+ return 0;
427+ }
428+
429+ bytes_written += writtenPageBytes;
430+ pages_out++;
431+ }
432+
433+ free(inopt.comments);
434+
435+ return 1;
436+}
437+
438+int writeFrame(uint8_t *framePcmBytes, uint32_t frameByteCount, int end) {
439+ size_t cur_frame_size = frame_size;
440+ _packetId++;
441+
442+ opus_int32 nb_samples = frameByteCount / 2;
443+ total_samples += nb_samples;
444+ op.e_o_s = end;
445+
446+ int nbBytes = 0;
447+
448+ if (nb_samples != 0) {
449+ uint8_t *paddedFrameBytes = framePcmBytes;
450+ int freePaddedFrameBytes = 0;
451+
452+ if (nb_samples < cur_frame_size) {
453+ paddedFrameBytes = malloc(cur_frame_size * 2);
454+ freePaddedFrameBytes = 1;
455+ memcpy(paddedFrameBytes, framePcmBytes, frameByteCount);
456+ memset(paddedFrameBytes + nb_samples * 2, 0, cur_frame_size * 2 - nb_samples * 2);
457+ }
458+
459+ nbBytes = opus_encode(_encoder, (opus_int16 *)paddedFrameBytes, cur_frame_size, _packet, max_frame_bytes / 10);
460+ if (freePaddedFrameBytes) {
461+ free(paddedFrameBytes);
462+ }
463+
464+ if (nbBytes < 0) {
465+ LOGE("Encoding failed: %s. Aborting.", opus_strerror(nbBytes));
466+ return 0;
467+ }
468+
469+ enc_granulepos += cur_frame_size * 48000 / coding_rate;
470+ size_segments = (nbBytes + 255) / 255;
471+ min_bytes = MIN(nbBytes, min_bytes);
472+ }
473+
474+ while ((((size_segments <= 255) && (last_segments + size_segments > 255)) || (enc_granulepos - last_granulepos > max_ogg_delay)) && ogg_stream_flush_fill(&os, &og, 255 * 255)) {
475+ if (ogg_page_packets(&og) != 0) {
476+ last_granulepos = ogg_page_granulepos(&og);
477+ }
478+
479+ last_segments -= og.header[26];
480+ int writtenPageBytes = writeOggPage(&og, _fileOs);
481+ if (writtenPageBytes != og.header_len + og.body_len) {
482+ LOGE("Error: failed writing data to output stream");
483+ return 0;
484+ }
485+ bytes_written += writtenPageBytes;
486+ pages_out++;
487+ }
488+
489+ op.packet = _packet;
490+ op.bytes = nbBytes;
491+ op.b_o_s = 0;
492+ op.granulepos = enc_granulepos;
493+ if (op.e_o_s) {
494+ op.granulepos = ((total_samples * 48000 + rate - 1) / rate) + header.preskip;
495+ }
496+ op.packetno = 2 + _packetId;
497+ ogg_stream_packetin(&os, &op);
498+ last_segments += size_segments;
499+
500+ while ((op.e_o_s || (enc_granulepos + (frame_size * 48000 / coding_rate) - last_granulepos > max_ogg_delay) || (last_segments >= 255)) ? ogg_stream_flush_fill(&os, &og, 255 * 255) : ogg_stream_pageout_fill(&os, &og, 255 * 255)) {
501+ if (ogg_page_packets(&og) != 0) {
502+ last_granulepos = ogg_page_granulepos(&og);
503+ }
504+ last_segments -= og.header[26];
505+ int writtenPageBytes = writeOggPage(&og, _fileOs);
506+ if (writtenPageBytes != og.header_len + og.body_len) {
507+ LOGE("Error: failed writing data to output stream");
508+ return 0;
509+ }
510+ bytes_written += writtenPageBytes;
511+ pages_out++;
512+ }
513+
514+ return 1;
515+}
516+
517+JNIEXPORT jint Java_org_telegram_messenger_MediaController_startRecord(JNIEnv *env, jclass class, jstring path, jint sampleRate, jint bitrate) {
518+ const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
519+
520+ int32_t result = initRecorder(pathStr, sampleRate, bitrate);
521+
522+ if (pathStr != 0) {
523+ (*env)->ReleaseStringUTFChars(env, path, pathStr);
524+ }
525+
526+ return result;
527+}
528+
529+JNIEXPORT jint Java_org_telegram_messenger_MediaController_writeFrame(JNIEnv *env, jclass class, jobject frame, jint len) {
530+ jbyte *frameBytes = (*env)->GetDirectBufferAddress(env, frame);
531+ return writeFrame((uint8_t *) frameBytes, (uint32_t) len, len / 2 < frame_size);
532+}
533+
534+JNIEXPORT void Java_org_telegram_messenger_MediaController_stopRecord(JNIEnv *env, jclass class) {
535+ cleanupRecorder();
536+}
537+
538+JNIEXPORT jint Java_org_telegram_messenger_MediaController_isOpusFile(JNIEnv *env, jclass class, jstring path) {
539+ const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
540+
541+ int32_t result = 0;
542+
543+ int32_t error = OPUS_OK;
544+ OggOpusFile *file = op_test_file(pathStr, &error);
545+ if (file != NULL) {
546+ error = op_test_open(file);
547+ op_free(file);
548+ result = error == OPUS_OK;
549+ }
550+
551+ if (pathStr != 0) {
552+ (*env)->ReleaseStringUTFChars(env, path, pathStr);
553+ }
554+
555+ return result;
556+}
557+
558+static inline void set_bits(uint8_t *bytes, int32_t bitOffset, int32_t value) {
559+ bytes += bitOffset / 8;
560+ bitOffset %= 8;
561+
562+ uint16_t bits = (uint16_t) (value << bitOffset);
563+ bytes[0] |= (uint8_t) bits;
564+ bytes[1] |= (uint8_t) (bits >> 8);
565+}
566+
567+JNIEXPORT jbyteArray Java_org_telegram_messenger_MediaController_getWaveform2(JNIEnv *env, jclass class, jshortArray array, jint length) {
568+
569+ jshort *sampleBuffer = (*env)->GetShortArrayElements(env, array, 0);
570+ if (sampleBuffer == NULL) {
571+ return NULL;
572+ }
573+
574+ const int32_t resultSamples = 100;
575+ uint16_t *samples = calloc(resultSamples, sizeof(uint16_t));
576+ if (samples == NULL) {
577+ (*env)->ReleaseShortArrayElements(env, array, sampleBuffer, JNI_ABORT);
578+ return NULL;
579+ }
580+ uint64_t sampleIndex = 0;
581+ uint16_t peakSample = 0;
582+ int32_t sampleRate = (int32_t) MAX(1, length / resultSamples);
583+ int32_t index = 0;
584+
585+ for (int32_t i = 0; i < length; i++) {
586+ uint16_t sample = (uint16_t) abs(sampleBuffer[i]);
587+ if (sample > peakSample) {
588+ peakSample = sample;
589+ }
590+ if (sampleIndex++ % sampleRate == 0) {
591+ if (index < resultSamples) {
592+ samples[index++] = peakSample;
593+ }
594+ peakSample = 0;
595+ }
596+ }
597+
598+ int64_t sumSamples = 0;
599+ for (int32_t i = 0; i < resultSamples; i++) {
600+ sumSamples += samples[i];
601+ }
602+ uint16_t peak = (uint16_t) (sumSamples * 1.8f / resultSamples);
603+ if (peak < 2500) {
604+ peak = 2500;
605+ }
606+
607+ for (int32_t i = 0; i < resultSamples; i++) {
608+ uint16_t sample = (uint16_t) ((int64_t) samples[i]);
609+ if (sample > peak) {
610+ samples[i] = peak;
611+ }
612+ }
613+
614+ (*env)->ReleaseShortArrayElements(env, array, sampleBuffer, JNI_ABORT);
615+
616+ uint32_t bitstreamLength = resultSamples * 5 / 8 + 1;
617+ jbyteArray result = (*env)->NewByteArray(env, bitstreamLength);
618+ if (result) {
619+ uint8_t *bytes = calloc(bitstreamLength + 4, 1);
620+ if (bytes != NULL) {
621+ for (int32_t i = 0; i < resultSamples; i++) {
622+ int32_t value = MIN(31, abs((int32_t) samples[i]) * 31 / peak);
623+ set_bits(bytes, i * 5, value & 31);
624+ }
625+ (*env)->SetByteArrayRegion(env, result, 0, bitstreamLength, (jbyte *) bytes);
626+ free(bytes);
627+ } else {
628+ result = NULL;
629+ }
630+ }
631+ free(samples);
632+
633+ return result;
634+}
635+
636+int16_t *sampleBuffer = NULL;
637+
638+JNIEXPORT jbyteArray Java_org_telegram_messenger_MediaController_getWaveform(JNIEnv *env, jclass class, jstring path) {
639+ const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
640+ if (pathStr == NULL) {
641+ return NULL;
642+ }
643+ jbyteArray result = 0;
644+
645+ int error = OPUS_OK;
646+ OggOpusFile *opusFile = op_open_file(pathStr, &error);
647+ if (opusFile != NULL && error == OPUS_OK) {
648+ int64_t totalSamples = op_pcm_total(opusFile, -1);
649+ const uint32_t resultSamples = 100;
650+ int32_t sampleRate = MAX(1, (int32_t) (totalSamples / resultSamples));
651+
652+ uint16_t *samples = calloc(resultSamples, sizeof(uint16_t));
653+
654+ size_t bufferSize = 1024 * 128;
655+ if (sampleBuffer == NULL) {
656+ sampleBuffer = malloc(bufferSize);
657+ }
658+
659+ if (samples != NULL && sampleBuffer != NULL) {
660+ uint64_t sampleIndex = 0;
661+ uint16_t peakSample = 0;
662+
663+ int32_t index = 0;
664+ int decodeFailed = 0;
665+
666+ while (1) {
667+ int readSamples = op_read(opusFile, sampleBuffer, bufferSize / 2, NULL);
668+ if (readSamples < 0) {
669+ LOGE("getWaveform: op_read failed: %d", readSamples);
670+ decodeFailed = 1;
671+ break;
672+ }
673+ if (readSamples == 0) {
674+ break;
675+ }
676+ for (int32_t i = 0; i < readSamples; i++) {
677+ uint16_t sample = (uint16_t) abs(sampleBuffer[i]);
678+ if (sample > peakSample) {
679+ peakSample = sample;
680+ }
681+ if (sampleIndex++ % sampleRate == 0) {
682+ if (index < resultSamples) {
683+ samples[index++] = peakSample;
684+ }
685+ peakSample = 0;
686+ }
687+ }
688+ }
689+
690+ if (!decodeFailed) {
691+ int64_t sumSamples = 0;
692+ for (int32_t i = 0; i < resultSamples; i++) {
693+ sumSamples += samples[i];
694+ }
695+ uint16_t peak = (uint16_t) (sumSamples * 1.8f / resultSamples);
696+ if (peak < 2500) {
697+ peak = 2500;
698+ }
699+
700+ for (int32_t i = 0; i < resultSamples; i++) {
701+ uint16_t sample = (uint16_t) ((int64_t) samples[i]);
702+ if (sample > peak) {
703+ samples[i] = peak;
704+ }
705+ }
706+
707+ uint32_t bitstreamLength = (resultSamples * 5) / 8 + 1;
708+ result = (*env)->NewByteArray(env, bitstreamLength);
709+ if (result) {
710+ uint8_t *bytes = calloc(bitstreamLength + 4, 1);
711+ if (bytes != NULL) {
712+ for (int32_t i = 0; i < resultSamples; i++) {
713+ int32_t value = MIN(31, abs((int32_t) samples[i]) * 31 / peak);
714+ set_bits(bytes, i * 5, value & 31);
715+ }
716+
717+ (*env)->SetByteArrayRegion(env, result, 0, bitstreamLength, (jbyte *) bytes);
718+ free(bytes);
719+ } else {
720+ result = NULL;
721+ }
722+ }
723+ }
724+ }
725+
726+ free(samples);
727+ op_free(opusFile);
728+ }
729+
730+ (*env)->ReleaseStringUTFChars(env, path, pathStr);
731+ return result;
732+}
733+
734+JNIEXPORT void JNICALL Java_org_telegram_ui_Stories_recorder_FfmpegAudioWaveformLoader_init(JNIEnv *env, jobject obj, jstring pathJStr, jint count) {
735+ const char *path = (*env)->GetStringUTFChars(env, pathJStr, 0);
736+ if (path == NULL) {
737+ return;
738+ }
739+ if (count <= 0) {
740+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
741+ return;
742+ }
743+
744+ AVFormatContext *formatContext = avformat_alloc_context();
745+ if (!formatContext) {
746+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
747+ return;
748+ }
749+
750+ int res;
751+ if ((res = avformat_open_input(&formatContext, path, NULL, NULL)) != 0) {
752+ LOGD("avformat_open_input error %s", av_err2str(res));
753+ avformat_free_context(formatContext);
754+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
755+ return;
756+ }
757+
758+ if (avformat_find_stream_info(formatContext, NULL) < 0) {
759+ avformat_close_input(&formatContext);
760+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
761+ return;
762+ }
763+
764+ AVCodec *codec = NULL;
765+ int audioStreamIndex = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
766+ if (audioStreamIndex < 0 || codec == NULL) {
767+ LOGD("av_find_best_stream error %s", av_err2str(audioStreamIndex));
768+ avformat_close_input(&formatContext);
769+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
770+ return;
771+ }
772+
773+ AVCodecContext *codecContext = avcodec_alloc_context3(codec);
774+ if (codecContext == NULL) {
775+ avformat_close_input(&formatContext);
776+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
777+ return;
778+ }
779+ if (avcodec_parameters_to_context(codecContext, formatContext->streams[audioStreamIndex]->codecpar) < 0) {
780+ avcodec_free_context(&codecContext);
781+ avformat_close_input(&formatContext);
782+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
783+ return;
784+ }
785+
786+ int64_t duration_in_microseconds = formatContext->duration;
787+ double duration_in_seconds = (double)duration_in_microseconds / AV_TIME_BASE;
788+
789+ if (avcodec_open2(codecContext, codec, NULL) < 0) {
790+ avcodec_free_context(&codecContext);
791+ avformat_close_input(&formatContext);
792+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
793+ return;
794+ }
795+
796+ jclass cls = (*env)->GetObjectClass(env, obj);
797+ jmethodID mid = (*env)->GetMethodID(env, cls, "receiveChunk", "([SI)V");
798+
799+ AVFrame *frame = av_frame_alloc();
800+ if (frame == NULL) {
801+ avcodec_free_context(&codecContext);
802+ avformat_close_input(&formatContext);
803+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
804+ return;
805+ }
806+ AVPacket packet;
807+
808+ int sampleRate = codecContext->sample_rate;
809+ int skip = 4;
810+ int barWidth = (int) round((double) duration_in_seconds * sampleRate / count / (1 + skip));
811+
812+ int channels = codecContext->ch_layout.nb_channels;
813+ if (channels <= 0) {
814+ av_frame_free(&frame);
815+ avcodec_free_context(&codecContext);
816+ avformat_close_input(&formatContext);
817+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
818+ return;
819+ }
820+
821+ short peak = 0;
822+ int currentCount = 0;
823+ int index = 0;
824+ int chunkIndex = 0;
825+ short waveformChunkData[32] = {0};
826+
827+ while (av_read_frame(formatContext, &packet) >= 0) {
828+ if (packet.stream_index == audioStreamIndex) {
829+ int response = avcodec_send_packet(codecContext, &packet);
830+
831+ while (response >= 0) {
832+ response = avcodec_receive_frame(codecContext, frame);
833+ if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
834+ break;
835+ } else if (response < 0) {
836+ break;
837+ }
838+
839+ const int is_planar = av_sample_fmt_is_planar(codecContext->sample_fmt);
840+ const int sample_size = av_get_bytes_per_sample(codecContext->sample_fmt);
841+ for (int i = 0; i < frame->nb_samples; i++) {
842+ int sum = 0;
843+ for (int channel = 0; channel < channels; channel++) {
844+ uint8_t *data;
845+ if (is_planar) {
846+ data = frame->data[channel] + i * sample_size;
847+ } else {
848+ data = frame->data[0] + (i * channels + channel) * sample_size;
849+ }
850+ short sample_value = 0;
851+ switch (codecContext->sample_fmt) {
852+ case AV_SAMPLE_FMT_S16:
853+ case AV_SAMPLE_FMT_S16P:
854+ sample_value = *(int16_t *)data;
855+ break;
856+
857+ case AV_SAMPLE_FMT_FLT:
858+ case AV_SAMPLE_FMT_FLTP:
859+ sample_value = (short)(*(float *)data * 32767.0f);
860+ break;
861+
862+ case AV_SAMPLE_FMT_U8:
863+ case AV_SAMPLE_FMT_U8P:
864+ sample_value = (*(uint8_t *)data - 128) * 256;
865+ break;
866+
867+ default:
868+ break;
869+ }
870+ sum += sample_value;
871+ }
872+ short value = sum / channels;
873+
874+ if (currentCount >= barWidth) {
875+ waveformChunkData[index - chunkIndex] = peak;
876+ index++;
877+ if (index - chunkIndex >= sizeof(waveformChunkData) / sizeof(short) || index >= count) {
878+ jshortArray waveformData = (*env)->NewShortArray(env, sizeof(waveformChunkData) / sizeof(short));
879+ if (waveformData == NULL) {
880+ break;
881+ }
882+ (*env)->SetShortArrayRegion(env, waveformData, 0, sizeof(waveformChunkData) / sizeof(short), waveformChunkData);
883+ (*env)->CallVoidMethod(env, obj, mid, waveformData, sizeof(waveformChunkData) / sizeof(short));
884+
885+ memset(waveformChunkData, 0, sizeof(waveformChunkData));
886+ chunkIndex = index;
887+
888+ (*env)->DeleteLocalRef(env, waveformData);
889+ }
890+ peak = 0;
891+ currentCount = 0;
892+ if (index >= count) {
893+ break;
894+ }
895+ }
896+
897+ if (peak < value) {
898+ peak = value;
899+ }
900+ currentCount++;
901+
902+ i += skip;
903+ if (i >= frame->nb_samples) {
904+ break;
905+ }
906+ }
907+ }
908+ }
909+
910+ av_packet_unref(&packet);
911+
912+ if (index >= count) {
913+ break;
914+ }
915+
916+ jfieldID fid = (*env)->GetFieldID(env, cls, "running", "Z");
917+ jboolean running = (*env)->GetBooleanField(env, obj, fid);
918+ if (running == JNI_FALSE) {
919+ break;
920+ }
921+ }
922+
923+ av_frame_free(&frame);
924+ avcodec_free_context(&codecContext);
925+ avformat_close_input(&formatContext);
926+
927+ (*env)->ReleaseStringUTFChars(env, pathJStr, path);
928+}
929+
930+int cropOpusAudio(const char *inputPath, const char *outputPath, float startTimeMs, float endTimeMs) {
931+ int error;
932+ OggOpusFile *opusFile = op_open_file(inputPath, &error);
933+ if (!opusFile || error != OPUS_OK) {
934+ LOGE("Failed to open input opus file: %s", opus_strerror(error));
935+ return 0;
936+ }
937+
938+ const OpusHead *head = op_head(opusFile, -1);
939+ if (!head) {
940+ LOGE("Failed to read Opus header");
941+ op_free(opusFile);
942+ return 0;
943+ }
944+
945+ int channels = head->channel_count;
946+ opus_int64 total_source_samples = op_pcm_total(opusFile, -1);
947+ if (total_source_samples < 0) {
948+ LOGE("Failed to get source sample count: %lld", (long long) total_source_samples);
949+ op_free(opusFile);
950+ return 0;
951+ }
952+
953+ opus_int32 rate = 48000;
954+
955+ opus_int64 start_sample = MAX(0, MIN(total_source_samples, (opus_int64) ((startTimeMs / 1000.0) * rate)));
956+ opus_int64 end_sample = MAX(0, MIN(total_source_samples, (opus_int64) ((endTimeMs / 1000.0) * rate)));
957+ opus_int64 crop_length = end_sample - start_sample;
958+
959+ if (start_sample >= total_source_samples || end_sample > total_source_samples || start_sample >= end_sample) {
960+ LOGE("Invalid crop range");
961+ op_free(opusFile);
962+ return 0;
963+ }
964+
965+ if (op_pcm_seek(opusFile, start_sample) != 0) {
966+ LOGE("Failed to seek to start sample");
967+ op_free(opusFile);
968+ return 0;
969+ }
970+
971+ if (!initRecorder(outputPath, rate, OPUS_BITRATE_MAX)) {
972+ LOGE("Failed to init recorder");
973+ op_free(opusFile);
974+ return 0;
975+ }
976+
977+ int16_t *buffer = malloc(sizeof(int16_t) * frame_size * channels);
978+ if (!buffer) {
979+ LOGE("Out of memory");
980+ cleanupRecorder();
981+ op_free(opusFile);
982+ return 0;
983+ }
984+
985+ int success = 1;
986+ opus_int64 remaining_samples = crop_length;
987+ while (remaining_samples > 0) {
988+ int max_samples = (int) MIN(960, remaining_samples / channels);
989+ if (max_samples <= 0) {
990+ break;
991+ }
992+ int samples_read = op_read(opusFile, buffer, max_samples * channels, NULL);
993+ if (samples_read < 0) {
994+ LOGE("Decoding error from op_read(): %d", samples_read);
995+ success = 0;
996+ break;
997+ }
998+ if (samples_read == 0) {
999+ break;
1000+ }
1001+ remaining_samples -= samples_read;
1002+
1003+ int end = remaining_samples <= 0;
1004+
1005+ size_t byte_count = samples_read * sizeof(int16_t);
1006+ if (!writeFrame((uint8_t *)buffer, byte_count, end)) {
1007+ LOGE("Failed to write frame");
1008+ success = 0;
1009+ break;
1010+ }
1011+ }
1012+
1013+ free(buffer);
1014+ cleanupRecorder();
1015+ op_free(opusFile);
1016+
1017+ return success;
1018+}
1019+
1020+int append_stream(OggOpusFile *of, int16_t* buffer, int channels, int is_last) {
1021+ opus_int64 total_source_samples = op_pcm_total(of, -1);
1022+ if (total_source_samples < 0) {
1023+ LOGE("Failed to get source sample count: %lld",(long long) total_source_samples);
1024+ return 0;
1025+ }
1026+
1027+ while (total_source_samples > 0) {
1028+ int samples_read = op_read(of, buffer, frame_size, NULL);
1029+ if (samples_read < 0) {
1030+ LOGE("Decoding error from op_read(): %d", samples_read);
1031+ return 0;
1032+ }
1033+ if (samples_read == 0) {
1034+ break;
1035+ }
1036+ total_source_samples -= samples_read;
1037+ size_t byte_count = (size_t) samples_read * channels * sizeof(int16_t);
1038+ if (!writeFrame((uint8_t*) buffer, byte_count, is_last && total_source_samples <= 0)) {
1039+ LOGE("Failed to write encoded frame");
1040+ return 0;
1041+ }
1042+ }
1043+ return 1;
1044+}
1045+
1046+int joinOpusAudios(const char* file1, const char* file2, const char* dest) {
1047+ int error;
1048+ OggOpusFile *opusFile1 = op_open_file(file1, &error);
1049+ if (!opusFile1 || error != OPUS_OK) {
1050+ LOGE("Failed to open input opus file1: %s", opus_strerror(error));
1051+ return 0;
1052+ }
1053+ OggOpusFile *opusFile2 = op_open_file(file2, &error);
1054+ if (!opusFile2 || error != OPUS_OK) {
1055+ LOGE("Failed to open input opus file2: %s", opus_strerror(error));
1056+ if (opusFile2 != NULL) {
1057+ op_free(opusFile2);
1058+ }
1059+ op_free(opusFile1);
1060+ return 0;
1061+ }
1062+
1063+ const OpusHead *head1 = op_head(opusFile1, -1);
1064+ if (!head1) {
1065+ LOGE("Failed to read Opus header");
1066+ op_free(opusFile1);
1067+ op_free(opusFile2);
1068+ return 0;
1069+ }
1070+ const OpusHead *head2 = op_head(opusFile2, -1);
1071+ if (!head2) {
1072+ LOGE("Failed to read Opus header");
1073+ op_free(opusFile1);
1074+ op_free(opusFile2);
1075+ return 0;
1076+ }
1077+
1078+ int channels = MIN(head1->channel_count, head2->channel_count);
1079+ opus_int32 rate = 48000;
1080+
1081+ if (!initRecorder(dest, rate, OPUS_BITRATE_MAX)) {
1082+ LOGE("Failed to init recorder");
1083+ op_free(opusFile1);
1084+ op_free(opusFile2);
1085+ return 0;
1086+ }
1087+
1088+ int16_t *buffer = malloc(sizeof(int16_t) * frame_size * channels);
1089+ if (!buffer) {
1090+ LOGE("Out of memory");
1091+ cleanupRecorder();
1092+ op_free(opusFile1);
1093+ op_free(opusFile2);
1094+ return 0;
1095+ }
1096+
1097+ int success = append_stream(opusFile1, buffer, channels, 0);
1098+ if (success) {
1099+ success = append_stream(opusFile2, buffer, channels, 1);
1100+ }
1101+
1102+ free(buffer);
1103+ cleanupRecorder();
1104+ op_free(opusFile1);
1105+ op_free(opusFile2);
1106+
1107+ return success;
1108+}
1109+
1110+JNIEXPORT jboolean Java_org_telegram_messenger_MediaController_cropOpusFile(JNIEnv *env, jclass class, jstring src, jstring dst, jlong startMs, jlong endMs) {
1111+ const char* srcStr = (*env)->GetStringUTFChars(env, src, 0);
1112+ const char* dstStr = (*env)->GetStringUTFChars(env, dst, 0);
1113+ int result = cropOpusAudio(srcStr, dstStr, startMs, endMs);
1114+ (*env)->ReleaseStringUTFChars(env, src, srcStr);
1115+ (*env)->ReleaseStringUTFChars(env, dst, dstStr);
1116+ return result == 1;
1117+}
1118+
1119+JNIEXPORT jboolean Java_org_telegram_messenger_MediaController_joinOpusFiles(JNIEnv* env, jclass class, jstring file1, jstring file2, jstring dest) {
1120+ const char* file1Str = (*env)->GetStringUTFChars(env, file1, 0);
1121+ const char* file2Str = (*env)->GetStringUTFChars(env, file2, 0);
1122+ const char* destStr = (*env)->GetStringUTFChars(env, dest, 0);
1123+ int result = joinOpusAudios(file1Str, file2Str, destStr);
1124+ (*env)->ReleaseStringUTFChars(env, file1, file1Str);
1125+ (*env)->ReleaseStringUTFChars(env, file2, file2Str);
1126+ (*env)->ReleaseStringUTFChars(env, dest, destStr);
1127+ return result == 1;
1128+}
TMessagesProj/jni/c_utils.hnew file+27
@@ -0,0 +1,27 @@
1+#ifndef log_h
2+#define log_h
3+
4+#include <android/log.h>
5+#include <jni.h>
6+
7+#define LOG_TAG "tmessages_native"
8+#ifndef LOG_DISABLED
9+#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
10+#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
11+#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
12+#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
13+#else
14+#define LOGI(...)
15+#define LOGD(...)
16+#define LOGE(...)
17+#define LOGV(...)
18+#endif
19+
20+#ifndef MAX
21+#define MAX(x, y) ((x) > (y)) ? (x) : (y)
22+#endif
23+#ifndef MIN
24+#define MIN(x, y) ((x) < (y)) ? (x) : (y)
25+#endif
26+
27+#endif
TMessagesProj/jni/exports.mapnew file+8
@@ -0,0 +1,8 @@
1+{
2+ global:
3+ Java_*; # all JNI functions resolved by name
4+ JNI_OnLoad;
5+ JNI_OnUnload;
6+ local:
7+ *; # hide everything else (FFmpeg, libyuv, webrtc, ...)
8+};
TMessagesProj/jni/fast-edge.cppnew file+550
@@ -0,0 +1,550 @@
1+/*
2+ FAST-EDGE
3+ Copyright (c) 2009 Benjamin C. Haynor
4+
5+ Permission is hereby granted, free of charge, to any person
6+ obtaining a copy of this software and associated documentation
7+ files (the "Software"), to deal in the Software without
8+ restriction, including without limitation the rights to use,
9+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10+ copies of the Software, and to permit persons to whom the
11+ Software is furnished to do so, subject to the following
12+ conditions:
13+
14+ The above copyright notice and this permission notice shall be
15+ included in all copies or substantial portions of the Software.
16+
17+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+ OTHER DEALINGS IN THE SOFTWARE.
25+*/
26+
27+#include <stdio.h>
28+#include <stdlib.h>
29+#include <string.h>
30+#include <math.h>
31+#include <time.h>
32+#include "fast-edge.h"
33+
34+#define LOW_THRESHOLD_PERCENTAGE 0.8 // percentage of the high threshold value that the low threshold shall be set at
35+#define PI 3.14159265
36+#define HIGH_THRESHOLD_PERCENTAGE 0.10 // percentage of pixels that meet the high threshold - for example 0.15 will ensure that at least 15% of edge pixels are considered to meet the high threshold
37+
38+#define min(X,Y) ((X) < (Y) ? (X) : (Y))
39+#define max(X,Y) ((X) < (Y) ? (Y) : (X))
40+
41+namespace ocr{
42+/*
43+ CANNY EDGE DETECT
44+ DOES NOT PERFORM NOISE REDUCTION - PERFORM NOISE REDUCTION PRIOR TO USE
45+ Noise reduction omitted, as some applications benefit from morphological operations such as opening or closing as opposed to Gaussian noise reduction
46+ If your application always takes the same size input image, uncomment the definitions of WIDTH and HEIGHT in the header file and define them to the size of your input image,
47+ otherwise the required intermediate arrays will be dynamically allocated.
48+ If WIDTH and HEIGHT are defined, the arrays will be allocated in the compiler directive that follows:
49+*/
50+#ifdef WIDTH
51+int g[WIDTH * HEIGHT], dir[WIDTH * HEIGHT] = {0};
52+unsigned char img_scratch_data[WIDTH * HEIGHT] = {0};
53+#endif
54+void canny_edge_detect(struct image * img_in, struct image * img_out) {
55+ struct image img_scratch;
56+ int high, low;
57+ #ifndef WIDTH
58+ int * g = (int*)calloc(static_cast<size_t>(img_in->width*img_in->height), sizeof(int));
59+ int * dir = (int*)calloc(static_cast<size_t>(img_in->width*img_in->height), sizeof(int));
60+ unsigned char * img_scratch_data = (unsigned char*)calloc(static_cast<size_t>(img_in->width*img_in->height), sizeof(char));
61+ #endif
62+ img_scratch.width = img_in->width;
63+ img_scratch.height = img_in->height;
64+ img_scratch.pixel_data = img_scratch_data;
65+ calc_gradient_sobel(img_in, g, dir);
66+ //printf("*** performing non-maximum suppression ***\n");
67+ non_max_suppression(&img_scratch, g, dir);
68+ estimate_threshold(&img_scratch, &high, &low);
69+ hysteresis(high, low, &img_scratch, img_out);
70+ #ifndef WIDTH
71+ free(g);
72+ free(dir);
73+ free(img_scratch_data);
74+ #endif
75+}
76+
77+/*
78+ GAUSSIAN_NOISE_ REDUCE
79+ apply 5x5 Gaussian convolution filter, shrinks the image by 4 pixels in each direction, using Gaussian filter found here:
80+ http://en.wikipedia.org/wiki/Canny_edge_detector
81+*/
82+void gaussian_noise_reduce(struct image * img_in, struct image * img_out)
83+{
84+ #ifdef CLOCK
85+ clock_t start = clock();
86+ #endif
87+ int w, h, x, y, max_x, max_y;
88+ w = img_in->width;
89+ h = img_in->height;
90+ img_out->width = w;
91+ img_out->height = h;
92+ max_x = w - 2;
93+ max_y = w * (h - 2);
94+ for (y = w * 2; y < max_y; y += w) {
95+ for (x = 2; x < max_x; x++) {
96+ img_out->pixel_data[x + y] = (2 * img_in->pixel_data[x + y - 2 - w - w] +
97+ 4 * img_in->pixel_data[x + y - 1 - w - w] +
98+ 5 * img_in->pixel_data[x + y - w - w] +
99+ 4 * img_in->pixel_data[x + y + 1 - w - w] +
100+ 2 * img_in->pixel_data[x + y + 2 - w - w] +
101+ 4 * img_in->pixel_data[x + y - 2 - w] +
102+ 9 * img_in->pixel_data[x + y - 1 - w] +
103+ 12 * img_in->pixel_data[x + y - w] +
104+ 9 * img_in->pixel_data[x + y + 1 - w] +
105+ 4 * img_in->pixel_data[x + y + 2 - w] +
106+ 5 * img_in->pixel_data[x + y - 2] +
107+ 12 * img_in->pixel_data[x + y - 1] +
108+ 15 * img_in->pixel_data[x + y] +
109+ 12 * img_in->pixel_data[x + y + 1] +
110+ 5 * img_in->pixel_data[x + y + 2] +
111+ 4 * img_in->pixel_data[x + y - 2 + w] +
112+ 9 * img_in->pixel_data[x + y - 1 + w] +
113+ 12 * img_in->pixel_data[x + y + w] +
114+ 9 * img_in->pixel_data[x + y + 1 + w] +
115+ 4 * img_in->pixel_data[x + y + 2 + w] +
116+ 2 * img_in->pixel_data[x + y - 2 + w + w] +
117+ 4 * img_in->pixel_data[x + y - 1 + w + w] +
118+ 5 * img_in->pixel_data[x + y + w + w] +
119+ 4 * img_in->pixel_data[x + y + 1 + w + w] +
120+ 2 * img_in->pixel_data[x + y + 2 + w + w]) / 159;
121+ }
122+ }
123+ #ifdef CLOCK
124+ printf("Gaussian noise reduction - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
125+ #endif
126+}
127+
128+/*
129+ CALC_GRADIENT_SOBEL
130+ calculates the result of the Sobel operator - http://en.wikipedia.org/wiki/Sobel_operator - and estimates edge direction angle
131+*/
132+/*void calc_gradient_sobel(struct image * img_in, int g_x[], int g_y[], int g[], int dir[]) {//float theta[]) {*/
133+void calc_gradient_sobel(struct image * img_in, int g[], int dir[]) {
134+ #ifdef CLOCK
135+ clock_t start = clock();
136+ #endif
137+ int w, h, x, y, max_x, max_y, g_x, g_y;
138+ float g_div;
139+ w = img_in->width;
140+ h = img_in->height;
141+ max_x = w - 3;
142+ max_y = w * (h - 3);
143+ for (y = w * 3; y < max_y; y += w) {
144+ for (x = 3; x < max_x; x++) {
145+ g_x = (2 * img_in->pixel_data[x + y + 1]
146+ + img_in->pixel_data[x + y - w + 1]
147+ + img_in->pixel_data[x + y + w + 1]
148+ - 2 * img_in->pixel_data[x + y - 1]
149+ - img_in->pixel_data[x + y - w - 1]
150+ - img_in->pixel_data[x + y + w - 1]);
151+ g_y = 2 * img_in->pixel_data[x + y - w]
152+ + img_in->pixel_data[x + y - w + 1]
153+ + img_in->pixel_data[x + y - w - 1]
154+ - 2 * img_in->pixel_data[x + y + w]
155+ - img_in->pixel_data[x + y + w + 1]
156+ - img_in->pixel_data[x + y + w - 1];
157+ #ifndef ABS_APPROX
158+ g[x + y] = sqrt(g_x * g_x + g_y * g_y);
159+ #endif
160+ #ifdef ABS_APPROX
161+ g[x + y] = abs(g_x[x + y]) + abs(g_y[x + y]);
162+ #endif
163+ if (g_x == 0) {
164+ dir[x + y] = 2;
165+ } else {
166+ g_div = g_y / (float) g_x;
167+ /* the following commented-out code is slightly faster than the code that follows, but is a slightly worse approximation for determining the edge direction angle
168+ if (g_div < 0) {
169+ if (g_div < -1) {
170+ dir[n] = 0;
171+ } else {
172+ dir[n] = 1;
173+ }
174+ } else {
175+ if (g_div > 1) {
176+ dir[n] = 0;
177+ } else {
178+ dir[n] = 3;
179+ }
180+ }
181+ */
182+ if (g_div < 0) {
183+ if (g_div < -2.41421356237) {
184+ dir[x + y] = 0;
185+ } else {
186+ if (g_div < -0.414213562373) {
187+ dir[x + y] = 1;
188+ } else {
189+ dir[x + y] = 2;
190+ }
191+ }
192+ } else {
193+ if (g_div > 2.41421356237) {
194+ dir[x + y] = 0;
195+ } else {
196+ if (g_div > 0.414213562373) {
197+ dir[x + y] = 3;
198+ } else {
199+ dir[x + y] = 2;
200+ }
201+ }
202+ }
203+ }
204+ }
205+
206+ }
207+ #ifdef CLOCK
208+ printf("Calculate gradient Sobel - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
209+ #endif
210+}
211+
212+/*
213+ CALC_GRADIENT_SCHARR
214+ calculates the result of the Scharr version of the Sobel operator - http://en.wikipedia.org/wiki/Sobel_operator - and estimates edge direction angle
215+ may have better rotational symmetry
216+*/
217+void calc_gradient_scharr(struct image * img_in, int g_x[], int g_y[], int g[], int dir[]) {//float theta[]) {
218+ #ifdef CLOCK
219+ clock_t start = clock();
220+ #endif
221+ int w, h, x, y, max_x, max_y, n;
222+ float g_div;
223+ w = img_in->width;
224+ h = img_in->height;
225+ max_x = w - 1;
226+ max_y = w * (h - 1);
227+ n = 0;
228+ for (y = w; y < max_y; y += w) {
229+ for (x = 1; x < max_x; x++) {
230+ g_x[n] = (10 * img_in->pixel_data[x + y + 1]
231+ + 3 * img_in->pixel_data[x + y - w + 1]
232+ + 3 * img_in->pixel_data[x + y + w + 1]
233+ - 10 * img_in->pixel_data[x + y - 1]
234+ - 3 * img_in->pixel_data[x + y - w - 1]
235+ - 3 * img_in->pixel_data[x + y + w - 1]);
236+ g_y[n] = 10 * img_in->pixel_data[x + y - w]
237+ + 3 * img_in->pixel_data[x + y - w + 1]
238+ + 3 * img_in->pixel_data[x + y - w - 1]
239+ - 10 * img_in->pixel_data[x + y + w]
240+ - 3 * img_in->pixel_data[x + y + w + 1]
241+ - 3 * img_in->pixel_data[x + y + w - 1];
242+ #ifndef ABS_APPROX
243+ g[n] = sqrt(g_x[n] * g_x[n] + g_y[n] * g_y[n]);
244+ #endif
245+ #ifdef ABS_APPROX
246+ g[n] = abs(g_x[n]) + abs(g_y[n]);
247+ #endif
248+ if (g_x[n] == 0) {
249+ dir[n] = 2;
250+ } else {
251+ g_div = g_y[n] / (float) g_x[n];
252+ if (g_div < 0) {
253+ if (g_div < -2.41421356237) {
254+ dir[n] = 0;
255+ } else {
256+ if (g_div < -0.414213562373) {
257+ dir[n] = 1;
258+ } else {
259+ dir[n] = 2;
260+ }
261+ }
262+ } else {
263+ if (g_div > 2.41421356237) {
264+ dir[n] = 0;
265+ } else {
266+ if (g_div > 0.414213562373) {
267+ dir[n] = 3;
268+ } else {
269+ dir[n] = 2;
270+ }
271+ }
272+ }
273+ }
274+ n++;
275+ }
276+ }
277+ #ifdef CLOCK
278+ printf("Calculate gradient Scharr - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
279+ #endif
280+}
281+/*
282+ NON_MAX_SUPPRESSION
283+ using the estimates of the Gx and Gy image gradients and the edge direction angle determines whether the magnitude of the gradient assumes a local maximum in the gradient direction
284+ if the rounded edge direction angle is 0 degrees, checks the north and south directions
285+ if the rounded edge direction angle is 45 degrees, checks the northwest and southeast directions
286+ if the rounded edge direction angle is 90 degrees, checks the east and west directions
287+ if the rounded edge direction angle is 135 degrees, checks the northeast and southwest directions
288+*/
289+void non_max_suppression(struct image * img, int g[], int dir[]) {//float theta[]) {
290+ #ifdef CLOCK
291+ clock_t start = clock();
292+ #endif
293+ int w, h, x, y, max_x, max_y;
294+ w = img->width;
295+ h = img->height;
296+ max_x = w;
297+ max_y = w * h;
298+ for (y = 0; y < max_y; y += w) {
299+ for (x = 0; x < max_x; x++) {
300+ switch (dir[x + y]) {
301+ case 0:
302+ if(x+y-w-1<0){
303+ continue;
304+ }
305+ if (g[x + y] > g[x + y - w] && g[x + y] > g[x + y + w]) {
306+ if (g[x + y] > 255) {
307+ img->pixel_data[x + y] = 0xFF;
308+ } else {
309+ img->pixel_data[x + y] = g[x + y];
310+ }
311+ } else {
312+ img->pixel_data[x + y] = 0x00;
313+ }
314+ break;
315+ case 1:
316+ if(x+y-w-1<0){
317+ continue;
318+ }
319+ if (g[x + y] > g[x + y - w - 1] && g[x + y] > g[x + y + w + 1]) {
320+ if (g[x + y] > 255) {
321+ img->pixel_data[x + y] = 0xFF;
322+ } else {
323+ img->pixel_data[x + y] = g[x + y];
324+ }
325+ } else {
326+ img->pixel_data[x + y] = 0x00;
327+ }
328+ break;
329+ case 2:
330+ if (g[x + y] > g[x + y - 1] && g[x + y] > g[x + y + 1]) {
331+ if (g[x + y] > 255) {
332+ img->pixel_data[x + y] = 0xFF;
333+ } else {
334+ img->pixel_data[x + y] = g[x + y];
335+ }
336+ } else {
337+ img->pixel_data[x + y] = 0x00;
338+ }
339+ break;
340+ case 3:
341+ if(x+y-w-1<0){
342+ continue;
343+ }
344+ if (g[x + y] > g[x + y - w + 1] && g[x + y] > g[x + y + w - 1]) {
345+ if (g[x + y] > 255) {
346+ img->pixel_data[x + y] = 0xFF;
347+ } else {
348+ img->pixel_data[x + y] = g[x + y];
349+ }
350+ } else {
351+ img->pixel_data[x + y] = 0x00;
352+ }
353+ break;
354+ default:
355+ printf("ERROR - direction outside range 0 to 3");
356+ break;
357+ }
358+ }
359+ }
360+ #ifdef CLOCK
361+ printf("Non-maximum suppression - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
362+ #endif
363+}
364+/*
365+ ESTIMATE_THRESHOLD
366+ estimates hysteresis threshold, assuming that the top X% (as defined by the HIGH_THRESHOLD_PERCENTAGE) of edge pixels with the greatest intesity are true edges
367+ and that the low threshold is equal to the quantity of the high threshold plus the total number of 0s at the low end of the histogram divided by 2
368+*/
369+void estimate_threshold(struct image * img, int * high, int * low) {
370+ #ifdef CLOCK
371+ clock_t start = clock();
372+ #endif
373+ int i, max, pixels, high_cutoff;
374+ int histogram[256];
375+ max = img->width * img->height;
376+ for (i = 0; i < 256; i++) {
377+ histogram[i] = 0;
378+ }
379+ for (i = 0; i < max; i++) {
380+ histogram[img->pixel_data[i]]++;
381+ }
382+ pixels = (max - histogram[0]) * HIGH_THRESHOLD_PERCENTAGE;
383+ high_cutoff = 0;
384+ i = 255;
385+ while (high_cutoff < pixels) {
386+ high_cutoff += histogram[i];
387+ i--;
388+ }
389+ *high = i;
390+ i = 1;
391+ while (histogram[i] == 0) {
392+ i++;
393+ }
394+ *low = (*high + i) * LOW_THRESHOLD_PERCENTAGE;
395+ #ifdef PRINT_HISTOGRAM
396+ for (i = 0; i < 256; i++) {
397+ printf("i %d count %d\n", i, histogram[i]);
398+ }
399+ #endif
400+
401+ #ifdef CLOCK
402+ printf("Estimate threshold - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
403+ #endif
404+}
405+
406+void hysteresis (int high, int low, struct image * img_in, struct image * img_out)
407+{
408+ #ifdef CLOCK
409+ clock_t start = clock();
410+ #endif
411+ int x, y, n, max;
412+ max = img_in->width * img_in->height;
413+ for (n = 0; n < max; n++) {
414+ img_out->pixel_data[n] = 0x00;
415+ }
416+ for (y=0; y < img_out->height; y++) {
417+ for (x=0; x < img_out->width; x++) {
418+ if (img_in->pixel_data[y * img_out->width + x] >= high) {
419+ trace (x, y, low, img_in, img_out);
420+ }
421+ }
422+ }
423+ #ifdef CLOCK
424+ printf("Hysteresis - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
425+ #endif
426+}
427+
428+int trace(int x, int y, int low, struct image * img_in, struct image * img_out)
429+{
430+ int y_off, x_off;//, flag;
431+ if (img_out->pixel_data[y * img_out->width + x] == 0)
432+ {
433+ img_out->pixel_data[y * img_out->width + x] = 0xFF;
434+ for (y_off = -1; y_off <=1; y_off++)
435+ {
436+ for(x_off = -1; x_off <= 1; x_off++)
437+ {
438+ if (!(y == 0 && x_off == 0) && range(img_in, x + x_off, y + y_off) && img_in->pixel_data[(y + y_off) * img_out->width + x + x_off] >= low) {
439+ if (trace(x + x_off, y + y_off, low, img_in, img_out))
440+ {
441+ return(1);
442+ }
443+ }
444+ }
445+ }
446+ return(1);
447+ }
448+ return(0);
449+}
450+
451+int range(struct image * img, int x, int y)
452+{
453+ if ((x < 0) || (x >= img->width)) {
454+ return(0);
455+ }
456+ if ((y < 0) || (y >= img->height)) {
457+ return(0);
458+ }
459+ return(1);
460+}
461+
462+void dilate_1d_h(struct image * img, struct image * img_out) {
463+ int x, y, offset, y_max;
464+ y_max = img->height * (img->width - 2);
465+ for (y = 2 * img->width; y < y_max; y += img->width) {
466+ for (x = 2; x < img->width - 2; x++) {
467+ offset = x + y;
468+ img_out->pixel_data[offset] = max(max(max(max(img->pixel_data[offset-2], img->pixel_data[offset-1]), img->pixel_data[offset]), img->pixel_data[offset+1]), img->pixel_data[offset+2]);
469+ }
470+ }
471+}
472+
473+void dilate_1d_v(struct image * img, struct image * img_out) {
474+ int x, y, offset, y_max;
475+ y_max = img->height * (img->width - 2);
476+ for (y = 2 * img->width; y < y_max; y += img->width) {
477+ for (x = 2; x < img->width - 2; x++) {
478+ offset = x + y;
479+ img_out->pixel_data[offset] = max(max(max(max(img->pixel_data[offset-2 * img->width], img->pixel_data[offset-img->width]), img->pixel_data[offset]), img->pixel_data[offset+img->width]), img->pixel_data[offset+2*img->width]);
480+ }
481+ }
482+}
483+
484+void erode_1d_h(struct image * img, struct image * img_out) {
485+ int x, y, offset, y_max;
486+ y_max = img->height * (img->width - 2);
487+ for (y = 2 * img->width; y < y_max; y += img->width) {
488+ for (x = 2; x < img->width - 2; x++) {
489+ offset = x + y;
490+ img_out->pixel_data[offset] = min(min(min(min(img->pixel_data[offset-2], img->pixel_data[offset-1]), img->pixel_data[offset]), img->pixel_data[offset+1]), img->pixel_data[offset+2]);
491+ }
492+ }
493+}
494+
495+void erode_1d_v(struct image * img, struct image * img_out) {
496+ int x, y, offset, y_max;
497+ y_max = img->height * (img->width - 2);
498+ for (y = 2 * img->width; y < y_max; y += img->width) {
499+ for (x = 2; x < img->width - 2; x++) {
500+ offset = x + y;
501+ img_out->pixel_data[offset] = min(min(min(min(img->pixel_data[offset-2 * img->width], img->pixel_data[offset-img->width]), img->pixel_data[offset]), img->pixel_data[offset+img->width]), img->pixel_data[offset+2*img->width]);
502+ }
503+ }
504+}
505+
506+void erode(struct image * img_in, struct image * img_scratch, struct image * img_out) {
507+ #ifdef CLOCK
508+ clock_t start = clock();
509+ #endif
510+ erode_1d_h(img_in, img_scratch);
511+ erode_1d_v(img_scratch, img_out);
512+ #ifdef CLOCK
513+ printf("Erosion - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
514+ #endif
515+}
516+
517+void dilate(struct image * img_in, struct image * img_scratch, struct image * img_out) {
518+ #ifdef CLOCK
519+ clock_t start = clock();
520+ #endif
521+ dilate_1d_h(img_in, img_scratch);
522+ dilate_1d_v(img_scratch, img_out);
523+ #ifdef CLOCK
524+ printf("Dilation - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
525+ #endif
526+}
527+
528+void morph_open(struct image * img_in, struct image * img_scratch, struct image * img_scratch2, struct image * img_out) {
529+ #ifdef CLOCK
530+ clock_t start = clock();
531+ #endif
532+ erode(img_in, img_scratch, img_scratch2);
533+ dilate(img_scratch2, img_scratch, img_out);
534+ #ifdef CLOCK
535+ printf("Morphological opening - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
536+ #endif
537+}
538+
539+void morph_close(struct image * img_in, struct image * img_scratch, struct image * img_scratch2, struct image * img_out) {
540+ #ifdef CLOCK
541+ clock_t start = clock();
542+ #endif
543+ dilate(img_in, img_scratch, img_scratch2);
544+ erode(img_scratch2, img_scratch, img_out);
545+ #ifdef CLOCK
546+ printf("Morphological closing - time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);
547+ #endif
548+}
549+
550+}
TMessagesProj/jni/fast-edge.hnew file+61
@@ -0,0 +1,61 @@
1+/*
2+ FAST-EDGE
3+ Copyright (c) 2009 Benjamin C. Haynor
4+
5+ Permission is hereby granted, free of charge, to any person
6+ obtaining a copy of this software and associated documentation
7+ files (the "Software"), to deal in the Software without
8+ restriction, including without limitation the rights to use,
9+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10+ copies of the Software, and to permit persons to whom the
11+ Software is furnished to do so, subject to the following
12+ conditions:
13+
14+ The above copyright notice and this permission notice shall be
15+ included in all copies or substantial portions of the Software.
16+
17+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+ OTHER DEALINGS IN THE SOFTWARE.
25+*/
26+
27+#ifndef _FASTEDGE
28+#define _FASTEDGE
29+
30+namespace ocr{
31+//#define WIDTH 640 // uncomment to define width for situations where width is always known
32+//#define HEIGHT 480 // uncomment to define heigh for situations where height is always known
33+
34+//#define CLOCK // uncomment to show running times of image processing functions (in seconds)
35+//#define ABS_APPROX // uncomment to use the absolute value approximation of sqrt(Gx ^ 2 + Gy ^2)
36+//#define PRINT_HISTOGRAM // uncomment to print the histogram used to estimate the threshold
37+ struct image {
38+ int width;
39+ int height;
40+ unsigned char * pixel_data;
41+ };
42+
43+void canny_edge_detect(struct image * img_in, struct image * img_out);
44+void gaussian_noise_reduce(struct image * img_in, struct image * img_out);
45+void calc_gradient_sobel(struct image * img_in, int g[], int dir[]);
46+void calc_gradient_scharr(struct image * img_in, int g_x[], int g_y[], int g[], int dir[]);
47+void non_max_suppression(struct image * img, int g[], int dir[]);
48+void estimate_threshold(struct image * img, int * high, int * low);
49+void hysteresis (int high, int low, struct image * img_in, struct image * img_out);
50+int trace (int x, int y, int low, struct image * img_in, struct image * img_out);
51+int range (struct image * img, int x, int y);
52+void dilate_1d_h(struct image * img, struct image * img_out);
53+void dilate_1d_v(struct image * img, struct image * img_out);
54+void erode_1d_h(struct image * img, struct image * img_out);
55+void erode_1d_v(struct image * img, struct image * img_out);
56+void erode(struct image * img_in, struct image * img_scratch, struct image * img_out);
57+void dilate(struct image * img_in, struct image * img_scratch, struct image * img_out);
58+void morph_open(struct image * img_in, struct image * img_scratch, struct image * img_scratch2, struct image * img_out);
59+void morph_close(struct image * img_in, struct image * img_scratch, struct image * img_scratch2, struct image * img_out);
60+}
61+#endif
TMessagesProj/jni/ffmpeg_jni.ccnew file+1632
@@ -0,0 +1,1632 @@
1+/*
2+ * Copyright (C) 2016 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+#include <android/log.h>
18+#include <android/native_window.h>
19+#include <android/native_window_jni.h>
20+#include <jni.h>
21+#include <stdlib.h>
22+
23+#include <cstring>
24+#include <new>
25+
26+#include <libyuv.h>
27+#include <libyuv/scale.h>
28+
29+extern "C" {
30+#ifdef __cplusplus
31+#define __STDC_CONSTANT_MACROS
32+#ifdef _STDINT_H
33+#undef _STDINT_H
34+#endif
35+#include <stdint.h>
36+#endif
37+
38+#include <libavcodec/avcodec.h>
39+#include <libavutil/channel_layout.h>
40+#include <libavutil/error.h>
41+#include <libavutil/mem.h>
42+#include <libavutil/opt.h>
43+#include <libswresample/swresample.h>
44+#include <libswscale/swscale.h>
45+}
46+
47+#define LOG_TAG "ffmpeg_jni"
48+#define LOGE(...) \
49+ ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
50+#define LOGW(...) \
51+ ((void)__android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__))
52+#define LOGD(...) \
53+ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
54+
55+#define LIBRARY_FUNC(RETURN_TYPE, NAME, ...) \
56+ extern "C" { \
57+ JNIEXPORT RETURN_TYPE \
58+ Java_androidx_media3_decoder_ffmpeg_FfmpegLibrary_##NAME(JNIEnv* env, \
59+ jobject thiz, \
60+ ##__VA_ARGS__); \
61+ } \
62+ JNIEXPORT RETURN_TYPE \
63+ Java_androidx_media3_decoder_ffmpeg_FfmpegLibrary_##NAME( \
64+ JNIEnv* env, jobject thiz, ##__VA_ARGS__)
65+
66+#define AUDIO_DECODER_FUNC(RETURN_TYPE, NAME, ...) \
67+ extern "C" { \
68+ JNIEXPORT RETURN_TYPE \
69+ Java_androidx_media3_decoder_ffmpeg_FfmpegAudioDecoder_##NAME( \
70+ JNIEnv* env, jobject thiz, ##__VA_ARGS__); \
71+ } \
72+ JNIEXPORT RETURN_TYPE \
73+ Java_androidx_media3_decoder_ffmpeg_FfmpegAudioDecoder_##NAME( \
74+ JNIEnv* env, jobject thiz, ##__VA_ARGS__)
75+
76+#define VIDEO_DECODER_FUNC(RETURN_TYPE, NAME, ...) \
77+ extern "C" { \
78+ JNIEXPORT RETURN_TYPE \
79+ Java_androidx_media3_decoder_ffmpeg_ExperimentalFfmpegVideoDecoder_##NAME( \
80+ JNIEnv* env, jobject thiz, ##__VA_ARGS__); \
81+ } \
82+ JNIEXPORT RETURN_TYPE \
83+ Java_androidx_media3_decoder_ffmpeg_ExperimentalFfmpegVideoDecoder_##NAME( \
84+ JNIEnv* env, jobject thiz, ##__VA_ARGS__)
85+
86+#define ERROR_STRING_BUFFER_LENGTH 256
87+
88+// Output format corresponding to AudioFormat.ENCODING_PCM_16BIT.
89+static const AVSampleFormat OUTPUT_FORMAT_PCM_16BIT = AV_SAMPLE_FMT_S16;
90+// Output format corresponding to AudioFormat.ENCODING_PCM_FLOAT.
91+static const AVSampleFormat OUTPUT_FORMAT_PCM_FLOAT = AV_SAMPLE_FMT_FLT;
92+
93+// LINT.IfChange
94+static const int AUDIO_DECODER_ERROR_INVALID_DATA = -1;
95+static const int AUDIO_DECODER_ERROR_OTHER = -2;
96+// LINT.ThenChange(../java/androidx/media3/decoder/ffmpeg/FfmpegAudioDecoder.java)
97+
98+// LINT.IfChange
99+static const int VIDEO_DECODER_ERROR_SURFACE = -4;
100+static const int VIDEO_DECODER_SUCCESS = 0;
101+static const int VIDEO_DECODER_ERROR_INVALID_DATA = -1;
102+static const int VIDEO_DECODER_ERROR_OTHER = -2;
103+static const int VIDEO_DECODER_ERROR_READ_FRAME = -3;
104+// LINT.ThenChange(../java/androidx/media3/decoder/ffmpeg/ExperimentalFfmpegVideoDecoder.java)
105+
106+static jmethodID growOutputBufferMethod;
107+
108+/**
109+ * Returns the AVCodec with the specified name, or NULL if it is not available.
110+ */
111+const AVCodec* getCodecByName(JNIEnv* env, jstring codecName);
112+
113+/**
114+ * Allocates and opens a new AVCodecContext for the specified codec, passing the
115+ * provided extraData as initialization data for the decoder if it is non-NULL.
116+ * Returns the created context.
117+ */
118+AVCodecContext* createContext(JNIEnv* env,
119+ const AVCodec* codec,
120+ jbyteArray extraData,
121+ jboolean outputFloat,
122+ jint rawSampleRate,
123+ jint rawChannelCount);
124+
125+struct GrowOutputBufferCallback {
126+ uint8_t* operator()(int requiredSize) const;
127+ JNIEnv* env;
128+ jobject thiz;
129+ jobject decoderOutputBuffer;
130+};
131+
132+/**
133+ * Decodes the packet into the output buffer, returning the number of bytes
134+ * written, or a negative AUDIO_DECODER_ERROR constant value in the case of an
135+ * error.
136+ */
137+int decodePacket(AVCodecContext* context,
138+ AVPacket* packet,
139+ uint8_t* outputBuffer,
140+ int outputSize,
141+ GrowOutputBufferCallback growBuffer);
142+
143+/**
144+ * Transforms ffmpeg AVERROR into a negative AUDIO_DECODER_ERROR constant value.
145+ */
146+int transformError(int errorNumber);
147+
148+/**
149+ * Outputs a log message describing the avcodec error number.
150+ */
151+void logError(const char* functionName, int errorNumber);
152+
153+/**
154+ * Releases the specified context.
155+ */
156+void releaseContext(AVCodecContext* context);
157+
158+jstring ffmpegGetVersion(JNIEnv* env, jobject thiz) {
159+ return env->NewStringUTF(LIBAVCODEC_IDENT);
160+}
161+
162+jint ffmpegGetInputBufferPaddingSize(JNIEnv* env, jobject thiz) {
163+ return static_cast<jint>(AV_INPUT_BUFFER_PADDING_SIZE);
164+}
165+
166+jboolean ffmpegHasDecoder(JNIEnv* env, jobject thiz, jstring codecName) {
167+ return getCodecByName(env, codecName) != NULL;
168+}
169+
170+jstring ffmpegGetAv1DecoderName(JNIEnv* env, jobject thiz) {
171+ if (avcodec_find_decoder_by_name("libdav1d")) {
172+ return env->NewStringUTF("libdav1d");
173+ }
174+ if (avcodec_find_decoder_by_name("libaom-av1")) {
175+ return env->NewStringUTF("libaom-av1");
176+ }
177+ return NULL;
178+}
179+
180+jlong ffmpegInitialize(JNIEnv* env,
181+ jobject thiz,
182+ jstring codecName,
183+ jbyteArray extraData,
184+ jboolean outputFloat,
185+ jint rawSampleRate,
186+ jint rawChannelCount) {
187+ const AVCodec* codec = getCodecByName(env, codecName);
188+ if (!codec) {
189+ LOGE("Codec not found.");
190+ return 0L;
191+ }
192+ return reinterpret_cast<jlong>(
193+ createContext(env, codec, extraData, outputFloat, rawSampleRate,
194+ rawChannelCount));
195+}
196+
197+jint ffmpegDecode(JNIEnv* env,
198+ jobject thiz,
199+ jlong context,
200+ jobject inputData,
201+ jint inputSize,
202+ jobject decoderOutputBuffer,
203+ jobject outputData,
204+ jint outputSize) {
205+ if (!context) {
206+ LOGE("Context must be non-NULL.");
207+ return -1;
208+ }
209+ if (!inputData || !decoderOutputBuffer || !outputData) {
210+ LOGE("Input and output buffers must be non-NULL.");
211+ return -1;
212+ }
213+ if (inputSize < 0) {
214+ LOGE("Invalid input buffer size: %d.", inputSize);
215+ return -1;
216+ }
217+ if (outputSize < 0) {
218+ LOGE("Invalid output buffer length: %d", outputSize);
219+ return -1;
220+ }
221+
222+ uint8_t* inputBuffer =
223+ static_cast<uint8_t*>(env->GetDirectBufferAddress(inputData));
224+ uint8_t* outputBuffer =
225+ static_cast<uint8_t*>(env->GetDirectBufferAddress(outputData));
226+
227+ AVPacket* packet = av_packet_alloc();
228+ if (!packet) {
229+ LOGE("Failed to allocate packet.");
230+ return -1;
231+ }
232+
233+ packet->data = inputBuffer;
234+ packet->size = inputSize;
235+
236+ const int ret =
237+ decodePacket(reinterpret_cast<AVCodecContext*>(context), packet,
238+ outputBuffer, outputSize,
239+ GrowOutputBufferCallback{env, thiz, decoderOutputBuffer});
240+ av_packet_free(&packet);
241+ return ret;
242+}
243+
244+uint8_t* GrowOutputBufferCallback::operator()(int requiredSize) const {
245+ jobject newOutputData = env->CallObjectMethod(
246+ thiz, growOutputBufferMethod, decoderOutputBuffer, requiredSize);
247+ if (env->ExceptionCheck()) {
248+ LOGE("growOutputBuffer() failed");
249+ env->ExceptionDescribe();
250+ return nullptr;
251+ }
252+ return static_cast<uint8_t*>(env->GetDirectBufferAddress(newOutputData));
253+}
254+
255+jint ffmpegGetChannelCount(JNIEnv* env, jobject thiz, jlong context) {
256+ if (!context) {
257+ LOGE("Context must be non-NULL.");
258+ return -1;
259+ }
260+ return reinterpret_cast<AVCodecContext*>(context)->ch_layout.nb_channels;
261+}
262+
263+jint ffmpegGetSampleRate(JNIEnv* env, jobject thiz, jlong context) {
264+ if (!context) {
265+ LOGE("Context must be non-NULL.");
266+ return -1;
267+ }
268+ return reinterpret_cast<AVCodecContext*>(context)->sample_rate;
269+}
270+
271+jlong ffmpegReset(JNIEnv* env,
272+ jobject thiz,
273+ jlong jContext,
274+ jbyteArray extraData) {
275+ AVCodecContext* context = reinterpret_cast<AVCodecContext*>(jContext);
276+ if (!context) {
277+ LOGE("Tried to reset without a context.");
278+ return 0L;
279+ }
280+
281+ AVCodecID codecId = context->codec_id;
282+ if (codecId == AV_CODEC_ID_TRUEHD) {
283+ jboolean outputFloat =
284+ static_cast<jboolean>(context->request_sample_fmt == OUTPUT_FORMAT_PCM_FLOAT);
285+
286+ // Release and recreate the context if the codec is TrueHD.
287+ // TODO: Figure out why flushing doesn't work for this codec.
288+ releaseContext(context);
289+
290+ const AVCodec* codec = avcodec_find_decoder(codecId);
291+ if (!codec) {
292+ LOGE("Unexpected error finding codec %d.", codecId);
293+ return 0L;
294+ }
295+
296+ return reinterpret_cast<jlong>(
297+ createContext(env, codec, extraData, outputFloat,
298+ /* rawSampleRate= */ -1,
299+ /* rawChannelCount= */ -1));
300+ }
301+
302+ avcodec_flush_buffers(context);
303+ return reinterpret_cast<jlong>(context);
304+}
305+
306+void ffmpegRelease(JNIEnv* env, jobject thiz, jlong context) {
307+ if (context) {
308+ releaseContext(reinterpret_cast<AVCodecContext*>(context));
309+ }
310+}
311+
312+const AVCodec* getCodecByName(JNIEnv* env, jstring codecName) {
313+ if (!codecName) {
314+ return NULL;
315+ }
316+
317+ const char* codecNameChars = env->GetStringUTFChars(codecName, NULL);
318+ if (!codecNameChars) {
319+ return NULL;
320+ }
321+
322+ const AVCodec* codec = avcodec_find_decoder_by_name(codecNameChars);
323+ env->ReleaseStringUTFChars(codecName, codecNameChars);
324+ return codec;
325+}
326+
327+AVCodecContext* createContext(JNIEnv* env,
328+ const AVCodec* codec,
329+ jbyteArray extraData,
330+ jboolean outputFloat,
331+ jint rawSampleRate,
332+ jint rawChannelCount) {
333+ AVCodecContext* context = avcodec_alloc_context3(codec);
334+ if (!context) {
335+ LOGE("Failed to allocate context.");
336+ return NULL;
337+ }
338+
339+ context->request_sample_fmt =
340+ outputFloat ? OUTPUT_FORMAT_PCM_FLOAT : OUTPUT_FORMAT_PCM_16BIT;
341+
342+ if (extraData) {
343+ const jsize size = env->GetArrayLength(extraData);
344+ context->extradata_size = size;
345+
346+ // FFmpeg requires AV_INPUT_BUFFER_PADDING_SIZE zero bytes after extradata.
347+ context->extradata = static_cast<uint8_t*>(
348+ av_mallocz(static_cast<size_t>(size) + AV_INPUT_BUFFER_PADDING_SIZE));
349+ if (!context->extradata) {
350+ LOGE("Failed to allocate extradata.");
351+ releaseContext(context);
352+ return NULL;
353+ }
354+
355+ env->GetByteArrayRegion(
356+ extraData, 0, size, reinterpret_cast<jbyte*>(context->extradata));
357+ if (env->ExceptionCheck()) {
358+ releaseContext(context);
359+ return NULL;
360+ }
361+ }
362+
363+ if (context->codec_id == AV_CODEC_ID_PCM_MULAW ||
364+ context->codec_id == AV_CODEC_ID_PCM_ALAW) {
365+ context->sample_rate = rawSampleRate;
366+ av_channel_layout_default(&context->ch_layout, rawChannelCount);
367+ }
368+
369+ context->err_recognition = AV_EF_IGNORE_ERR;
370+
371+ const int result = avcodec_open2(context, codec, NULL);
372+ if (result < 0) {
373+ logError("avcodec_open2", result);
374+ releaseContext(context);
375+ return NULL;
376+ }
377+
378+ return context;
379+}
380+
381+int decodePacket(AVCodecContext* context,
382+ AVPacket* packet,
383+ uint8_t* outputBuffer,
384+ int outputSize,
385+ GrowOutputBufferCallback growBuffer) {
386+ int result = avcodec_send_packet(context, packet);
387+ if (result) {
388+ logError("avcodec_send_packet", result);
389+ return transformError(result);
390+ }
391+
392+ int outSize = 0;
393+ while (true) {
394+ AVFrame* frame = av_frame_alloc();
395+ if (!frame) {
396+ LOGE("Failed to allocate output frame.");
397+ return AUDIO_DECODER_ERROR_INVALID_DATA;
398+ }
399+
400+ result = avcodec_receive_frame(context, frame);
401+ if (result) {
402+ av_frame_free(&frame);
403+ if (result == AVERROR(EAGAIN)) {
404+ break;
405+ }
406+ logError("avcodec_receive_frame", result);
407+ return transformError(result);
408+ }
409+
410+ AVSampleFormat sampleFormat = context->sample_fmt;
411+ int channelCount = context->ch_layout.nb_channels;
412+ int sampleRate = context->sample_rate;
413+ int sampleCount = frame->nb_samples;
414+
415+ SwrContext* resampleContext =
416+ static_cast<SwrContext*>(context->opaque);
417+ if (!resampleContext) {
418+ result =
419+ swr_alloc_set_opts2(&resampleContext,
420+ &context->ch_layout,
421+ context->request_sample_fmt,
422+ sampleRate,
423+ &context->ch_layout,
424+ sampleFormat,
425+ sampleRate,
426+ 0,
427+ NULL);
428+ if (result < 0) {
429+ logError("swr_alloc_set_opts2", result);
430+ av_frame_free(&frame);
431+ return transformError(result);
432+ }
433+
434+ result = swr_init(resampleContext);
435+ if (result < 0) {
436+ logError("swr_init", result);
437+ swr_free(&resampleContext);
438+ av_frame_free(&frame);
439+ return transformError(result);
440+ }
441+
442+ context->opaque = resampleContext;
443+ }
444+
445+ const int outSampleSize =
446+ av_get_bytes_per_sample(context->request_sample_fmt);
447+ const int outSamples =
448+ swr_get_out_samples(resampleContext, sampleCount);
449+ const int bufferOutSize =
450+ outSampleSize * channelCount * outSamples;
451+
452+ if (outSize + bufferOutSize > outputSize) {
453+ LOGD(
454+ "Output buffer size (%d) too small for output data (%d), "
455+ "reallocating buffer.",
456+ outputSize, outSize + bufferOutSize);
457+
458+ outputSize = outSize + bufferOutSize;
459+ outputBuffer = growBuffer(outputSize);
460+ if (!outputBuffer) {
461+ LOGE("Failed to reallocate output buffer.");
462+ av_frame_free(&frame);
463+ return AUDIO_DECODER_ERROR_OTHER;
464+ }
465+ }
466+
467+ result = swr_convert(
468+ resampleContext,
469+ &outputBuffer,
470+ bufferOutSize,
471+ const_cast<const uint8_t**>(frame->data),
472+ frame->nb_samples);
473+
474+ av_frame_free(&frame);
475+
476+ if (result < 0) {
477+ logError("swr_convert", result);
478+ return AUDIO_DECODER_ERROR_INVALID_DATA;
479+ }
480+
481+ const int available = swr_get_out_samples(resampleContext, 0);
482+ if (available != 0) {
483+ LOGE("Expected no samples remaining after resampling, but found %d.",
484+ available);
485+ return AUDIO_DECODER_ERROR_INVALID_DATA;
486+ }
487+
488+ outputBuffer += bufferOutSize;
489+ outSize += bufferOutSize;
490+ }
491+
492+ return outSize;
493+}
494+
495+int transformError(int errorNumber) {
496+ return errorNumber == AVERROR_INVALIDDATA
497+ ? AUDIO_DECODER_ERROR_INVALID_DATA
498+ : AUDIO_DECODER_ERROR_OTHER;
499+}
500+
501+void logError(const char* functionName, int errorNumber) {
502+ char buffer[ERROR_STRING_BUFFER_LENGTH];
503+ av_strerror(errorNumber, buffer, ERROR_STRING_BUFFER_LENGTH);
504+ LOGE("Error in %s: %s", functionName, buffer);
505+}
506+
507+void releaseContext(AVCodecContext* context) {
508+ if (!context) {
509+ return;
510+ }
511+
512+ SwrContext* swrContext =
513+ static_cast<SwrContext*>(context->opaque);
514+ if (swrContext) {
515+ swr_free(&swrContext);
516+ context->opaque = NULL;
517+ }
518+
519+ avcodec_free_context(&context);
520+}
521+
522+// -----------------------------------------------------------------------------
523+// Video
524+// -----------------------------------------------------------------------------
525+
526+// Android YUV format. See:
527+// https://developer.android.com/reference/android/graphics/ImageFormat.html#YV12.
528+static const int kImageFormatYV12 = 0x32315659;
529+
530+struct JniContext {
531+ ~JniContext() {
532+ if (native_window) {
533+ ANativeWindow_release(native_window);
534+ native_window = nullptr;
535+ }
536+ }
537+
538+ bool MaybeAcquireNativeWindow(JNIEnv* env, jobject new_surface) {
539+ if (!new_surface) {
540+ LOGE("Surface must be non-null.");
541+ return false;
542+ }
543+
544+ if (surface != nullptr &&
545+ native_window != nullptr &&
546+ env->IsSameObject(surface, new_surface)) {
547+ return true;
548+ }
549+
550+ if (native_window) {
551+ ANativeWindow_release(native_window);
552+ native_window = nullptr;
553+ }
554+
555+ native_window_width = 0;
556+ native_window_height = 0;
557+ native_window_format = 0;
558+
559+ if (surface != nullptr) {
560+ env->DeleteGlobalRef(surface);
561+ surface = nullptr;
562+ }
563+
564+ native_window = ANativeWindow_fromSurface(env, new_surface);
565+ if (!native_window) {
566+ LOGE("ANativeWindow_fromSurface failed.");
567+ return false;
568+ }
569+
570+ surface = env->NewGlobalRef(new_surface);
571+ if (!surface) {
572+ LOGE("NewGlobalRef(Surface) failed.");
573+ ANativeWindow_release(native_window);
574+ native_window = nullptr;
575+ return false;
576+ }
577+
578+ return true;
579+ }
580+
581+ jfieldID data_field = nullptr;
582+ jfieldID width_field = nullptr;
583+ jfieldID height_field = nullptr;
584+ jfieldID pts_field = nullptr;
585+ jfieldID colorspace_field = nullptr;
586+ jfieldID y_stride_field = nullptr;
587+ jfieldID uv_stride_field = nullptr;
588+ jmethodID init_for_yuv_frame_method = nullptr;
589+
590+ AVCodecContext* codecContext = nullptr;
591+ SwsContext* swsContext = nullptr;
592+
593+ ANativeWindow* native_window = nullptr;
594+ jobject surface = nullptr;
595+
596+ int rotate_degree = 0;
597+ int native_window_width = 0;
598+ int native_window_height = 0;
599+ int native_window_format = 0;
600+ bool use_rgba_fallback = false;
601+};
602+
603+constexpr int AlignTo16(int value) {
604+ return (value + 15) & ~15;
605+}
606+
607+/**
608+ * Converts AVFrame color space to VideoDecoderOutputBuffer#COLORSPACE_*.
609+ */
610+constexpr int cvt_colorspace(AVColorSpace colorSpace) {
611+ switch (colorSpace) {
612+ case AVCOL_SPC_BT470BG:
613+ case AVCOL_SPC_SMPTE170M:
614+ case AVCOL_SPC_SMPTE240M:
615+ return 1; // COLORSPACE_BT601
616+ case AVCOL_SPC_BT709:
617+ return 2; // COLORSPACE_BT709
618+ case AVCOL_SPC_BT2020_NCL:
619+ case AVCOL_SPC_BT2020_CL:
620+ return 3; // COLORSPACE_BT2020
621+ default:
622+ return 0; // COLORSPACE_UNKNOWN
623+ }
624+}
625+
626+const int* cvt_colorspace_coefficients(AVColorSpace colorSpace) {
627+ switch (colorSpace) {
628+ case AVCOL_SPC_BT709:
629+ return sws_getCoefficients(SWS_CS_ITU709);
630+
631+ case AVCOL_SPC_BT2020_NCL:
632+ case AVCOL_SPC_BT2020_CL:
633+ return sws_getCoefficients(SWS_CS_BT2020);
634+
635+ case AVCOL_SPC_BT470BG:
636+ case AVCOL_SPC_SMPTE170M:
637+ case AVCOL_SPC_SMPTE240M:
638+ default:
639+ return sws_getCoefficients(SWS_CS_ITU601);
640+ }
641+}
642+
643+/**
644+ * Converts a decoded frame to the requested pixel format and size.
645+ */
646+AVFrame* cvt_format(JniContext* jniContext,
647+ AVFrame* src,
648+ AVPixelFormat dst_format,
649+ int dst_width,
650+ int dst_height) {
651+ if (!jniContext || !src || dst_width <= 0 || dst_height <= 0) {
652+ LOGE("Invalid arguments for pixel format conversion.");
653+ return nullptr;
654+ }
655+
656+ const AVPixelFormat src_format =
657+ static_cast<AVPixelFormat>(src->format);
658+
659+ SwsContext* swsContext =
660+ sws_getCachedContext(
661+ jniContext->swsContext,
662+ src->width,
663+ src->height,
664+ src_format,
665+ dst_width,
666+ dst_height,
667+ dst_format,
668+ SWS_BILINEAR,
669+ NULL,
670+ NULL,
671+ NULL);
672+
673+ if (!swsContext) {
674+ LOGE("Failed to allocate swsContext.");
675+ return nullptr;
676+ }
677+
678+ jniContext->swsContext = swsContext;
679+
680+ // Preserve the decoded frame's matrix/range while changing bit depth/format.
681+ const int src_range =
682+ src->color_range == AVCOL_RANGE_JPEG ? 1 : 0;
683+ const int* coefficients =
684+ cvt_colorspace_coefficients(src->colorspace);
685+
686+ const int colorspace_result =
687+ sws_setColorspaceDetails(
688+ swsContext,
689+ coefficients,
690+ src_range,
691+ coefficients,
692+ src_range,
693+ 0,
694+ 1 << 16,
695+ 1 << 16);
696+
697+ if (colorspace_result < 0) {
698+ logError("sws_setColorspaceDetails", colorspace_result);
699+ return nullptr;
700+ }
701+
702+ AVFrame* dst = av_frame_alloc();
703+ if (!dst) {
704+ LOGE("Failed to allocate converted AVFrame.");
705+ return nullptr;
706+ }
707+
708+ const int props_result = av_frame_copy_props(dst, src);
709+ if (props_result < 0) {
710+ logError("av_frame_copy_props", props_result);
711+ av_frame_free(&dst);
712+ return nullptr;
713+ }
714+
715+ dst->width = dst_width;
716+ dst->height = dst_height;
717+ dst->format = dst_format;
718+
719+ const int alloc_result = av_frame_get_buffer(dst, 0);
720+ if (alloc_result < 0) {
721+ logError("av_frame_get_buffer", alloc_result);
722+ av_frame_free(&dst);
723+ return nullptr;
724+ }
725+
726+ const int scale_result =
727+ sws_scale(
728+ swsContext,
729+ src->data,
730+ src->linesize,
731+ 0,
732+ src->height,
733+ dst->data,
734+ dst->linesize);
735+
736+ if (scale_result <= 0) {
737+ if (scale_result < 0) {
738+ logError("sws_scale", scale_result);
739+ } else {
740+ LOGE("sws_scale produced no output.");
741+ }
742+ av_frame_free(&dst);
743+ return nullptr;
744+ }
745+
746+ return dst;
747+}
748+
749+libyuv::RotationMode cvt_rotate(int degree) {
750+ switch (degree) {
751+ case 90:
752+ return libyuv::kRotate90;
753+ case 180:
754+ return libyuv::kRotate180;
755+ case 270:
756+ return libyuv::kRotate270;
757+ default:
758+ return libyuv::kRotate0;
759+ }
760+}
761+
762+JniContext* createVideoContext(JNIEnv* env,
763+ const AVCodec* codec,
764+ jbyteArray extraData,
765+ jint threads,
766+ jint degree,
767+ jint width,
768+ jint height) {
769+ JniContext* jniContext = new (std::nothrow) JniContext();
770+ if (!jniContext) {
771+ LOGE("Failed to allocate JniContext.");
772+ return NULL;
773+ }
774+
775+ AVCodecContext* codecContext = avcodec_alloc_context3(codec);
776+ if (!codecContext) {
777+ LOGE("Failed to allocate video codec context.");
778+ delete jniContext;
779+ return NULL;
780+ }
781+
782+ jniContext->rotate_degree = degree;
783+
784+ if (extraData) {
785+ const jsize size = env->GetArrayLength(extraData);
786+ codecContext->extradata_size = size;
787+
788+ // FFmpeg requires zeroed padding after extradata.
789+ codecContext->extradata = static_cast<uint8_t*>(
790+ av_mallocz(static_cast<size_t>(size) + AV_INPUT_BUFFER_PADDING_SIZE));
791+ if (!codecContext->extradata) {
792+ LOGE("Failed to allocate video extradata.");
793+ releaseContext(codecContext);
794+ delete jniContext;
795+ return NULL;
796+ }
797+
798+ env->GetByteArrayRegion(
799+ extraData, 0, size,
800+ reinterpret_cast<jbyte*>(codecContext->extradata));
801+ if (env->ExceptionCheck()) {
802+ releaseContext(codecContext);
803+ delete jniContext;
804+ return NULL;
805+ }
806+ }
807+
808+ codecContext->skip_loop_filter = AVDISCARD_DEFAULT;
809+ codecContext->skip_frame = AVDISCARD_DEFAULT;
810+ codecContext->thread_count = threads;
811+ codecContext->thread_type = FF_THREAD_FRAME;
812+ codecContext->err_recognition = AV_EF_IGNORE_ERR;
813+
814+ AVDictionary* opts = NULL;
815+
816+ if (codec->id == AV_CODEC_ID_AV1 &&
817+ strcmp(codec->name, "libdav1d") == 0) {
818+ av_dict_set(&opts, "max_frame_delay", "1", 0);
819+ }
820+
821+ if (width > 0 && height > 0) {
822+ codecContext->width = width;
823+ codecContext->height = height;
824+ }
825+
826+ const int result = avcodec_open2(codecContext, codec, &opts);
827+ av_dict_free(&opts);
828+
829+ if (result < 0) {
830+ logError("avcodec_open2", result);
831+ releaseContext(codecContext);
832+ delete jniContext;
833+ return NULL;
834+ }
835+
836+ jniContext->codecContext = codecContext;
837+
838+ const jclass outputBufferClass =
839+ env->FindClass("androidx/media3/decoder/VideoDecoderOutputBuffer");
840+ if (!outputBufferClass) {
841+ LOGE("Failed to find VideoDecoderOutputBuffer class.");
842+ releaseContext(codecContext);
843+ jniContext->codecContext = nullptr;
844+ delete jniContext;
845+ return NULL;
846+ }
847+
848+ jniContext->data_field =
849+ env->GetFieldID(
850+ outputBufferClass, "data", "Ljava/nio/ByteBuffer;");
851+ jniContext->width_field =
852+ env->GetFieldID(outputBufferClass, "width", "I");
853+ jniContext->height_field =
854+ env->GetFieldID(outputBufferClass, "height", "I");
855+ jniContext->pts_field =
856+ env->GetFieldID(outputBufferClass, "timeUs", "J");
857+ jniContext->colorspace_field =
858+ env->GetFieldID(outputBufferClass, "colorspace", "I");
859+ jniContext->y_stride_field =
860+ env->GetFieldID(outputBufferClass, "yStride", "I");
861+ jniContext->uv_stride_field =
862+ env->GetFieldID(outputBufferClass, "uvStride", "I");
863+ jniContext->init_for_yuv_frame_method =
864+ env->GetMethodID(
865+ outputBufferClass, "initForYuvFrame", "(IIIII)Z");
866+
867+ const bool fields_ok =
868+ jniContext->data_field &&
869+ jniContext->width_field &&
870+ jniContext->height_field &&
871+ jniContext->pts_field &&
872+ jniContext->colorspace_field &&
873+ jniContext->y_stride_field &&
874+ jniContext->uv_stride_field &&
875+ jniContext->init_for_yuv_frame_method;
876+
877+ env->DeleteLocalRef(outputBufferClass);
878+
879+ if (!fields_ok || env->ExceptionCheck()) {
880+ LOGE("Failed to resolve VideoDecoderOutputBuffer JNI members.");
881+ releaseContext(codecContext);
882+ jniContext->codecContext = nullptr;
883+ delete jniContext;
884+ return NULL;
885+ }
886+
887+ return jniContext;
888+}
889+
890+VIDEO_DECODER_FUNC(
891+ jlong,
892+ ffmpegInitialize,
893+ jstring codecName,
894+ jbyteArray extraData,
895+ jint threads,
896+ jint degree,
897+ jint width,
898+ jint height) {
899+ const AVCodec* codec = getCodecByName(env, codecName);
900+ if (!codec) {
901+ LOGE("Codec not found.");
902+ return 0L;
903+ }
904+
905+ return reinterpret_cast<jlong>(
906+ createVideoContext(
907+ env, codec, extraData, threads, degree, width, height));
908+}
909+
910+VIDEO_DECODER_FUNC(jlong, ffmpegReset, jlong jContext) {
911+ JniContext* const jniContext =
912+ reinterpret_cast<JniContext*>(jContext);
913+ if (!jniContext || !jniContext->codecContext) {
914+ LOGE("Tried to reset without a context.");
915+ return 0L;
916+ }
917+
918+ avcodec_flush_buffers(jniContext->codecContext);
919+ return reinterpret_cast<jlong>(jniContext);
920+}
921+
922+VIDEO_DECODER_FUNC(void, ffmpegRelease, jlong jContext) {
923+ JniContext* const jniContext =
924+ reinterpret_cast<JniContext*>(jContext);
925+ if (!jniContext) {
926+ return;
927+ }
928+
929+ if (jniContext->codecContext) {
930+ avcodec_free_context(&jniContext->codecContext);
931+ }
932+
933+ if (jniContext->swsContext) {
934+ sws_freeContext(jniContext->swsContext);
935+ jniContext->swsContext = nullptr;
936+ }
937+
938+ if (jniContext->surface != nullptr) {
939+ env->DeleteGlobalRef(jniContext->surface);
940+ jniContext->surface = nullptr;
941+ }
942+
943+ // ~JniContext releases ANativeWindow.
944+ delete jniContext;
945+}
946+
947+VIDEO_DECODER_FUNC(
948+ jint,
949+ ffmpegSendPacket,
950+ jlong jContext,
951+ jobject encodedData,
952+ jint length,
953+ jlong inputTimeUs) {
954+ JniContext* const jniContext =
955+ reinterpret_cast<JniContext*>(jContext);
956+
957+ if (!jniContext ||
958+ !jniContext->codecContext ||
959+ !encodedData ||
960+ length < 0) {
961+ LOGE("Invalid context or input buffer.");
962+ return VIDEO_DECODER_ERROR_OTHER;
963+ }
964+
965+ uint8_t* inputBuffer =
966+ static_cast<uint8_t*>(
967+ env->GetDirectBufferAddress(encodedData));
968+ const jlong inputCapacity =
969+ env->GetDirectBufferCapacity(encodedData);
970+
971+ if (!inputBuffer ||
972+ inputCapacity < 0 ||
973+ inputCapacity < static_cast<jlong>(length)) {
974+ LOGE("Invalid direct input buffer: capacity=%lld length=%d",
975+ static_cast<long long>(inputCapacity), length);
976+ return VIDEO_DECODER_ERROR_OTHER;
977+ }
978+
979+ AVPacket* packet = av_packet_alloc();
980+ if (!packet) {
981+ LOGE("Failed to allocate packet.");
982+ return VIDEO_DECODER_ERROR_OTHER;
983+ }
984+
985+ // Do not point AVPacket directly at Java memory.
986+ //
987+ // The normal DecoderInputBuffer is padded, but PendingInput in the PR is
988+ // copied into a direct ByteBuffer whose capacity is exactly the payload
989+ // length. FFmpeg parsers may legally read AV_INPUT_BUFFER_PADDING_SIZE bytes
990+ // past packet->data + packet->size. av_new_packet() allocates that padding
991+ // and zeroes it.
992+ const int allocationResult = av_new_packet(packet, length);
993+ if (allocationResult < 0) {
994+ logError("av_new_packet", allocationResult);
995+ av_packet_free(&packet);
996+ return VIDEO_DECODER_ERROR_OTHER;
997+ }
998+
999+ if (length > 0) {
1000+ std::memcpy(
1001+ packet->data,
1002+ inputBuffer,
1003+ static_cast<size_t>(length));
1004+ }
1005+
1006+ packet->pts = inputTimeUs;
1007+
1008+ const int result =
1009+ avcodec_send_packet(jniContext->codecContext, packet);
1010+
1011+ av_packet_free(&packet);
1012+
1013+ if (result == 0) {
1014+ return VIDEO_DECODER_SUCCESS;
1015+ }
1016+
1017+ if (result == AVERROR_INVALIDDATA) {
1018+ logError("avcodec_send_packet", result);
1019+ return VIDEO_DECODER_ERROR_INVALID_DATA;
1020+ }
1021+
1022+ if (result == AVERROR(EAGAIN)) {
1023+ return VIDEO_DECODER_ERROR_READ_FRAME;
1024+ }
1025+
1026+ logError("avcodec_send_packet", result);
1027+ return VIDEO_DECODER_ERROR_OTHER;
1028+}
1029+
1030+VIDEO_DECODER_FUNC(
1031+ jint,
1032+ ffmpegReceiveFrame,
1033+ jlong jContext,
1034+ jint outputMode,
1035+ jobject jOutputBuffer,
1036+ jboolean decodeOnly) {
1037+ JniContext* const jniContext =
1038+ reinterpret_cast<JniContext*>(jContext);
1039+
1040+ if (!jniContext ||
1041+ !jniContext->codecContext ||
1042+ !jOutputBuffer) {
1043+ LOGE("Invalid context or output buffer.");
1044+ return VIDEO_DECODER_ERROR_OTHER;
1045+ }
1046+
1047+ AVFrame* rawFrame = av_frame_alloc();
1048+ if (!rawFrame) {
1049+ LOGE("Failed to allocate output frame.");
1050+ return VIDEO_DECODER_ERROR_OTHER;
1051+ }
1052+
1053+ const int receiveResult =
1054+ avcodec_receive_frame(
1055+ jniContext->codecContext, rawFrame);
1056+
1057+ if (receiveResult == AVERROR(EAGAIN)) {
1058+ av_frame_free(&rawFrame);
1059+ return VIDEO_DECODER_ERROR_INVALID_DATA;
1060+ }
1061+
1062+ if (receiveResult != 0) {
1063+ logError("avcodec_receive_frame", receiveResult);
1064+ av_frame_free(&rawFrame);
1065+ return VIDEO_DECODER_ERROR_OTHER;
1066+ }
1067+
1068+ // The frame must still be dequeued from FFmpeg for decode-only input, but
1069+ // there is no need to allocate/convert/copy it into the Java output buffer.
1070+ if (decodeOnly) {
1071+ av_frame_free(&rawFrame);
1072+ return VIDEO_DECODER_ERROR_INVALID_DATA;
1073+ }
1074+
1075+ AVFrame* frame = rawFrame;
1076+
1077+ if (rawFrame->format != AV_PIX_FMT_YUV420P) {
1078+ frame =
1079+ cvt_format(
1080+ jniContext,
1081+ rawFrame,
1082+ AV_PIX_FMT_YUV420P,
1083+ rawFrame->width,
1084+ rawFrame->height);
1085+
1086+ if (!frame) {
1087+ av_frame_free(&rawFrame);
1088+ LOGW("Convert to YUV420P failed.");
1089+ return VIDEO_DECODER_ERROR_OTHER;
1090+ }
1091+
1092+ av_frame_free(&rawFrame);
1093+ }
1094+
1095+ const int decodedWidth = frame->width;
1096+ const int decodedHeight = frame->height;
1097+
1098+ if (decodedWidth <= 0 || decodedHeight <= 0) {
1099+ LOGE("Invalid decoded frame dimensions: %dx%d",
1100+ decodedWidth, decodedHeight);
1101+ av_frame_free(&frame);
1102+ return VIDEO_DECODER_ERROR_OTHER;
1103+ }
1104+
1105+ int outputWidth = decodedWidth;
1106+ int outputHeight = decodedHeight;
1107+
1108+ if (jniContext->rotate_degree == 90 ||
1109+ jniContext->rotate_degree == 270) {
1110+ outputWidth = decodedHeight;
1111+ outputHeight = decodedWidth;
1112+ }
1113+
1114+ const int colorSpace =
1115+ cvt_colorspace(frame->colorspace);
1116+
1117+ // We store the intermediate Java buffer as tightly packed I420.
1118+ const int strideY = outputWidth;
1119+ const int strideUv = (outputWidth + 1) / 2;
1120+
1121+ const int oldWidth =
1122+ env->GetIntField(
1123+ jOutputBuffer, jniContext->width_field);
1124+ const int oldHeight =
1125+ env->GetIntField(
1126+ jOutputBuffer, jniContext->height_field);
1127+
1128+ if (oldWidth != outputWidth ||
1129+ oldHeight != outputHeight) {
1130+ const jboolean initResult =
1131+ env->CallBooleanMethod(
1132+ jOutputBuffer,
1133+ jniContext->init_for_yuv_frame_method,
1134+ outputWidth,
1135+ outputHeight,
1136+ strideY,
1137+ strideUv,
1138+ colorSpace);
1139+
1140+ if (env->ExceptionCheck()) {
1141+ av_frame_free(&frame);
1142+ return VIDEO_DECODER_ERROR_OTHER;
1143+ }
1144+
1145+ if (!initResult) {
1146+ av_frame_free(&frame);
1147+ return VIDEO_DECODER_ERROR_OTHER;
1148+ }
1149+ }
1150+
1151+ // Color space is frame metadata and can change without a resolution change.
1152+ env->SetIntField(
1153+ jOutputBuffer,
1154+ jniContext->colorspace_field,
1155+ colorSpace);
1156+
1157+ if (frame->pts != AV_NOPTS_VALUE) {
1158+ env->SetLongField(
1159+ jOutputBuffer,
1160+ jniContext->pts_field,
1161+ frame->pts);
1162+ }
1163+
1164+ if (env->ExceptionCheck()) {
1165+ av_frame_free(&frame);
1166+ return VIDEO_DECODER_ERROR_OTHER;
1167+ }
1168+
1169+ jobject dataObject =
1170+ env->GetObjectField(
1171+ jOutputBuffer,
1172+ jniContext->data_field);
1173+
1174+ if (!dataObject) {
1175+ LOGE("Output data buffer is null.");
1176+ av_frame_free(&frame);
1177+ return VIDEO_DECODER_ERROR_OTHER;
1178+ }
1179+
1180+ uint8_t* data =
1181+ static_cast<uint8_t*>(
1182+ env->GetDirectBufferAddress(dataObject));
1183+ const jlong dataCapacity =
1184+ env->GetDirectBufferCapacity(dataObject);
1185+
1186+ const int uvHeight = (outputHeight + 1) / 2;
1187+
1188+ const size_t lengthY =
1189+ static_cast<size_t>(strideY) *
1190+ static_cast<size_t>(outputHeight);
1191+ const size_t lengthUv =
1192+ static_cast<size_t>(strideUv) *
1193+ static_cast<size_t>(uvHeight);
1194+ const size_t requiredSize =
1195+ lengthY + 2u * lengthUv;
1196+
1197+ if (!data ||
1198+ dataCapacity < 0 ||
1199+ requiredSize > static_cast<size_t>(dataCapacity)) {
1200+ LOGE("Invalid output YUV buffer: capacity=%lld required=%zu",
1201+ static_cast<long long>(dataCapacity),
1202+ requiredSize);
1203+
1204+ env->DeleteLocalRef(dataObject);
1205+ av_frame_free(&frame);
1206+ return VIDEO_DECODER_ERROR_OTHER;
1207+ }
1208+
1209+ const libyuv::RotationMode rotate =
1210+ cvt_rotate(jniContext->rotate_degree);
1211+
1212+ const int rotateResult =
1213+ libyuv::I420Rotate(
1214+ frame->data[0],
1215+ frame->linesize[0],
1216+ frame->data[1],
1217+ frame->linesize[1],
1218+ frame->data[2],
1219+ frame->linesize[2],
1220+ data,
1221+ strideY,
1222+ data + lengthY,
1223+ strideUv,
1224+ data + lengthY + lengthUv,
1225+ strideUv,
1226+ decodedWidth,
1227+ decodedHeight,
1228+ rotate);
1229+
1230+ env->DeleteLocalRef(dataObject);
1231+ av_frame_free(&frame);
1232+
1233+ if (rotateResult != 0) {
1234+ LOGE("I420Rotate failed: %d", rotateResult);
1235+ return VIDEO_DECODER_ERROR_OTHER;
1236+ }
1237+
1238+ return VIDEO_DECODER_SUCCESS;
1239+}
1240+
1241+int I420ToRgba8888(int colorSpace,
1242+ const uint8_t* srcY,
1243+ int srcStrideY,
1244+ const uint8_t* srcU,
1245+ int srcStrideU,
1246+ const uint8_t* srcV,
1247+ int srcStrideV,
1248+ uint8_t* dstRgba,
1249+ int dstStrideRgba,
1250+ int width,
1251+ int height) {
1252+ // libyuv names formats by register order. On little-endian Android,
1253+ // I420ToABGR writes R,G,B,A bytes in memory, which matches RGBA_8888.
1254+ switch (colorSpace) {
1255+ case 2: // COLORSPACE_BT709
1256+ return libyuv::H420ToABGR(
1257+ srcY, srcStrideY,
1258+ srcU, srcStrideU,
1259+ srcV, srcStrideV,
1260+ dstRgba, dstStrideRgba,
1261+ width, height);
1262+ case 3: // COLORSPACE_BT2020
1263+ return libyuv::U420ToABGR(
1264+ srcY, srcStrideY,
1265+ srcU, srcStrideU,
1266+ srcV, srcStrideV,
1267+ dstRgba, dstStrideRgba,
1268+ width, height);
1269+ case 1: // COLORSPACE_BT601
1270+ default:
1271+ return libyuv::I420ToABGR(
1272+ srcY, srcStrideY,
1273+ srcU, srcStrideU,
1274+ srcV, srcStrideV,
1275+ dstRgba, dstStrideRgba,
1276+ width, height);
1277+ }
1278+}
1279+
1280+VIDEO_DECODER_FUNC(
1281+ jint,
1282+ ffmpegRenderFrame,
1283+ jlong jContext,
1284+ jobject jSurface,
1285+ jobject jOutputBuffer,
1286+ jint displayedWidth,
1287+ jint displayedHeight) {
1288+ JniContext* const jniContext =
1289+ reinterpret_cast<JniContext*>(jContext);
1290+
1291+ if (!jniContext ||
1292+ !jniContext->codecContext ||
1293+ !jSurface ||
1294+ !jOutputBuffer ||
1295+ displayedWidth <= 0 ||
1296+ displayedHeight <= 0) {
1297+ LOGE("Invalid render arguments.");
1298+ return VIDEO_DECODER_ERROR_OTHER;
1299+ }
1300+
1301+ if (!jniContext->MaybeAcquireNativeWindow(env, jSurface)) {
1302+ return VIDEO_DECODER_ERROR_OTHER;
1303+ }
1304+
1305+ ANativeWindow* const nativeWindow = jniContext->native_window;
1306+ if (!nativeWindow) {
1307+ return VIDEO_DECODER_ERROR_OTHER;
1308+ }
1309+
1310+ jobject dataObject =
1311+ env->GetObjectField(jOutputBuffer, jniContext->data_field);
1312+ if (!dataObject) {
1313+ LOGE("Output data buffer is null.");
1314+ return VIDEO_DECODER_ERROR_OTHER;
1315+ }
1316+
1317+ uint8_t* data = static_cast<uint8_t*>(
1318+ env->GetDirectBufferAddress(dataObject));
1319+ const jlong dataCapacity = env->GetDirectBufferCapacity(dataObject);
1320+
1321+ const int frameWidth =
1322+ env->GetIntField(jOutputBuffer, jniContext->width_field);
1323+ const int frameHeight =
1324+ env->GetIntField(jOutputBuffer, jniContext->height_field);
1325+ const int srcStrideY =
1326+ env->GetIntField(jOutputBuffer, jniContext->y_stride_field);
1327+ const int srcStrideUv =
1328+ env->GetIntField(jOutputBuffer, jniContext->uv_stride_field);
1329+ const int colorSpace =
1330+ env->GetIntField(jOutputBuffer, jniContext->colorspace_field);
1331+
1332+ if (!data || dataCapacity < 0) {
1333+ LOGE("Output data is not a direct ByteBuffer.");
1334+ env->DeleteLocalRef(dataObject);
1335+ return VIDEO_DECODER_ERROR_OTHER;
1336+ }
1337+
1338+ if (frameWidth != displayedWidth || frameHeight != displayedHeight) {
1339+ LOGE("Frame/window size mismatch: frame=%dx%d window=%dx%d",
1340+ frameWidth, frameHeight, displayedWidth, displayedHeight);
1341+ env->DeleteLocalRef(dataObject);
1342+ return VIDEO_DECODER_ERROR_OTHER;
1343+ }
1344+
1345+ if (srcStrideY < frameWidth || srcStrideUv < (frameWidth + 1) / 2) {
1346+ LOGE("Invalid source strides: frame=%dx%d y=%d uv=%d",
1347+ frameWidth, frameHeight, srcStrideY, srcStrideUv);
1348+ env->DeleteLocalRef(dataObject);
1349+ return VIDEO_DECODER_ERROR_OTHER;
1350+ }
1351+
1352+ const int srcUvHeight = (frameHeight + 1) / 2;
1353+ const size_t srcLengthY =
1354+ static_cast<size_t>(srcStrideY) * static_cast<size_t>(frameHeight);
1355+ const size_t srcLengthUv =
1356+ static_cast<size_t>(srcStrideUv) * static_cast<size_t>(srcUvHeight);
1357+ const size_t srcRequiredSize = srcLengthY + 2u * srcLengthUv;
1358+
1359+ if (srcRequiredSize > static_cast<size_t>(dataCapacity)) {
1360+ LOGE("Source YUV buffer too small: capacity=%lld required=%zu",
1361+ static_cast<long long>(dataCapacity), srcRequiredSize);
1362+ env->DeleteLocalRef(dataObject);
1363+ return VIDEO_DECODER_ERROR_OTHER;
1364+ }
1365+
1366+ const uint8_t* srcY = data;
1367+ const uint8_t* srcU = data + srcLengthY;
1368+ const uint8_t* srcV = srcU + srcLengthUv;
1369+
1370+ // YV12 cannot represent odd dimensions. Go directly to the packed RGBA
1371+ // fallback instead of trying to invent a YV12 layout.
1372+ if ((displayedWidth & 1) != 0 || (displayedHeight & 1) != 0) {
1373+ jniContext->use_rgba_fallback = true;
1374+ }
1375+
1376+ // At most two attempts are needed. The first one tries the cheap YV12 path.
1377+ // If the vendor returns an unusable legacy stride (notably stride == 0),
1378+ // switch this decoder context permanently to RGBA_8888 and retry the same
1379+ // frame without guessing the YUV plane layout.
1380+ for (int attempt = 0; attempt < 2; ++attempt) {
1381+ const bool rgba = jniContext->use_rgba_fallback;
1382+ const int windowFormat =
1383+ rgba ? WINDOW_FORMAT_RGBA_8888 : kImageFormatYV12;
1384+
1385+ if (jniContext->native_window_width != displayedWidth ||
1386+ jniContext->native_window_height != displayedHeight ||
1387+ jniContext->native_window_format != windowFormat) {
1388+ const int geometryResult =
1389+ ANativeWindow_setBuffersGeometry(
1390+ nativeWindow,
1391+ displayedWidth,
1392+ displayedHeight,
1393+ windowFormat);
1394+ if (geometryResult != 0) {
1395+ LOGE("ANativeWindow_setBuffersGeometry failed: %d format=0x%x",
1396+ geometryResult, windowFormat);
1397+ env->DeleteLocalRef(dataObject);
1398+ return VIDEO_DECODER_ERROR_OTHER;
1399+ }
1400+
1401+ jniContext->native_window_width = displayedWidth;
1402+ jniContext->native_window_height = displayedHeight;
1403+ jniContext->native_window_format = windowFormat;
1404+ }
1405+
1406+ ANativeWindow_Buffer windowBuffer;
1407+ const int lockResult =
1408+ ANativeWindow_lock(nativeWindow, &windowBuffer, nullptr);
1409+
1410+ if (lockResult == -19) {
1411+ if (jniContext->surface != nullptr) {
1412+ env->DeleteGlobalRef(jniContext->surface);
1413+ jniContext->surface = nullptr;
1414+ }
1415+ jniContext->native_window_width = 0;
1416+ jniContext->native_window_height = 0;
1417+ jniContext->native_window_format = 0;
1418+ env->DeleteLocalRef(dataObject);
1419+ return VIDEO_DECODER_ERROR_SURFACE;
1420+ }
1421+
1422+ if (lockResult != 0 || !windowBuffer.bits) {
1423+ LOGE("ANativeWindow_lock failed: %d", lockResult);
1424+ env->DeleteLocalRef(dataObject);
1425+ return VIDEO_DECODER_ERROR_OTHER;
1426+ }
1427+
1428+ if (windowBuffer.width != displayedWidth ||
1429+ windowBuffer.height != displayedHeight) {
1430+ LOGE("Unexpected ANativeWindow size: buffer=%dx%d requested=%dx%d",
1431+ windowBuffer.width, windowBuffer.height,
1432+ displayedWidth, displayedHeight);
1433+ ANativeWindow_unlockAndPost(nativeWindow);
1434+ jniContext->native_window_width = 0;
1435+ jniContext->native_window_height = 0;
1436+ jniContext->native_window_format = 0;
1437+ env->DeleteLocalRef(dataObject);
1438+ return VIDEO_DECODER_ERROR_OTHER;
1439+ }
1440+
1441+ if (windowBuffer.format != windowFormat) {
1442+ LOGE("Unexpected ANativeWindow format: got=0x%x requested=0x%x",
1443+ windowBuffer.format, windowFormat);
1444+ ANativeWindow_unlockAndPost(nativeWindow);
1445+ jniContext->native_window_width = 0;
1446+ jniContext->native_window_height = 0;
1447+ jniContext->native_window_format = 0;
1448+ env->DeleteLocalRef(dataObject);
1449+ return VIDEO_DECODER_ERROR_OTHER;
1450+ }
1451+
1452+ if (!rgba && windowBuffer.stride == 0) {
1453+ // Some gralloc implementations expose no meaningful legacy stride for
1454+ // a YUV buffer through ANativeWindow_Buffer. There is no public NDK API
1455+ // that exposes the individual Y/U/V plane layouts of this already locked
1456+ // ANativeWindow buffer. Do not guess ALIGN(width, 16): a vendor is free
1457+ // to use a larger allocation stride.
1458+ LOGW("YV12 ANativeWindow returned stride=0; switching to RGBA fallback "
1459+ "for this decoder context (size=%dx%d)",
1460+ windowBuffer.width, windowBuffer.height);
1461+
1462+ const int unlockResult = ANativeWindow_unlockAndPost(nativeWindow);
1463+ if (unlockResult != 0) {
1464+ LOGE("ANativeWindow_unlockAndPost failed while switching format: %d",
1465+ unlockResult);
1466+ env->DeleteLocalRef(dataObject);
1467+ return VIDEO_DECODER_ERROR_OTHER;
1468+ }
1469+
1470+ jniContext->use_rgba_fallback = true;
1471+ jniContext->native_window_width = 0;
1472+ jniContext->native_window_height = 0;
1473+ jniContext->native_window_format = 0;
1474+ continue;
1475+ }
1476+
1477+ int renderResult = VIDEO_DECODER_SUCCESS;
1478+
1479+ if (!rgba) {
1480+ if (windowBuffer.stride < windowBuffer.width ||
1481+ (windowBuffer.stride & 15) != 0) {
1482+ LOGE("Invalid YV12 stride: width=%d stride=%d",
1483+ windowBuffer.width, windowBuffer.stride);
1484+ renderResult = VIDEO_DECODER_ERROR_OTHER;
1485+ } else {
1486+ const int dstStrideY = windowBuffer.stride;
1487+ const int dstStrideUv = AlignTo16(dstStrideY / 2);
1488+ const int dstUvHeight = windowBuffer.height / 2;
1489+
1490+ const size_t dstLengthY =
1491+ static_cast<size_t>(dstStrideY) *
1492+ static_cast<size_t>(windowBuffer.height);
1493+ const size_t dstLengthUv =
1494+ static_cast<size_t>(dstStrideUv) *
1495+ static_cast<size_t>(dstUvHeight);
1496+
1497+ uint8_t* dstY = static_cast<uint8_t*>(windowBuffer.bits);
1498+ uint8_t* dstV = dstY + dstLengthY;
1499+ uint8_t* dstU = dstV + dstLengthUv;
1500+
1501+ const int copyResult =
1502+ libyuv::I420Copy(
1503+ srcY, srcStrideY,
1504+ srcU, srcStrideUv,
1505+ srcV, srcStrideUv,
1506+ dstY, dstStrideY,
1507+ dstU, dstStrideUv,
1508+ dstV, dstStrideUv,
1509+ frameWidth, frameHeight);
1510+
1511+ if (copyResult != 0) {
1512+ LOGE("I420Copy failed: %d", copyResult);
1513+ renderResult = VIDEO_DECODER_ERROR_OTHER;
1514+ }
1515+ }
1516+ } else {
1517+ if (windowBuffer.stride < windowBuffer.width) {
1518+ LOGE("Invalid RGBA stride: width=%d stride=%d",
1519+ windowBuffer.width, windowBuffer.stride);
1520+ renderResult = VIDEO_DECODER_ERROR_OTHER;
1521+ } else {
1522+ const int dstStrideBytes = windowBuffer.stride * 4;
1523+ uint8_t* dstRgba = static_cast<uint8_t*>(windowBuffer.bits);
1524+
1525+ const int convertResult =
1526+ I420ToRgba8888(
1527+ colorSpace,
1528+ srcY, srcStrideY,
1529+ srcU, srcStrideUv,
1530+ srcV, srcStrideUv,
1531+ dstRgba, dstStrideBytes,
1532+ frameWidth, frameHeight);
1533+
1534+ if (convertResult != 0) {
1535+ LOGE("I420ToRgba8888 failed: %d", convertResult);
1536+ renderResult = VIDEO_DECODER_ERROR_OTHER;
1537+ }
1538+ }
1539+ }
1540+
1541+ const int unlockResult =
1542+ ANativeWindow_unlockAndPost(nativeWindow);
1543+ if (unlockResult != 0) {
1544+ LOGE("ANativeWindow_unlockAndPost failed: %d", unlockResult);
1545+ env->DeleteLocalRef(dataObject);
1546+ return VIDEO_DECODER_ERROR_OTHER;
1547+ }
1548+
1549+ env->DeleteLocalRef(dataObject);
1550+ return renderResult;
1551+ }
1552+
1553+ env->DeleteLocalRef(dataObject);
1554+ return VIDEO_DECODER_ERROR_OTHER;
1555+}
1556+
1557+extern "C" int ffmpegOnJNILoad(JavaVM *vm, JNIEnv *env) {
1558+ jclass clazz =
1559+ env->FindClass(
1560+ "androidx/media3/decoder/ffmpeg/FfmpegAudioDecoder");
1561+ if (!clazz) {
1562+ LOGE("JNI_OnLoad: FindClass failed");
1563+ return -1;
1564+ }
1565+
1566+ growOutputBufferMethod =
1567+ env->GetMethodID(
1568+ clazz,
1569+ "growOutputBuffer",
1570+ "(Landroidx/media3/decoder/"
1571+ "SimpleDecoderOutputBuffer;I)Ljava/nio/ByteBuffer;");
1572+ if (!growOutputBufferMethod) {
1573+ LOGE("JNI_OnLoad: GetMethodID failed");
1574+ return -1;
1575+ }
1576+
1577+ static const JNINativeMethod kFfmpegAudioDecoderMethods[] = {
1578+ {"ffmpegInitialize", "(Ljava/lang/String;[BZII)J",
1579+ reinterpret_cast<void*>(ffmpegInitialize)},
1580+ {"ffmpegDecode",
1581+ "(JLjava/nio/ByteBuffer;ILandroidx/media3/decoder/"
1582+ "SimpleDecoderOutputBuffer;Ljava/nio/ByteBuffer;I)I",
1583+ reinterpret_cast<void*>(ffmpegDecode)},
1584+ {"ffmpegGetChannelCount", "(J)I",
1585+ reinterpret_cast<void*>(ffmpegGetChannelCount)},
1586+ {"ffmpegGetSampleRate", "(J)I",
1587+ reinterpret_cast<void*>(ffmpegGetSampleRate)},
1588+ {"ffmpegReset", "(J[B)J",
1589+ reinterpret_cast<void*>(ffmpegReset)},
1590+ {"ffmpegRelease", "(J)V",
1591+ reinterpret_cast<void*>(ffmpegRelease)},
1592+ };
1593+
1594+ if (env->RegisterNatives(
1595+ clazz,
1596+ kFfmpegAudioDecoderMethods,
1597+ sizeof(kFfmpegAudioDecoderMethods) /
1598+ sizeof(kFfmpegAudioDecoderMethods[0])) < 0) {
1599+ LOGE("JNI_OnLoad: RegisterNatives failed for FfmpegAudioDecoder");
1600+ return -1;
1601+ }
1602+
1603+ jclass libraryClazz =
1604+ env->FindClass(
1605+ "androidx/media3/decoder/ffmpeg/FfmpegLibrary");
1606+ if (!libraryClazz) {
1607+ LOGE("JNI_OnLoad: FindClass failed for FfmpegLibrary");
1608+ return -1;
1609+ }
1610+
1611+ static const JNINativeMethod kFfmpegLibraryMethods[] = {
1612+ {"ffmpegGetVersion", "()Ljava/lang/String;",
1613+ reinterpret_cast<void*>(ffmpegGetVersion)},
1614+ {"ffmpegGetInputBufferPaddingSize", "()I",
1615+ reinterpret_cast<void*>(ffmpegGetInputBufferPaddingSize)},
1616+ {"ffmpegHasDecoder", "(Ljava/lang/String;)Z",
1617+ reinterpret_cast<void*>(ffmpegHasDecoder)},
1618+ {"ffmpegGetAv1DecoderName", "()Ljava/lang/String;",
1619+ reinterpret_cast<void*>(ffmpegGetAv1DecoderName)},
1620+ };
1621+
1622+ if (env->RegisterNatives(
1623+ libraryClazz,
1624+ kFfmpegLibraryMethods,
1625+ sizeof(kFfmpegLibraryMethods) /
1626+ sizeof(kFfmpegLibraryMethods[0])) < 0) {
1627+ LOGE("JNI_OnLoad: RegisterNatives failed for FfmpegLibrary");
1628+ return -1;
1629+ }
1630+
1631+ return JNI_TRUE;
1632+}
TMessagesProj/jni/genann.cnew file+357
@@ -0,0 +1,357 @@
1+/*
2+ * GENANN - Minimal C Artificial Neural Network
3+ *
4+ * Copyright (c) 2015, 2016 Lewis Van Winkle
5+ *
6+ * http://CodePlea.com
7+ *
8+ * This software is provided 'as-is', without any express or implied
9+ * warranty. In no event will the authors be held liable for any damages
10+ * arising from the use of this software.
11+ *
12+ * Permission is granted to anyone to use this software for any purpose,
13+ * including commercial applications, and to alter it and redistribute it
14+ * freely, subject to the following restrictions:
15+ *
16+ * 1. The origin of this software must not be misrepresented; you must not
17+ * claim that you wrote the original software. If you use this software
18+ * in a product, an acknowledgement in the product documentation would be
19+ * appreciated but is not required.
20+ * 2. Altered source versions must be plainly marked as such, and must not be
21+ * misrepresented as being the original software.
22+ * 3. This notice may not be removed or altered from any source distribution.
23+ *
24+ */
25+
26+#include "genann.h"
27+
28+#include <stdlib.h>
29+#include <string.h>
30+#include <math.h>
31+#include <assert.h>
32+#include <stdio.h>
33+
34+#define LOOKUP_SIZE 4096
35+
36+double genann_act_sigmoid(double a) {
37+ if (a < -45.0) return 0;
38+ if (a > 45.0) return 1;
39+ return 1.0 / (1 + exp(-a));
40+}
41+
42+
43+double genann_act_sigmoid_cached(double a) {
44+ /* If you're optimizing for memory usage, just
45+ * delete this entire function and replace references
46+ * of genann_act_sigmoid_cached to genann_act_sigmoid
47+ */
48+ const double min = -15.0;
49+ const double max = 15.0;
50+ static double interval;
51+ static int initialized = 0;
52+ static double lookup[LOOKUP_SIZE];
53+
54+ /* Calculate entire lookup table on first run. */
55+ if (!initialized) {
56+ interval = (max - min) / LOOKUP_SIZE;
57+ int i;
58+ for (i = 0; i < LOOKUP_SIZE; ++i) {
59+ lookup[i] = genann_act_sigmoid(min + interval * i);
60+ }
61+ /* This is down here to make this thread safe. */
62+ initialized = 1;
63+ }
64+
65+ int i;
66+ i = (int)((a-min)/interval+0.5);
67+ if (i <= 0) return lookup[0];
68+ if (i >= LOOKUP_SIZE) return lookup[LOOKUP_SIZE-1];
69+ return lookup[i];
70+}
71+
72+
73+double genann_act_threshold(double a) {
74+ return a > 0;
75+}
76+
77+
78+double genann_act_linear(double a) {
79+ return a;
80+}
81+
82+
83+genann *genann_init(int inputs, int hidden_layers, int hidden, int outputs) {
84+ if (hidden_layers < 0) return 0;
85+ if (inputs < 1) return 0;
86+ if (outputs < 1) return 0;
87+ if (hidden_layers > 0 && hidden < 1) return 0;
88+
89+
90+ const int hidden_weights = hidden_layers ? (inputs+1) * hidden + (hidden_layers-1) * (hidden+1) * hidden : 0;
91+ const int output_weights = (hidden_layers ? (hidden+1) : (inputs+1)) * outputs;
92+ const int total_weights = (hidden_weights + output_weights);
93+
94+ const int total_neurons = (inputs + hidden * hidden_layers + outputs);
95+
96+ /* Allocate extra size for weights, outputs, and deltas. */
97+ const int size = sizeof(genann) + sizeof(double) * (total_weights + total_neurons + (total_neurons - inputs));
98+ genann *ret = malloc(size);
99+ if (!ret) return 0;
100+
101+ ret->inputs = inputs;
102+ ret->hidden_layers = hidden_layers;
103+ ret->hidden = hidden;
104+ ret->outputs = outputs;
105+
106+ ret->total_weights = total_weights;
107+ ret->total_neurons = total_neurons;
108+
109+ /* Set pointers. */
110+ ret->weight = (double*)((char*)ret + sizeof(genann));
111+ ret->output = ret->weight + ret->total_weights;
112+ ret->delta = ret->output + ret->total_neurons;
113+
114+ genann_randomize(ret);
115+
116+ ret->activation_hidden = genann_act_sigmoid_cached;
117+ ret->activation_output = genann_act_sigmoid_cached;
118+
119+ return ret;
120+}
121+
122+
123+genann *genann_read(FILE *in) {
124+ int inputs, hidden_layers, hidden, outputs;
125+ fscanf(in, "%d %d %d %d", &inputs, &hidden_layers, &hidden, &outputs);
126+
127+ genann *ann = genann_init(inputs, hidden_layers, hidden, outputs);
128+
129+ int i;
130+ for (i = 0; i < ann->total_weights; ++i) {
131+ fscanf(in, " %le", ann->weight + i);
132+ }
133+
134+ return ann;
135+}
136+
137+
138+genann *genann_copy(genann const *ann) {
139+ const int size = sizeof(genann) + sizeof(double) * (ann->total_weights + ann->total_neurons + (ann->total_neurons - ann->inputs));
140+ genann *ret = malloc(size);
141+ if (!ret) return 0;
142+
143+ memcpy(ret, ann, size);
144+
145+ /* Set pointers. */
146+ ret->weight = (double*)((char*)ret + sizeof(genann));
147+ ret->output = ret->weight + ret->total_weights;
148+ ret->delta = ret->output + ret->total_neurons;
149+
150+ return ret;
151+}
152+
153+
154+void genann_randomize(genann *ann) {
155+ int i;
156+ for (i = 0; i < ann->total_weights; ++i) {
157+ double r = GENANN_RANDOM();
158+ /* Sets weights from -0.5 to 0.5. */
159+ ann->weight[i] = r - 0.5;
160+ }
161+}
162+
163+
164+void genann_free(genann *ann) {
165+ /* The weight, output, and delta pointers go to the same buffer. */
166+ free(ann);
167+}
168+
169+
170+double const *genann_run(genann const *ann, double const *inputs) {
171+ double const *w = ann->weight;
172+ double *o = ann->output + ann->inputs;
173+ double const *i = ann->output;
174+
175+ /* Copy the inputs to the scratch area, where we also store each neuron's
176+ * output, for consistency. This way the first layer isn't a special case. */
177+ memcpy(ann->output, inputs, sizeof(double) * ann->inputs);
178+
179+ int h, j, k;
180+
181+ const genann_actfun act = ann->activation_hidden;
182+ const genann_actfun acto = ann->activation_output;
183+
184+ /* Figure hidden layers, if any. */
185+ for (h = 0; h < ann->hidden_layers; ++h) {
186+ for (j = 0; j < ann->hidden; ++j) {
187+ double sum = 0;
188+ for (k = 0; k < (h == 0 ? ann->inputs : ann->hidden) + 1; ++k) {
189+ if (k == 0) {
190+ sum += *w++ * -1.0;
191+ } else {
192+ sum += *w++ * i[k-1];
193+ }
194+ }
195+ *o++ = act(sum);
196+ }
197+
198+
199+ i += (h == 0 ? ann->inputs : ann->hidden);
200+ }
201+
202+ double const *ret = o;
203+
204+ /* Figure output layer. */
205+ for (j = 0; j < ann->outputs; ++j) {
206+ double sum = 0;
207+ for (k = 0; k < (ann->hidden_layers ? ann->hidden : ann->inputs) + 1; ++k) {
208+ if (k == 0) {
209+ sum += *w++ * -1.0;
210+ } else {
211+ sum += *w++ * i[k-1];
212+ }
213+ }
214+ *o++ = acto(sum);
215+ }
216+
217+ /* Sanity check that we used all weights and wrote all outputs. */
218+ assert(w - ann->weight == ann->total_weights);
219+ assert(o - ann->output == ann->total_neurons);
220+
221+ return ret;
222+}
223+
224+
225+void genann_train(genann const *ann, double const *inputs, double const *desired_outputs, double learning_rate) {
226+ /* To begin with, we must run the network forward. */
227+ genann_run(ann, inputs);
228+
229+ int h, j, k;
230+
231+ /* First set the output layer deltas. */
232+ {
233+ double const *o = ann->output + ann->inputs + ann->hidden * ann->hidden_layers; /* First output. */
234+ double *d = ann->delta + ann->hidden * ann->hidden_layers; /* First delta. */
235+ double const *t = desired_outputs; /* First desired output. */
236+
237+
238+ /* Set output layer deltas. */
239+ if (ann->activation_output == genann_act_linear) {
240+ for (j = 0; j < ann->outputs; ++j) {
241+ *d++ = *t++ - *o++;
242+ }
243+ } else {
244+ for (j = 0; j < ann->outputs; ++j) {
245+ *d++ = (*t - *o) * *o * (1.0 - *o);
246+ ++o; ++t;
247+ }
248+ }
249+ }
250+
251+
252+ /* Set hidden layer deltas, start on last layer and work backwards. */
253+ /* Note that loop is skipped in the case of hidden_layers == 0. */
254+ for (h = ann->hidden_layers - 1; h >= 0; --h) {
255+
256+ /* Find first output and delta in this layer. */
257+ double const *o = ann->output + ann->inputs + (h * ann->hidden);
258+ double *d = ann->delta + (h * ann->hidden);
259+
260+ /* Find first delta in following layer (which may be hidden or output). */
261+ double const * const dd = ann->delta + ((h+1) * ann->hidden);
262+
263+ /* Find first weight in following layer (which may be hidden or output). */
264+ double const * const ww = ann->weight + ((ann->inputs+1) * ann->hidden) + ((ann->hidden+1) * ann->hidden * (h));
265+
266+ for (j = 0; j < ann->hidden; ++j) {
267+
268+ double delta = 0;
269+
270+ for (k = 0; k < (h == ann->hidden_layers-1 ? ann->outputs : ann->hidden); ++k) {
271+ const double forward_delta = dd[k];
272+ const int windex = k * (ann->hidden + 1) + (j + 1);
273+ const double forward_weight = ww[windex];
274+ delta += forward_delta * forward_weight;
275+ }
276+
277+ *d = *o * (1.0-*o) * delta;
278+ ++d; ++o;
279+ }
280+ }
281+
282+
283+ /* Train the outputs. */
284+ {
285+ /* Find first output delta. */
286+ double const *d = ann->delta + ann->hidden * ann->hidden_layers; /* First output delta. */
287+
288+ /* Find first weight to first output delta. */
289+ double *w = ann->weight + (ann->hidden_layers
290+ ? ((ann->inputs+1) * ann->hidden + (ann->hidden+1) * ann->hidden * (ann->hidden_layers-1))
291+ : (0));
292+
293+ /* Find first output in previous layer. */
294+ double const * const i = ann->output + (ann->hidden_layers
295+ ? (ann->inputs + (ann->hidden) * (ann->hidden_layers-1))
296+ : 0);
297+
298+ /* Set output layer weights. */
299+ for (j = 0; j < ann->outputs; ++j) {
300+ for (k = 0; k < (ann->hidden_layers ? ann->hidden : ann->inputs) + 1; ++k) {
301+ if (k == 0) {
302+ *w++ += *d * learning_rate * -1.0;
303+ } else {
304+ *w++ += *d * learning_rate * i[k-1];
305+ }
306+ }
307+
308+ ++d;
309+ }
310+
311+ assert(w - ann->weight == ann->total_weights);
312+ }
313+
314+
315+ /* Train the hidden layers. */
316+ for (h = ann->hidden_layers - 1; h >= 0; --h) {
317+
318+ /* Find first delta in this layer. */
319+ double const *d = ann->delta + (h * ann->hidden);
320+
321+ /* Find first input to this layer. */
322+ double const *i = ann->output + (h
323+ ? (ann->inputs + ann->hidden * (h-1))
324+ : 0);
325+
326+ /* Find first weight to this layer. */
327+ double *w = ann->weight + (h
328+ ? ((ann->inputs+1) * ann->hidden + (ann->hidden+1) * (ann->hidden) * (h-1))
329+ : 0);
330+
331+
332+ for (j = 0; j < ann->hidden; ++j) {
333+ for (k = 0; k < (h == 0 ? ann->inputs : ann->hidden) + 1; ++k) {
334+ if (k == 0) {
335+ *w++ += *d * learning_rate * -1.0;
336+ } else {
337+ *w++ += *d * learning_rate * i[k-1];
338+ }
339+ }
340+ ++d;
341+ }
342+
343+ }
344+
345+}
346+
347+
348+void genann_write(genann const *ann, FILE *out) {
349+ fprintf(out, "%d %d %d %d", ann->inputs, ann->hidden_layers, ann->hidden, ann->outputs);
350+
351+ int i;
352+ for (i = 0; i < ann->total_weights; ++i) {
353+ fprintf(out, " %.20e", ann->weight[i]);
354+ }
355+}
356+
357+
TMessagesProj/jni/genann.hnew file+110
@@ -0,0 +1,110 @@
1+/*
2+ * GENANN - Minimal C Artificial Neural Network
3+ *
4+ * Copyright (c) 2015, 2016 Lewis Van Winkle
5+ *
6+ * http://CodePlea.com
7+ *
8+ * This software is provided 'as-is', without any express or implied
9+ * warranty. In no event will the authors be held liable for any damages
10+ * arising from the use of this software.
11+ *
12+ * Permission is granted to anyone to use this software for any purpose,
13+ * including commercial applications, and to alter it and redistribute it
14+ * freely, subject to the following restrictions:
15+ *
16+ * 1. The origin of this software must not be misrepresented; you must not
17+ * claim that you wrote the original software. If you use this software
18+ * in a product, an acknowledgement in the product documentation would be
19+ * appreciated but is not required.
20+ * 2. Altered source versions must be plainly marked as such, and must not be
21+ * misrepresented as being the original software.
22+ * 3. This notice may not be removed or altered from any source distribution.
23+ *
24+ */
25+
26+
27+#ifndef __GENANN_H__
28+#define __GENANN_H__
29+
30+#include <stdio.h>
31+
32+#ifdef __cplusplus
33+extern "C" {
34+#endif
35+
36+#ifndef GENANN_RANDOM
37+/* We use the following for uniform random numbers between 0 and 1.
38+ * If you have a better function, redefine this macro. */
39+#define GENANN_RANDOM() (((double)rand())/RAND_MAX)
40+#endif
41+
42+
43+typedef double (*genann_actfun)(double a);
44+
45+
46+typedef struct genann {
47+ /* How many inputs, outputs, and hidden neurons. */
48+ int inputs, hidden_layers, hidden, outputs;
49+
50+ /* Which activation function to use for hidden neurons. Default: gennann_act_sigmoid_cached*/
51+ genann_actfun activation_hidden;
52+
53+ /* Which activation function to use for output. Default: gennann_act_sigmoid_cached*/
54+ genann_actfun activation_output;
55+
56+ /* Total number of weights, and size of weights buffer. */
57+ int total_weights;
58+
59+ /* Total number of neurons + inputs and size of output buffer. */
60+ int total_neurons;
61+
62+ /* All weights (total_weights long). */
63+ double *weight;
64+
65+ /* Stores input array and output of each neuron (total_neurons long). */
66+ double *output;
67+
68+ /* Stores delta of each hidden and output neuron (total_neurons - inputs long). */
69+ double *delta;
70+
71+} genann;
72+
73+
74+
75+/* Creates and returns a new ann. */
76+genann *genann_init(int inputs, int hidden_layers, int hidden, int outputs);
77+
78+/* Creates ANN from file saved with genann_write. */
79+genann *genann_read(FILE *in);
80+
81+/* Sets weights randomly. Called by init. */
82+void genann_randomize(genann *ann);
83+
84+/* Returns a new copy of ann. */
85+genann *genann_copy(genann const *ann);
86+
87+/* Frees the memory used by an ann. */
88+void genann_free(genann *ann);
89+
90+/* Runs the feedforward algorithm to calculate the ann's output. */
91+double const *genann_run(genann const *ann, double const *inputs);
92+
93+/* Does a single backprop update. */
94+void genann_train(genann const *ann, double const *inputs, double const *desired_outputs, double learning_rate);
95+
96+/* Saves the ann. */
97+void genann_write(genann const *ann, FILE *out);
98+
99+
100+double genann_act_sigmoid(double a);
101+double genann_act_sigmoid_cached(double a);
102+double genann_act_threshold(double a);
103+double genann_act_linear(double a);
104+
105+
106+#ifdef __cplusplus
107+}
108+#endif
109+
110+#endif /*__GENANN_H__*/
TMessagesProj/jni/gifvideo.cppnew file+1034
@@ -0,0 +1,1034 @@
1+#include <jni.h>
2+#include <android/bitmap.h>
3+#include <cstdint>
4+#include <limits>
5+#include <string>
6+#include <unistd.h>
7+#include <linux/stat.h>
8+#include <asm/fcntl.h>
9+#include <fcntl.h>
10+#include <libyuv.h>
11+#include <tgnet/FileLog.h>
12+#include "tgnet/ConnectionsManager.h"
13+#include "voip/webrtc/common_video/h264/sps_parser.h"
14+#include "voip/webrtc/common_video/h264/h264_common.h"
15+#include "c_utils.h"
16+#include "gifvideo/sws_context_holder.h"
17+#include "gifvideo/video_frame_reader.h"
18+#include <cmath>
19+
20+extern "C" {
21+#include <libavformat/avformat.h>
22+#include <libavutil/eval.h>
23+#include <libswscale/swscale.h>
24+#include <libavutil/display.h>
25+}
26+
27+#define RGB8888_A(p) ((p & (0xff<<24)) >> 24 )
28+
29+static const std::string av_make_error_str(int errnum) {
30+ char errbuf[AV_ERROR_MAX_STRING_SIZE];
31+ av_strerror(errnum, errbuf, AV_ERROR_MAX_STRING_SIZE);
32+ return (std::string) errbuf;
33+}
34+
35+#undef av_err2str
36+#define av_err2str(errnum) av_make_error_str(errnum).c_str()
37+#define FFMPEG_AVSEEK_SIZE 0x10000
38+
39+jclass jclass_AnimatedFileDrawableStream;
40+jmethodID jclass_AnimatedFileDrawableStream_read;
41+jmethodID jclass_AnimatedFileDrawableStream_cancel;
42+jmethodID jclass_AnimatedFileDrawableStream_isCanceled;
43+jmethodID jclass_AnimatedFileDrawableStream_isFinishedLoadingFile;
44+jmethodID jclass_AnimatedFileDrawableStream_getFinishedFilePath;
45+
46+struct OffsetIOContext;
47+struct VideoInfo;
48+static void freeOffsetIO(VideoInfo *info);
49+
50+typedef struct VideoInfo {
51+
52+ ~VideoInfo() {
53+ delete reader;
54+ reader = nullptr;
55+
56+ if (video_dec_ctx) {
57+ // avcodec_close() frees internals but NOT the context allocated by
58+ // avcodec_alloc_context3(); avcodec_free_context() frees both.
59+ avcodec_free_context(&video_dec_ctx);
60+ }
61+ if (fmt_ctx) {
62+ avformat_close_input(&fmt_ctx);
63+ fmt_ctx = nullptr;
64+ }
65+ if (src) {
66+ delete [] src;
67+ src = nullptr;
68+ }
69+ if (stream != nullptr) {
70+ JNIEnv *jniEnv = nullptr;
71+ JavaVMAttachArgs jvmArgs;
72+ jvmArgs.version = JNI_VERSION_1_6;
73+
74+ bool attached;
75+ if (JNI_EDETACHED == javaVm->GetEnv((void **) &jniEnv, JNI_VERSION_1_6)) {
76+ javaVm->AttachCurrentThread(&jniEnv, &jvmArgs);
77+ attached = true;
78+ } else {
79+ attached = false;
80+ }
81+ DEBUG_DELREF("gifvideo.cpp stream");
82+ jniEnv->DeleteGlobalRef(stream);
83+ if (attached) {
84+ javaVm->DetachCurrentThread();
85+ }
86+ stream = nullptr;
87+ }
88+ if (ioContext != nullptr) {
89+ if (ioContext->buffer) {
90+ av_freep(&ioContext->buffer);
91+ }
92+ avio_context_free(&ioContext);
93+ ioContext = nullptr;
94+ }
95+ freeOffsetIO(this);
96+ if (fd >= 0) {
97+ close(fd);
98+ fd = -1;
99+ }
100+
101+ video_stream_idx = -1;
102+ video_stream = nullptr;
103+ audio_stream = nullptr;
104+ }
105+
106+ AVFormatContext *fmt_ctx = nullptr;
107+ char *src = nullptr;
108+ int video_stream_idx = -1;
109+ AVStream *video_stream = nullptr;
110+ AVStream *audio_stream = nullptr;
111+ AVCodecContext *video_dec_ctx = nullptr;
112+ // Borrows fmt_ctx and video_dec_ctx; must be deleted before them (see dtor).
113+ VideoFrameReader *reader = nullptr;
114+ bool stopped = false;
115+ bool seeking = false;
116+ bool afterEof = false;
117+ bool isSingleFrame = false;
118+
119+ struct SwsContextHolder sws_ctx_holder;
120+
121+ AVIOContext *ioContext = nullptr;
122+ unsigned char *ioBuffer = nullptr;
123+ // Custom AVIO for the fileOffset path in nGetVideoInfo. Owned here because
124+ // fmt_ctx->pb is not freed by avformat_close_input for a caller-supplied pb.
125+ AVIOContext *offsetIoContext = nullptr;
126+ struct OffsetIOContext *offsetIoOpaque = nullptr;
127+ jobject stream = nullptr;
128+ int32_t account = 0;
129+ int fd = -1;
130+ int64_t file_size = 0;
131+ int64_t last_seek_p = 0;
132+};
133+
134+void custom_log(void *ptr, int level, const char* fmt, va_list vl){
135+ va_list vl2;
136+ char line[1024];
137+ static int print_prefix = 1;
138+
139+ va_copy(vl2, vl);
140+ av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
141+ va_end(vl2);
142+
143+ LOGE(line);
144+}
145+
146+static enum AVPixelFormat get_format(AVCodecContext *ctx,
147+ const enum AVPixelFormat *pix_fmts)
148+{
149+ const enum AVPixelFormat *p;
150+
151+ for (p = pix_fmts; *p != -1; p++) {
152+ LOGE("available format %d", p);
153+ }
154+
155+ return pix_fmts[0];
156+}
157+
158+int open_codec_context(int *stream_idx, AVCodecContext **dec_ctx, AVFormatContext *fmt_ctx, enum AVMediaType type) {
159+ int ret, stream_index;
160+ AVStream *st;
161+ const AVCodec *dec = NULL;
162+ AVDictionary *opts = NULL;
163+
164+ ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0);
165+ if (ret < 0) {
166+ LOGE("can't find %s stream in input file", av_get_media_type_string(type));
167+ return ret;
168+ } else {
169+ stream_index = ret;
170+ st = fmt_ctx->streams[stream_index];
171+
172+ dec = avcodec_find_decoder(st->codecpar->codec_id);
173+ if (!dec) {
174+ LOGE("failed to find %d codec", st->codecpar->codec_id);
175+ return AVERROR(EINVAL);
176+ }
177+
178+ *dec_ctx = avcodec_alloc_context3(dec);
179+ if (!*dec_ctx) {
180+ LOGE("Failed to allocate the %s codec context", av_get_media_type_string(type));
181+ return AVERROR(ENOMEM);
182+ }
183+
184+ if ((ret = avcodec_parameters_to_context(*dec_ctx, st->codecpar)) < 0) {
185+ LOGE("Failed to copy %s codec parameters to decoder context", av_get_media_type_string(type));
186+ return ret;
187+ }
188+
189+ av_dict_set(&opts, "refcounted_frames", "1", 0);
190+ ret = avcodec_open2(*dec_ctx, dec, &opts);
191+ av_dict_free(&opts); // frees leftover (unconsumed) options on all paths
192+ if (ret < 0) {
193+ LOGE("Failed to open %s codec", av_get_media_type_string(type));
194+ return ret;
195+ }
196+ *stream_idx = stream_index;
197+ }
198+
199+ return 0;
200+}
201+
202+void requestFd(VideoInfo *info) {
203+ JNIEnv *jniEnv = nullptr;
204+
205+ JavaVMAttachArgs jvmArgs;
206+ jvmArgs.version = JNI_VERSION_1_6;
207+
208+ bool attached;
209+ if (JNI_EDETACHED == javaVm->GetEnv((void **) &jniEnv, JNI_VERSION_1_6)) {
210+ javaVm->AttachCurrentThread(&jniEnv, &jvmArgs);
211+ attached = true;
212+ } else {
213+ attached = false;
214+ }
215+ jniEnv->CallIntMethod(info->stream, jclass_AnimatedFileDrawableStream_read, (jint) 0, (jint) 1);
216+ jboolean loaded = jniEnv->CallBooleanMethod(info->stream, jclass_AnimatedFileDrawableStream_isFinishedLoadingFile);
217+ if (loaded) {
218+ delete[] info->src;
219+ jstring src = (jstring) jniEnv->CallObjectMethod(info->stream, jclass_AnimatedFileDrawableStream_getFinishedFilePath);
220+ char const *srcString = jniEnv->GetStringUTFChars(src, 0);
221+ size_t len = strlen(srcString);
222+ info->src = new char[len + 1];
223+ memcpy(info->src, srcString, len);
224+ info->src[len] = '\0';
225+ if (srcString != 0) {
226+ jniEnv->ReleaseStringUTFChars(src, srcString);
227+ }
228+ }
229+
230+ if (attached) {
231+ javaVm->DetachCurrentThread();
232+ }
233+ info->fd = open(info->src, O_RDONLY, S_IRUSR);
234+}
235+
236+int readCallback(void *opaque, uint8_t *buf, int buf_size) {
237+ VideoInfo *info = (VideoInfo *) opaque;
238+ if (!info->stopped) {
239+ if (info->fd < 0) {
240+ requestFd(info);
241+ }
242+ if (info->fd >= 0) {
243+ if (info->last_seek_p + buf_size > info->file_size) {
244+ buf_size = (int) (info->file_size - info->last_seek_p);
245+ }
246+ if (buf_size > 0) {
247+ JNIEnv *jniEnv = nullptr;
248+
249+ JavaVMAttachArgs jvmArgs;
250+ jvmArgs.version = JNI_VERSION_1_6;
251+
252+ bool attached;
253+ if (JNI_EDETACHED == javaVm->GetEnv((void **) &jniEnv, JNI_VERSION_1_6)) {
254+ javaVm->AttachCurrentThread(&jniEnv, &jvmArgs);
255+ attached = true;
256+ } else {
257+ attached = false;
258+ }
259+
260+ buf_size = jniEnv->CallIntMethod(info->stream, jclass_AnimatedFileDrawableStream_read, (jint) info->last_seek_p, (jint) buf_size);
261+ info->last_seek_p += buf_size;
262+ if (attached) {
263+ javaVm->DetachCurrentThread();
264+ }
265+ if (buf_size == 0) {
266+ return AVERROR_EXIT;
267+ }
268+ int ret = (int) read(info->fd, buf, (size_t) buf_size);
269+ if (ret <= 0) {
270+ return AVERROR_EOF;
271+ }
272+ return ret;
273+ }
274+ }
275+ }
276+ return AVERROR_EOF;
277+}
278+
279+int64_t seekCallback(void *opaque, int64_t offset, int whence) {
280+ VideoInfo *info = (VideoInfo *) opaque;
281+ if (!info->stopped) {
282+ if (info->fd < 0) {
283+ requestFd(info);
284+ }
285+ if (info->fd >= 0) {
286+ if (whence & FFMPEG_AVSEEK_SIZE) {
287+ return info->file_size;
288+ } else {
289+ info->last_seek_p = offset;
290+ lseek(info->fd, off_t(offset), SEEK_SET);
291+ return offset;
292+ }
293+ }
294+ }
295+ return 0;
296+}
297+
298+enum PARAM_NUM {
299+ PARAM_NUM_SUPPORTED_VIDEO_CODEC = 0,
300+ PARAM_NUM_WIDTH = 1,
301+ PARAM_NUM_HEIGHT = 2,
302+ PARAM_NUM_BITRATE = 3,
303+ PARAM_NUM_DURATION = 4,
304+ PARAM_NUM_AUDIO_FRAME_SIZE = 5,
305+ PARAM_NUM_VIDEO_FRAME_SIZE = 6,
306+ PARAM_NUM_FRAMERATE = 7,
307+ PARAM_NUM_ROTATION = 8,
308+ PARAM_NUM_SUPPORTED_AUDIO_CODEC = 9,
309+ PARAM_NUM_HAS_AUDIO = 10,
310+ PARAM_NUM_COUNT = 11,
311+};
312+
313+struct OffsetIOContext {
314+ int fd;
315+ int64_t offset;
316+};
317+
318+static int offsetRead(void *opaque, uint8_t *buf, int size) {
319+ OffsetIOContext *ctx = (OffsetIOContext *)opaque;
320+ return read(ctx->fd, buf, size);
321+}
322+
323+static int64_t offsetSeek(void *opaque, int64_t pos, int whence) {
324+ OffsetIOContext *ctx = (OffsetIOContext *)opaque;
325+ if (whence == AVSEEK_SIZE) return -1; // unknown size, FFmpeg handles this
326+ return lseek(ctx->fd, ctx->offset + pos, whence);
327+}
328+
329+// Frees the custom AVIO built for the fileOffset path (see nGetVideoInfo).
330+// Safe to call when nothing was allocated: all fields default to null/-1.
331+static void freeOffsetIO(VideoInfo *info) {
332+ if (info->offsetIoContext != nullptr) {
333+ av_freep(&info->offsetIoContext->buffer);
334+ avio_context_free(&info->offsetIoContext);
335+ info->offsetIoContext = nullptr;
336+ }
337+ if (info->offsetIoOpaque != nullptr) {
338+ if (info->offsetIoOpaque->fd >= 0) {
339+ close(info->offsetIoOpaque->fd);
340+ }
341+ delete info->offsetIoOpaque;
342+ info->offsetIoOpaque = nullptr;
343+ }
344+}
345+
346+int getVideoRotation(const AVStream *stream) {
347+ const AVPacketSideData *displayMatrix = av_packet_side_data_get(
348+ stream->codecpar->coded_side_data,
349+ stream->codecpar->nb_coded_side_data,
350+ AV_PKT_DATA_DISPLAYMATRIX);
351+ if (displayMatrix != nullptr && displayMatrix->size >= 9 * sizeof(int32_t)) {
352+ // av_display_rotation_get() returns the counter-clockwise angle; negate
353+ // to match the legacy clockwise convention, then normalize.
354+ double theta = -av_display_rotation_get((const int32_t *) displayMatrix->data);
355+ if (!std::isnan(theta)) {
356+ int rotation = ((int) lround(theta / 90.0) * 90) % 360;
357+ return rotation < 0 ? rotation + 360 : rotation;
358+ }
359+ return 0;
360+ }
361+
362+ // Fallback for old containers that still carry the legacy metadata tag.
363+ AVDictionaryEntry *rotate_tag = av_dict_get(stream->metadata, "rotate", nullptr, 0);
364+ if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0") != 0) {
365+ char *tail;
366+ int rotation = (int) av_strtod(rotate_tag->value, &tail);
367+ if (*tail == '\0') {
368+ rotation = ((rotation / 90) * 90) % 360;
369+ return rotation < 0 ? rotation + 360 : rotation;
370+ }
371+ }
372+ return 0;
373+}
374+
375+
376+extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nGetVideoInfo(JNIEnv *env, jclass clazz, jstring src, jintArray data, jlong fileOffset, jint maxAv1DecodePixels) {
377+ VideoInfo *info = new VideoInfo();
378+
379+ char const *srcString = env->GetStringUTFChars(src, 0);
380+ size_t len = strlen(srcString);
381+ info->src = new char[len + 1];
382+ memcpy(info->src, srcString, len);
383+ info->src[len] = '\0';
384+ if (srcString != nullptr) {
385+ env->ReleaseStringUTFChars(src, srcString);
386+ }
387+
388+ int ret;
389+ if (fileOffset > 0) {
390+ int fd = open(info->src, O_RDONLY);
391+ if (fd < 0) {
392+ LOGE("can't open source file %s", info->src);
393+ delete info;
394+ return;
395+ }
396+ if (lseek(fd, fileOffset, SEEK_SET) < 0) {
397+ LOGE("can't seek to offset %lld in file %s", (long long)fileOffset, info->src);
398+ close(fd);
399+ delete info;
400+ return;
401+ }
402+
403+ OffsetIOContext *ioCtx = new OffsetIOContext{fd, fileOffset};
404+ uint8_t *ioBuf = (uint8_t *)av_malloc(32 * 1024);
405+ AVIOContext *avio = avio_alloc_context(ioBuf, 32 * 1024, 0, ioCtx, offsetRead, nullptr, offsetSeek);
406+
407+ // Owned by info from here on: ~VideoInfo -> freeOffsetIO frees avio, its
408+ // buffer, ioCtx and its fd. avformat_close_input won't free a custom pb.
409+ info->offsetIoContext = avio;
410+ info->offsetIoOpaque = ioCtx;
411+
412+ info->fmt_ctx = avformat_alloc_context();
413+ info->fmt_ctx->pb = avio;
414+
415+ if ((ret = avformat_open_input(&info->fmt_ctx, nullptr, nullptr, nullptr)) < 0) {
416+ LOGE("can't open source file at offset %s (offset=%lld), %s", info->src, fileOffset, av_err2str(ret));
417+ info->fmt_ctx = nullptr;
418+ delete info;
419+ return;
420+ }
421+ } else {
422+ if ((ret = avformat_open_input(&info->fmt_ctx, info->src, nullptr, nullptr)) < 0) {
423+ LOGE("can't open source file %s, %s", info->src, av_err2str(ret));
424+ delete info;
425+ return;
426+ }
427+ }
428+
429+ if ((ret = avformat_find_stream_info(info->fmt_ctx, NULL)) < 0) {
430+ LOGE("can't find stream information %s, %s", info->src, av_err2str(ret));
431+ delete info;
432+ return;
433+ }
434+
435+ if ((ret = av_find_best_stream(info->fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0)) >= 0) {
436+ info->video_stream = info->fmt_ctx->streams[ret];
437+ }
438+
439+ if ((ret = av_find_best_stream(info->fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0)) >= 0) {
440+ info->audio_stream = info->fmt_ctx->streams[ret];
441+ }
442+
443+ if (info->video_stream == nullptr) {
444+ LOGE("can't find video stream in the input, aborting %s", info->src);
445+ delete info;
446+ return;
447+ }
448+
449+ jint *dataArr = env->GetIntArrayElements(data, 0);
450+ if (dataArr != nullptr) {
451+ //https://developer.android.com/guide/topics/media/media-formats
452+ dataArr[PARAM_NUM_SUPPORTED_VIDEO_CODEC] =
453+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_H264 ||
454+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_H263 ||
455+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_MPEG4 ||
456+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_VP8 ||
457+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_VP9 ||
458+ info->video_stream->codecpar->codec_id == AV_CODEC_ID_HEVC ||
459+ (maxAv1DecodePixels > 0 && info->video_stream->codecpar->codec_id == AV_CODEC_ID_AV1 &&
460+ (int64_t) info->video_stream->codecpar->width * info->video_stream->codecpar->height <= (int64_t) maxAv1DecodePixels);
461+
462+ /*
463+ if (strstr(info->fmt_ctx->iformat->name, "mov") != 0 && dataArr[PARAM_NUM_SUPPORTED_VIDEO_CODEC]) {
464+ MOVStreamContext *mov = (MOVStreamContext *) info->video_stream->priv_data;
465+ dataArr[PARAM_NUM_VIDEO_FRAME_SIZE] = (jint) mov->data_size;
466+
467+ if (info->audio_stream != nullptr) {
468+ mov = (MOVStreamContext *) info->audio_stream->priv_data;
469+ dataArr[PARAM_NUM_AUDIO_FRAME_SIZE] = (jint) mov->data_size;
470+ }
471+ }
472+ */
473+
474+ if (info->audio_stream != nullptr) {
475+ //https://developer.android.com/guide/topics/media/media-formats
476+ dataArr[PARAM_NUM_SUPPORTED_AUDIO_CODEC] =
477+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_AAC ||
478+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_AAC_LATM ||
479+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_VORBIS ||
480+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_AMR_NB ||
481+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_AMR_WB ||
482+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_FLAC ||
483+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_MP3 ||
484+ // not supported codec, skip audio in this case
485+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV ||
486+ info->audio_stream->codecpar->codec_id == AV_CODEC_ID_OPUS;
487+ dataArr[PARAM_NUM_HAS_AUDIO] = 1;
488+ } else {
489+ dataArr[PARAM_NUM_HAS_AUDIO] = 0;
490+ }
491+
492+ dataArr[PARAM_NUM_BITRATE] = (jint) info->video_stream->codecpar->bit_rate;
493+ dataArr[PARAM_NUM_WIDTH] = info->video_stream->codecpar->width;
494+ dataArr[PARAM_NUM_HEIGHT] = info->video_stream->codecpar->height;
495+ dataArr[PARAM_NUM_ROTATION] = (jint) getVideoRotation(info->video_stream);
496+ if (info->video_stream->codecpar->codec_id == AV_CODEC_ID_H264 || info->video_stream->codecpar->codec_id == AV_CODEC_ID_HEVC) {
497+ dataArr[PARAM_NUM_FRAMERATE] = (jint) av_q2d(info->video_stream->avg_frame_rate);
498+ } else {
499+ dataArr[PARAM_NUM_FRAMERATE] = (jint) av_q2d(info->video_stream->r_frame_rate);
500+ }
501+ dataArr[PARAM_NUM_DURATION] = (int32_t) (info->fmt_ctx->duration * 1000 / AV_TIME_BASE);
502+ env->ReleaseIntArrayElements(data, dataArr, 0);
503+ delete info;
504+ }
505+}
506+
507+static bool isStreamCanceled(VideoInfo *info) {
508+ if (info->stream == nullptr) {
509+ return false;
510+ }
511+ JNIEnv *jniEnv = nullptr;
512+ JavaVMAttachArgs jvmArgs;
513+ jvmArgs.version = JNI_VERSION_1_6;
514+
515+ bool attached = false;
516+ if (JNI_EDETACHED == javaVm->GetEnv((void **) &jniEnv, JNI_VERSION_1_6)) {
517+ javaVm->AttachCurrentThread(&jniEnv, &jvmArgs);
518+ attached = true;
519+ }
520+ jboolean canceled = jniEnv->CallBooleanMethod(
521+ info->stream, jclass_AnimatedFileDrawableStream_isCanceled);
522+ if (attached) {
523+ javaVm->DetachCurrentThread();
524+ }
525+ return canceled;
526+}
527+
528+extern "C" JNIEXPORT jlong JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nCreateDecoder(JNIEnv *env, jclass clazz, jstring src, jintArray data, jint account, jlong streamFileSize, jobject stream, jboolean preview) {
529+ VideoInfo *info = new VideoInfo();
530+
531+ char const *srcString = env->GetStringUTFChars(src, 0);
532+ size_t len = strlen(srcString);
533+ info->src = new char[len + 1];
534+ memcpy(info->src, srcString, len);
535+ info->src[len] = '\0';
536+ if (srcString != 0) {
537+ env->ReleaseStringUTFChars(src, srcString);
538+ }
539+
540+ int ret;
541+ if (streamFileSize != 0) {
542+ info->file_size = streamFileSize;
543+ DEBUG_REF("gifvideo.cpp new stream");
544+ info->stream = env->NewGlobalRef(stream);
545+ info->account = account;
546+ info->fd = open(info->src, O_RDONLY, S_IRUSR);
547+
548+ info->ioBuffer = (unsigned char *) av_malloc(64 * 1024);
549+ info->ioContext = avio_alloc_context(info->ioBuffer, 64 * 1024, 0, info, readCallback, nullptr, seekCallback);
550+ if (info->ioContext == nullptr) {
551+ // avio didn't take ownership of the buffer; free it here. After a
552+ // successful alloc the buffer lives in ioContext->buffer and is
553+ // freed by the destructor (and may be reallocated by FFmpeg).
554+ av_freep(&info->ioBuffer);
555+ delete info;
556+ return 0;
557+ }
558+
559+ info->fmt_ctx = avformat_alloc_context();
560+ info->fmt_ctx->pb = info->ioContext;
561+
562+ AVDictionary *options = NULL;
563+ av_dict_set(&options, "usetoc", "1", 0);
564+ ret = avformat_open_input(&info->fmt_ctx, "http://localhost/file", NULL, &options);
565+ av_dict_free(&options);
566+ if (ret < 0) {
567+ LOGE("can't open source file %s, %s", info->src, av_err2str(ret));
568+ delete info;
569+ return 0;
570+ }
571+ info->fmt_ctx->flags |= AVFMT_FLAG_FAST_SEEK;
572+ if (preview) {
573+ info->fmt_ctx->flags |= AVFMT_FLAG_NOBUFFER;
574+ }
575+ } else {
576+ if ((ret = avformat_open_input(&info->fmt_ctx, info->src, NULL, NULL)) < 0) {
577+ LOGE("can't open source file %s, %s", info->src, av_err2str(ret));
578+ delete info;
579+ return 0;
580+ }
581+ }
582+
583+ if ((ret = avformat_find_stream_info(info->fmt_ctx, NULL)) < 0) {
584+ LOGE("can't find stream information %s, %s", info->src, av_err2str(ret));
585+ delete info;
586+ return 0;
587+ }
588+
589+ if (open_codec_context(&info->video_stream_idx, &info->video_dec_ctx, info->fmt_ctx, AVMEDIA_TYPE_VIDEO) >= 0) {
590+ info->video_stream = info->fmt_ctx->streams[info->video_stream_idx];
591+ }
592+
593+ if (info->video_stream == nullptr) {
594+ LOGE("can't find video stream in the input, aborting %s", info->src);
595+ delete info;
596+ return 0;
597+ }
598+
599+ info->reader = new VideoFrameReader(info->fmt_ctx, info->video_dec_ctx, info->video_stream_idx);
600+ VideoInfo *self = info;
601+ info->reader->shouldAbort = [self]() {
602+ // Covers nStopDecoder (stopped), nPrepareToSeek (seeking) and stream cancel.
603+ return self->stopped || self->seeking || isStreamCanceled(self);
604+ };
605+
606+ jint *dataArr = env->GetIntArrayElements(data, 0);
607+ if (dataArr != nullptr) {
608+ dataArr[0] = info->video_dec_ctx->width;
609+ dataArr[1] = info->video_dec_ctx->height;
610+ //float pixelWidthHeightRatio = info->video_dec_ctx->sample_aspect_ratio.num / info->video_dec_ctx->sample_aspect_ratio.den; TODO support
611+ dataArr[2] = (jint) getVideoRotation(info->video_stream);
612+ dataArr[4] = (int32_t) (info->fmt_ctx->duration * 1000 / AV_TIME_BASE);
613+ int video_stream_index = -1;
614+ double fps = 30.0;
615+ for (int i = 0; i < info->fmt_ctx->nb_streams; i++) {
616+ if (info->fmt_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
617+ video_stream_index = i;
618+ break;
619+ }
620+ }
621+ if (video_stream_index != -1) {
622+ AVStream* video_stream = info->fmt_ctx->streams[video_stream_index];
623+ if (video_stream->avg_frame_rate.den && video_stream->avg_frame_rate.num) {
624+ fps = av_q2d(video_stream->avg_frame_rate);
625+ } else if(video_stream->r_frame_rate.den && video_stream->r_frame_rate.num) {
626+ fps = av_q2d(video_stream->r_frame_rate);
627+ } else {
628+ /*
629+ int ticks = video_stream->codec->ticks_per_frame;
630+ fps = 1.0 / (ticks * av_q2d(video_stream->time_base));
631+ */
632+ }
633+ }
634+ dataArr[5] = (int32_t) fps;
635+ //(int32_t) (1000 * info->video_stream->duration * av_q2d(info->video_stream->time_base));
636+ env->ReleaseIntArrayElements(data, dataArr, 0);
637+ }
638+
639+ //LOGD("successfully opened file %s", info->src);
640+
641+ return (jlong) (intptr_t) info;
642+}
643+
644+extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nDestroyDecoder(JNIEnv *env, jclass clazz, jlong ptr) {
645+ if (ptr == NULL) {
646+ return;
647+ }
648+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
649+ if (info->stream != nullptr) {
650+ JNIEnv *jniEnv = nullptr;
651+ JavaVMAttachArgs jvmArgs;
652+ jvmArgs.version = JNI_VERSION_1_6;
653+
654+ bool attached;
655+ if (JNI_EDETACHED == javaVm->GetEnv((void **) &jniEnv, JNI_VERSION_1_6)) {
656+ javaVm->AttachCurrentThread(&jniEnv, &jvmArgs);
657+ attached = true;
658+ } else {
659+ attached = false;
660+ }
661+ jniEnv->CallVoidMethod(info->stream, jclass_AnimatedFileDrawableStream_cancel);
662+ if (attached) {
663+ javaVm->DetachCurrentThread();
664+ }
665+ }
666+ delete info;
667+}
668+
669+extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nStopDecoder(JNIEnv *env, jclass clazz, jlong ptr) {
670+ if (ptr == NULL) {
671+ return;
672+ }
673+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
674+ info->stopped = true;
675+}
676+
677+extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nPrepareToSeek(JNIEnv *env, jclass clazz, jlong ptr) {
678+ if (ptr == NULL) {
679+ return;
680+ }
681+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
682+ info->seeking = true;
683+}
684+
685+void push_time(JNIEnv *env, VideoInfo* info, AVFrame *frame, jintArray data) {
686+ jint *dataArr = env->GetIntArrayElements(data, 0);
687+ dataArr[3] = (jint) (1000 * frame->best_effort_timestamp * av_q2d(info->video_stream->time_base));
688+ env->ReleaseIntArrayElements(data, dataArr, 0);
689+}
690+
691+void push_single_frame(JNIEnv *env, jintArray data) {
692+ jint *dataArr = env->GetIntArrayElements(data, 0);
693+ dataArr[7] = 1;
694+ env->ReleaseIntArrayElements(data, dataArr, 0);
695+}
696+
697+extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nSeekToMs(JNIEnv *env, jclass clazz, jlong ptr, jlong ms, jintArray data, jboolean precise) {
698+ if (ptr == 0) {
699+ return;
700+ }
701+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
702+ info->seeking = false; // clear before decoding so shouldAbort() won't bail
703+ info->afterEof = false;
704+
705+ AVRational tb = info->video_stream->time_base;
706+ int64_t pts = (int64_t) (ms / av_q2d(tb) / 1000);
707+
708+ if (!info->reader->seek(pts)) {
709+ LOGE("can't seek file %s", info->src);
710+ return;
711+ }
712+
713+ if (!precise) {
714+ // Non-precise: land on the keyframe, don't decode toward the target.
715+ return;
716+ }
717+
718+ double targetSec = ms / 1000.0;
719+ for (;;) {
720+ VideoFrameReader::Status st = info->reader->getNextFrame();
721+ if (st != VideoFrameReader::Status::Ok) {
722+ // Eof: target lies past the last frame -> rewind to start, as before.
723+ // Aborted/Error: stop without advancing.
724+ if (st == VideoFrameReader::Status::Eof) {
725+ info->reader->seek(0);
726+ }
727+ return;
728+ }
729+
730+ if (info->reader->frameTimeSeconds() >= targetSec) {
731+ push_time(env, info, info->reader->frame(), data);
732+ return;
733+ }
734+ }
735+}
736+
737+static inline void writeFrameToBitmap(JNIEnv *env, VideoInfo *info, AVFrame *frame, jintArray data, jobject bitmap) {
738+ if (env->IsSameObject(bitmap, NULL)) {
739+ push_time(env, info, frame, data);
740+ return;
741+ }
742+ jint *dataArr = env->GetIntArrayElements(data, 0);
743+ int32_t wantedWidth;
744+ int32_t wantedHeight;
745+
746+ AndroidBitmapInfo bitmapInfo;
747+ AndroidBitmap_getInfo(env, bitmap, &bitmapInfo);
748+ int32_t bitmapWidth = bitmapInfo.width;
749+ int32_t bitmapHeight = bitmapInfo.height;
750+ int32_t bitmapStride = bitmapInfo.stride;
751+
752+ if (dataArr != nullptr) {
753+ wantedWidth = dataArr[0];
754+ wantedHeight = dataArr[1];
755+ dataArr[3] = (jint) (1000 * frame->best_effort_timestamp * av_q2d(info->video_stream->time_base));
756+ if (env->GetArrayLength(data) > 6) {
757+ bool isOpaque = (
758+ frame->format == AV_PIX_FMT_YUV420P ||
759+ frame->format == AV_PIX_FMT_YUVJ420P ||
760+ frame->format == AV_PIX_FMT_YUV444P
761+ );
762+ dataArr[6] = isOpaque ? 1 : 0;
763+ }
764+ env->ReleaseIntArrayElements(data, dataArr, 0);
765+ } else {
766+ wantedWidth = bitmapWidth;
767+ wantedHeight = bitmapHeight;
768+ }
769+
770+ if (!(wantedWidth == frame->width && wantedHeight == frame->height || wantedWidth == frame->height && wantedHeight == frame->width)) {
771+ return;
772+ }
773+
774+ void *pixels;
775+ if (__builtin_expect(AndroidBitmap_lockPixels(env, bitmap, &pixels) != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
776+ return;
777+ }
778+
779+ SwsContext* sws_ctx = nullptr;
780+ if (frame->format > AV_PIX_FMT_NONE && frame->format < AV_PIX_FMT_NB && frame->format != AV_PIX_FMT_YUVA420P) {
781+ sws_ctx = info->sws_ctx_holder.get(
782+ frame->width,
783+ frame->height,
784+ (AVPixelFormat) frame->format,
785+ bitmapWidth,
786+ bitmapHeight,
787+ AV_PIX_FMT_RGBA);
788+ } else if (info->video_dec_ctx->pix_fmt > AV_PIX_FMT_NONE && info->video_dec_ctx->pix_fmt < AV_PIX_FMT_NB && frame->format != AV_PIX_FMT_YUVA420P) {
789+ sws_ctx = info->sws_ctx_holder.get(
790+ info->video_dec_ctx->width,
791+ info->video_dec_ctx->height,
792+ info->video_dec_ctx->pix_fmt,
793+ bitmapWidth,
794+ bitmapHeight,
795+ AV_PIX_FMT_RGBA);
796+ }
797+
798+ if (sws_ctx != nullptr && ((intptr_t) pixels) % 16 == 0) {
799+ uint8_t __attribute__ ((aligned (16))) *dst_data[1];
800+ dst_data[0] = (uint8_t *) pixels;
801+
802+ int32_t dst_stride[1];
803+ dst_stride[0] = bitmapStride;
804+ sws_scale(sws_ctx,
805+ frame->data,
806+ frame->linesize,
807+ 0,
808+ frame->height,
809+ dst_data,
810+ dst_stride
811+ );
812+ } else if (frame->width == bitmapWidth && frame->height == bitmapHeight) {
813+ if (frame->format == AV_PIX_FMT_YUVA420P) {
814+ libyuv::I420AlphaToARGBMatrix(
815+ frame->data[0], frame->linesize[0],
816+ frame->data[2], frame->linesize[2],
817+ frame->data[1], frame->linesize[1],
818+ frame->data[3], frame->linesize[3],
819+ (uint8_t *) pixels,
820+ bitmapStride,
821+ &libyuv::kYvuI601Constants,
822+ bitmapWidth,
823+ bitmapHeight,
824+ 1
825+ );
826+ } else if (frame->format == AV_PIX_FMT_YUV444P) {
827+ libyuv::H444ToARGB(
828+ frame->data[0], frame->linesize[0],
829+ frame->data[2], frame->linesize[2],
830+ frame->data[1], frame->linesize[1],
831+ (uint8_t *) pixels,
832+ bitmapStride,
833+ bitmapWidth,
834+ bitmapHeight
835+ );
836+ } else if (frame->format == AV_PIX_FMT_YUV420P || frame->format == AV_PIX_FMT_YUVJ420P) {
837+ if (frame->colorspace == AVColorSpace::AVCOL_SPC_BT709) {
838+ libyuv::H420ToARGB(
839+ frame->data[0], frame->linesize[0],
840+ frame->data[2], frame->linesize[2],
841+ frame->data[1], frame->linesize[1],
842+ (uint8_t *) pixels,
843+ bitmapStride,
844+ bitmapWidth,
845+ bitmapHeight
846+ );
847+ } else {
848+ libyuv::I420ToARGB(
849+ frame->data[0], frame->linesize[0],
850+ frame->data[2], frame->linesize[2],
851+ frame->data[1], frame->linesize[1],
852+ (uint8_t *) pixels,
853+ bitmapStride,
854+ bitmapWidth,
855+ bitmapHeight
856+ );
857+ }
858+ } else if (frame->format == AV_PIX_FMT_BGRA) {
859+ libyuv::ABGRToARGB(
860+ frame->data[0], frame->linesize[0],
861+ (uint8_t *) pixels,
862+ bitmapStride,
863+ bitmapWidth,
864+ bitmapHeight
865+ );
866+ }
867+ } else if (sws_ctx != nullptr && ((intptr_t) pixels) % 16 != 0) {
868+ // fallback if pixels not aligned
869+ int alignedStride = FFALIGN(bitmapWidth * 4, 16);
870+ int bufSize = alignedStride * bitmapHeight;
871+ uint8_t *alignedBuf = (uint8_t *) av_malloc(bufSize);
872+ if (alignedBuf != nullptr) {
873+ uint8_t *dst_data[1] = { alignedBuf };
874+ int32_t dst_stride[1] = { alignedStride };
875+ sws_scale(sws_ctx,
876+ frame->data,
877+ frame->linesize,
878+ 0,
879+ frame->height,
880+ dst_data,
881+ dst_stride
882+ );
883+ if (alignedStride == bitmapStride) {
884+ memcpy(pixels, alignedBuf, bufSize);
885+ } else {
886+ uint8_t *src = alignedBuf;
887+ uint8_t *dst = (uint8_t *) pixels;
888+ int copyStride = bitmapWidth * 4;
889+ for (int i = 0; i < bitmapHeight; i++) {
890+ memcpy(dst, src, copyStride);
891+ src += alignedStride;
892+ dst += bitmapStride;
893+ }
894+ }
895+ av_free(alignedBuf);
896+ }
897+ }
898+
899+ AndroidBitmap_unlockPixels(env, bitmap);
900+}
901+
902+extern "C" JNIEXPORT int JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nGetFrameAtTime(JNIEnv *env, jclass clazz, jlong ptr, jlong ms, jobject bitmap, jintArray data) {
903+ if (ptr == 0 || bitmap == nullptr || data == nullptr) {
904+ return 0;
905+ }
906+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
907+ info->seeking = false; // clear before decoding so shouldAbort() won't bail
908+ info->afterEof = false;
909+
910+ AVRational tb = info->video_stream->time_base;
911+ int64_t pts = (int64_t) (ms / av_q2d(tb) / 1000);
912+
913+ if (!info->reader->seek(pts)) {
914+ LOGE("can't seek file %s", info->src);
915+ return 0;
916+ }
917+
918+ double targetSec = ms / 1000.0;
919+ AVFrame *held = av_frame_alloc(); // most recent frame before target (fallback)
920+ bool haveHeld = false;
921+ int result = 0;
922+
923+ for (;;) {
924+ VideoFrameReader::Status st = info->reader->getNextFrame();
925+ if (st != VideoFrameReader::Status::Ok) {
926+ // Eof: target lies at/after the last frame -> emit the last frame we
927+ // held. Aborted/Error: give up with no frame.
928+ if (st == VideoFrameReader::Status::Eof && haveHeld) {
929+ writeFrameToBitmap(env, info, held, data, bitmap);
930+ result = 1;
931+ }
932+ break;
933+ }
934+
935+ AVFrame *frame = info->reader->frame();
936+ if (info->reader->frameTimeSeconds() >= targetSec) {
937+ writeFrameToBitmap(env, info, frame, data, bitmap);
938+ result = 1;
939+ break;
940+ }
941+
942+ // Frame is before the target: keep it as the fallback and continue.
943+ av_frame_unref(held);
944+ av_frame_ref(held, frame);
945+ haveHeld = true;
946+ }
947+
948+ av_frame_free(&held);
949+ return result;
950+}
951+
952+extern "C" JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_AnimatedFileNative_nGetVideoFrame(JNIEnv *env, jclass clazz, jlong ptr, jobject bitmap, jintArray data, jboolean preview, jfloat start_time, jfloat end_time, jboolean loop) {
953+ if (ptr == 0) {
954+ return 0;
955+ }
956+ VideoInfo *info = (VideoInfo *) (intptr_t) ptr;
957+ if (info->stopped || info->seeking) {
958+ return 0;
959+ }
960+
961+ AVRational tb = info->video_stream->time_base;
962+ int64_t startPts = start_time > 0 ? (int64_t) (start_time / av_q2d(tb)) : 0;
963+
964+ VideoFrameReader::Status st = info->reader->getNextFrame();
965+
966+ // End of stream, or the frame ran past the trim point -> loop back or finish.
967+ // Note: end_time is compared against the frame's display-order timestamp,
968+ // not a packet pts, so B-frame reordering can no longer drop the wrong frame.
969+ bool pastEnd = st == VideoFrameReader::Status::Ok &&
970+ end_time > 0 && info->reader->frameTimeSeconds() > end_time;
971+
972+ if (st == VideoFrameReader::Status::Eof) {
973+ if (info->afterEof && !info->isSingleFrame) {
974+ push_single_frame(env, data);
975+ info->isSingleFrame = true;
976+ }
977+ info->afterEof = true;
978+ } else {
979+ info->afterEof = false;
980+ }
981+
982+ if (st == VideoFrameReader::Status::Eof || pastEnd) {
983+ if (!loop) {
984+ return 0;
985+ }
986+ if (!info->reader->seek(startPts)) {
987+ return 0;
988+ }
989+ st = info->reader->getNextFrame();
990+ }
991+
992+ if (st != VideoFrameReader::Status::Ok) {
993+ // Aborted (stopped / seeking / canceled), Error, or Eof after looping.
994+ return 0;
995+ }
996+
997+ AVFrame *frame = info->reader->frame();
998+ if (bitmap != nullptr) {
999+ writeFrameToBitmap(env, info, frame, data, bitmap);
1000+ }
1001+ push_time(env, info, frame, data);
1002+ return 1;
1003+}
1004+
1005+extern "C" jint videoOnJNILoad(JavaVM *vm, JNIEnv *env) {
1006+ //av_log_set_callback(custom_log);
1007+ DEBUG_REF("gifvideo.cpp AnimatedFileDrawableStream ref");
1008+ jclass_AnimatedFileDrawableStream = (jclass) env->NewGlobalRef(env->FindClass("org/telegram/messenger/AnimatedFileDrawableStream"));
1009+ if (jclass_AnimatedFileDrawableStream == 0) {
1010+ return JNI_FALSE;
1011+ }
1012+ jclass_AnimatedFileDrawableStream_read = env->GetMethodID(jclass_AnimatedFileDrawableStream, "read", "(II)I");
1013+ if (jclass_AnimatedFileDrawableStream_read == 0) {
1014+ return JNI_FALSE;
1015+ }
1016+ jclass_AnimatedFileDrawableStream_cancel = env->GetMethodID(jclass_AnimatedFileDrawableStream, "cancel", "()V");
1017+ if (jclass_AnimatedFileDrawableStream_cancel == 0) {
1018+ return JNI_FALSE;
1019+ }
1020+ jclass_AnimatedFileDrawableStream_isFinishedLoadingFile = env->GetMethodID(jclass_AnimatedFileDrawableStream, "isFinishedLoadingFile", "()Z");
1021+ if (jclass_AnimatedFileDrawableStream_isFinishedLoadingFile == 0) {
1022+ return JNI_FALSE;
1023+ }
1024+ jclass_AnimatedFileDrawableStream_isCanceled = env->GetMethodID(jclass_AnimatedFileDrawableStream, "isCanceled", "()Z");
1025+ if (jclass_AnimatedFileDrawableStream_isCanceled == 0) {
1026+ return JNI_FALSE;
1027+ }
1028+ jclass_AnimatedFileDrawableStream_getFinishedFilePath = env->GetMethodID(jclass_AnimatedFileDrawableStream, "getFinishedFilePath", "()Ljava/lang/String;");
1029+ if (jclass_AnimatedFileDrawableStream_getFinishedFilePath == 0) {
1030+ return JNI_FALSE;
1031+ }
1032+
1033+ return JNI_TRUE;
1034+}
TMessagesProj/jni/gifvideo/sws_context_holder.hnew file+103
@@ -0,0 +1,103 @@
1+#ifndef SWS_CONTEXT_HOLDER_H
2+#define SWS_CONTEXT_HOLDER_H
3+
4+extern "C" {
5+#include <libswscale/swscale.h>
6+#include <libavutil/pixfmt.h>
7+}
8+
9+struct SwsContextHolder {
10+
11+ SwsContext* ctx = nullptr;
12+ int src_width = 0;
13+ int src_height = 0;
14+ AVPixelFormat src_format = AV_PIX_FMT_NONE;
15+ int dst_width = 0;
16+ int dst_height = 0;
17+ AVPixelFormat dst_format = AV_PIX_FMT_NONE;
18+
19+ // Default constructor — starts with no context
20+ SwsContextHolder() = default;
21+
22+ // Destructor — always free the context when the object is destroyed
23+ ~SwsContextHolder() {
24+ reset();
25+ }
26+
27+ // Copy constructor — disabled, context ownership must be unique
28+ SwsContextHolder(const SwsContextHolder&) = delete;
29+
30+ // Copy assignment — disabled for the same reason
31+ SwsContextHolder& operator=(const SwsContextHolder&) = delete;
32+
33+ // Move constructor — transfer ownership from another holder without freeing
34+ SwsContextHolder(SwsContextHolder&& other) noexcept
35+ : ctx(other.ctx),
36+ src_width(other.src_width), src_height(other.src_height), src_format(other.src_format),
37+ dst_width(other.dst_width), dst_height(other.dst_height), dst_format(other.dst_format) {
38+ other.ctx = nullptr; // prevent the other holder from freeing the context
39+ }
40+
41+ // Move assignment — free current context, then take ownership from other
42+ SwsContextHolder& operator=(SwsContextHolder&& other) noexcept {
43+ if (this != &other) {
44+ reset(); // free whatever we currently hold
45+ ctx = other.ctx;
46+ src_width = other.src_width;
47+ src_height = other.src_height;
48+ src_format = other.src_format;
49+ dst_width = other.dst_width;
50+ dst_height = other.dst_height;
51+ dst_format = other.dst_format;
52+ other.ctx = nullptr; // prevent the other holder from freeing the context
53+ }
54+ return *this;
55+ }
56+
57+ // Returns a valid context for the given parameters.
58+ // Recreates the context if any parameter has changed since the last call.
59+ SwsContext* get(
60+ int new_src_width, int new_src_height, AVPixelFormat new_src_format,
61+ int new_dst_width, int new_dst_height, AVPixelFormat new_dst_format
62+ ) {
63+ // Reuse existing context if all parameters match
64+ if (ctx != nullptr &&
65+ src_width == new_src_width && src_height == new_src_height && src_format == new_src_format &&
66+ dst_width == new_dst_width && dst_height == new_dst_height && dst_format == new_dst_format) {
67+ return ctx;
68+ }
69+
70+ // Parameters changed — free the old context before creating a new one
71+ reset();
72+
73+ ctx = sws_getContext(
74+ new_src_width, new_src_height, new_src_format,
75+ new_dst_width, new_dst_height, new_dst_format,
76+ SWS_BILINEAR, nullptr, nullptr, nullptr
77+ );
78+
79+ // Only store parameters if context was created successfully
80+ if (ctx != nullptr) {
81+ src_width = new_src_width;
82+ src_height = new_src_height;
83+ src_format = new_src_format;
84+ dst_width = new_dst_width;
85+ dst_height = new_dst_height;
86+ dst_format = new_dst_format;
87+ }
88+
89+ return ctx;
90+ }
91+
92+ // Free the context and reset all parameters
93+ void reset() {
94+ if (ctx != nullptr) {
95+ sws_freeContext(ctx);
96+ ctx = nullptr;
97+ }
98+ src_width = src_height = dst_width = dst_height = 0;
99+ src_format = dst_format = AV_PIX_FMT_NONE;
100+ }
101+};
102+
103+#endif // SWS_CONTEXT_HOLDER_H
TMessagesProj/jni/gifvideo/video_frame_reader.hnew file+148
@@ -0,0 +1,148 @@
1+#pragma once
2+
3+#include <functional>
4+
5+extern "C" {
6+#include <libavformat/avformat.h>
7+#include <libavcodec/avcodec.h>
8+}
9+
10+// Pull-based reader over a single decoded video stream.
11+//
12+// Wraps the FFmpeg send/receive API and exposes getNextFrame(), which yields
13+// frames one at a time in DISPLAY (presentation) order. The decoder itself
14+// performs B-frame reordering, so callers never see decode-order packets.
15+//
16+// Scope: this class owns ONLY the per-stream decode loop (send/receive/flush/
17+// seek). Higher-level concerns -- looping, end_time trimming, target-pts
18+// skipping -- belong to the caller and are intentionally kept out.
19+//
20+// Ownership: the reader BORROWS the format and codec contexts. The caller
21+// allocates, opens, frees them, and keeps them alive for the reader's lifetime.
22+class VideoFrameReader {
23+public:
24+ enum class Status {
25+ Ok, // a frame is available via frame()
26+ Eof, // stream fully drained, no more frames
27+ Aborted, // shouldAbort() requested a stop mid-decode
28+ Error, // unrecoverable decode/demux error
29+ };
30+
31+ VideoFrameReader(AVFormatContext *fmt, AVCodecContext *dec, int streamIndex)
32+ : m_fmt(fmt), m_dec(dec), m_streamIndex(streamIndex) {
33+ m_pkt = av_packet_alloc();
34+ m_frame = av_frame_alloc();
35+ }
36+
37+ ~VideoFrameReader() {
38+ av_frame_free(&m_frame);
39+ av_packet_free(&m_pkt);
40+ // m_fmt and m_dec are borrowed: not freed here.
41+ }
42+
43+ VideoFrameReader(const VideoFrameReader &) = delete;
44+ VideoFrameReader &operator=(const VideoFrameReader &) = delete;
45+
46+ // Optional. If set and it returns true, getNextFrame() stops promptly and
47+ // returns Status::Aborted. Polled between packet reads. Use it to react to
48+ // external cancellation without waiting for a blocking I/O read to unwind.
49+ std::function<bool()> shouldAbort;
50+
51+ // Decodes and returns the next frame in display order.
52+ // On Status::Ok, the frame is valid via frame() until the next call.
53+ // Idempotent after Eof.
54+ Status getNextFrame() {
55+ if (m_pkt == nullptr || m_frame == nullptr) {
56+ return Status::Error;
57+ }
58+
59+ av_frame_unref(m_frame);
60+
61+ for (;;) {
62+ if (shouldAbort && shouldAbort()) {
63+ return Status::Aborted;
64+ }
65+
66+ // 1. Try to pull a decoded frame first.
67+ int ret = avcodec_receive_frame(m_dec, m_frame);
68+ if (ret == 0) {
69+ return Status::Ok; // display-order frame
70+ }
71+ if (ret == AVERROR_EOF) {
72+ return Status::Eof; // decoder fully drained
73+ }
74+ if (ret != AVERROR(EAGAIN)) {
75+ return Status::Error; // real decode error
76+ }
77+
78+ // 2. EAGAIN: decoder needs more input. Because we always fully drain
79+ // receive before sending, send() itself can never return EAGAIN.
80+ if (m_draining) {
81+ return Status::Eof; // flushed and drained
82+ }
83+ if (!feedNextPacket()) {
84+ return Status::Error;
85+ }
86+ }
87+ }
88+
89+ // Seeks so that the next getNextFrame() starts at (or just before) pts.
90+ // Flushes decoder buffers and clears draining state. pts is in the video
91+ // stream's time_base. Returns false on seek failure.
92+ bool seek(int64_t pts,
93+ int flags = AVSEEK_FLAG_BACKWARD) {
94+ int ret = av_seek_frame(m_fmt, m_streamIndex, pts, flags);
95+ if (ret < 0) {
96+ return false;
97+ }
98+ avcodec_flush_buffers(m_dec);
99+ av_frame_unref(m_frame);
100+ m_draining = false;
101+ return true;
102+ }
103+
104+ // Valid only immediately after getNextFrame() returned Status::Ok.
105+ AVFrame *frame() const { return m_frame; }
106+
107+ // Presentation timestamp of the current frame, in seconds (display order).
108+ double frameTimeSeconds() const {
109+ AVRational tb = m_fmt->streams[m_streamIndex]->time_base;
110+ return m_frame->best_effort_timestamp * av_q2d(tb);
111+ }
112+
113+ int streamIndex() const { return m_streamIndex; }
114+
115+private:
116+ // Reads one packet for our stream and sends it to the decoder. On
117+ // end-of-input, sends a NULL flush packet and enters draining mode.
118+ bool feedNextPacket() {
119+ for (;;) {
120+ int ret = av_read_frame(m_fmt, m_pkt);
121+ if (ret < 0) {
122+ avcodec_send_packet(m_dec, nullptr); // flush
123+ m_draining = true;
124+ return true;
125+ }
126+
127+ if (m_pkt->stream_index != m_streamIndex) {
128+ av_packet_unref(m_pkt);
129+ continue; // skip other streams
130+ }
131+
132+ ret = avcodec_send_packet(m_dec, m_pkt);
133+ av_packet_unref(m_pkt);
134+ if (ret < 0 && ret != AVERROR(EAGAIN)) {
135+ return false;
136+ }
137+ return true;
138+ }
139+ }
140+
141+ AVFormatContext *m_fmt; // borrowed
142+ AVCodecContext *m_dec; // borrowed
143+ int m_streamIndex;
144+
145+ AVPacket *m_pkt = nullptr;
146+ AVFrame *m_frame = nullptr;
147+ bool m_draining = false;
148+};
TMessagesProj/jni/image.cppnew file+2440
@@ -0,0 +1,2440 @@
1+#include <jni.h>
2+#include <cstdio>
3+#include <csetjmp>
4+#include <cstdlib>
5+#include <cstring>
6+#include <cmath>
7+#include <cstdint>
8+#include <mutex>
9+#include <unistd.h>
10+#include <android/bitmap.h>
11+#include <string>
12+#include <limits.h>
13+#include "libyuv/scale_argb.h"
14+#include <tgnet/FileLog.h>
15+#include <vector>
16+#include <algorithm>
17+#include "c_utils.h"
18+
19+extern "C" {
20+
21+static inline uint64_t getColors(const uint8_t *p) {
22+ return p[0] + (p[1] << 16) + ((uint64_t) p[2] << 32) + ((uint64_t) p[3] << 48);
23+}
24+
25+static inline uint64_t getColors565(const uint8_t *p) {
26+ uint16_t *ps = (uint16_t *) p;
27+ return ((((ps[0] & 0xF800) >> 11) * 255) / 31) + (((((ps[0] & 0x07E0) >> 5) * 255) / 63) << 16) + ((uint64_t)(((ps[0] & 0x001F) * 255) / 31) << 32);
28+}
29+
30+static void fastBlurMore(int32_t w, int32_t h, int32_t stride, uint8_t *pix, int32_t radius) {
31+ const int32_t r1 = radius + 1;
32+ const int32_t div = radius * 2 + 1;
33+
34+ if (radius > 15 || div >= w || div >= h || w * h > 150 * 150 || stride > w * 4) {
35+ return;
36+ }
37+
38+ uint64_t *rgb = new uint64_t[w * h];
39+ if (rgb == NULL) {
40+ return;
41+ }
42+
43+ int32_t x, y, i;
44+
45+ int32_t yw = 0;
46+ const int32_t we = w - r1;
47+ for (y = 0; y < h; y++) {
48+ uint64_t cur = getColors(&pix[yw]);
49+ uint64_t rgballsum = -radius * cur;
50+ uint64_t rgbsum = cur * ((r1 * (r1 + 1)) >> 1);
51+
52+ for (i = 1; i <= radius; i++) {
53+ cur = getColors(&pix[yw + i * 4]);
54+ rgbsum += cur * (r1 - i);
55+ rgballsum += cur;
56+ }
57+
58+ x = 0;
59+
60+#define update(start, middle, end) \
61+ rgb[y * w + x] = (rgbsum >> 6) & 0x00FF00FF00FF00FF; \
62+ rgballsum += getColors(&pix[yw + (start) * 4]) - 2 * getColors(&pix[yw + (middle) * 4]) + getColors(&pix[yw + (end) * 4]); \
63+ rgbsum += rgballsum; \
64+ x++; \
65+
66+ while (x < r1) {
67+ update (0, x, x + r1)
68+ }
69+ while (x < we) {
70+ update (x - r1, x, x + r1)
71+ }
72+ while (x < w) {
73+ update (x - r1, x, w - 1)
74+ }
75+#undef update
76+
77+ yw += stride;
78+ }
79+
80+ const int32_t he = h - r1;
81+ for (x = 0; x < w; x++) {
82+ uint64_t rgballsum = -radius * rgb[x];
83+ uint64_t rgbsum = rgb[x] * ((r1 * (r1 + 1)) >> 1);
84+ for (i = 1; i <= radius; i++) {
85+ rgbsum += rgb[i * w + x] * (r1 - i);
86+ rgballsum += rgb[i * w + x];
87+ }
88+
89+ y = 0;
90+ int32_t yi = x * 4;
91+
92+#define update(start, middle, end) \
93+ int64_t res = rgbsum >> 6; \
94+ pix[yi] = res; \
95+ pix[yi + 1] = res >> 16; \
96+ pix[yi + 2] = res >> 32; \
97+ pix[yi + 3] = res >> 48; \
98+ rgballsum += rgb[x + (start) * w] - 2 * rgb[x + (middle) * w] + rgb[x + (end) * w]; \
99+ rgbsum += rgballsum; \
100+ y++; \
101+ yi += stride;
102+
103+ while (y < r1) {
104+ update (0, y, y + r1)
105+ }
106+ while (y < he) {
107+ update (y - r1, y, y + r1)
108+ }
109+ while (y < h) {
110+ update (y - r1, y, h - 1)
111+ }
112+#undef update
113+ }
114+
115+ delete[] rgb;
116+}
117+
118+static void fastBlur(int32_t w, int32_t h, int32_t stride, uint8_t *pix, int32_t radius) {
119+ if (pix == nullptr) {
120+ return;
121+ }
122+ const int32_t r1 = radius + 1;
123+ const int32_t div = radius * 2 + 1;
124+ int32_t shift;
125+ if (radius == 1) {
126+ shift = 2;
127+ } else if (radius == 3) {
128+ shift = 4;
129+ } else if (radius == 7) {
130+ shift = 6;
131+ } else if (radius == 15) {
132+ shift = 8;
133+ } else {
134+ return;
135+ }
136+
137+ if (radius > 15 || div >= w || div >= h || w * h > 150 * 150 || stride > w * 4) {
138+ return;
139+ }
140+
141+ uint64_t *rgb = new uint64_t[w * h];
142+ if (rgb == nullptr) {
143+ return;
144+ }
145+
146+ int32_t x, y, i;
147+
148+ int32_t yw = 0;
149+ const int32_t we = w - r1;
150+ for (y = 0; y < h; y++) {
151+ uint64_t cur = getColors(&pix[yw]);
152+ uint64_t rgballsum = -radius * cur;
153+ uint64_t rgbsum = cur * ((r1 * (r1 + 1)) >> 1);
154+
155+ for (i = 1; i <= radius; i++) {
156+ cur = getColors(&pix[yw + i * 4]);
157+ rgbsum += cur * (r1 - i);
158+ rgballsum += cur;
159+ }
160+
161+ x = 0;
162+
163+#define update(start, middle, end) \
164+ rgb[y * w + x] = (rgbsum >> shift) & 0x00FF00FF00FF00FFLL; \
165+ rgballsum += getColors(&pix[yw + (start) * 4]) - 2 * getColors(&pix[yw + (middle) * 4]) + getColors(&pix[yw + (end) * 4]); \
166+ rgbsum += rgballsum; \
167+ x++; \
168+
169+ while (x < r1) {
170+ update (0, x, x + r1)
171+ }
172+ while (x < we) {
173+ update (x - r1, x, x + r1)
174+ }
175+ while (x < w) {
176+ update (x - r1, x, w - 1)
177+ }
178+
179+#undef update
180+
181+ yw += stride;
182+ }
183+
184+ const int32_t he = h - r1;
185+ for (x = 0; x < w; x++) {
186+ uint64_t rgballsum = -radius * rgb[x];
187+ uint64_t rgbsum = rgb[x] * ((r1 * (r1 + 1)) >> 1);
188+ for (i = 1; i <= radius; i++) {
189+ rgbsum += rgb[i * w + x] * (r1 - i);
190+ rgballsum += rgb[i * w + x];
191+ }
192+
193+ y = 0;
194+ int32_t yi = x * 4;
195+
196+#define update(start, middle, end) \
197+ int64_t res = rgbsum >> shift; \
198+ pix[yi] = res; \
199+ pix[yi + 1] = res >> 16; \
200+ pix[yi + 2] = res >> 32; \
201+ pix[yi + 3] = res >> 48; \
202+ rgballsum += rgb[x + (start) * w] - 2 * rgb[x + (middle) * w] + rgb[x + (end) * w]; \
203+ rgbsum += rgballsum; \
204+ y++; \
205+ yi += stride;
206+
207+ while (y < r1) {
208+ update (0, y, y + r1)
209+ }
210+ while (y < he) {
211+ update (y - r1, y, y + r1)
212+ }
213+ while (y < h) {
214+ update (y - r1, y, h - 1)
215+ }
216+#undef update
217+ }
218+
219+ delete[] rgb;
220+}
221+
222+static void fastBlurMore565(int32_t w, int32_t h, int32_t stride, uint8_t *pix, int32_t radius) {
223+ const int32_t r1 = radius + 1;
224+ const int32_t div = radius * 2 + 1;
225+
226+ if (radius > 15 || div >= w || div >= h || w * h > 150 * 150 || stride > w * 2) {
227+ return;
228+ }
229+
230+ uint64_t *rgb = new uint64_t[w * h];
231+ if (rgb == NULL) {
232+ return;
233+ }
234+
235+ int32_t x, y, i;
236+
237+ int32_t yw = 0;
238+ const int32_t we = w - r1;
239+ for (y = 0; y < h; y++) {
240+ uint64_t cur = getColors565(&pix[yw]);
241+ uint64_t rgballsum = -radius * cur;
242+ uint64_t rgbsum = cur * ((r1 * (r1 + 1)) >> 1);
243+
244+ for (i = 1; i <= radius; i++) {
245+ cur = getColors565(&pix[yw + i * 2]);
246+ rgbsum += cur * (r1 - i);
247+ rgballsum += cur;
248+ }
249+
250+ x = 0;
251+
252+#define update(start, middle, end) \
253+ rgb[y * w + x] = (rgbsum >> 6) & 0x00FF00FF00FF00FF; \
254+ rgballsum += getColors565(&pix[yw + (start) * 2]) - 2 * getColors565(&pix[yw + (middle) * 2]) + getColors565(&pix[yw + (end) * 2]); \
255+ rgbsum += rgballsum; \
256+ x++; \
257+
258+ while (x < r1) {
259+ update (0, x, x + r1)
260+ }
261+ while (x < we) {
262+ update (x - r1, x, x + r1)
263+ }
264+ while (x < w) {
265+ update (x - r1, x, w - 1)
266+ }
267+#undef update
268+
269+ yw += stride;
270+ }
271+
272+ const int32_t he = h - r1;
273+ for (x = 0; x < w; x++) {
274+ uint64_t rgballsum = -radius * rgb[x];
275+ uint64_t rgbsum = rgb[x] * ((r1 * (r1 + 1)) >> 1);
276+ for (i = 1; i <= radius; i++) {
277+ rgbsum += rgb[i * w + x] * (r1 - i);
278+ rgballsum += rgb[i * w + x];
279+ }
280+
281+ y = 0;
282+ int32_t yi = x * 2;
283+
284+#define update(start, middle, end) \
285+ int64_t res = rgbsum >> 6; \
286+ pix[yi] = ((res >> 13) & 0xe0) | ((res >> 35) & 0x1f); \
287+ pix[yi + 1] = (res & 0xf8) | ((res >> 21) & 0x7); \
288+ rgballsum += rgb[x + (start) * w] - 2 * rgb[x + (middle) * w] + rgb[x + (end) * w]; \
289+ rgbsum += rgballsum; \
290+ y++; \
291+ yi += stride;
292+
293+ while (y < r1) {
294+ update (0, y, y + r1)
295+ }
296+ while (y < he) {
297+ update (y - r1, y, y + r1)
298+ }
299+ while (y < h) {
300+ update (y - r1, y, h - 1)
301+ }
302+#undef update
303+ }
304+
305+ delete[] rgb;
306+}
307+
308+static void fastBlur565(int32_t w, int32_t h, int32_t stride, uint8_t *pix, int32_t radius) {
309+ if (pix == NULL) {
310+ return;
311+ }
312+ const int32_t r1 = radius + 1;
313+ const int32_t div = radius * 2 + 1;
314+ int32_t shift;
315+ if (radius == 1) {
316+ shift = 2;
317+ } else if (radius == 3) {
318+ shift = 4;
319+ } else if (radius == 7) {
320+ shift = 6;
321+ } else if (radius == 15) {
322+ shift = 8;
323+ } else {
324+ return;
325+ }
326+
327+ if (radius > 15 || div >= w || div >= h || w * h > 150 * 150 || stride > w * 2) {
328+ return;
329+ }
330+
331+ uint64_t *rgb = new uint64_t[w * h];
332+ if (rgb == NULL) {
333+ return;
334+ }
335+
336+ int32_t x, y, i;
337+
338+ int32_t yw = 0;
339+ const int32_t we = w - r1;
340+ for (y = 0; y < h; y++) {
341+ uint64_t cur = getColors565(&pix[yw]);
342+ uint64_t rgballsum = -radius * cur;
343+ uint64_t rgbsum = cur * ((r1 * (r1 + 1)) >> 1);
344+
345+ for (i = 1; i <= radius; i++) {
346+ cur = getColors565(&pix[yw + i * 2]);
347+ rgbsum += cur * (r1 - i);
348+ rgballsum += cur;
349+ }
350+
351+ x = 0;
352+
353+#define update(start, middle, end) \
354+ rgb[y * w + x] = (rgbsum >> shift) & 0x00FF00FF00FF00FFLL; \
355+ rgballsum += getColors565(&pix[yw + (start) * 2]) - 2 * getColors565(&pix[yw + (middle) * 2]) + getColors565(&pix[yw + (end) * 2]); \
356+ rgbsum += rgballsum; \
357+ x++;
358+
359+ while (x < r1) {
360+ update(0, x, x + r1)
361+ }
362+ while (x < we) {
363+ update(x - r1, x, x + r1)
364+ }
365+ while (x < w) {
366+ update(x - r1, x, w - 1)
367+ }
368+
369+#undef update
370+
371+ yw += stride;
372+ }
373+
374+ const int32_t he = h - r1;
375+ for (x = 0; x < w; x++) {
376+ uint64_t rgballsum = -radius * rgb[x];
377+ uint64_t rgbsum = rgb[x] * ((r1 * (r1 + 1)) >> 1);
378+ for (i = 1; i <= radius; i++) {
379+ rgbsum += rgb[i * w + x] * (r1 - i);
380+ rgballsum += rgb[i * w + x];
381+ }
382+
383+ y = 0;
384+ int32_t yi = x * 2;
385+
386+#define update(start, middle, end) \
387+ uint64_t res = rgbsum >> shift; \
388+ pix[yi] = ((res >> 13) & 0xe0) | ((res >> 35) & 0x1f); \
389+ pix[yi + 1] = (res & 0xf8) | ((res >> 21) & 0x7); \
390+ rgballsum += rgb[x + (start) * w] - 2 * rgb[x + (middle) * w] + rgb[x + (end) * w]; \
391+ rgbsum += rgballsum; \
392+ y++; \
393+ yi += stride;
394+
395+ while (y < r1) {
396+ update (0, y, y + r1)
397+ }
398+ while (y < he) {
399+ update (y - r1, y, y + r1)
400+ }
401+ while (y < h) {
402+ update (y - r1, y, h - 1)
403+ }
404+#undef update
405+ }
406+
407+ delete[] rgb;
408+}
409+
410+JNIEXPORT int Java_org_telegram_messenger_Utilities_needInvert(JNIEnv *env, jclass clazz, jobject bitmap) {
411+ if (!bitmap) {
412+ return 0;
413+ }
414+
415+ AndroidBitmapInfo info{};
416+ if (__builtin_expect(AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
417+ return 0;
418+ }
419+ uint32_t width = info.width;
420+ uint32_t height = info.height;
421+ uint32_t stride = info.stride;
422+
423+ if (!width || !height || !stride || stride != width * 4 || width * height > 150 * 150) {
424+ return 0;
425+ }
426+
427+ void *pixels = nullptr;
428+ if (AndroidBitmap_lockPixels(env, bitmap, &pixels) < 0) {
429+ return 0;
430+ }
431+ if (pixels == nullptr) {
432+ return 0;
433+ }
434+ uint8_t *pix = (uint8_t *) pixels;
435+
436+ int32_t hasAlpha = 0;
437+ float matching = 0;
438+ float total = 0;
439+ for (int32_t y = 0; y < height; y++) {
440+ for (int32_t x = 0; x < width; x++) {
441+ int32_t index = y * stride + x * 4;
442+ uint8_t a = pix[index + 3];
443+ float alpha = a / 255.0f;
444+
445+ uint8_t r = (uint8_t)(pix[index] * alpha);
446+ uint8_t g = (uint8_t)(pix[index + 1] * alpha);
447+ uint8_t b = (uint8_t)(pix[index + 2] * alpha);
448+
449+ uint8_t cmax = (r > g) ? r : g;
450+ if (b > cmax) {
451+ cmax = b;
452+ }
453+ uint8_t cmin = (r < g) ? r : g;
454+ if (b < cmin) {
455+ cmin = b;
456+ }
457+
458+ float saturation;
459+ float brightness = ((float) cmax) / 255.0f;
460+ if (cmax != 0) {
461+ saturation = ((float) (cmax - cmin)) / ((float) cmax);
462+ } else {
463+ saturation = 0;
464+ }
465+
466+ if (alpha < 1.0) {
467+ hasAlpha = 1;
468+ }
469+
470+ if (alpha > 0.0) {
471+ total += 1;
472+ if (saturation < 0.1f && brightness < 0.25f) {
473+ matching += 1;
474+ }
475+ }
476+ }
477+ }
478+ AndroidBitmap_unlockPixels(env, bitmap);
479+ return hasAlpha && matching / total > 0.85;
480+}
481+
482+JNIEXPORT void Java_org_telegram_messenger_Utilities_blurBitmap(JNIEnv *env, jclass clazz, jobject bitmap, jint radius) {
483+ if (!bitmap) {
484+ return;
485+ }
486+
487+ AndroidBitmapInfo info{};
488+ if (__builtin_expect(AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
489+ return;
490+ }
491+ uint32_t width = info.width;
492+ uint32_t height = info.height;
493+ uint32_t stride = info.stride;
494+
495+ if (!width || !height || !stride) {
496+ return;
497+ }
498+
499+ void *pixels = nullptr;
500+ if (AndroidBitmap_lockPixels(env, bitmap, &pixels) < 0) {
501+ return;
502+ }
503+ if (stride == width * 2) {
504+ if (radius <= 3) {
505+ fastBlur565(width, height, stride, (uint8_t *) pixels, radius);
506+ } else {
507+ fastBlurMore565(width, height, stride, (uint8_t *) pixels, radius);
508+ }
509+ } else {
510+ if (radius <= 3) {
511+ fastBlur(width, height, stride, (uint8_t *) pixels, radius);
512+ } else {
513+ fastBlurMore(width, height, stride, (uint8_t *) pixels, radius);
514+ }
515+ }
516+ AndroidBitmap_unlockPixels(env, bitmap);
517+}
518+
519+const uint32_t PGPhotoEnhanceHistogramBins = 256;
520+const uint32_t PGPhotoEnhanceSegments = 4;
521+
522+JNIEXPORT void Java_org_telegram_messenger_Utilities_calcCDT(JNIEnv *env, jclass clazz, jobject hsvBuffer, jint width, jint height, jobject buffer, jobject calcBuffer) {
523+ float imageWidth = width;
524+ float imageHeight = height;
525+ float _clipLimit = 1.25f;
526+
527+ uint32_t totalSegments = PGPhotoEnhanceSegments * PGPhotoEnhanceSegments;
528+ uint32_t tileArea = (uint32_t) (floorf(imageWidth / PGPhotoEnhanceSegments) * floorf(imageHeight / PGPhotoEnhanceSegments));
529+ uint32_t clipLimit = (uint32_t) MAX(1, _clipLimit * tileArea / (float) PGPhotoEnhanceHistogramBins);
530+ float scale = 255.0f / (float) tileArea;
531+
532+ unsigned char *bytes = (unsigned char *) env->GetDirectBufferAddress(hsvBuffer);
533+ uint32_t *calcBytes = (uint32_t *) env->GetDirectBufferAddress(calcBuffer);
534+ unsigned char *result = (unsigned char *) env->GetDirectBufferAddress(buffer);
535+
536+ uint32_t *cdfsMin = calcBytes;
537+ calcBytes += totalSegments;
538+ uint32_t *cdfsMax = calcBytes;
539+ calcBytes += totalSegments;
540+ uint32_t *cdfs = calcBytes;
541+ calcBytes += totalSegments * PGPhotoEnhanceHistogramBins;
542+ uint32_t *hist = calcBytes;
543+ memset(hist, 0, sizeof(uint32_t) * totalSegments * PGPhotoEnhanceHistogramBins);
544+
545+ float xMul = PGPhotoEnhanceSegments / imageWidth;
546+ float yMul = PGPhotoEnhanceSegments / imageHeight;
547+
548+ uint32_t i, j;
549+
550+ for (i = 0; i < imageHeight; i++) {
551+ uint32_t yOffset = i * width * 4;
552+ for (j = 0; j < imageWidth; j++) {
553+ uint32_t index = j * 4 + yOffset;
554+
555+ uint32_t tx = (uint32_t)(j * xMul);
556+ uint32_t ty = (uint32_t)(i * yMul);
557+ uint32_t t = ty * PGPhotoEnhanceSegments + tx;
558+
559+ hist[t * PGPhotoEnhanceHistogramBins + bytes[index + 2]]++;
560+ }
561+ }
562+
563+ for (i = 0; i < totalSegments; i++) {
564+ if (clipLimit > 0) {
565+ uint32_t clipped = 0;
566+ for (j = 0; j < PGPhotoEnhanceHistogramBins; j++) {
567+ if (hist[i * PGPhotoEnhanceHistogramBins + j] > clipLimit) {
568+ clipped += hist[i * PGPhotoEnhanceHistogramBins + j] - clipLimit;
569+ hist[i * PGPhotoEnhanceHistogramBins + j] = clipLimit;
570+ }
571+ }
572+
573+ uint32_t redistBatch = clipped / PGPhotoEnhanceHistogramBins;
574+ uint32_t residual = clipped - redistBatch * PGPhotoEnhanceHistogramBins;
575+
576+ for (j = 0; j < PGPhotoEnhanceHistogramBins; j++) {
577+ hist[i * PGPhotoEnhanceHistogramBins + j] += redistBatch;
578+ if (j < residual) {
579+ hist[i * PGPhotoEnhanceHistogramBins + j]++;
580+ }
581+ }
582+ }
583+ memcpy(cdfs + i * PGPhotoEnhanceHistogramBins, hist + i * PGPhotoEnhanceHistogramBins, PGPhotoEnhanceHistogramBins * sizeof(uint32_t));
584+
585+ uint32_t hMin = PGPhotoEnhanceHistogramBins - 1;
586+ for (j = 0; j < hMin; ++j) {
587+ if (cdfs[i * PGPhotoEnhanceHistogramBins + j] != 0) {
588+ hMin = j;
589+ }
590+ }
591+
592+ uint32_t cdf = 0;
593+ for (j = hMin; j < PGPhotoEnhanceHistogramBins; j++) {
594+ cdf += cdfs[i * PGPhotoEnhanceHistogramBins + j];
595+ cdfs[i * PGPhotoEnhanceHistogramBins + j] = (uint8_t) MIN(255, cdf * scale);
596+ }
597+
598+ cdfsMin[i] = cdfs[i * PGPhotoEnhanceHistogramBins + hMin];
599+ cdfsMax[i] = cdfs[i * PGPhotoEnhanceHistogramBins + PGPhotoEnhanceHistogramBins - 1];
600+ }
601+
602+ for (j = 0; j < totalSegments; j++) {
603+ uint32_t yOffset = j * PGPhotoEnhanceHistogramBins * 4;
604+ for (i = 0; i < PGPhotoEnhanceHistogramBins; i++) {
605+ uint32_t index = i * 4 + yOffset;
606+ result[index] = (uint8_t) cdfs[j * PGPhotoEnhanceHistogramBins + i];
607+ result[index + 1] = (uint8_t) cdfsMin[j];
608+ result[index + 2] = (uint8_t) cdfsMax[j];
609+ result[index + 3] = 255;
610+ }
611+ }
612+}
613+
614+#define SQUARE(i) ((i)*(i))
615+
616+inline static void zeroClearInt(int *p, size_t count) {
617+ memset(p, 0, sizeof(int) * count);
618+}
619+
620+JNIEXPORT void Java_org_telegram_messenger_Utilities_stackBlurBitmap(JNIEnv *env, jclass clazz, jobject bitmap, jint radius) {
621+ if (radius < 1) {
622+ return;
623+ }
624+
625+ AndroidBitmapInfo info;
626+ if (AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS) {
627+ return;
628+ }
629+ if (info.format != ANDROID_BITMAP_FORMAT_RGBA_8888) {
630+ return;
631+ }
632+
633+ int w = info.width;
634+ int h = info.height;
635+ int stride = info.stride;
636+
637+ unsigned char *pixels = nullptr;
638+ AndroidBitmap_lockPixels(env, bitmap, (void **) &pixels);
639+ if (!pixels) {
640+ return;
641+ }
642+ // Constants
643+ //const int radius = (int)inradius; // Transform unsigned into signed for further operations
644+ const int wm = w - 1;
645+ const int hm = h - 1;
646+ const int wh = w * h;
647+ const int div = radius + radius + 1;
648+ const int r1 = radius + 1;
649+ const int divsum = SQUARE((div + 1) >> 1);
650+
651+ // Small buffers
652+ int stack[div * 4];
653+ zeroClearInt(stack, div * 4);
654+
655+ int vmin[MAX(w, h)];
656+ zeroClearInt(vmin, MAX(w, h));
657+
658+ // Large buffers
659+ int *r = new int[wh];
660+ int *g = new int[wh];
661+ int *b = new int[wh];
662+ int *a = new int[wh];
663+ zeroClearInt(r, wh);
664+ zeroClearInt(g, wh);
665+ zeroClearInt(b, wh);
666+ zeroClearInt(a, wh);
667+
668+ const size_t dvcount = 256 * divsum;
669+ int *dv = new int[dvcount];
670+ int i;
671+ for (i = 0; (size_t) i < dvcount; i++) {
672+ dv[i] = (i / divsum);
673+ }
674+
675+ // Variables
676+ int x, y;
677+ int *sir;
678+ int routsum, goutsum, boutsum, aoutsum;
679+ int rinsum, ginsum, binsum, ainsum;
680+ int rsum, gsum, bsum, asum, p, yp;
681+ int stackpointer;
682+ int stackstart;
683+ int rbs;
684+
685+ int yw = 0, yi = 0;
686+ for (y = 0; y < h; y++) {
687+ ainsum = aoutsum = asum = rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0;
688+
689+ for (i = -radius; i <= radius; i++) {
690+ sir = &stack[(i + radius) * 4];
691+ int offset = (y * stride + (MIN(wm, MAX(i, 0))) * 4);
692+ sir[0] = pixels[offset];
693+ sir[1] = pixels[offset + 1];
694+ sir[2] = pixels[offset + 2];
695+ sir[3] = pixels[offset + 3];
696+
697+ rbs = r1 - abs(i);
698+ rsum += sir[0] * rbs;
699+ gsum += sir[1] * rbs;
700+ bsum += sir[2] * rbs;
701+ asum += sir[3] * rbs;
702+ if (i > 0) {
703+ rinsum += sir[0];
704+ ginsum += sir[1];
705+ binsum += sir[2];
706+ ainsum += sir[3];
707+ } else {
708+ routsum += sir[0];
709+ goutsum += sir[1];
710+ boutsum += sir[2];
711+ aoutsum += sir[3];
712+ }
713+ }
714+ stackpointer = radius;
715+
716+ for (x = 0; x < w; x++) {
717+ r[yi] = dv[rsum];
718+ g[yi] = dv[gsum];
719+ b[yi] = dv[bsum];
720+ a[yi] = dv[asum];
721+
722+ rsum -= routsum;
723+ gsum -= goutsum;
724+ bsum -= boutsum;
725+ asum -= aoutsum;
726+
727+ stackstart = stackpointer - radius + div;
728+ sir = &stack[(stackstart % div) * 4];
729+
730+ routsum -= sir[0];
731+ goutsum -= sir[1];
732+ boutsum -= sir[2];
733+ aoutsum -= sir[3];
734+
735+ if (y == 0) {
736+ vmin[x] = MIN(x + radius + 1, wm);
737+ }
738+
739+ int offset = (y * stride + vmin[x] * 4);
740+ sir[0] = pixels[offset];
741+ sir[1] = pixels[offset + 1];
742+ sir[2] = pixels[offset + 2];
743+ sir[3] = pixels[offset + 3];
744+ rinsum += sir[0];
745+ ginsum += sir[1];
746+ binsum += sir[2];
747+ ainsum += sir[3];
748+
749+ rsum += rinsum;
750+ gsum += ginsum;
751+ bsum += binsum;
752+ asum += ainsum;
753+
754+ stackpointer = (stackpointer + 1) % div;
755+ sir = &stack[(stackpointer % div) * 4];
756+
757+ routsum += sir[0];
758+ goutsum += sir[1];
759+ boutsum += sir[2];
760+ aoutsum += sir[3];
761+
762+ rinsum -= sir[0];
763+ ginsum -= sir[1];
764+ binsum -= sir[2];
765+ ainsum -= sir[3];
766+
767+ yi++;
768+ }
769+ yw += w;
770+ }
771+
772+ for (x = 0; x < w; x++) {
773+ ainsum = aoutsum = asum = rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0;
774+ yp = -radius * w;
775+ for (i = -radius; i <= radius; i++) {
776+ yi = MAX(0, yp) + x;
777+
778+ sir = &stack[(i + radius) * 4];
779+
780+ sir[0] = r[yi];
781+ sir[1] = g[yi];
782+ sir[2] = b[yi];
783+ sir[3] = a[yi];
784+
785+ rbs = r1 - abs(i);
786+
787+ rsum += r[yi] * rbs;
788+ gsum += g[yi] * rbs;
789+ bsum += b[yi] * rbs;
790+ asum += a[yi] * rbs;
791+
792+ if (i > 0) {
793+ rinsum += sir[0];
794+ ginsum += sir[1];
795+ binsum += sir[2];
796+ ainsum += sir[3];
797+ } else {
798+ routsum += sir[0];
799+ goutsum += sir[1];
800+ boutsum += sir[2];
801+ aoutsum += sir[3];
802+ }
803+
804+ if (i < hm) {
805+ yp += w;
806+ }
807+ }
808+ stackpointer = radius;
809+ for (y = 0; y < h; y++) {
810+ int offset = stride * y + x * 4;
811+ pixels[offset] = dv[rsum];
812+ pixels[offset + 1] = dv[gsum];
813+ pixels[offset + 2] = dv[bsum];
814+ pixels[offset + 3] = dv[asum];
815+ rsum -= routsum;
816+ gsum -= goutsum;
817+ bsum -= boutsum;
818+ asum -= aoutsum;
819+
820+ stackstart = stackpointer - radius + div;
821+ sir = &stack[(stackstart % div) * 4];
822+
823+ routsum -= sir[0];
824+ goutsum -= sir[1];
825+ boutsum -= sir[2];
826+ aoutsum -= sir[3];
827+
828+ if (x == 0) {
829+ vmin[y] = (MIN(y + r1, hm)) * w;
830+ }
831+ p = x + vmin[y];
832+
833+ sir[0] = r[p];
834+ sir[1] = g[p];
835+ sir[2] = b[p];
836+ sir[3] = a[p];
837+
838+ rinsum += sir[0];
839+ ginsum += sir[1];
840+ binsum += sir[2];
841+ ainsum += sir[3];
842+
843+ rsum += rinsum;
844+ gsum += ginsum;
845+ bsum += binsum;
846+ asum += ainsum;
847+
848+ stackpointer = (stackpointer + 1) % div;
849+ sir = &stack[stackpointer * 4];
850+
851+ routsum += sir[0];
852+ goutsum += sir[1];
853+ boutsum += sir[2];
854+ aoutsum += sir[3];
855+
856+ rinsum -= sir[0];
857+ ginsum -= sir[1];
858+ binsum -= sir[2];
859+ ainsum -= sir[3];
860+
861+ yi += w;
862+ }
863+ }
864+
865+ delete[] r;
866+ delete[] g;
867+ delete[] b;
868+ delete[] a;
869+ delete[] dv;
870+ AndroidBitmap_unlockPixels(env, bitmap);
871+}
872+
873+JNIEXPORT jboolean JNICALL Java_org_telegram_messenger_Utilities_drawDitheredGradient(JNIEnv *env, jclass clazz, jobject bitmap, jintArray colors, jint startX, jint startY, jint endX, jint endY) {
874+ AndroidBitmapInfo info;
875+ void *pixelsBuffer;
876+ int reason;
877+
878+ if ((reason = AndroidBitmap_getInfo(env, bitmap, &info)) != ANDROID_BITMAP_RESULT_SUCCESS) {
879+ return JNI_FALSE;
880+ }
881+
882+ if (info.format != ANDROID_BITMAP_FORMAT_RGBA_8888) {
883+ return JNI_FALSE;
884+ }
885+
886+ if ((reason = AndroidBitmap_lockPixels(env, bitmap, &pixelsBuffer)) != ANDROID_BITMAP_RESULT_SUCCESS) {
887+ return JNI_FALSE;
888+ }
889+
890+ uint8_t i, j, n;
891+
892+ // gradient colors extracting
893+ jint *colorsBuffer = env->GetIntArrayElements(colors, 0);
894+ uint8_t *colorsComponents = (uint8_t *) colorsBuffer;
895+ float colorsF[4][2];
896+ for (i = 0; i < 4; i++) {
897+ // swap red and green channels
898+ n = (uint8_t) (i == 0 ? 2 : (i == 2 ? 0 : i));
899+ for (j = 0; j < 2; j++) {
900+ colorsF[n][j] = colorsComponents[j * 4 + i] / 255.F;
901+ }
902+ }
903+ env->ReleaseIntArrayElements(colors, colorsBuffer, JNI_ABORT);
904+
905+ // gradient vector
906+ const int32_t vx = endX - startX;
907+ const int32_t vy = endY - startY;
908+ const float vSquaredMag = vx * vx + vy * vy;
909+
910+ float noise, fraction, error, componentF;
911+ float *pixelsComponentsF = new float[info.height * info.stride * 4];
912+ memset(pixelsComponentsF, 0, info.height * info.stride * 4 * sizeof(float));
913+ uint8_t * bitmapPixelsComponents = (uint8_t * )
914+ pixelsBuffer;
915+
916+ int32_t x, y;
917+ int32_t offset;
918+ int32_t position;
919+ for (y = 0; y < info.height; y++) {
920+ offset = y * info.stride;
921+ for (x = 0; x < info.width; x++) {
922+ // triangular probability density function dither noise
923+ noise = (rand() - rand()) / 255.F / RAND_MAX;
924+
925+ // alpha channel
926+ bitmapPixelsComponents[offset + x * 4 + 3] = 255;
927+
928+ for (i = 0; i < 3; i++) {
929+ position = offset + x * 4 + i;
930+ fraction = (vx * (x - startX) + vy * (y - startY)) / vSquaredMag;
931+
932+ // gradient interpolation and noise
933+ pixelsComponentsF[position] += colorsF[i][0] + fraction * (colorsF[i][1] - colorsF[i][0]) + noise;
934+
935+ // clamp
936+ if (pixelsComponentsF[position] > 1.F) {
937+ pixelsComponentsF[position] = 1.F;
938+ } else if (pixelsComponentsF[position] < 0.F) {
939+ pixelsComponentsF[position] = 0.F;
940+ }
941+
942+ // draw
943+ componentF = roundf(pixelsComponentsF[position] * 255.F);
944+ bitmapPixelsComponents[position] = (uint8_t)
945+ componentF;
946+
947+ // floyd-steinberg dithering
948+ error = pixelsComponentsF[position] - componentF / 255.F;
949+ if (x + 1 < info.width) {
950+ pixelsComponentsF[position + 4] += error * 7.F / 16.F;
951+ if (y + 1 < info.height) {
952+ pixelsComponentsF[position + info.height + 4] += error * 1.F / 16.F;
953+ }
954+ }
955+ if (y + 1 < info.height) {
956+ pixelsComponentsF[position + info.height] += error * 5.F / 16.F;
957+ if (x - 1 >= 0) {
958+ pixelsComponentsF[position + info.height - 4] += error * 3.F / 16.F;
959+ }
960+ }
961+ }
962+ }
963+ }
964+
965+ delete[] pixelsComponentsF;
966+
967+ AndroidBitmap_unlockPixels(env, bitmap);
968+ return JNI_TRUE;
969+}
970+
971+//JNIEXPORT jint Java_org_telegram_messenger_Utilities_saveProgressiveJpeg(JNIEnv *env, jclass clazz, jobject bitmap, jint width, jint height, jint stride, jint quality, jstring path) {
972+// if (!bitmap || !path || !width || !height || !stride || stride != width * 4) {
973+// return 0;
974+// }
975+// void *pixels = 0;
976+// if (AndroidBitmap_lockPixels(env, bitmap, &pixels) < 0) {
977+// return 0;
978+// }
979+// if (pixels == NULL) {
980+// return 0;
981+// }
982+// tjhandle handle = 0;
983+// if ((handle = tjInitCompress()) == NULL) {
984+// return 0;
985+// }
986+// const char *pathStr = env->GetStringUTFChars(path, 0);
987+// std::string filePath = std::string(pathStr);
988+// if (pathStr != 0) {
989+// env->ReleaseStringUTFChars(path, pathStr);
990+// }
991+//
992+// const char *enabledValue = "1";
993+// const char *disabledValue = "0";
994+// setenv("TJ_OPTIMIZE", enabledValue, 1);
995+// setenv("TJ_ARITHMETIC", disabledValue, 1);
996+// setenv("TJ_PROGRESSIVE", enabledValue, 1);
997+// setenv("TJ_REVERT", enabledValue, 1);
998+//
999+// TJSAMP jpegSubsamp = TJSAMP::TJSAMP_420;
1000+// jint buffSize = (jint) tjBufSize(width, height, jpegSubsamp);
1001+// unsigned char *jpegBuf = new unsigned char[buffSize];
1002+// unsigned char *srcBuf = (unsigned char *) pixels;
1003+//
1004+// int pf = org_libjpegturbo_turbojpeg_TJ_PF_RGBA;
1005+//
1006+// jsize actualPitch = width * tjPixelSize[pf];
1007+// jsize arraySize = (height - 1) * actualPitch + (width) * tjPixelSize[pf];
1008+// unsigned long jpegSize = tjBufSize(width, height, jpegSubsamp);
1009+//
1010+// if (tjCompress2(handle, srcBuf, width, stride, height, pf, &jpegBuf, &jpegSize, jpegSubsamp, quality, TJFLAG_ACCURATEDCT | TJFLAG_PROGRESSIVE | TJFLAG_NOREALLOC) == 0) {
1011+// FILE *f = fopen(filePath.c_str(), "wb");
1012+// if (f && fwrite(jpegBuf, sizeof(unsigned char), jpegSize, f) == jpegSize) {
1013+// fflush(f);
1014+// fsync(fileno(f));
1015+// } else {
1016+// jpegSize = -1;
1017+// }
1018+// fclose(f);
1019+// } else {
1020+// jpegSize = -1;
1021+// }
1022+// delete[] jpegBuf;
1023+// tjDestroy(handle);
1024+// AndroidBitmap_unlockPixels(env, bitmap);
1025+// return jpegSize;
1026+//
1027+// /*struct jpeg_compress_struct cinfo;
1028+// struct jpeg_error_mgr jerr;
1029+// cinfo.err = jpeg_std_error(&jerr);
1030+// jpeg_create_compress(&cinfo);
1031+//
1032+// const char *pathStr = env->GetStringUTFChars(path, 0);
1033+// std::string filePath = std::string(pathStr);
1034+// if (pathStr != 0) {
1035+// env->ReleaseStringUTFChars(path, pathStr);
1036+// }
1037+//
1038+// uint8_t *outBuffer = NULL;
1039+// unsigned long outSize = 0;
1040+// jpeg_mem_dest(&cinfo, &outBuffer, &outSize);
1041+// unsigned char *srcBuf = (unsigned char *) pixels;
1042+//
1043+// cinfo.image_width = (uint32_t) width;
1044+// cinfo.image_height = (uint32_t) height;
1045+// cinfo.input_components = 4;
1046+// cinfo.in_color_space = JCS_EXT_RGBA;
1047+// jpeg_c_set_int_param(&cinfo, JINT_COMPRESS_PROFILE, JCP_FASTEST);
1048+// jpeg_set_defaults(&cinfo);
1049+// cinfo.arith_code = FALSE;
1050+// cinfo.dct_method = JDCT_ISLOW;
1051+// cinfo.optimize_coding = TRUE;
1052+// jpeg_set_quality(&cinfo, 78, 1);
1053+// jpeg_simple_progression(&cinfo);
1054+// jpeg_start_compress(&cinfo, 1);
1055+//
1056+// JSAMPROW rowPointer[1];
1057+// while (cinfo.next_scanline < cinfo.image_height) {
1058+// rowPointer[0] = (JSAMPROW) (srcBuf + cinfo.next_scanline * stride);
1059+// jpeg_write_scanlines(&cinfo, rowPointer, 1);
1060+// }
1061+//
1062+// jpeg_finish_compress(&cinfo);
1063+//
1064+// FILE *f = fopen(filePath.c_str(), "wb");
1065+// if (f && fwrite(outBuffer, sizeof(uint8_t), outSize, f) == outSize) {
1066+// fflush(f);
1067+// fsync(fileno(f));
1068+// }
1069+// fclose(f);
1070+//
1071+// jpeg_destroy_compress(&cinfo);
1072+// return outSize;*/
1073+//}
1074+
1075+std::vector<std::pair<float, float>> gatherPositions(std::vector<std::pair<float, float>> list, int phase) {
1076+ std::vector<std::pair<float, float>> result(4);
1077+ for (int i = 0; i < 4; i++) {
1078+ int pos = phase + i * 2;
1079+ while (pos >= 8) {
1080+ pos -= 8;
1081+ }
1082+ result[i] = list[pos];
1083+ result[i].second = 1.0f - result[i].second;
1084+ }
1085+ return result;
1086+}
1087+
1088+thread_local static float *pixelCache = nullptr;
1089+thread_local static int pixelCacheSize = 0;
1090+
1091+JNIEXPORT void Java_org_telegram_messenger_Utilities_generateGradient(JNIEnv *env, jclass clazz, jobject bitmap, jint phase, jfloat progress, jintArray colors) {
1092+ if (!bitmap) {
1093+ return;
1094+ }
1095+
1096+ AndroidBitmapInfo info{};
1097+ if (__builtin_expect(AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
1098+ return;
1099+ }
1100+ uint32_t width = info.width;
1101+ uint32_t height = info.height;
1102+ uint32_t stride = info.stride;
1103+
1104+ if (!width || !height) {
1105+ return;
1106+ }
1107+
1108+ uint8_t *pixels = nullptr;
1109+ if (AndroidBitmap_lockPixels(env, bitmap, (void **) &pixels) < 0) {
1110+ return;
1111+ }
1112+
1113+ std::vector<std::pair<float, float>> positions{
1114+ {0.80f, 0.10f},
1115+ {0.60f, 0.20f},
1116+ {0.35f, 0.25f},
1117+ {0.25f, 0.60f},
1118+ {0.20f, 0.90f},
1119+ {0.40f, 0.80f},
1120+ {0.65f, 0.75f},
1121+ {0.75f, 0.40f}
1122+ };
1123+
1124+ int32_t previousPhase = phase + 1;
1125+ if (previousPhase > 7) {
1126+ previousPhase = 0;
1127+ }
1128+ std::vector<std::pair<float, float>> previous = gatherPositions(positions, previousPhase);
1129+ std::vector<std::pair<float, float>> current = gatherPositions(positions, phase);
1130+
1131+ auto colorsArray = (uint8_t *) env->GetIntArrayElements(colors, nullptr);
1132+ float *newPixelCache = nullptr;
1133+
1134+ if (width * height != pixelCacheSize && pixelCache != nullptr) {
1135+ delete[] pixelCache;
1136+ pixelCache = nullptr;
1137+ }
1138+ pixelCacheSize = width * height;
1139+
1140+ if (pixelCache == nullptr) {
1141+ newPixelCache = new float[width * height * 2];
1142+ }
1143+ float directPixelY;
1144+ float centerDistanceY;
1145+ float centerDistanceY2;
1146+ int32_t colorsCount = colorsArray[12] == 0 && colorsArray[13] == 0 && colorsArray[14] == 0 && colorsArray[15] == 0 ? 3 : 4;
1147+
1148+ for (int y = 0; y < height; y++) {
1149+ if (pixelCache == nullptr) {
1150+ directPixelY = (float) y / (float) height;
1151+ centerDistanceY = directPixelY - 0.5f;
1152+ centerDistanceY2 = centerDistanceY * centerDistanceY;
1153+ }
1154+ uint32_t offset = y * stride;
1155+ for (int x = 0; x < width; x++) {
1156+ float pixelX;
1157+ float pixelY;
1158+ if (pixelCache != nullptr) {
1159+ pixelX = pixelCache[(y * width + x) * 2];
1160+ pixelY = pixelCache[(y * width + x) * 2 + 1];
1161+ } else {
1162+ float directPixelX = (float) x / (float) width;
1163+
1164+ float centerDistanceX = directPixelX - 0.5f;
1165+ float centerDistance = sqrtf(centerDistanceX * centerDistanceX + centerDistanceY2);
1166+
1167+ float swirlFactor = 0.35f * centerDistance;
1168+ float theta = swirlFactor * swirlFactor * 0.8f * 8.0f;
1169+ float sinTheta = sinf(theta);
1170+ float cosTheta = cosf(theta);
1171+
1172+ pixelX = newPixelCache[(y * width + x) * 2] = std::max(0.0f, std::min(1.0f, 0.5f + centerDistanceX * cosTheta - centerDistanceY * sinTheta));
1173+ pixelY = newPixelCache[(y * width + x) * 2 + 1] = std::max(0.0f, std::min(1.0f, 0.5f + centerDistanceX * sinTheta + centerDistanceY * cosTheta));
1174+ }
1175+
1176+ float distanceSum = 0.0f;
1177+
1178+ float r = 0.0f;
1179+ float g = 0.0f;
1180+ float b = 0.0f;
1181+
1182+ for (int i = 0; i < colorsCount; i++) {
1183+ float colorX = previous[i].first + (current[i].first - previous[i].first) * progress;
1184+ float colorY = previous[i].second + (current[i].second - previous[i].second) * progress;
1185+
1186+ float distanceX = pixelX - colorX;
1187+ float distanceY = pixelY - colorY;
1188+
1189+ float distance = std::max(0.0f, 0.9f - sqrtf(distanceX * distanceX + distanceY * distanceY));
1190+ distance = distance * distance * distance * distance;
1191+ distanceSum += distance;
1192+
1193+ r = r + distance * ((float) colorsArray[i * 4] / 255.0f);
1194+ g = g + distance * ((float) colorsArray[i * 4 + 1] / 255.0f);
1195+ b = b + distance * ((float) colorsArray[i * 4 + 2] / 255.0f);
1196+ }
1197+
1198+ pixels[offset + x * 4] = (uint8_t) (b / distanceSum * 255.0f);
1199+ pixels[offset + x * 4 + 1] = (uint8_t) (g / distanceSum * 255.0f);
1200+ pixels[offset + x * 4 + 2] = (uint8_t) (r / distanceSum * 255.0f);
1201+ pixels[offset + x * 4 + 3] = 0xff;
1202+ }
1203+ }
1204+ if (newPixelCache != nullptr) {
1205+ delete [] pixelCache;
1206+ pixelCache = newPixelCache;
1207+ }
1208+
1209+ env->ReleaseIntArrayElements(colors, (jint *) colorsArray, JNI_ABORT);
1210+
1211+ AndroidBitmap_unlockPixels(env, bitmap);
1212+}
1213+
1214+static inline uint32_t bitmapBytesPerPixel(int32_t format) {
1215+ switch (format) {
1216+ case ANDROID_BITMAP_FORMAT_A_8:
1217+ return 1;
1218+
1219+ case ANDROID_BITMAP_FORMAT_RGB_565:
1220+ case ANDROID_BITMAP_FORMAT_RGBA_4444: // deprecated since API 13
1221+ return 2;
1222+
1223+ case ANDROID_BITMAP_FORMAT_RGBA_8888:
1224+ return 4;
1225+
1226+ case ANDROID_BITMAP_FORMAT_RGBA_F16:
1227+ return 8;
1228+
1229+ case ANDROID_BITMAP_FORMAT_RGBA_1010102:
1230+ return 4;
1231+
1232+ default:
1233+ return 0;
1234+ }
1235+}
1236+
1237+/**
1238+ * Copies pixel data from src to dst.
1239+ *
1240+ * Both bitmaps must have identical dimensions and pixel format.
1241+ * Hardware-backed bitmaps are not supported.
1242+ * Copying a bitmap to itself is a no-op and returns JNI_TRUE.
1243+ *
1244+ * @param src Source bitmap.
1245+ * @param dst Destination bitmap.
1246+ * @return JNI_TRUE on success, JNI_FALSE if bitmaps are incompatible or an error occurred.
1247+ */
1248+JNIEXPORT jboolean JNICALL
1249+Java_org_telegram_messenger_Utilities_copyBitmaps(
1250+ JNIEnv *env,
1251+ jclass /*clazz*/,
1252+ jobject src,
1253+ jobject dst) {
1254+
1255+ if (__builtin_expect(src == nullptr || dst == nullptr, 0)) {
1256+ return JNI_FALSE;
1257+ }
1258+
1259+ if (__builtin_expect(env->IsSameObject(src, dst), 0)) {
1260+ return JNI_TRUE;
1261+ }
1262+
1263+ AndroidBitmapInfo srcInfo{};
1264+ AndroidBitmapInfo dstInfo{};
1265+
1266+ if (__builtin_expect(
1267+ AndroidBitmap_getInfo(env, src, &srcInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
1268+ AndroidBitmap_getInfo(env, dst, &dstInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
1269+ 0)) {
1270+ return JNI_FALSE;
1271+ }
1272+
1273+ if (__builtin_expect(
1274+ (srcInfo.flags & ANDROID_BITMAP_FLAGS_IS_HARDWARE) != 0 ||
1275+ (dstInfo.flags & ANDROID_BITMAP_FLAGS_IS_HARDWARE) != 0,
1276+ 0)) {
1277+ return JNI_FALSE;
1278+ }
1279+
1280+ if (__builtin_expect(
1281+ srcInfo.width != dstInfo.width ||
1282+ srcInfo.height != dstInfo.height ||
1283+ srcInfo.format != dstInfo.format ||
1284+ srcInfo.width == 0 ||
1285+ srcInfo.height == 0,
1286+ 0)) {
1287+ return JNI_FALSE;
1288+ }
1289+
1290+ const uint32_t bytesPerPixel = bitmapBytesPerPixel(srcInfo.format);
1291+ if (__builtin_expect(bytesPerPixel == 0, 0)) {
1292+ return JNI_FALSE;
1293+ }
1294+
1295+ // size_t cast prevents width * bytesPerPixel overflow on 32-bit platforms
1296+ const size_t rowBytes = static_cast<size_t>(srcInfo.width) * bytesPerPixel;
1297+
1298+ if (__builtin_expect(
1299+ static_cast<size_t>(srcInfo.stride) < rowBytes ||
1300+ static_cast<size_t>(dstInfo.stride) < rowBytes,
1301+ 0)) {
1302+ return JNI_FALSE;
1303+ }
1304+
1305+ void *srcPixels = nullptr;
1306+ void *dstPixels = nullptr;
1307+
1308+ if (__builtin_expect(
1309+ AndroidBitmap_lockPixels(env, src, &srcPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1310+ 0)) {
1311+ return JNI_FALSE;
1312+ }
1313+
1314+ if (__builtin_expect(
1315+ AndroidBitmap_lockPixels(env, dst, &dstPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1316+ 0)) {
1317+ AndroidBitmap_unlockPixels(env, src);
1318+ return JNI_FALSE;
1319+ }
1320+
1321+ const bool contiguous =
1322+ static_cast<size_t>(srcInfo.stride) == rowBytes &&
1323+ static_cast<size_t>(dstInfo.stride) == rowBytes;
1324+
1325+ if (contiguous) {
1326+ // size_t cast prevents rowBytes * height overflow on 32-bit platforms
1327+ std::memcpy(dstPixels, srcPixels, rowBytes * static_cast<size_t>(srcInfo.height));
1328+ } else {
1329+ auto *srcRow = static_cast<const uint8_t *>(srcPixels);
1330+ auto *dstRow = static_cast<uint8_t *>(dstPixels);
1331+
1332+ for (uint32_t y = 0; y < srcInfo.height; ++y) {
1333+ std::memcpy(dstRow, srcRow, rowBytes);
1334+ srcRow += static_cast<ptrdiff_t>(srcInfo.stride);
1335+ dstRow += static_cast<ptrdiff_t>(dstInfo.stride);
1336+ }
1337+ }
1338+
1339+ AndroidBitmap_unlockPixels(env, dst);
1340+ AndroidBitmap_unlockPixels(env, src);
1341+ return JNI_TRUE;
1342+}
1343+
1344+// ---------------------------------------------------------------------------
1345+// Soft-Light blend — exact Android/Skia formula, simplified for α_dst = 1.
1346+//
1347+// General form (C values are pre-multiplied):
1348+// m = C_dst / α_dst
1349+// g = (16m² + 4m)*(m-1) + 7m if 4*C_dst <= α_dst (m <= 0.25)
1350+// = sqrt(m) - m otherwise
1351+// f = C_dst*(α_src + (2*C_src - α_src)*(1-m)) if 2*C_src <= α_src
1352+// = C_dst*α_src + α_dst*(2*C_src - α_src)*g otherwise
1353+// α_out = α_src + α_dst - α_src*α_dst
1354+// C_out = C_src/α_dst + C_dst/α_src + f
1355+//
1356+// Simplified for α_dst = 1 (guaranteed by caller).
1357+// Let cb = straight backdrop channel, cs = straight source channel,
1358+// a = α_src (color alpha, in [0,1]):
1359+//
1360+// m = cb
1361+// g = (16cb² + 4cb)*(cb-1) + 7cb if cb <= 0.25
1362+// = sqrt(cb) - cb otherwise
1363+// f = cb*(a + (2*a*cs - a)*(1-cb)) if 2*a*cs <= a → cs <= 0.5
1364+// = cb*a + (2*a*cs - a)*g otherwise
1365+//
1366+// result_straight = f/a (recover straight channel from pre-multiplied f)
1367+//
1368+// Both LUTs are built on the first call and reused across all subsequent calls.
1369+// ---------------------------------------------------------------------------
1370+
1371+// g_sl_lut[cs_u8][cb_u8] -> soft-light result as uint8, for fully opaque color (a=1).
1372+// 256 * 256 = 64 KB — fits in L2 cache on modern ARM cores.
1373+static uint8_t g_sl_lut[256][256];
1374+
1375+// g_lerp_lut[alpha_u8][value_u8] -> floor(alpha * value / 255)
1376+// Used for branch-free integer lerp in the hot loop:
1377+// out = g_lerp_lut[alpha][blend] + g_lerp_lut[255 - alpha][cb]
1378+// 256 * 256 = 64 KB.
1379+static uint8_t g_lerp_lut[256][256];
1380+
1381+static std::once_flag g_lut_flag;
1382+
1383+static void build_luts() {
1384+ // lerp LUT: floor(a * v / 255) — intentional floor, not round.
1385+ // This guarantees lerpA[x] + lerpInvA[x] <= 255 for any x and any alpha,
1386+ // preventing uint8_t overflow when the two terms are summed in process_alpha.
1387+ //
1388+ // Proof: floor(a*x/255) + floor((255-a)*x/255)
1389+ // <= a*x/255 + (255-a)*x/255 = x <= 255.
1390+ for (int a = 0; a < 256; ++a) {
1391+ for (int v = 0; v < 256; ++v) {
1392+ g_lerp_lut[a][v] = static_cast<uint8_t>((a * v) / 255);
1393+ }
1394+ }
1395+
1396+ // Soft-light LUT for fully opaque color (α_src = 1, i.e. a = 1).
1397+ // With a = 1: C_src = cs, so 2*C_src <= α_src becomes cs <= 0.5.
1398+ // f = cb*(1 + (2*cs - 1)*(1-cb)) if cs <= 0.5
1399+ // = cb + (2*cs - 1)*g otherwise
1400+ // result = f (already straight since a = 1)
1401+ for (int cs_i = 0; cs_i < 256; ++cs_i) {
1402+ const float cs = cs_i / 255.0f;
1403+
1404+ for (int cb_i = 0; cb_i < 256; ++cb_i) {
1405+ const float cb = cb_i / 255.0f;
1406+ float result;
1407+
1408+ if (cs <= 0.5f) {
1409+ // f = cb * (α_src + (2*C_src - α_src)*(1 - m))
1410+ // = cb * (1 + (2*cs - 1)*(1 - cb))
1411+ result = cb * (1.0f + (2.0f * cs - 1.0f) * (1.0f - cb));
1412+ } else {
1413+ // g = (16m² + 4m)*(m-1) + 7m, m = cb
1414+ float g;
1415+ if (cb <= 0.25f) {
1416+ g = (16.0f * cb * cb + 4.0f * cb) * (cb - 1.0f) + 7.0f * cb;
1417+ } else {
1418+ g = sqrtf(cb) - cb;
1419+ }
1420+ // f = cb*α_src + α_dst*(2*C_src - α_src)*g
1421+ // = cb + (2*cs - 1)*g (α_src = α_dst = 1)
1422+ result = cb + (2.0f * cs - 1.0f) * g;
1423+ }
1424+
1425+ // Clamp for float rounding safety.
1426+ if (result < 0.0f) result = 0.0f;
1427+ if (result > 1.0f) result = 1.0f;
1428+
1429+ g_sl_lut[cs_i][cb_i] = static_cast<uint8_t>(result * 255.0f + 0.5f);
1430+ }
1431+ }
1432+}
1433+
1434+// ---------------------------------------------------------------------------
1435+// Three specialised hot loops, selected by colorA before entering the loop.
1436+// Alpha branching is lifted OUT of the loop — no branches inside iterations.
1437+// ---------------------------------------------------------------------------
1438+
1439+// colorA == 0xFF: out[ch] = sl_lut[cs][cb]
1440+static void process_opaque(
1441+ const uint8_t * __restrict__ inPx,
1442+ uint8_t * __restrict__ outPx,
1443+ uint32_t width, uint32_t height,
1444+ uint32_t inStride, uint32_t outStride,
1445+ uint8_t csR, uint8_t csG, uint8_t csB)
1446+{
1447+ // LUT row pointers are fixed for a given color — load them once outside the loop.
1448+ const uint8_t * __restrict__ slR = g_sl_lut[csR];
1449+ const uint8_t * __restrict__ slG = g_sl_lut[csG];
1450+ const uint8_t * __restrict__ slB = g_sl_lut[csB];
1451+
1452+ for (uint32_t y = 0; y < height; ++y) {
1453+ const uint8_t * __restrict__ src = inPx + y * inStride;
1454+ uint8_t * __restrict__ dst = outPx + y * outStride;
1455+ const uint8_t * const end = src + width * 4u;
1456+
1457+ while (src < end) {
1458+ dst[0] = slR[src[0]];
1459+ dst[1] = slG[src[1]];
1460+ dst[2] = slB[src[2]];
1461+ dst[3] = 0xFF;
1462+ src += 4;
1463+ dst += 4;
1464+ }
1465+ }
1466+}
1467+
1468+// colorA == 0x00: output is a copy of input with alpha forced to 0xFF.
1469+// (Input bitmap is guaranteed opaque, so the copy is a straight pixel copy.)
1470+static void process_transparent(
1471+ const uint8_t * __restrict__ inPx,
1472+ uint8_t * __restrict__ outPx,
1473+ uint32_t width, uint32_t height,
1474+ uint32_t inStride, uint32_t outStride)
1475+{
1476+ if (inStride == width * 4u && outStride == width * 4u) {
1477+ memcpy(outPx, inPx, width * height * 4u);
1478+ } else {
1479+ for (uint32_t y = 0; y < height; ++y) {
1480+ memcpy(outPx + y * outStride, inPx + y * inStride, width * 4u);
1481+ }
1482+ }
1483+}
1484+
1485+// 0 < colorA < 0xFF:
1486+// out[ch] = lerp_lut[colorA][sl[cs][cb]] + lerp_lut[255 - colorA][cb]
1487+// No floats, no branches inside the loop.
1488+static void process_alpha(
1489+ const uint8_t * __restrict__ inPx,
1490+ uint8_t * __restrict__ outPx,
1491+ uint32_t width, uint32_t height,
1492+ uint32_t inStride, uint32_t outStride,
1493+ uint8_t csR, uint8_t csG, uint8_t csB, uint8_t colorA)
1494+{
1495+ const uint8_t invA = static_cast<uint8_t>(255 - colorA);
1496+
1497+ const uint8_t * __restrict__ slR = g_sl_lut[csR];
1498+ const uint8_t * __restrict__ slG = g_sl_lut[csG];
1499+ const uint8_t * __restrict__ slB = g_sl_lut[csB];
1500+ const uint8_t * __restrict__ lerpA = g_lerp_lut[colorA];
1501+ const uint8_t * __restrict__ lerpInvA = g_lerp_lut[invA];
1502+
1503+ for (uint32_t y = 0; y < height; ++y) {
1504+ const uint8_t * __restrict__ src = inPx + y * inStride;
1505+ uint8_t * __restrict__ dst = outPx + y * outStride;
1506+ const uint8_t * const end = src + width * 4u;
1507+
1508+ while (src < end) {
1509+ const uint8_t cbR = src[0];
1510+ const uint8_t cbG = src[1];
1511+ const uint8_t cbB = src[2];
1512+ dst[0] = lerpA[slR[cbR]] + lerpInvA[cbR];
1513+ dst[1] = lerpA[slG[cbG]] + lerpInvA[cbG];
1514+ dst[2] = lerpA[slB[cbB]] + lerpInvA[cbB];
1515+ dst[3] = 0xFF;
1516+ src += 4;
1517+ dst += 4;
1518+ }
1519+ }
1520+}
1521+
1522+// ---------------------------------------------------------------------------
1523+// JNI entry point
1524+//
1525+// Kotlin: external fun applySoftLight(input: Bitmap, output: Bitmap, color: Int): Boolean [org.telegram.messenger.Utilities]
1526+//
1527+// color — Android packed ARGB (0xAARRGGBB), straight (non-premultiplied) alpha.
1528+// Returns true on success, false on error (size mismatch or unsupported format).
1529+// ---------------------------------------------------------------------------
1530+JNIEXPORT jboolean JNICALL
1531+Java_org_telegram_messenger_Utilities_applySoftLight(
1532+ JNIEnv *env,
1533+ jclass /*clazz*/,
1534+ jobject inputBitmap,
1535+ jobject outputBitmap,
1536+ jint color)
1537+{
1538+ std::call_once(g_lut_flag, build_luts);
1539+
1540+ if (__builtin_expect(env->IsSameObject(inputBitmap, outputBitmap), 0)) {
1541+ return JNI_FALSE;
1542+ }
1543+
1544+ AndroidBitmapInfo inInfo{};
1545+ AndroidBitmapInfo outInfo{};
1546+
1547+ if (__builtin_expect(
1548+ AndroidBitmap_getInfo(env, inputBitmap, &inInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
1549+ AndroidBitmap_getInfo(env, outputBitmap, &outInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
1550+ 0)) {
1551+ return JNI_FALSE;
1552+ }
1553+
1554+ if (__builtin_expect(
1555+ inInfo.width != outInfo.width ||
1556+ inInfo.height != outInfo.height ||
1557+ inInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
1558+ outInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
1559+ inInfo.width == 0 ||
1560+ inInfo.height == 0 ||
1561+ inInfo.stride < inInfo.width * 4u ||
1562+ outInfo.stride < outInfo.width * 4u,
1563+ 0)) {
1564+ return JNI_FALSE;
1565+ }
1566+
1567+ void *inPixels = nullptr;
1568+ void *outPixels = nullptr;
1569+
1570+ if (__builtin_expect(
1571+ AndroidBitmap_lockPixels(env, inputBitmap, &inPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1572+ 0)) {
1573+ return JNI_FALSE;
1574+ }
1575+ if (__builtin_expect(
1576+ AndroidBitmap_lockPixels(env, outputBitmap, &outPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1577+ 0)) {
1578+ AndroidBitmap_unlockPixels(env, inputBitmap);
1579+ return JNI_FALSE;
1580+ }
1581+
1582+ // Unpack Java color (0xAARRGGBB) into separate channels.
1583+ const auto u = static_cast<uint32_t>(color);
1584+ const uint8_t colorA = static_cast<uint8_t>(u >> 24);
1585+ const uint8_t colorR = static_cast<uint8_t>(u >> 16);
1586+ const uint8_t colorG = static_cast<uint8_t>(u >> 8);
1587+ const uint8_t colorB = static_cast<uint8_t>(u);
1588+
1589+ const auto *src = static_cast<const uint8_t *>(inPixels);
1590+ auto *dst = static_cast<uint8_t *>(outPixels);
1591+ const uint32_t w = inInfo.width;
1592+ const uint32_t h = inInfo.height;
1593+ const uint32_t si = inInfo.stride;
1594+ const uint32_t so = outInfo.stride;
1595+
1596+ // Dispatch before the loop so no alpha branching occurs inside it.
1597+ if (colorA == 0xFF) {
1598+ process_opaque(src, dst, w, h, si, so, colorR, colorG, colorB);
1599+ } else if (colorA == 0x00) {
1600+ process_transparent(src, dst, w, h, si, so);
1601+ } else {
1602+ process_alpha(src, dst, w, h, si, so, colorR, colorG, colorB, colorA);
1603+ }
1604+
1605+ AndroidBitmap_unlockPixels(env, outputBitmap);
1606+ AndroidBitmap_unlockPixels(env, inputBitmap);
1607+ return JNI_TRUE;
1608+}
1609+
1610+
1611+
1612+// ---------------------------------------------------------------------------
1613+// Alpha-invert effect.
1614+//
1615+// For every pixel:
1616+// a = alpha channel of the input pixel
1617+// v = 255 - (a * intensity / 255) (clamped to [0, 255])
1618+// output pixel = RGBA(0, 0, 0, v)
1619+//
1620+// Input : RGBA_8888 (alpha is byte 3) or ALPHA_8 (single byte per pixel)
1621+// Output : RGBA_8888, same dimensions as input
1622+//
1623+// The output has RGB = 0, which satisfies RGB <= A for any v, so the result is
1624+// simultaneously valid as straight and as premultiplied RGBA — no conversion
1625+// is needed either way.
1626+//
1627+// The output pixel depends only on `a` and `intensity`, so a 256-entry LUT of
1628+// fully packed uint32 pixels is built once per call (256 iterations —
1629+// negligible next to millions of pixels). The hot loop then reduces to one
1630+// lookup plus one 32-bit store per pixel.
1631+// ---------------------------------------------------------------------------
1632+
1633+// Builds lut[a] = the fully packed output pixel RGBA(0, 0, 0, v),
1634+// where v = clamp(255 - (a * intensity / 255), 0, 255).
1635+//
1636+// Storing the packed 32-bit pixel (rather than just v) means the hot loop is a
1637+// single lookup followed by a single 32-bit store, with no per-pixel packing.
1638+//
1639+// RGBA_8888 memory order is R, G, B, A; on little-endian (every Android ABI)
1640+// the packed word is (A << 24) | (B << 16) | (G << 8) | R. With R = G = B = 0
1641+// this collapses to v << 24.
1642+static void build_intensity_lut(uint32_t lut[256], int32_t intensity) {
1643+ for (int32_t a = 0; a < 256; ++a) {
1644+ // int64 keeps the product safe even for out-of-range intensity values.
1645+ int64_t v = 255 - (static_cast<int64_t>(a) * intensity) / 255;
1646+ if (v < 0) v = 0;
1647+ if (v > 255) v = 255;
1648+
1649+ lut[a] = static_cast<uint32_t>(v) << 24;
1650+ }
1651+}
1652+
1653+// ---------------------------------------------------------------------------
1654+// Hot loops. One per input format, selected before entering the loop.
1655+//
1656+// Each iteration is a single LUT lookup followed by a single 32-bit store.
1657+// Output is RGBA_8888, whose base pointer is 4-byte aligned by
1658+// AndroidBitmap_lockPixels and whose stride is a multiple of 4 (validated by
1659+// the caller), so the uint32_t store is legal on every row.
1660+// ---------------------------------------------------------------------------
1661+
1662+// Input RGBA_8888: alpha lives in byte 3 of every 4-byte pixel.
1663+static void process_rgba8888(
1664+ const uint8_t * __restrict__ inPx,
1665+ uint8_t * __restrict__ outPx,
1666+ uint32_t width, uint32_t height,
1667+ uint32_t inStride, uint32_t outStride,
1668+ const uint32_t * __restrict__ lut)
1669+{
1670+ for (uint32_t y = 0; y < height; ++y) {
1671+ const uint8_t * __restrict__ src = inPx + y * inStride;
1672+ auto * __restrict__ dst =
1673+ reinterpret_cast<uint32_t *>(outPx + y * outStride);
1674+
1675+ for (uint32_t x = 0; x < width; ++x) {
1676+ dst[x] = lut[src[3]]; // byte 3 = alpha
1677+ src += 4;
1678+ }
1679+ }
1680+}
1681+
1682+// Input ALPHA_8: one alpha byte per pixel, no other channels.
1683+static void process_alpha8(
1684+ const uint8_t * __restrict__ inPx,
1685+ uint8_t * __restrict__ outPx,
1686+ uint32_t width, uint32_t height,
1687+ uint32_t inStride, uint32_t outStride,
1688+ const uint32_t * __restrict__ lut)
1689+{
1690+ for (uint32_t y = 0; y < height; ++y) {
1691+ const uint8_t * __restrict__ src = inPx + y * inStride;
1692+ auto * __restrict__ dst =
1693+ reinterpret_cast<uint32_t *>(outPx + y * outStride);
1694+
1695+ for (uint32_t x = 0; x < width; ++x) {
1696+ dst[x] = lut[src[x]];
1697+ }
1698+ }
1699+}
1700+
1701+// ---------------------------------------------------------------------------
1702+// JNI entry point
1703+//
1704+// Kotlin: external fun applyAlphaInvert(
1705+// input: Bitmap, output: Bitmap, intensity: Int): Boolean
1706+// [org.telegram.messenger.Utilities]
1707+//
1708+// input — RGBA_8888 or ALPHA_8
1709+// output — RGBA_8888, same dimensions as input
1710+// intensity — alpha scaling factor in [0, 255]; 255 means "use alpha as-is"
1711+//
1712+// Returns true on success, false on error (size mismatch, unsupported format,
1713+// aliasing between the two bitmaps, or a failed lock).
1714+// ---------------------------------------------------------------------------
1715+extern "C"
1716+JNIEXPORT jboolean JNICALL
1717+Java_org_telegram_messenger_Utilities_applyAlphaInvert(
1718+ JNIEnv *env,
1719+ jclass /*clazz*/,
1720+ jobject inputBitmap,
1721+ jobject outputBitmap,
1722+ jint intensity)
1723+{
1724+ if (__builtin_expect(env->IsSameObject(inputBitmap, outputBitmap), 0)) {
1725+ return JNI_FALSE;
1726+ }
1727+
1728+ AndroidBitmapInfo inInfo{};
1729+ AndroidBitmapInfo outInfo{};
1730+
1731+ if (__builtin_expect(
1732+ AndroidBitmap_getInfo(env, inputBitmap, &inInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
1733+ AndroidBitmap_getInfo(env, outputBitmap, &outInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
1734+ 0)) {
1735+ return JNI_FALSE;
1736+ }
1737+
1738+ // Input may be RGBA_8888 (4 bytes/px) or ALPHA_8 (1 byte/px).
1739+ const bool inIsRgba = (inInfo.format == ANDROID_BITMAP_FORMAT_RGBA_8888);
1740+ const bool inIsA8 = (inInfo.format == ANDROID_BITMAP_FORMAT_A_8);
1741+ const uint32_t inBpp = inIsRgba ? 4u : 1u;
1742+
1743+ if (__builtin_expect(
1744+ (!inIsRgba && !inIsA8) ||
1745+ outInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
1746+ inInfo.width != outInfo.width ||
1747+ inInfo.height != outInfo.height ||
1748+ inInfo.width == 0 ||
1749+ inInfo.height == 0 ||
1750+ inInfo.stride < inInfo.width * inBpp ||
1751+ outInfo.stride < outInfo.width * 4u,
1752+ 0)) {
1753+ return JNI_FALSE;
1754+ }
1755+
1756+ void *inPixels = nullptr;
1757+ void *outPixels = nullptr;
1758+
1759+ if (__builtin_expect(
1760+ AndroidBitmap_lockPixels(env, inputBitmap, &inPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1761+ 0)) {
1762+ return JNI_FALSE;
1763+ }
1764+ if (__builtin_expect(
1765+ AndroidBitmap_lockPixels(env, outputBitmap, &outPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
1766+ 0)) {
1767+ AndroidBitmap_unlockPixels(env, inputBitmap);
1768+ return JNI_FALSE;
1769+ }
1770+
1771+ // 1 KB LUT of packed output pixels — built per call because it depends on `intensity`.
1772+ uint32_t lut[256];
1773+ build_intensity_lut(lut, intensity);
1774+
1775+ const auto *src = static_cast<const uint8_t *>(inPixels);
1776+ auto *dst = static_cast<uint8_t *>(outPixels);
1777+ const uint32_t w = inInfo.width;
1778+ const uint32_t h = inInfo.height;
1779+ const uint32_t si = inInfo.stride;
1780+ const uint32_t so = outInfo.stride;
1781+
1782+ // Dispatch before the loop so no format branching occurs inside it.
1783+ if (inIsRgba) {
1784+ process_rgba8888(src, dst, w, h, si, so, lut);
1785+ } else {
1786+ process_alpha8(src, dst, w, h, si, so, lut);
1787+ }
1788+
1789+ AndroidBitmap_unlockPixels(env, outputBitmap);
1790+ AndroidBitmap_unlockPixels(env, inputBitmap);
1791+ return JNI_TRUE;
1792+}
1793+
1794+
1795+
1796+extern "C"
1797+JNIEXPORT jboolean JNICALL
1798+Java_org_telegram_messenger_Utilities_nLibyuvARGBSaleBitmap(
1799+ JNIEnv* env,
1800+ jclass,
1801+ jobject inputBitmap,
1802+ jobject outputBitmap,
1803+ jint filterMode
1804+) {
1805+ if (__builtin_expect(inputBitmap == nullptr || outputBitmap == nullptr, 0)) {
1806+ return JNI_FALSE;
1807+ }
1808+
1809+ AndroidBitmapInfo inInfo{};
1810+ AndroidBitmapInfo outInfo{};
1811+
1812+ if (__builtin_expect(
1813+ AndroidBitmap_getInfo(env, inputBitmap, &inInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
1814+ AndroidBitmap_getInfo(env, outputBitmap, &outInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
1815+ 0)) {
1816+ return JNI_FALSE;
1817+ }
1818+
1819+ if (__builtin_expect(
1820+ inInfo.width == 0 || inInfo.height == 0 ||
1821+ outInfo.width == 0 || outInfo.height == 0,
1822+ 0)) {
1823+ return JNI_FALSE;
1824+ }
1825+
1826+ if (__builtin_expect(
1827+ inInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
1828+ outInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888,
1829+ 0)) {
1830+ return JNI_FALSE;
1831+ }
1832+
1833+ if (__builtin_expect(
1834+ inInfo.width > INT_MAX / 4 ||
1835+ outInfo.width > INT_MAX / 4 ||
1836+ inInfo.height > INT_MAX ||
1837+ outInfo.height > INT_MAX ||
1838+ inInfo.stride > INT_MAX ||
1839+ outInfo.stride > INT_MAX,
1840+ 0)) {
1841+ return JNI_FALSE;
1842+ }
1843+
1844+ if (__builtin_expect(
1845+ inInfo.stride < inInfo.width * 4 ||
1846+ outInfo.stride < outInfo.width * 4,
1847+ 0)) {
1848+ return JNI_FALSE;
1849+ }
1850+
1851+ libyuv::FilterMode mode;
1852+
1853+ switch (filterMode) {
1854+ case 0: mode = libyuv::kFilterNone; break;
1855+ case 1: mode = libyuv::kFilterLinear; break;
1856+ case 2: mode = libyuv::kFilterBilinear; break;
1857+ case 3: mode = libyuv::kFilterBox; break;
1858+ default: return JNI_FALSE;
1859+ }
1860+
1861+ void* inPixels = nullptr;
1862+ void* outPixels = nullptr;
1863+
1864+ if (__builtin_expect(
1865+ AndroidBitmap_lockPixels(env, inputBitmap, &inPixels) != ANDROID_BITMAP_RESULT_SUCCESS ||
1866+ inPixels == nullptr,
1867+ 0)) {
1868+ return JNI_FALSE;
1869+ }
1870+
1871+ if (__builtin_expect(
1872+ AndroidBitmap_lockPixels(env, outputBitmap, &outPixels) != ANDROID_BITMAP_RESULT_SUCCESS ||
1873+ outPixels == nullptr,
1874+ 0)) {
1875+ AndroidBitmap_unlockPixels(env, inputBitmap);
1876+ return JNI_FALSE;
1877+ }
1878+
1879+ const int scaleResult = libyuv::ARGBScale(
1880+ static_cast<const uint8_t*>(inPixels),
1881+ static_cast<int>(inInfo.stride),
1882+ static_cast<int>(inInfo.width),
1883+ static_cast<int>(inInfo.height),
1884+ static_cast<uint8_t*>(outPixels),
1885+ static_cast<int>(outInfo.stride),
1886+ static_cast<int>(outInfo.width),
1887+ static_cast<int>(outInfo.height),
1888+ mode
1889+ );
1890+
1891+ AndroidBitmap_unlockPixels(env, outputBitmap);
1892+ AndroidBitmap_unlockPixels(env, inputBitmap);
1893+
1894+ return __builtin_expect(scaleResult == 0, 1) ? JNI_TRUE : JNI_FALSE;
1895+}
1896+
1897+
1898+extern "C"
1899+JNIEXPORT jint JNICALL
1900+Java_org_telegram_messenger_Utilities_averageBitmapColor(
1901+ JNIEnv* env,
1902+ jclass,
1903+ jobject bitmap,
1904+ jint left,
1905+ jint top,
1906+ jint right,
1907+ jint bottom
1908+) {
1909+ if (__builtin_expect(bitmap == nullptr, 0)) {
1910+ return 0;
1911+ }
1912+
1913+ if (__builtin_expect(left < 0 || top < 0 || right <= left || bottom <= top, 0)) {
1914+ return 0;
1915+ }
1916+
1917+ AndroidBitmapInfo info{};
1918+
1919+ if (__builtin_expect(
1920+ AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS,
1921+ 0)) {
1922+ return 0;
1923+ }
1924+
1925+ if (__builtin_expect(
1926+ info.width == 0 || info.height == 0 ||
1927+ info.format != ANDROID_BITMAP_FORMAT_RGBA_8888,
1928+ 0)) {
1929+ return 0;
1930+ }
1931+
1932+ if (__builtin_expect(
1933+ info.width > INT_MAX / 4 ||
1934+ info.height > INT_MAX ||
1935+ info.stride > INT_MAX,
1936+ 0)) {
1937+ return 0;
1938+ }
1939+
1940+ if (__builtin_expect(info.stride < info.width * 4, 0)) {
1941+ return 0;
1942+ }
1943+
1944+ if (__builtin_expect(
1945+ right > static_cast<jint>(info.width) ||
1946+ bottom > static_cast<jint>(info.height),
1947+ 0)) {
1948+ return 0;
1949+ }
1950+
1951+ void* pixels = nullptr;
1952+
1953+ if (__builtin_expect(
1954+ AndroidBitmap_lockPixels(env, bitmap, &pixels) != ANDROID_BITMAP_RESULT_SUCCESS ||
1955+ pixels == nullptr,
1956+ 0)) {
1957+ return 0;
1958+ }
1959+
1960+ uint64_t sumR = 0;
1961+ uint64_t sumG = 0;
1962+ uint64_t sumB = 0;
1963+ uint64_t sumA = 0;
1964+
1965+ const uint8_t* base = static_cast<const uint8_t*>(pixels);
1966+ const int stride = static_cast<int>(info.stride);
1967+
1968+ for (int y = top; y < bottom; y++) {
1969+ const uint8_t* row = base + static_cast<size_t>(y) * stride + static_cast<size_t>(left) * 4;
1970+
1971+ for (int x = left; x < right; x++) {
1972+ sumR += row[0];
1973+ sumG += row[1];
1974+ sumB += row[2];
1975+ sumA += row[3];
1976+ row += 4;
1977+ }
1978+ }
1979+
1980+ AndroidBitmap_unlockPixels(env, bitmap);
1981+
1982+ const uint64_t count = static_cast<uint64_t>(right - left) * static_cast<uint64_t>(bottom - top);
1983+
1984+ const uint32_t avgR = static_cast<uint32_t>(sumR / count);
1985+ const uint32_t avgG = static_cast<uint32_t>(sumG / count);
1986+ const uint32_t avgB = static_cast<uint32_t>(sumB / count);
1987+ const uint32_t avgA = static_cast<uint32_t>(sumA / count);
1988+
1989+ return static_cast<jint>(
1990+ (avgA << 24) |
1991+ (avgR << 16) |
1992+ (avgG << 8) |
1993+ avgB
1994+ );
1995+}
1996+
1997+// ---------------------------------------------------------------------------
1998+// ALPHA_8 -> RGBA_8888 expansion.
1999+//
2000+// For every pixel:
2001+// a = the source alpha byte
2002+// output pixel = RGBA(0, 0, 0, a) — black, alpha taken from the source
2003+//
2004+// src : ALPHA_8 (1 byte per pixel)
2005+// dst : RGBA_8888 (4 bytes per pixel), same dimensions as src
2006+//
2007+// RGB = 0 satisfies RGB <= A for any a, so the result is simultaneously valid
2008+// as straight and as premultiplied RGBA — no conversion is needed either way.
2009+//
2010+// No LUT is needed here: on little-endian (every Android ABI) the RGBA_8888
2011+// memory order R, G, B, A packs into a word as (A << 24) | (B << 16) |
2012+// (G << 8) | R, which with R = G = B = 0 collapses to a << 24. A shift is
2013+// cheaper than a table lookup, so the hot loop is a byte load, a shift, and a
2014+// 32-bit store.
2015+// ---------------------------------------------------------------------------
2016+
2017+static void expand_alpha8_to_rgba8888(
2018+ const uint8_t * __restrict__ srcPx,
2019+ uint8_t * __restrict__ dstPx,
2020+ uint32_t width, uint32_t height,
2021+ uint32_t srcStride, uint32_t dstStride)
2022+{
2023+ for (uint32_t y = 0; y < height; ++y) {
2024+ const uint8_t * __restrict__ src = srcPx + y * srcStride;
2025+ auto * __restrict__ dst =
2026+ reinterpret_cast<uint32_t *>(dstPx + y * dstStride);
2027+
2028+ for (uint32_t x = 0; x < width; ++x) {
2029+ dst[x] = static_cast<uint32_t>(src[x]) << 24; // RGBA(0, 0, 0, a)
2030+ }
2031+ }
2032+}
2033+
2034+// ---------------------------------------------------------------------------
2035+// JNI entry point
2036+//
2037+// Kotlin: external fun expandAlphaToBlack(src: Bitmap, dst: Bitmap): Boolean
2038+// [org.telegram.messenger.Utilities]
2039+//
2040+// src — ALPHA_8
2041+// dst — RGBA_8888, same dimensions as src
2042+//
2043+// Returns true on success, false on error (size mismatch, unsupported format,
2044+// aliasing between the two bitmaps, or a failed lock).
2045+// ---------------------------------------------------------------------------
2046+extern "C"
2047+JNIEXPORT jboolean JNICALL
2048+Java_org_telegram_messenger_Utilities_expandAlphaToBlack(
2049+ JNIEnv *env,
2050+ jclass /*clazz*/,
2051+ jobject srcBitmap,
2052+ jobject dstBitmap)
2053+{
2054+ if (__builtin_expect(env->IsSameObject(srcBitmap, dstBitmap), 0)) {
2055+ return JNI_FALSE;
2056+ }
2057+
2058+ AndroidBitmapInfo srcInfo{};
2059+ AndroidBitmapInfo dstInfo{};
2060+
2061+ if (__builtin_expect(
2062+ AndroidBitmap_getInfo(env, srcBitmap, &srcInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
2063+ AndroidBitmap_getInfo(env, dstBitmap, &dstInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
2064+ 0)) {
2065+ return JNI_FALSE;
2066+ }
2067+
2068+ if (__builtin_expect(
2069+ srcInfo.format != ANDROID_BITMAP_FORMAT_A_8 ||
2070+ dstInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
2071+ srcInfo.width != dstInfo.width ||
2072+ srcInfo.height != dstInfo.height ||
2073+ srcInfo.width == 0 ||
2074+ srcInfo.height == 0 ||
2075+ srcInfo.stride < srcInfo.width ||
2076+ dstInfo.stride < dstInfo.width * 4u,
2077+ 0)) {
2078+ return JNI_FALSE;
2079+ }
2080+
2081+ void *srcPixels = nullptr;
2082+ void *dstPixels = nullptr;
2083+
2084+ if (__builtin_expect(
2085+ AndroidBitmap_lockPixels(env, srcBitmap, &srcPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
2086+ 0)) {
2087+ return JNI_FALSE;
2088+ }
2089+ if (__builtin_expect(
2090+ AndroidBitmap_lockPixels(env, dstBitmap, &dstPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
2091+ 0)) {
2092+ AndroidBitmap_unlockPixels(env, srcBitmap);
2093+ return JNI_FALSE;
2094+ }
2095+
2096+ expand_alpha8_to_rgba8888(
2097+ static_cast<const uint8_t *>(srcPixels),
2098+ static_cast<uint8_t *>(dstPixels),
2099+ srcInfo.width, srcInfo.height,
2100+ srcInfo.stride, dstInfo.stride);
2101+
2102+ AndroidBitmap_unlockPixels(env, dstBitmap);
2103+ AndroidBitmap_unlockPixels(env, srcBitmap);
2104+ return JNI_TRUE;
2105+}
2106+
2107+// ---------------------------------------------------------------------------
2108+// RGBA_8888 -> ALPHA_8: extract the alpha channel.
2109+//
2110+// For every pixel:
2111+// dst = alpha byte of the source pixel
2112+//
2113+// src : RGBA_8888 (4 bytes per pixel; alpha is the high byte on little-endian)
2114+// dst : ALPHA_8 (1 byte per pixel), same dimensions as src
2115+//
2116+// The hot loop reads each pixel as one 32-bit word and stores its high byte.
2117+// Reading a whole word and shifting is friendlier to the load unit than a
2118+// strided byte read of src[3], and lets the compiler vectorise the pass.
2119+// ---------------------------------------------------------------------------
2120+
2121+// Contiguous fast path: both bitmaps have no row padding, so they are flat
2122+// buffers and the whole image is one pass over width*height pixels.
2123+static void extract_alpha_contiguous(
2124+ const uint8_t * __restrict__ srcPx,
2125+ uint8_t * __restrict__ dstPx,
2126+ uint32_t width, uint32_t height)
2127+{
2128+ const auto * __restrict__ src = reinterpret_cast<const uint32_t *>(srcPx);
2129+ uint8_t * __restrict__ dst = dstPx;
2130+ const uint32_t count = width * height;
2131+
2132+ for (uint32_t i = 0; i < count; ++i) {
2133+ dst[i] = static_cast<uint8_t>(src[i] >> 24); // high byte = alpha
2134+ }
2135+}
2136+
2137+// General path: row-by-row, honouring each bitmap's stride.
2138+static void extract_alpha_strided(
2139+ const uint8_t * __restrict__ srcPx,
2140+ uint8_t * __restrict__ dstPx,
2141+ uint32_t width, uint32_t height,
2142+ uint32_t srcStride, uint32_t dstStride)
2143+{
2144+ for (uint32_t y = 0; y < height; ++y) {
2145+ const auto * __restrict__ src =
2146+ reinterpret_cast<const uint32_t *>(srcPx + y * srcStride);
2147+ uint8_t * __restrict__ dst = dstPx + y * dstStride;
2148+
2149+ for (uint32_t x = 0; x < width; ++x) {
2150+ dst[x] = static_cast<uint8_t>(src[x] >> 24); // high byte = alpha
2151+ }
2152+ }
2153+}
2154+
2155+// ---------------------------------------------------------------------------
2156+// JNI entry point
2157+//
2158+// Kotlin: external fun extractAlpha(src: Bitmap, dst: Bitmap): Boolean
2159+// [org.telegram.messenger.Utilities]
2160+//
2161+// src — RGBA_8888
2162+// dst — ALPHA_8, same dimensions as src
2163+//
2164+// Returns true on success, false on error (size mismatch, unsupported format,
2165+// aliasing between the two bitmaps, or a failed lock).
2166+// ---------------------------------------------------------------------------
2167+extern "C"
2168+JNIEXPORT jboolean JNICALL
2169+Java_org_telegram_messenger_Utilities_extractAlpha(
2170+ JNIEnv *env,
2171+ jclass /*clazz*/,
2172+ jobject srcBitmap,
2173+ jobject dstBitmap)
2174+{
2175+ if (__builtin_expect(env->IsSameObject(srcBitmap, dstBitmap), 0)) {
2176+ return JNI_FALSE;
2177+ }
2178+
2179+ AndroidBitmapInfo srcInfo{};
2180+ AndroidBitmapInfo dstInfo{};
2181+
2182+ if (__builtin_expect(
2183+ AndroidBitmap_getInfo(env, srcBitmap, &srcInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
2184+ AndroidBitmap_getInfo(env, dstBitmap, &dstInfo) != ANDROID_BITMAP_RESULT_SUCCESS,
2185+ 0)) {
2186+ return JNI_FALSE;
2187+ }
2188+
2189+ if (__builtin_expect(
2190+ srcInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
2191+ dstInfo.format != ANDROID_BITMAP_FORMAT_A_8 ||
2192+ srcInfo.width != dstInfo.width ||
2193+ srcInfo.height != dstInfo.height ||
2194+ srcInfo.width == 0 ||
2195+ srcInfo.height == 0 ||
2196+ srcInfo.stride < srcInfo.width * 4u ||
2197+ dstInfo.stride < dstInfo.width,
2198+ 0)) {
2199+ return JNI_FALSE;
2200+ }
2201+
2202+ void *srcPixels = nullptr;
2203+ void *dstPixels = nullptr;
2204+
2205+ if (__builtin_expect(
2206+ AndroidBitmap_lockPixels(env, srcBitmap, &srcPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
2207+ 0)) {
2208+ return JNI_FALSE;
2209+ }
2210+ if (__builtin_expect(
2211+ AndroidBitmap_lockPixels(env, dstBitmap, &dstPixels) != ANDROID_BITMAP_RESULT_SUCCESS,
2212+ 0)) {
2213+ AndroidBitmap_unlockPixels(env, srcBitmap);
2214+ return JNI_FALSE;
2215+ }
2216+
2217+ // Contiguous when neither bitmap has row padding. The two formats have
2218+ // different bytes-per-pixel, so each has its own "no padding" test.
2219+ if (srcInfo.stride == srcInfo.width * 4u && dstInfo.stride == dstInfo.width) {
2220+ extract_alpha_contiguous(
2221+ static_cast<const uint8_t *>(srcPixels),
2222+ static_cast<uint8_t *>(dstPixels),
2223+ srcInfo.width, srcInfo.height);
2224+ } else {
2225+ extract_alpha_strided(
2226+ static_cast<const uint8_t *>(srcPixels),
2227+ static_cast<uint8_t *>(dstPixels),
2228+ srcInfo.width, srcInfo.height,
2229+ srcInfo.stride, dstInfo.stride);
2230+ }
2231+
2232+ AndroidBitmap_unlockPixels(env, dstBitmap);
2233+ AndroidBitmap_unlockPixels(env, srcBitmap);
2234+ return JNI_TRUE;
2235+}
2236+
2237+}
2238+
2239+
2240+
2241+
2242+
2243+// ---------------------------------------------------------------------------
2244+// Fills an ARGB_8888 bitmap with the reply-line stripe pattern:
2245+//
2246+// - color1 background
2247+// - color2 diagonal bars (45°, sharp pixel edges)
2248+// - optionally color3 diagonal bars placed right after color2's
2249+//
2250+// The bitmap height IS the vertical period; a BitmapShader with
2251+// TileMode.REPEAT tiles it on the Java side.
2252+//
2253+// All bar colors are pre-composited by the caller via
2254+// ColorUtils.compositeColors(barColor, backgroundColor), so this
2255+// function writes flat pixel values — no alpha blending.
2256+// ---------------------------------------------------------------------------
2257+
2258+#include <jni.h>
2259+#include <android/bitmap.h>
2260+#include <cstdint>
2261+#include <cstring>
2262+
2263+// Maximum supported tile period (pixels). dp(19) ≈ 95 px at 5× density;
2264+// 256 is well above any realistic value and keeps the ref column on the stack.
2265+static constexpr uint32_t MAX_PERIOD = 256;
2266+
2267+// ---------------------------------------------------------------------------
2268+// Converts a Java ARGB color int to the native RGBA_8888 pixel value.
2269+//
2270+// Java color int (0xAARRGGBB): A31-24 R23-16 G15-8 B7-0
2271+// RGBA_8888 memory (little-endian byte order R, G, B, A) read as uint32_t:
2272+// R7-0 G15-8 B23-16 A31-24 → 0xAABBGGRR
2273+//
2274+// A and G are already in the right positions; swap R and B.
2275+// ---------------------------------------------------------------------------
2276+static inline uint32_t argb_to_native(uint32_t argb) {
2277+ return (argb & 0xFF00FF00u) | // A and G stay
2278+ ((argb >> 16) & 0xFFu) | // R → bits 7-0
2279+ ((argb & 0xFFu) << 16); // B → bits 23-16
2280+}
2281+
2282+// ---------------------------------------------------------------------------
2283+// Premultiplies a native RGBA pixel (R in low byte, A in high byte on LE).
2284+//
2285+// Android ARGB_8888 bitmaps are premultiplied by default; writing
2286+// straight-alpha pixels causes the renderer to mis-interpret RGB,
2287+// distorting colors whenever A < 255.
2288+// ---------------------------------------------------------------------------
2289+static inline uint32_t premultiply(uint32_t rgba) {
2290+ const uint32_t a = rgba >> 24;
2291+ if (a == 0xFF) return rgba;
2292+ if (a == 0x00) return 0;
2293+ const uint32_t r = ( rgba & 0xFFu) * a / 255u;
2294+ const uint32_t g = ((rgba >> 8) & 0xFFu) * a / 255u;
2295+ const uint32_t b = ((rgba >> 16) & 0xFFu) * a / 255u;
2296+ return r | (g << 8) | (b << 16) | (a << 24);
2297+}
2298+
2299+// ---------------------------------------------------------------------------
2300+// Per-byte average of two RGBA pixels (SWAR trick, no per-channel extract).
2301+// Computes floor((p + q) / 2) for each of the four bytes independently.
2302+// The 0x7F7F7F7F mask prevents carry leaking between adjacent bytes.
2303+// ---------------------------------------------------------------------------
2304+static inline uint32_t avg_color(uint32_t p, uint32_t q) {
2305+ return (p & q) + (((p ^ q) >> 1) & 0x7F7F7F7Fu);
2306+}
2307+
2308+// ---------------------------------------------------------------------------
2309+// Core pixel loop.
2310+//
2311+// The pattern within one period (= height):
2312+// [0, gapSize) → color1 (background)
2313+// [gapSize, gapSize + barHeight) → color2 (first bar)
2314+// [gapSize + barHeight, period) → color3 (second bar, if present)
2315+//
2316+// The 45° skew is applied per-column: column x reads from the reference
2317+// column at (y + x) % period. Since width ≤ period (checked by the
2318+// caller), y + x < 2·period, so a single compare-and-subtract replaces
2319+// the modulo.
2320+// ---------------------------------------------------------------------------
2321+static void draw_reply_line_pattern(
2322+ uint8_t * __restrict__ pixels,
2323+ uint32_t width, uint32_t height, uint32_t stride,
2324+ uint32_t c1, uint32_t c2, uint32_t c3,
2325+ uint32_t barHeight, bool hasColor3)
2326+{
2327+ const uint32_t period = height;
2328+ const uint32_t barsTotal = hasColor3 ? 2u * barHeight : barHeight;
2329+ const uint32_t gapSize = period > barsTotal ? period - barsTotal : 0u;
2330+ const uint32_t bar2End = gapSize + barHeight;
2331+
2332+ // Build a reference column (color for each y at x = 0).
2333+ // At every boundary between two color regions the last pixel of the
2334+ // outgoing region is replaced with the average of the two colors,
2335+ // giving a 1-pixel anti-aliased transition on the 45° diagonal.
2336+ uint32_t ref[MAX_PERIOD];
2337+ for (uint32_t i = 0; i < period; ++i) {
2338+ uint32_t ci, cn;
2339+
2340+ if (i < gapSize) ci = c1;
2341+ else if (i < bar2End) ci = c2;
2342+ else ci = c3;
2343+
2344+ const uint32_t ni = (i + 1u < period) ? i + 1u : 0u;
2345+ if (ni < gapSize) cn = c1;
2346+ else if (ni < bar2End) cn = c2;
2347+ else cn = c3;
2348+
2349+ ref[i] = (ci != cn) ? avg_color(ci, cn) : ci;
2350+ }
2351+
2352+ // Fill each pixel: the 45° skew means column x reads from
2353+ // ref[(y + x) % period]. Instead of a per-pixel branch we split
2354+ // each row into at most two contiguous memcpy runs.
2355+ for (uint32_t y = 0; y < height; ++y) {
2356+ auto * __restrict__ row =
2357+ reinterpret_cast<uint32_t *>(pixels + y * stride);
2358+ const uint32_t split = period - y;
2359+ if (split >= width) {
2360+ memcpy(row, ref + y, width * sizeof(uint32_t));
2361+ } else {
2362+ memcpy(row, ref + y, split * sizeof(uint32_t));
2363+ memcpy(row + split, ref, (width - split) * sizeof(uint32_t));
2364+ }
2365+ }
2366+}
2367+
2368+// ---------------------------------------------------------------------------
2369+// JNI entry point
2370+//
2371+// Java: public static native boolean drawReplyLinePattern(
2372+// Bitmap bitmap, int color1, int color2, int color3,
2373+// int barHeight, boolean hasColor3);
2374+// [org.telegram.messenger.Utilities]
2375+//
2376+// bitmap — mutable ARGB_8888, width × period
2377+// color1 — background (Java ARGB int, raw)
2378+// color2 — first bar color (Java ARGB int, composited over color1)
2379+// color3 — second bar color (Java ARGB int, composited over color1;
2380+// ignored when hasColor3 == false)
2381+// barHeight — height of each bar in pixels (> 0)
2382+// hasColor3 — whether the second bar is drawn
2383+//
2384+// Returns true on success, false on any validation or locking error.
2385+// ---------------------------------------------------------------------------
2386+extern "C"
2387+JNIEXPORT jboolean JNICALL
2388+Java_org_telegram_messenger_Utilities_drawReplyLinePattern(
2389+ JNIEnv *env,
2390+ jclass /*clazz*/,
2391+ jobject bitmap,
2392+ jint color1,
2393+ jint color2,
2394+ jint color3,
2395+ jint barHeight,
2396+ jboolean hasColor3)
2397+{
2398+ if (__builtin_expect(!bitmap, 0)) {
2399+ return JNI_FALSE;
2400+ }
2401+
2402+ AndroidBitmapInfo info{};
2403+ if (__builtin_expect(
2404+ AndroidBitmap_getInfo(env, bitmap, &info)
2405+ != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
2406+ return JNI_FALSE;
2407+ }
2408+
2409+ if (__builtin_expect(
2410+ info.format != ANDROID_BITMAP_FORMAT_RGBA_8888 ||
2411+ info.width == 0 ||
2412+ info.height == 0 ||
2413+ info.height > MAX_PERIOD ||
2414+ info.width > info.height ||
2415+ info.stride < info.width * 4u ||
2416+ barHeight <= 0 ||
2417+ static_cast<uint32_t>(barHeight) > info.height,
2418+ 0)) {
2419+ return JNI_FALSE;
2420+ }
2421+
2422+ void *pixels = nullptr;
2423+ if (__builtin_expect(
2424+ AndroidBitmap_lockPixels(env, bitmap, &pixels)
2425+ != ANDROID_BITMAP_RESULT_SUCCESS, 0)) {
2426+ return JNI_FALSE;
2427+ }
2428+
2429+ draw_reply_line_pattern(
2430+ static_cast<uint8_t *>(pixels),
2431+ info.width, info.height, info.stride,
2432+ premultiply(argb_to_native(static_cast<uint32_t>(color1))),
2433+ premultiply(argb_to_native(static_cast<uint32_t>(color2))),
2434+ hasColor3 ? premultiply(argb_to_native(static_cast<uint32_t>(color3))) : 0u,
2435+ static_cast<uint32_t>(barHeight),
2436+ hasColor3);
2437+
2438+ AndroidBitmap_unlockPixels(env, bitmap);
2439+ return JNI_TRUE;
2440+}
TMessagesProj/jni/intro/IntroRenderer.cnew file+2849
@@ -0,0 +1,2849 @@
1+#include "IntroRenderer.h"
2+#include <math.h>
3+#include <stdlib.h>
4+#include <jni.h>
5+#include <string.h>
6+
7+static int32_t is_initialized = 0;
8+static float _coefficientsX[TIMING_NUM][4], _coefficientsY[TIMING_NUM][4];
9+static const float _c0x = 0.0;
10+static const float _c0y = 0.0;
11+static const float _c3x = 1.0;
12+static const float _c3y = 1.0;
13+
14+float scale_factor;
15+int width, height;
16+int y_offset_absolute;
17+static TextureProgram texture_program;
18+static TextureProgram texture_program_one;
19+static TextureProgram texture_program_red;
20+static TextureProgram texture_program_blue;
21+static TextureProgram texture_program_light_red;
22+static TextureProgram texture_program_light_blue;
23+static TextureProgram *texture_program_temp;
24+static ColorProgram color_program;
25+static float y_offset;
26+
27+#define BUFFER_OFFSET(i) ((void*)(i))
28+
29+static const vec4 black_color = {0.0f, 0.0f, 0.0f, 1.0f};
30+static const vec4 white_color = {1.0f, 1.0f, 1.0f, 1.0f};
31+
32+static LayerParams ribbonLayer, privateLayer;
33+
34+static TexturedShape spiral;
35+static Shape mask1;
36+static Shape cloud_extra_mask1;
37+static Shape cloud_extra_mask2;
38+static Shape cloud_extra_mask3;
39+static Shape cloud_extra_mask4;
40+static int surfaceCreated = 0;
41+
42+static Shape cloud_cover;
43+
44+static Shape free_bg;
45+static TexturedShape fast_body;
46+static TexturedShape fast_arrow_shadow;
47+static TexturedShape fast_arrow;
48+
49+static TexturedShape free_knot1;
50+static TexturedShape free_knot2;
51+static TexturedShape free_knot3;
52+static TexturedShape free_knot4;
53+
54+static Shape powerful_bg;
55+static TexturedShape powerful_mask, powerful_infinity, powerful_infinity_white;
56+
57+static Shape private_bg;
58+
59+static TexturedShape telegram_sphere, telegram_plane, telegram_mask;
60+
61+static Shape cloud_bg;
62+
63+#define starsCount 80
64+static TexturedShape star;
65+static Params stars[starsCount];
66+
67+static Shape ribbon1;
68+static Shape ribbon2;
69+static Shape ribbon3;
70+static Shape ribbon4;
71+static mat4x4 stars_matrix;
72+static mat4x4 main_matrix;
73+static mat4x4 ribbons_layer;
74+
75+static TexturedShape ic_bubble_dot, ic_bubble, ic_cam_lens, ic_cam, ic_pencil, ic_pin, ic_smile_eye, ic_smile, ic_videocam;
76+static GLuint ic_bubble_dot_texture, ic_bubble_texture, ic_cam_lens_texture, ic_cam_texture, ic_pencil_texture, ic_pin_texture, ic_smile_eye_texture, ic_smile_texture, ic_videocam_texture;
77+static GLuint telegram_sphere_texture, telegram_plane_texture, telegram_mask_texture;
78+static GLuint fast_spiral_texture, fast_body_texture, fast_arrow_texture, fast_arrow_shadow_texture;
79+static GLuint free_knot_up_texture, free_knot_down_texture;
80+static GLuint powerful_mask_texture, powerful_star_texture, powerful_infinity_texture, powerful_infinity_white_texture;
81+static GLuint private_door_texture, private_screw_texture, private_keyhole_body_texture;
82+static Shape infinity;
83+
84+static TexturedShape private_door, private_screw, private_keyhole_body;
85+static Shape private_stroke;
86+
87+static Shape start_button;
88+
89+static const float r1 = 58.5f;
90+static const float r2 = 70;
91+static double ms0;
92+static float date, date0;
93+static float duration_const = 0.3f;
94+static int32_t direct;
95+static int32_t i;
96+static int32_t current_page, prev_page;
97+static float time;
98+static mat4x4 ic_matrix;
99+static LayerParams ic_pin_layer, ic_cam_layer, ic_videocam_layer, ic_smile_layer, ic_bubble_layer, ic_pencil_layer;
100+static float time_local = 0;
101+static float knot_delays[4];
102+static float offset_y;
103+static float ribbonLength = 86.5f;
104+static int32_t starsFar = 500;
105+static float scroll_offset;
106+
107+static float calculated_speedometer_sin;
108+float ms0_anim;
109+int fps_anim;
110+int last_stars_update_fps;
111+int count_anim_fps;
112+static float speedometer_scroll_offset = 0, free_scroll_offset = 0, private_scroll_offset = 0;
113+float anim_pencil_start_time, anim_pencil_start_all_time, anim_pencil_start_all_end_time;
114+int anim_pencil_stage;
115+int anim_bubble_dots_stage;
116+int anim_bubble_dots_end_period;
117+float anim_videocam_start_time, anim_videocam_next_time, anim_videocam_duration, anim_videocam_angle, anim_videocam_old_angle;
118+float anim_cam_start_time, anim_cam_next_time, anim_cam_duration, anim_cam_angle, anim_cam_old_angle;
119+CPoint anim_cam_position, anim_cam_old_position;
120+int qShot;
121+float anim_camshot_start_time, anim_camshot_duration;
122+float anim_smile_start_time1, anim_smile_start_time2, anim_smile_blink_start_time;
123+int anim_smile_blink_one;
124+int anim_smile_stage;
125+static float scale;
126+float anim_pin_start_time, anim_pin_duration;
127+static int32_t anim_pencil_period;
128+static mat4x4 private_matrix;
129+float cloud_scroll_offset;
130+
131+vec4 background_color = {1, 1, 1, 1};
132+
133+static inline void vec2_add(vec2 r, vec2 a, vec2 b) {
134+ int32_t i;
135+ for (i = 0; i < 2; ++i) {
136+ r[i] = a[i] + b[i];
137+ }
138+}
139+
140+static inline float vec2_mul_inner(vec2 a, vec2 b) {
141+ float p = 0.f;
142+ int32_t i;
143+ for (i = 0; i < 2; ++i) {
144+ p += b[i] * a[i];
145+ }
146+ return p;
147+}
148+
149+static inline float vec2_len(vec2 v) {
150+ return sqrtf(vec2_mul_inner(v, v));
151+}
152+
153+static inline void vec2_scale(vec2 r, vec2 v, float s) {
154+ int32_t i;
155+ for (i = 0; i < 2; ++i) {
156+ r[i] = v[i] * s;
157+ }
158+}
159+
160+static inline void vec2_norm(vec2 r, vec2 v) {
161+ float k = 1.f / vec2_len(v);
162+ vec2_scale(r, v, k);
163+}
164+
165+static inline void mat4x4_identity(mat4x4 M) {
166+ int32_t i, j;
167+ for (i = 0; i < 4; ++i) {
168+ for (j = 0; j < 4; ++j) {
169+ M[i][j] = i == j ? 1.f : 0.f;
170+ }
171+ }
172+}
173+
174+static inline void mat4x4_dup(mat4x4 M, mat4x4 N) {
175+ int32_t i, j;
176+ for (i = 0; i < 4; ++i) {
177+ for (j = 0; j < 4; ++j) {
178+ M[i][j] = N[i][j];
179+ }
180+ }
181+}
182+
183+static inline void vec4_scale(vec4 r, vec4 v, float s) {
184+ int32_t i;
185+ for (i = 0; i < 4; ++i) {
186+ r[i] = v[i] * s;
187+ }
188+}
189+
190+static inline void mat4x4_scale_aniso(mat4x4 M, mat4x4 a, float x, float y, float z) {
191+ vec4_scale(M[0], a[0], x);
192+ vec4_scale(M[1], a[1], y);
193+ vec4_scale(M[2], a[2], z);
194+}
195+
196+static inline void mat4x4_mul(mat4x4 M, mat4x4 a, mat4x4 b) {
197+ int32_t k, r, c;
198+ for (c = 0; c < 4; ++c) {
199+ for (r = 0; r < 4; ++r) {
200+ M[c][r] = 0.f;
201+ for (k = 0; k < 4; ++k) {
202+ M[c][r] += a[k][r] * b[c][k];
203+ }
204+ }
205+ }
206+}
207+
208+static inline void mat4x4_mul_vec4(vec4 r, mat4x4 M, vec4 v) {
209+ int32_t i, j;
210+ for (j = 0; j < 4; ++j) {
211+ r[j] = 0.f;
212+ for (i = 0; i < 4; ++i) {
213+ r[j] += M[i][j] * v[i];
214+ }
215+ }
216+}
217+
218+static inline void mat4x4_translate(mat4x4 T, float x, float y, float z) {
219+ mat4x4_identity(T);
220+ T[3][0] = x;
221+ T[3][1] = y;
222+ T[3][2] = z;
223+}
224+
225+static inline void mat4x4_rotate_Z2(mat4x4 Q, mat4x4 M, float angle) {
226+ float s = sinf(angle);
227+ float c = cosf(angle);
228+ mat4x4 R = {
229+ {c, s, 0.f, 0.f},
230+ {-s, c, 0.f, 0.f},
231+ {0.f, 0.f, 1.f, 0.f},
232+ {0.f, 0.f, 0.f, 1.f}
233+ };
234+ mat4x4_mul(Q, M, R);
235+}
236+
237+static inline void mat4x4_rotate_Z(mat4x4 Q, float angle) {
238+ mat4x4 temp;
239+ mat4x4_dup(temp, Q);
240+ mat4x4_rotate_Z2(Q, temp, angle);
241+}
242+
243+static inline void mat4x4_translate_in_place(mat4x4 m, float x, float y, float z) {
244+ int32_t i;
245+ for (i = 0; i < 4; ++i) {
246+ m[3][i] += m[0][i] * x + m[1][i] * y + m[2][i] * z;
247+ }
248+}
249+
250+static inline float deg_to_radf(float deg) {
251+ return deg * (float) M_PI / 180.0f;
252+}
253+
254+static inline float MAXf(float a, float b) {
255+ return a > b ? a : b;
256+}
257+
258+static inline float MINf(float a, float b) {
259+ return a < b ? a : b;
260+}
261+
262+GLuint compile_shader(const GLenum type, const GLchar* source, const GLint length) {
263+ GLuint shader_object_id = glCreateShader(type);
264+ GLint compile_status;
265+ glShaderSource(shader_object_id, 1, &source, &length);
266+ glCompileShader(shader_object_id);
267+ glGetShaderiv(shader_object_id, GL_COMPILE_STATUS, &compile_status);
268+ return shader_object_id;
269+}
270+
271+GLuint link_program(const GLuint vertex_shader, const GLuint fragment_shader) {
272+ GLuint program_object_id = glCreateProgram();
273+ GLint link_status;
274+ glAttachShader(program_object_id, vertex_shader);
275+ glAttachShader(program_object_id, fragment_shader);
276+ glLinkProgram(program_object_id);
277+ glGetProgramiv(program_object_id, GL_LINK_STATUS, &link_status);
278+ return program_object_id;
279+}
280+
281+GLuint build_program(const GLchar * vertex_shader_source, const GLint vertex_shader_source_length, const GLchar * fragment_shader_source, const GLint fragment_shader_source_length) {
282+ GLuint vertex_shader = compile_shader(GL_VERTEX_SHADER, vertex_shader_source, vertex_shader_source_length);
283+ GLuint fragment_shader = compile_shader(GL_FRAGMENT_SHADER, fragment_shader_source, fragment_shader_source_length);
284+ return link_program(vertex_shader, fragment_shader);
285+}
286+
287+GLuint create_vbo(const GLsizeiptr size, const GLvoid* data, const GLenum usage) {
288+ GLuint vbo_object;
289+ glGenBuffers(1, &vbo_object);
290+ glBindBuffer(GL_ARRAY_BUFFER, vbo_object);
291+ glBufferData(GL_ARRAY_BUFFER, (GLsizeiptr) size, data, usage);
292+ glBindBuffer(GL_ARRAY_BUFFER, 0);
293+ return vbo_object;
294+}
295+
296+TextureProgram get_texture_program(GLuint program) {
297+ return (TextureProgram) {
298+ program,
299+ (GLuint) glGetAttribLocation(program, "a_Position"),
300+ (GLuint) glGetAttribLocation(program, "a_TextureCoordinates"),
301+ glGetUniformLocation(program, "u_MvpMatrix"),
302+ glGetUniformLocation(program, "u_TextureUnit"),
303+ glGetUniformLocation(program, "u_Alpha")};
304+}
305+
306+ColorProgram get_color_program(GLuint program) {
307+ return (ColorProgram) {
308+ program,
309+ (GLuint) glGetAttribLocation(program, "a_Position"),
310+ glGetUniformLocation(program, "u_MvpMatrix"),
311+ glGetUniformLocation(program, "u_Color"),
312+ glGetUniformLocation(program, "u_Alpha")};
313+}
314+
315+float frand(float from, float to) {
316+ return (float) (((double) random() / RAND_MAX) * (to - from) + from);
317+}
318+
319+int irand(int32_t from, int32_t to) {
320+ return (int32_t) (((double) random() / RAND_MAX) * (to - from + 1) + from);
321+}
322+
323+int signrand() {
324+ return irand(0, 1) * 2 - 1;
325+}
326+
327+static inline float evaluateAtParameterWithCoefficients(float t, float coefficients[]) {
328+ return coefficients[0] + t * coefficients[1] + t * t * coefficients[2] + t * t * t * coefficients[3];
329+}
330+
331+static inline float evaluateDerivationAtParameterWithCoefficients(float t, float coefficients[]) {
332+ return coefficients[1] + 2 * t * coefficients[2] + 3 * t * t * coefficients[3];
333+}
334+
335+static inline float calcParameterViaNewtonRaphsonUsingXAndCoefficientsForX(float x, float coefficientsX[]) {
336+ float t = x;
337+ int32_t i;
338+ for (i = 0; i < 10; i++) {
339+ float x2 = evaluateAtParameterWithCoefficients(t, coefficientsX) - x;
340+ float d = evaluateDerivationAtParameterWithCoefficients(t, coefficientsX);
341+ float dt = x2 / d;
342+ t = t - dt;
343+ }
344+ return t;
345+}
346+
347+float timing(float x, timing_type type) {
348+ if (is_initialized == 0) {
349+ is_initialized = 1;
350+
351+ float c[TIMING_NUM][4];
352+ c[Default][0] = 0.25f;
353+ c[Default][1] = 0.1f;
354+ c[Default][2] = 0.25f;
355+ c[Default][3] = 1.0f;
356+ c[EaseInEaseOut][0] = 0.42f;
357+ c[EaseInEaseOut][1] = 0.0f;
358+ c[EaseInEaseOut][2] = 0.58f;
359+ c[EaseInEaseOut][3] = 1.0f;
360+ c[EaseIn][0] = 0.42f;
361+ c[EaseIn][1] = 0.0f;
362+ c[EaseIn][2] = 1.0f;
363+ c[EaseIn][3] = 1.0f;
364+ c[EaseOut][0] = 0.0f;
365+ c[EaseOut][1] = 0.0f;
366+ c[EaseOut][2] = 0.58f;
367+ c[EaseOut][3] = 1.0f;
368+ c[EaseOutBounce][0] = 0.0f;
369+ c[EaseOutBounce][1] = 0.0f;
370+ c[EaseOutBounce][2] = 0.0f;
371+ c[EaseOutBounce][3] = 1.25;
372+ c[Linear][0] = 0.0;
373+ c[Linear][1] = 0.0;
374+ c[Linear][2] = 1.0;
375+ c[Linear][3] = 1.0;
376+ int32_t i;
377+ for (i = 0; i < TIMING_NUM; i++) {
378+ float _c1x = c[i][0];
379+ float _c1y = c[i][1];
380+ float _c2x = c[i][2];
381+ float _c2y = c[i][3];
382+ _coefficientsX[i][0] = _c0x;
383+ _coefficientsX[i][1] = -3.0f * _c0x + 3.0f * _c1x;
384+ _coefficientsX[i][2] = 3.0f * _c0x - 6.0f * _c1x + 3.0f * _c2x;
385+ _coefficientsX[i][3] = -_c0x + 3.0f * _c1x - 3.0f * _c2x + _c3x;
386+ _coefficientsY[i][0] = _c0y;
387+ _coefficientsY[i][1] = -3.0f * _c0y + 3.0f * _c1y;
388+ _coefficientsY[i][2] = 3.0f * _c0y - 6.0f * _c1y + 3.0f * _c2y;
389+ _coefficientsY[i][3] = -_c0y + 3.0f * _c1y - 3.0f * _c2y + _c3y;
390+ }
391+ }
392+
393+ if (x == 0.0 || x == 1.0) {
394+ return x;
395+ }
396+ float t = calcParameterViaNewtonRaphsonUsingXAndCoefficientsForX(x, _coefficientsX[type]);
397+ float y = evaluateAtParameterWithCoefficients(t, _coefficientsY[type]);
398+ return y;
399+}
400+
401+void set_y_offset_objects(float a) {
402+ y_offset = a;
403+}
404+
405+void setup_shaders() {
406+ const char *vshader =
407+ "uniform mat4 u_MvpMatrix;"
408+ "attribute vec4 a_Position;"
409+ "void main(){"
410+ " gl_Position = u_MvpMatrix * a_Position;"
411+ "}";
412+
413+ const char *fshader =
414+ "precision lowp float;"
415+ "uniform vec4 u_Color;"
416+ "uniform float u_Alpha;"
417+ "void main() {"
418+ " gl_FragColor = u_Color;"
419+ " gl_FragColor.w*=u_Alpha;"
420+ "}";
421+
422+ color_program = get_color_program(build_program(vshader, (GLint) strlen(vshader), fshader, (GLint) strlen(fshader)));
423+
424+ const char *vshader_texture =
425+ "uniform mat4 u_MvpMatrix;"
426+ "attribute vec4 a_Position;"
427+ "attribute vec2 a_TextureCoordinates;"
428+ "varying vec2 v_TextureCoordinates;"
429+ "void main(){"
430+ " v_TextureCoordinates = a_TextureCoordinates;"
431+ " gl_Position = u_MvpMatrix * a_Position;"
432+ "}";
433+
434+ const char *fshader_texture =
435+ "precision lowp float;"
436+ "uniform sampler2D u_TextureUnit;"
437+ "varying vec2 v_TextureCoordinates;"
438+ "uniform float u_Alpha;"
439+ "void main(){"
440+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
441+ " gl_FragColor.w *= u_Alpha;"
442+ "}";
443+
444+ texture_program = get_texture_program(build_program(vshader_texture, (GLint) strlen(vshader_texture), fshader_texture, (GLint) strlen(fshader_texture)));
445+
446+ const char *vshader_texture_blue =
447+ "uniform mat4 u_MvpMatrix;"
448+ "attribute vec4 a_Position;"
449+ "attribute vec2 a_TextureCoordinates;"
450+ "varying vec2 v_TextureCoordinates;"
451+ "void main(){"
452+ " v_TextureCoordinates = a_TextureCoordinates;"
453+ " gl_Position = u_MvpMatrix * a_Position;"
454+ "}";
455+
456+ const char *fshader_texture_blue =
457+ "precision lowp float;"
458+ "uniform sampler2D u_TextureUnit;"
459+ "varying vec2 v_TextureCoordinates;"
460+ "uniform float u_Alpha;"
461+ "void main(){"
462+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
463+ " float p = u_Alpha*gl_FragColor.w;"
464+ " gl_FragColor = vec4(0,0.6,0.898,p);"
465+ "}";
466+
467+ texture_program_blue = get_texture_program(build_program(vshader_texture_blue, (GLint) strlen(vshader_texture_blue), fshader_texture_blue, (GLint) strlen(fshader_texture_blue)));
468+
469+ const char *vshader_texture_red =
470+ "uniform mat4 u_MvpMatrix;"
471+ "attribute vec4 a_Position;"
472+ "attribute vec2 a_TextureCoordinates;"
473+ "varying vec2 v_TextureCoordinates;"
474+ "void main(){"
475+ " v_TextureCoordinates = a_TextureCoordinates;"
476+ " gl_Position = u_MvpMatrix * a_Position;"
477+ "}";
478+
479+ const char *fshader_texture_red =
480+ "precision lowp float;"
481+ "uniform sampler2D u_TextureUnit;"
482+ "varying vec2 v_TextureCoordinates;"
483+ "uniform float u_Alpha;"
484+ "void main(){"
485+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
486+ " float p = gl_FragColor.w*u_Alpha;"
487+ " gl_FragColor = vec4(210./255.,57./255.,41./255.,p);"
488+ "}";
489+
490+ texture_program_red = get_texture_program(build_program(vshader_texture_red, (GLint) strlen(vshader_texture_red), fshader_texture_red, (GLint) strlen(fshader_texture_red)));
491+
492+ vshader =
493+ "uniform mat4 u_MvpMatrix;"
494+ "attribute vec4 a_Position;"
495+ "attribute vec2 a_TextureCoordinates;"
496+ "varying vec2 v_TextureCoordinates;"
497+ "void main(){"
498+ " v_TextureCoordinates = a_TextureCoordinates;"
499+ " gl_Position = u_MvpMatrix * a_Position;"
500+ "}";
501+
502+ fshader =
503+ "precision lowp float;"
504+ "uniform sampler2D u_TextureUnit;"
505+ "varying vec2 v_TextureCoordinates;"
506+ "uniform float u_Alpha;"
507+ "void main(){"
508+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
509+ " float p = u_Alpha*gl_FragColor.w;"
510+ " gl_FragColor = vec4(246./255., 73./255., 55./255., p);"
511+ "}";
512+
513+ texture_program_light_red = get_texture_program(build_program(vshader, (GLint) strlen(vshader), fshader, (GLint) strlen(fshader)));
514+
515+ vshader =
516+ "uniform mat4 u_MvpMatrix;"
517+ "attribute vec4 a_Position;"
518+ "attribute vec2 a_TextureCoordinates;"
519+ "varying vec2 v_TextureCoordinates;"
520+ "void main(){"
521+ " v_TextureCoordinates = a_TextureCoordinates;"
522+ " gl_Position = u_MvpMatrix * a_Position;"
523+ "}";
524+
525+ fshader =
526+ "precision lowp float;"
527+ "uniform sampler2D u_TextureUnit;"
528+ "varying vec2 v_TextureCoordinates;"
529+ "uniform float u_Alpha;"
530+ "void main(){"
531+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
532+ " float p = u_Alpha*gl_FragColor.w;"
533+ " gl_FragColor = vec4(42./255.,180./255.,247./255.,p);"
534+ "}";
535+
536+ texture_program_light_blue = get_texture_program(build_program(vshader, (GLint) strlen(vshader), fshader, (GLint) strlen(fshader)));
537+
538+ vshader =
539+ "uniform mat4 u_MvpMatrix;"
540+ "attribute vec4 a_Position;"
541+ "attribute vec2 a_TextureCoordinates;"
542+ "varying vec2 v_TextureCoordinates;"
543+ "void main(){"
544+ " v_TextureCoordinates = a_TextureCoordinates;"
545+ " gl_Position = u_MvpMatrix * a_Position;"
546+ "}";
547+
548+ fshader =
549+ "precision lowp float;"
550+ "uniform sampler2D u_TextureUnit;"
551+ "varying vec2 v_TextureCoordinates;"
552+ "uniform float u_Alpha;"
553+ "void main(){"
554+ " gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);"
555+ " gl_FragColor *= u_Alpha;"
556+ "}";
557+
558+ texture_program_one = get_texture_program(build_program(vshader, (GLint) strlen(vshader), fshader, (GLint) strlen(fshader)));
559+}
560+
561+CPoint CPointMake(float x, float y) {
562+ CPoint p = {x, y};
563+ return p;
564+}
565+
566+CSize CSizeMake(float width, float height) {
567+ CSize s = {width, height};
568+ return s;
569+}
570+
571+float D2R(float a) {
572+ return (float) (a * M_PI / 180.0);
573+}
574+
575+float R2D(float a) {
576+ return (float) (a * 180.0 / M_PI);
577+}
578+
579+xyz xyzMake(float x, float y, float z) {
580+ xyz result;
581+ result.x = x;
582+ result.y = y;
583+ result.z = z;
584+ return result;
585+}
586+
587+LayerParams default_layer_params() {
588+ LayerParams params;
589+ params.anchor.x = params.anchor.y = params.anchor.z = 0;
590+ params.position.x = params.position.y = params.position.z = 0;
591+ params.rotation = 0;
592+ params.scale.x = params.scale.y = params.scale.z = 1.0f;
593+ return params;
594+}
595+
596+Params default_params() {
597+ Params params;
598+ params.anchor.x = params.anchor.y = params.anchor.z = 0.0f;
599+ params.position.x = params.position.y = params.position.z = 0.0f;
600+ params.rotation = 0;
601+ params.scale.x = params.scale.y = params.scale.z = 1.0f;
602+ params.alpha = 1.0f;
603+ params.var_params.side_length = 0;
604+ params.var_params.start_angle = 0;
605+ params.var_params.end_angle = 0;
606+ params.var_params.angle = 0;
607+ params.var_params.size = CSizeMake(0, 0);
608+ params.var_params.radius = 0;
609+ params.var_params.width = 0;
610+ params.const_params.is_star = 0;
611+ params.layer_params = default_layer_params();
612+ return params;
613+}
614+
615+void mat4x4_translate_independed(mat4x4 m, float x, float y, float z) {
616+ mat4x4 tr;
617+ mat4x4_identity(tr);
618+ mat4x4_translate_in_place(tr, x, y, z);
619+ mat4x4 m_dup;
620+ mat4x4_dup(m_dup, m);
621+ mat4x4_mul(m, tr, m_dup);
622+}
623+
624+static inline void mvp_matrix(mat4x4 model_view_projection_matrix, Params params, mat4x4 view_projection_matrix) {
625+ mat4x4 model_matrix;
626+ mat4x4_identity(model_matrix);
627+ mat4x4 id;
628+ mat4x4_identity(id);
629+ mat4x4_translate(model_matrix, -params.anchor.x, -params.anchor.y, params.anchor.z);
630+ mat4x4 scaled;
631+ mat4x4_identity(scaled);
632+ mat4x4_scale_aniso(scaled, scaled, params.scale.x, -params.scale.y, params.scale.z);
633+ mat4x4 tmp;
634+ mat4x4_dup(tmp, model_matrix);
635+ mat4x4_mul(model_matrix, scaled, tmp);
636+ mat4x4 rotate;
637+ mat4x4_dup(rotate, id);
638+ mat4x4_rotate_Z2(rotate, id, deg_to_radf(-params.rotation));
639+ mat4x4_dup(tmp, model_matrix);
640+ mat4x4_mul(model_matrix, rotate, tmp);
641+ mat4x4_translate_independed(model_matrix, params.position.x, -params.position.y, params.position.z);
642+ mat4x4 model_matrix3;
643+ mat4x4_identity(model_matrix3);
644+ mat4x4 mm;
645+ mat4x4_mul(mm, model_matrix3, view_projection_matrix);
646+ mat4x4_mul(model_view_projection_matrix, mm, model_matrix);
647+ mat4x4_translate_independed(model_view_projection_matrix, 0, -y_offset / view_projection_matrix[3][3], 0);
648+}
649+
650+void draw_shape(const Shape* shape, mat4x4 view_projection_matrix) {
651+ if (shape->params.alpha > 0 && (fabs(shape->params.scale.x) > 0 && fabs(shape->params.scale.y) > 0 && fabs(shape->params.scale.z) > 0)) {
652+ mat4x4 model_view_projection_matrix;
653+ mvp_matrix(model_view_projection_matrix, shape->params, view_projection_matrix);
654+ glUseProgram(color_program.program);
655+ glUniformMatrix4fv(color_program.u_mvp_matrix_location, 1, GL_FALSE, (GLfloat *) model_view_projection_matrix);
656+ if (shape->params.rotation == 5.0f) {
657+ glUniform4fv(color_program.u_color_location, 1, shape->color);
658+ } else if (shape->params.rotation == 10.0f) {
659+ vec4 col = {0, 1, 0, 1};
660+ glUniform4fv(color_program.u_color_location, 1, col);
661+ } else {
662+ glUniform4fv(color_program.u_color_location, 1, shape->color);
663+ }
664+ glUniform1f(color_program.u_alpha_loaction, shape->params.alpha);
665+ glVertexAttribPointer(color_program.a_position_location, 2, GL_FLOAT, GL_FALSE, sizeof(CPoint), &shape->data[0].x);
666+ glEnableVertexAttribArray(color_program.a_position_location);
667+ glDrawArrays(shape->params.const_params.triangle_mode, 0, shape->num_points);
668+ }
669+}
670+
671+void draw_textured_shape(const TexturedShape* shape, mat4x4 view_projection_matrix, texture_program_type program_type) {
672+ if (shape->params.alpha > 0 && (fabs(shape->params.scale.x) > 0 && fabs(shape->params.scale.y) > 0 && fabs(shape->params.scale.z) > 0)) {
673+ mat4x4 model_view_projection_matrix;
674+ mvp_matrix(model_view_projection_matrix, shape->params, view_projection_matrix);
675+ if (shape->params.const_params.is_star == 1) {
676+ vec4 pos;
677+ vec4 vertex = {0, 0, 0, 1};
678+ mat4x4_mul_vec4(pos, model_view_projection_matrix, vertex);
679+ vec4 p_NDC = {pos[0] / pos[3], pos[1] / pos[3], pos[2] / pos[3], pos[3] / pos[3]};
680+ vec4 p_window = {p_NDC[0] * width, -p_NDC[1] * height, 0, 0};
681+ int32_t d = 160;
682+ if (fabs(p_window[0]) > d || p_window[1] > y_offset_absolute * 2 + d || p_window[1] < y_offset_absolute * 2 - d) {
683+ return;
684+ }
685+ }
686+ if (program_type == RED) {
687+ texture_program_temp = &texture_program_red;
688+ } else if (program_type == BLUE) {
689+ texture_program_temp = &texture_program_blue;
690+ } else if (program_type == LIGHT_RED) {
691+ texture_program_temp = &texture_program_light_red;
692+ } else if (program_type == LIGHT_BLUE) {
693+ texture_program_temp = &texture_program_light_blue;
694+ } else if (program_type == NORMAL_ONE) {
695+ texture_program_temp = &texture_program_one;
696+ } else {
697+ texture_program_temp = &texture_program;
698+ }
699+
700+
701+ glUseProgram(texture_program_temp->program);
702+
703+ glActiveTexture(GL_TEXTURE0);
704+ glBindTexture(GL_TEXTURE_2D, shape->texture);
705+ glUniformMatrix4fv(texture_program_temp->u_mvp_matrix_location, 1, GL_FALSE, (GLfloat *) model_view_projection_matrix);
706+ glUniform1i(texture_program_temp->u_texture_unit_location, 0);
707+ glUniform1f(texture_program_temp->u_alpha_loaction, shape->params.alpha);
708+
709+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
710+ glVertexAttribPointer(texture_program_temp->a_position_location, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(GL_FLOAT), BUFFER_OFFSET(0));
711+ glVertexAttribPointer(texture_program_temp->a_texture_coordinates_location, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(GL_FLOAT), BUFFER_OFFSET(2 * sizeof(GL_FLOAT)));
712+ glEnableVertexAttribArray(texture_program_temp->a_position_location);
713+ glEnableVertexAttribArray(texture_program_temp->a_texture_coordinates_location);
714+ glDrawArrays(shape->params.const_params.triangle_mode, 0, shape->num_points);
715+ glBindBuffer(GL_ARRAY_BUFFER, 0);
716+ }
717+}
718+
719+static inline void gen_rounded_rectangle(CPoint* out, CSize size, float radius, int32_t round_count) {
720+ int32_t offset = 0;
721+ out[offset++] = CPointMake(0, 0);
722+ float k = (float) (M_PI / 2 / (round_count + 1));
723+ int32_t i = 0;
724+ int32_t n = 0;
725+ for (i = (round_count + 2) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
726+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * radius, size.height / 2 - radius + sinf(i * k) * radius);
727+ }
728+ n++;
729+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
730+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * radius, size.height / 2 - radius + sinf(i * k) * radius);
731+ }
732+ n++;
733+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
734+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * radius, -size.height / 2 + radius + sinf(i * k) * radius);
735+ }
736+ n++;
737+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
738+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * radius, -size.height / 2 + radius + sinf(i * k) * radius);
739+ }
740+ out[offset] = CPointMake(size.width / 2, size.height / 2 - radius);
741+}
742+
743+Shape create_rounded_rectangle(CSize size, float radius, int32_t round_count, const vec4 color) {
744+ int32_t real_vertex_count = 4 * (2 + round_count) + 2;
745+
746+ Params params = default_params();
747+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count * 2;
748+ params.const_params.round_count = round_count;
749+ params.const_params.triangle_mode = GL_TRIANGLE_FAN;
750+
751+ params.var_params.size = size;
752+ params.var_params.radius = radius;
753+ CPoint *data = malloc((size_t) params.const_params.datasize);
754+ gen_rounded_rectangle(data, params.var_params.size, params.var_params.radius, params.const_params.round_count);
755+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
756+}
757+
758+void change_rounded_rectangle(Shape* shape, CSize size, float radius) {
759+ if ((*shape).params.var_params.size.width != size.width || (*shape).params.var_params.size.height != size.height || (*shape).params.var_params.radius != radius) {
760+ (*shape).params.var_params.size.width = size.width;
761+ (*shape).params.var_params.size.height = size.height;
762+ (*shape).params.var_params.radius = radius;
763+ gen_rounded_rectangle((*shape).data, (*shape).params.var_params.size, (*shape).params.var_params.radius, (*shape).params.const_params.round_count);
764+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
765+ glBufferSubData(GL_ARRAY_BUFFER, 0, shape->params.const_params.datasize, shape->data);
766+ glBindBuffer(GL_ARRAY_BUFFER, 0);
767+ }
768+}
769+
770+static inline CPoint square_point(float angle, float radius) {
771+ CPoint p = {0.0f, 0.0f};
772+ if (angle <= M_PI / 2 * 0.5f || angle > M_PI / 2 * 3.5f) {
773+ p = CPointMake(radius, radius * sinf(angle) / cosf(angle));
774+ } else if (angle <= M_PI / 2 * 1.5) {
775+ p = CPointMake(radius * cosf(angle) / sinf(angle), radius);
776+ } else if (angle <= M_PI / 2 * 2.5) {
777+ p = CPointMake(-radius, -radius * sinf(angle) / cosf(angle));
778+ } else if (angle <= (float) (M_PI / 2 * 3.5)) {
779+ p = CPointMake(-radius * cosf(angle) / sinf(angle), -radius);
780+ }
781+ return p;
782+}
783+
784+static inline CPoint square_texture_point(CPoint p, float side_length) {
785+ return CPointMake((-p.x / side_length * 0.5f + 0.5f), -p.y / side_length * 0.5f + 0.5f);
786+}
787+
788+static inline void gen_segmented_square(CPoint* out, float side_length, float start_angle, float end_angle) {
789+ CPoint p;
790+ float radius = side_length;
791+ int32_t offset = 0;
792+ float k = 1;
793+ float da = D2R(-2.6f * 2) * k;
794+ p = CPointMake(sinf(start_angle + end_angle) * 6 * k, -cosf(start_angle + end_angle) * 6 * k);
795+ out[offset++] = p;
796+ out[offset++] = square_texture_point(p, side_length);
797+ p = square_point(start_angle + da, radius);
798+ out[offset++] = p;
799+ out[offset++] = square_texture_point(p, side_length);
800+ int32_t q = 0;
801+ int32_t i;
802+ for (i = (int32_t) start_angle; i < floorf(R2D(start_angle + end_angle + da)); i++) {
803+ if ((i + 45) % 90 == 0) {
804+ p = square_point(D2R(i), radius);
805+ out[offset++] = p;
806+ out[offset++] = square_texture_point(p, side_length);
807+ q++;
808+ }
809+ }
810+ p = square_point(start_angle + end_angle + da, radius);
811+ out[offset++] = p;
812+ out[offset++] = square_texture_point(p, side_length);
813+ for (i = 0; i < 4 - q; i++) {
814+ p = square_point(start_angle + end_angle + da, radius);
815+ out[offset++] = p;
816+ out[offset++] = square_texture_point(p, side_length);
817+ }
818+}
819+
820+TexturedShape create_segmented_square(float side_length, float start_angle, float end_angle, GLuint texture) {
821+ int32_t real_vertex_count = 7;
822+ Params params = default_params();
823+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count * 2 * 2;
824+ params.const_params.triangle_mode = GL_TRIANGLE_FAN;
825+ CPoint *data = malloc((size_t) params.const_params.datasize);
826+ gen_segmented_square(data, side_length, start_angle, end_angle);
827+ return (TexturedShape) {texture, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
828+}
829+
830+void change_segmented_square(TexturedShape* shape, float side_length, float start_angle, float end_angle) {
831+ if ((*shape).params.var_params.side_length != side_length || (*shape).params.var_params.start_angle != start_angle || (*shape).params.var_params.end_angle != end_angle) {
832+ (*shape).params.var_params.side_length = side_length;
833+ (*shape).params.var_params.start_angle = start_angle;
834+ (*shape).params.var_params.end_angle = end_angle;
835+ gen_segmented_square((*shape).data, side_length, start_angle, end_angle);
836+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
837+ glBufferSubData(GL_ARRAY_BUFFER, 0, shape->params.const_params.datasize, shape->data);
838+ glBindBuffer(GL_ARRAY_BUFFER, 0);
839+ }
840+}
841+
842+static inline void gen_rectangle(CPoint* out, CSize size) {
843+ out[0] = CPointMake(-size.width / 2, -size.height / 2);
844+ out[1] = CPointMake(size.width / 2, -size.height / 2);
845+ out[2] = CPointMake(-size.width / 2, size.height / 2);
846+ out[3] = CPointMake(size.width / 2, size.height / 2);
847+}
848+
849+Shape create_rectangle(CSize size, const vec4 color) {
850+ int32_t real_vertex_count = 4;
851+ Params params = default_params();
852+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count;
853+ params.const_params.triangle_mode = GL_TRIANGLE_STRIP;
854+ CPoint *data = malloc((size_t) params.const_params.datasize);
855+ gen_rectangle(data, size);
856+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
857+}
858+
859+static inline CPoint rectangle_texture_point(CPoint p, CSize size) {
860+ return CPointMake(1 - (-p.x / size.width + 0.5f), p.y / size.height + 0.5f);
861+}
862+
863+static inline void gen_textured_rectangle(CPoint* out, CSize size) {
864+ out[0] = CPointMake(-size.width / 2, -size.height / 2);
865+ out[1] = rectangle_texture_point(CPointMake(-size.width / 2, -size.height / 2), size);
866+ out[2] = CPointMake(size.width / 2, -size.height / 2);
867+ out[3] = rectangle_texture_point(CPointMake(size.width / 2, -size.height / 2), size);
868+ out[4] = CPointMake(-size.width / 2, size.height / 2);
869+ out[5] = rectangle_texture_point(CPointMake(-size.width / 2, size.height / 2), size);
870+ out[6] = CPointMake(size.width / 2, size.height / 2);
871+ out[7] = rectangle_texture_point(CPointMake(size.width / 2, size.height / 2), size);
872+}
873+
874+TexturedShape create_textured_rectangle(CSize size, GLuint texture) {
875+ int32_t real_vertex_count = 4;
876+ Params params = default_params();
877+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count * 2;
878+ params.const_params.triangle_mode = GL_TRIANGLE_STRIP;
879+ CPoint *data = malloc((size_t) params.const_params.datasize);
880+ gen_textured_rectangle(data, size);
881+ return (TexturedShape) {texture, data, create_vbo(params.const_params.datasize, data, GL_STATIC_DRAW), real_vertex_count, params};
882+}
883+
884+static inline void gen_ribbon(CPoint* out, float length) {
885+ out[0] = CPointMake(-MAXf(length - 5.5f, 0), -5.5f);
886+ out[1] = CPointMake(0, -5.5f);
887+ out[2] = CPointMake(-MAXf(length, 0), 5.5f);
888+ out[3] = CPointMake(0, 5.5f);
889+}
890+
891+Shape create_ribbon(float length, const vec4 color) {
892+ int32_t real_vertex_count = 4;
893+ Params params = default_params();
894+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count;
895+ params.const_params.triangle_mode = GL_TRIANGLE_STRIP;
896+ params.var_params.side_length = length;
897+ CPoint *data = malloc((size_t) params.const_params.datasize);
898+ gen_ribbon(data, length);
899+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
900+}
901+
902+void change_ribbon(Shape* shape, float length) {
903+ if ((*shape).params.var_params.side_length != length) {
904+ (*shape).params.var_params.side_length = length;
905+ gen_ribbon((*shape).data, length);
906+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
907+ glBufferSubData(GL_ARRAY_BUFFER, 0, shape->params.const_params.datasize, shape->data);
908+ glBindBuffer(GL_ARRAY_BUFFER, 0);
909+ }
910+}
911+
912+static inline void gen_circle(CPoint* out, float radius, int32_t vertex_count) {
913+ int32_t offset = 0;
914+ out[offset++] = CPointMake(0, 0);
915+ int32_t i;
916+ for (i = 0; i <= vertex_count; i++) {
917+ out[offset++] = CPointMake(radius * (cosf(2 * (float) M_PI * (i / (float) vertex_count))), radius * sinf(2 * (float) M_PI * (i / (float) vertex_count)));
918+ }
919+}
920+
921+Shape create_circle(float radius, int32_t vertex_count, const vec4 color) {
922+ int32_t real_vertex_count = vertex_count + 2;
923+ Params params = default_params();
924+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count;
925+ params.const_params.triangle_mode = GL_TRIANGLE_FAN;
926+ params.const_params.round_count = vertex_count;
927+ CPoint *data = (CPoint *) malloc((size_t) params.const_params.datasize);
928+ gen_circle(data, radius, vertex_count);
929+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_STATIC_DRAW), real_vertex_count, params};
930+}
931+
932+int size_of_infinity_in_vertices(int32_t segment_count) {
933+ return (segment_count + 1) * 2;
934+}
935+
936+static inline void gen_infinity(CPoint* out, float width, float angle, int32_t segment_count) {
937+ CPoint path[13];
938+ path[0] = CPointMake(53, 23);
939+ path[1] = CPointMake(49, 31);
940+ path[2] = CPointMake(39, 47);
941+ path[3] = CPointMake(22, 47);
942+ path[4] = CPointMake(6, 47);
943+ path[5] = CPointMake(0, 31);
944+ path[6] = CPointMake(0, 23);
945+ path[7] = CPointMake(0, 16);
946+ path[8] = CPointMake(5, 0);
947+ path[9] = CPointMake(23, 0);
948+ path[10] = CPointMake(39, 0);
949+ path[11] = CPointMake(48, 15);
950+ path[12] = CPointMake(52, 21);
951+ int32_t offset = 0;
952+ int32_t seg;
953+ for (seg = 0; seg <= segment_count; seg++) {
954+ float tt = ((float) seg / (float) segment_count) * angle;
955+ int32_t q = 4;
956+ float tstep = 1.f / q;
957+ int32_t n = (int32_t) floor(tt / tstep);
958+ CPoint a = path[0 + 3 * n];;
959+ CPoint p1 = path[1 + 3 * n];
960+ CPoint p2 = path[2 + 3 * n];
961+ CPoint b = path[3 + 3 * n];
962+ float t = (tt - tstep * n) * q;
963+ float nt = 1.0f - t;
964+
965+ vec2 p = {a.x * nt * nt * nt + 3.0f * p1.x * nt * nt * t + 3.0f * p2.x * nt * t * t + b.x * t * t * t,
966+ a.y * nt * nt * nt + 3.0f * p1.y * nt * nt * t + 3.0f * p2.y * nt * t * t + b.y * t * t * t};
967+ vec2 tangent = {-3.0f * a.x * nt * nt + 3.0f * p1.x * (1.0f - 4.0f * t + 3.0f * t * t) + 3.0f * p2.x * (2.0f * t - 3.0f * t * t) + 3.0f * b.x * t * t,
968+ -3.0f * a.y * nt * nt + 3.0f * p1.y * (1.0f - 4.0f * t + 3.0f * t * t) + 3.0f * p2.y * (2.0f * t - 3.0f * t * t) + 3.0f * b.y * t * t};
969+
970+ vec2 tan_norm = {-tangent[1], tangent[0]};
971+ vec2 norm;
972+ vec2_norm(norm, tan_norm);
973+
974+ vec2 v;
975+ vec2 norm_scaled;
976+ vec2_scale(norm_scaled, norm, +width / 2.f);
977+ vec2_add(v, p, norm_scaled);
978+
979+ out[offset] = CPointMake(v[0], v[1]);
980+ offset++;
981+
982+ vec2_scale(norm_scaled, norm, -width / 2.f);
983+ vec2_add(v, p, norm_scaled);
984+
985+ out[offset] = CPointMake(v[0], v[1]);
986+ offset++;
987+ }
988+}
989+
990+Shape create_infinity(float width, float angle, int32_t segment_count, const vec4 color) {
991+ int32_t real_vertex_count = size_of_infinity_in_vertices(segment_count);
992+ Params params = default_params();
993+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count;
994+ params.const_params.triangle_mode = GL_TRIANGLE_STRIP;
995+ params.const_params.round_count = segment_count;
996+ params.var_params.width = width;
997+ params.var_params.angle = angle;
998+ CPoint *data = malloc((size_t) params.const_params.datasize);
999+ gen_infinity(data, width, angle, segment_count);
1000+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
1001+}
1002+
1003+void change_infinity(Shape* shape, float angle) {
1004+ if ((*shape).params.var_params.angle != angle) {
1005+ (*shape).params.var_params.angle = angle;
1006+ gen_infinity(shape->data, (*shape).params.var_params.width, (*shape).params.var_params.angle, (*shape).params.const_params.round_count);
1007+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
1008+ glBufferData(GL_ARRAY_BUFFER, shape->params.const_params.datasize, shape->data, GL_DYNAMIC_DRAW);
1009+ glBindBuffer(GL_ARRAY_BUFFER, 0);
1010+ }
1011+}
1012+
1013+static inline void gen_rounded_rectangle_stroked(CPoint* out, CSize size, float radius, float stroke_width, int32_t round_count) {
1014+ int32_t offset = 0;
1015+ float k = (float) (M_PI / 2 / (round_count + 1));
1016+ float inner_radius = radius - stroke_width;
1017+ int32_t i = 0;
1018+ int32_t n = 0;
1019+ for (i = (round_count + 2) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
1020+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * radius, size.height / 2 - radius + sinf(i * k) * radius);
1021+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * inner_radius, size.height / 2 - radius + sinf(i * k) * inner_radius);
1022+ }
1023+ n++;
1024+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
1025+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * radius, size.height / 2 - radius + sinf(i * k) * radius);
1026+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * inner_radius, size.height / 2 - radius + sinf(i * k) * inner_radius);
1027+ }
1028+ n++;
1029+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
1030+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * radius, -size.height / 2 + radius + sinf(i * k) * radius);
1031+ out[offset++] = CPointMake(-size.width / 2 + radius + cosf(i * k) * inner_radius, -size.height / 2 + radius + sinf(i * k) * inner_radius);
1032+ }
1033+ n++;
1034+ for (i = (round_count + 1) * n; i <= round_count + 1 + (round_count + 1) * n; i++) {
1035+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * radius, -size.height / 2 + radius + sinf(i * k) * radius);
1036+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * inner_radius, -size.height / 2 + radius + sinf(i * k) * inner_radius);
1037+ }
1038+ i = 0;
1039+ out[offset++] = CPointMake(size.width / 2 - radius + cosf(i * k) * radius, size.height / 2 - radius + sinf(i * k) * radius);
1040+ out[offset] = CPointMake(size.width / 2 - radius + cosf(i * k) * inner_radius, size.height / 2 - radius + sinf(i * k) * inner_radius);
1041+}
1042+
1043+Shape create_rounded_rectangle_stroked(CSize size, float radius, float stroke_width, int32_t round_count, const vec4 color) {
1044+ int32_t real_vertex_count = 4 * (2 + round_count) * 2 + 2;
1045+ Params params = default_params();
1046+ params.const_params.round_count = round_count;
1047+ params.const_params.datasize = sizeof(CPoint) * real_vertex_count * 2;
1048+ params.var_params.size = size;
1049+ params.var_params.radius = radius;
1050+ params.var_params.width = stroke_width;
1051+ CPoint *data = (CPoint *) malloc((size_t) params.const_params.datasize);
1052+ gen_rounded_rectangle_stroked(data, params.var_params.size, params.var_params.radius, params.var_params.width, params.const_params.round_count);
1053+ params.const_params.triangle_mode = GL_TRIANGLE_STRIP;
1054+ return (Shape) {{color[0], color[1], color[2], color[3]}, data, create_vbo(params.const_params.datasize, data, GL_DYNAMIC_DRAW), real_vertex_count, params};
1055+}
1056+
1057+void change_rounded_rectangle_stroked(Shape* shape, CSize size, float radius) {
1058+ if ((*shape).params.var_params.size.width != size.width || (*shape).params.var_params.size.height != size.height || (*shape).params.var_params.radius != radius) {
1059+ (*shape).params.var_params.size.width = size.width;
1060+ (*shape).params.var_params.size.height = size.height;
1061+ (*shape).params.var_params.radius = radius;
1062+ gen_rounded_rectangle_stroked((*shape).data, (*shape).params.var_params.size, (*shape).params.var_params.radius, (*shape).params.var_params.width, (*shape).params.const_params.round_count);
1063+ glBindBuffer(GL_ARRAY_BUFFER, shape->buffer);
1064+ glBufferSubData(GL_ARRAY_BUFFER, 0, shape->params.const_params.datasize, shape->data);
1065+ glBindBuffer(GL_ARRAY_BUFFER, 0);
1066+ }
1067+}
1068+
1069+//------------------------------
1070+
1071+float t(float start_value, float end_value, float start_time, float duration, timing_type type) {
1072+ if (time > start_time + duration) {
1073+ return end_value;
1074+ }
1075+ if (type == Linear) {
1076+ return start_value + (end_value - start_value) * MINf(duration + start_time, MAXf(.0, (time - start_time))) / duration;
1077+ }
1078+ return start_value + (end_value - start_value) * timing(MINf(duration + start_time, MAXf(.0, (time - start_time))) / duration, type);
1079+}
1080+
1081+float t_reversed(float end_value, float start_value, float start_time, float duration, timing_type type) {
1082+ if (time > start_time + duration) {
1083+ return end_value;
1084+ }
1085+ if (type == Linear) {
1086+ return start_value + (end_value - start_value) * MINf(duration + start_time, MAXf(0.0f, (time - start_time))) / duration;
1087+ }
1088+ return start_value + (end_value - start_value) * timing(MINf(duration + start_time, MAXf(0.0f, (time - start_time))) / duration, type);
1089+}
1090+
1091+float t_local(float start_value, float end_value, float start_time, float duration, timing_type type) {
1092+ if (type == Sin) {
1093+ return start_value + (end_value - start_value) * sinf(MINf(MAXf((time_local - start_time) / duration * (float) M_PI, 0), (float) M_PI));
1094+ }
1095+
1096+ if (time_local > start_time + duration) {
1097+ return end_value;
1098+ }
1099+
1100+ if (type == Linear) {
1101+ return start_value + (end_value - start_value) * MINf(duration + start_time, MAXf(.0, (time_local - start_time))) / duration;
1102+ }
1103+ return start_value + (end_value - start_value) * timing(MINf(duration + start_time, MAXf(.0, (time_local - start_time))) / duration, type);
1104+}
1105+
1106+xyz star_create_position(float far) {
1107+ starsFar = 1500;
1108+ int32_t minR = 100;
1109+ int32_t maxR = 1000;
1110+ return xyzMake(signrand() * frand(minR, maxR), signrand() * frand(minR, maxR), far);
1111+}
1112+
1113+xyz star_initial_position(int32_t randZ, int32_t forward) {
1114+ starsFar = 1500;
1115+ int32_t minR = 100;
1116+ int32_t maxR = 1000;
1117+ float z = 0;
1118+ if (forward == 1) {
1119+ if (randZ == 0) {
1120+ z = -starsFar;
1121+ } else {
1122+ z = frand(0, -starsFar);
1123+ }
1124+ }
1125+
1126+ return xyzMake(signrand() * frand(minR, maxR), signrand() * frand(minR, maxR), z);
1127+}
1128+
1129+void draw_stars() {
1130+ int update = last_stars_update_fps != fps_anim;
1131+ last_stars_update_fps = fps_anim;
1132+ float k = (float) width / (float) height;
1133+
1134+ set_y_offset_objects(-100 * k * 0);
1135+ for (i = 0; i < starsCount; i++) {
1136+ float stars_scroll_offset = MAXf(0, scroll_offset) * 2;
1137+
1138+ float transition_speed;
1139+ if (direct == 1) {
1140+ float s = 5;
1141+ transition_speed = s - t(0, s, 0, duration_const + 1 + 0.8f, Linear);
1142+ } else {
1143+ transition_speed = t(-4, 0, 0, duration_const + 1, EaseOut);
1144+ }
1145+
1146+ float speed = stars_scroll_offset + transition_speed;
1147+ if (update) {
1148+ stars[i].position.z += speed;
1149+ }
1150+
1151+ if (stars[i].position.z > 0 && speed > 0) {
1152+ stars[i].position = star_initial_position(0, 1);
1153+ }
1154+ if (stars[i].position.z < -1500 && speed < 0) {
1155+ stars[i].position = star_initial_position(0, 0);
1156+ }
1157+
1158+ float inc = scroll_offset * 100;
1159+ stars[i].position.z = stars[i].position.z + inc;
1160+
1161+ star.params.position = stars[i].position;
1162+ float s = 1 + (-stars[i].position.z) / starsFar * 5;
1163+
1164+ star.params.scale = xyzMake(s, s, 1);
1165+ float far = starsFar;
1166+ star.params.alpha = (1 - (-stars[i].position.z) / far) * 10.0f;
1167+ star.params.alpha = star.params.alpha * star.params.alpha / 10.0f;
1168+
1169+
1170+ draw_textured_shape(&star, stars_matrix, NORMAL);
1171+
1172+ stars[i].position.z = stars[i].position.z - inc;
1173+ }
1174+
1175+ set_y_offset_objects(offset_y);
1176+}
1177+
1178+static inline void mat4x4_plain(mat4x4 M, int32_t width, int32_t height) {
1179+ int32_t i, j;
1180+ for (i = 0; i < 4; ++i) {
1181+ for (j = 0; j < 4; ++j) {
1182+ M[i][j] = 0.0f;
1183+ }
1184+ }
1185+
1186+ M[0][0] = 1;
1187+ M[1][1] = 1;
1188+ M[2][2] = 1;
1189+ M[0][0] = 1;
1190+ M[1][1] = (float) width / (float) height;
1191+ M[2][2] = 1;
1192+ M[3][3] = (float) width / 2.0f;
1193+}
1194+
1195+static inline void mat4x4_stars(mat4x4 m, float y_fov_in_degrees, float aspect, float n, float f, int32_t width, int32_t height) {
1196+ if (height >= width) {
1197+ float k = (float) width / (float) height;
1198+ float q = 1.4f;
1199+ m[0][0] = 1.0f / q;
1200+ m[1][0] = 0.0f;
1201+ m[2][0] = 0.0f;
1202+ m[3][0] = 0.0f;
1203+
1204+ m[1][0] = 0.0f;
1205+ m[1][1] = k / q;
1206+ m[1][2] = 0.0f;
1207+ m[1][3] = 0.0f;
1208+
1209+ m[2][0] = 0.0f;
1210+ m[2][1] = 0.0f;
1211+ m[2][2] = 1.0f;
1212+ m[2][3] = -1.25f;
1213+
1214+ m[3][0] = 0.0f;
1215+ m[3][1] = 0.0f;
1216+ m[3][2] = 0.0f;
1217+ m[3][3] = width * k;
1218+ } else {
1219+ float k = (float) height / (float) width;
1220+ float q = 2.0f;
1221+
1222+ m[0][0] = 1.0f / q;
1223+ m[1][0] = 0.0f;
1224+ m[2][0] = 0.0f;
1225+ m[3][0] = 0.0f;
1226+
1227+ m[1][0] = 0.0f;
1228+ m[1][1] = (1.0f / k) / q;
1229+ m[1][2] = 0.0f;
1230+ m[1][3] = 0.0f;
1231+
1232+ m[2][0] = 0.0f;
1233+ m[2][1] = 0.0f;
1234+ m[2][2] = 1.0f;
1235+ m[2][3] = -1.25f;
1236+
1237+ m[3][0] = 0.0f;
1238+ m[3][1] = 0.0f;
1239+ m[3][2] = 0.0f;
1240+ m[3][3] = height * k;
1241+ }
1242+ mat4x4_translate_independed(m, 0, -2 * y_offset_absolute / (float) height + 4 * scale_factor / (float) height, 0);
1243+}
1244+
1245+void rglNormalDraw() {
1246+ glDisable(GL_DEPTH_TEST);
1247+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1248+ glColorMask(1, 1, 1, 1);
1249+ glDepthMask(0);
1250+}
1251+
1252+void rglMaskDraw() {
1253+ glEnable(GL_DEPTH_TEST);
1254+ glDisable(GL_BLEND);
1255+ glDepthMask(1);
1256+ glColorMask(0, 0, 0, 0);
1257+ glDepthFunc(GL_GREATER);
1258+ glClearDepthf(0);
1259+ glClear(GL_DEPTH_BUFFER_BIT);
1260+}
1261+
1262+void rglNormalDrawThroughMask() {
1263+ glColorMask(1, 1, 1, 1);
1264+ glDepthFunc(GL_LESS);
1265+ glDepthMask(0);
1266+}
1267+
1268+void mat4x4_scaled(mat4x4 matrix, float s) {
1269+ mat4x4_identity(matrix);
1270+ mat4x4_scale_aniso(matrix, matrix, s, s, s);
1271+}
1272+
1273+void mat4x4_layer(mat4x4 matrix, LayerParams params, float s, float r) {
1274+ float a = main_matrix[1][1];
1275+ mat4x4 model_matrix;
1276+ mat4x4_identity(model_matrix);
1277+ mat4x4 id;
1278+ mat4x4_identity(id);
1279+ float sc = main_matrix[3][3];
1280+ mat4x4_translate(model_matrix, -params.anchor.x / sc, params.anchor.y / sc * a, params.anchor.z / sc);
1281+ mat4x4 scaled;
1282+ mat4x4_identity(scaled);
1283+ float f = 1.0f;
1284+ mat4x4_scale_aniso(scaled, scaled, params.scale.x * f, params.scale.y * f, params.scale.z * f);
1285+ mat4x4 tmp;
1286+ mat4x4_dup(tmp, model_matrix);
1287+ mat4x4_mul(model_matrix, scaled, tmp);
1288+ mat4x4 rotate;
1289+ mat4x4_dup(rotate, id);
1290+ mat4x4_rotate_Z2(rotate, id, -deg_to_radf(params.rotation));
1291+ mat4x4_dup(tmp, model_matrix);
1292+ mat4x4_mul(model_matrix, rotate, tmp);
1293+ mat4x4_translate_independed(model_matrix, params.position.x / sc, -params.position.y / sc * a, params.position.z / sc);
1294+
1295+ mat4x4 m;
1296+ mat4x4_mul(m, model_matrix, main_matrix);
1297+
1298+ m[1][0] /= a;
1299+ m[0][1] *= a;
1300+
1301+ mat4x4 scale_m;
1302+ mat4x4_scaled(scale_m, s);
1303+ mat4x4_rotate_Z(scale_m, r);
1304+ scale_m[1][0] /= a;
1305+ scale_m[0][1] *= a;
1306+ mat4x4_mul(matrix, scale_m, m);
1307+}
1308+
1309+float bubble_dots_sinf(float a) {
1310+ if (a < M_PI * 2 * anim_bubble_dots_end_period) {
1311+ return sinf(a);
1312+ }
1313+ return 0;
1314+}
1315+
1316+static void reset_ic() {
1317+ anim_smile_start_time1 = time_local;
1318+ anim_pencil_start_time = 0;
1319+ anim_pencil_start_all_end_time = 0;
1320+ anim_cam_next_time = time_local;
1321+ anim_smile_stage = 0;
1322+ anim_smile_blink_one = 0;
1323+ anim_pencil_stage = 0;
1324+ anim_bubble_dots_end_period = 4;
1325+ anim_pencil_period = 1;
1326+}
1327+
1328+static void draw_ic(int32_t type) {
1329+ float rotation;
1330+ float beginTimeK;
1331+ float commonDelay;
1332+ float beginY = 250;
1333+ int32_t bounce;
1334+ texture_program_type COLOR, LIGHT_COLOR;
1335+ if (type == 0) {
1336+ beginTimeK = 2.0f;
1337+ commonDelay = duration_const * 0.5f;
1338+ bounce = 1;
1339+ rotation = -D2R(free_scroll_offset);
1340+ cloud_scroll_offset = 0;
1341+ COLOR = RED, LIGHT_COLOR = LIGHT_RED;
1342+ } else {
1343+ rotation = 0;
1344+ beginTimeK = 2.5;
1345+ commonDelay = 0;
1346+ bounce = 1;
1347+ COLOR = BLUE, LIGHT_COLOR = LIGHT_BLUE;
1348+ }
1349+ float scale;
1350+ float t_y;
1351+ CPoint ic_pos;
1352+ float ic_layer_alpha;
1353+ if (current_page == 1 && direct == 0) {
1354+ ic_layer_alpha = t(1, 0, 0, duration_const * 0.25f, EaseOut);
1355+ } else {
1356+ ic_layer_alpha = 1;
1357+ }
1358+ ic_pin.params.alpha = ic_layer_alpha;
1359+ ic_cam.params.alpha = ic_layer_alpha;
1360+ ic_cam_lens.params.alpha = ic_layer_alpha;
1361+ ic_smile.params.alpha = ic_layer_alpha;
1362+ ic_smile_eye.params.alpha = ic_layer_alpha;
1363+ ic_videocam.params.alpha = ic_layer_alpha;
1364+ ic_bubble.params.alpha = ic_layer_alpha;
1365+ ic_bubble_dot.params.alpha = ic_layer_alpha;
1366+ ic_pencil.params.alpha = ic_layer_alpha;
1367+
1368+ if (type == 0) {
1369+ ic_pos = CPointMake(-106 / 2, 61 / 2);
1370+ if (current_page == 1 && direct == 0) {
1371+ t_y = 0;
1372+ } else {
1373+ t_y = t(beginY, 0, commonDelay + duration_const * 0.2f * beginTimeK, duration_const, EaseOut);
1374+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.2f * beginTimeK)) * 50;
1375+ float value = beginY * powf(2.71, -0.055f * arg * 2) * cosf(0.08f * arg) * 0.4f;
1376+ t_y -= value * bounce;
1377+ }
1378+ } else {
1379+ ic_pos = CPointMake(-162 / 2 + 4, +26 / 2 + 20);
1380+ t_y = t(beginY, 0, commonDelay + duration_const * 0.2f * beginTimeK, duration_const, EaseOut);
1381+ float value = 0;
1382+ float e = 2.71;
1383+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.2f * beginTimeK)) * 50;
1384+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg - (float) M_PI / 8.0f) * 0.4f;
1385+ t_y -= value * bounce;
1386+ }
1387+
1388+ if (time_local > anim_pin_start_time) {
1389+ if (time_local > anim_pin_start_time + anim_pin_duration) {
1390+ anim_pin_start_time = time_local + duration_const * frand(10, 20) * 2;
1391+ anim_pin_duration = duration_const * frand(10, 20) * 2;
1392+ }
1393+ }
1394+ float pinasin = 0;
1395+ ic_pin_layer.position = xyzMake(ic_pos.x + cosf(time_local * 5) * 3 * pinasin + cloud_scroll_offset, ic_pos.y + sinf(time_local * 5) * 1.5f * pinasin + t_y, 0);
1396+ mat4x4_layer(ic_matrix, ic_pin_layer, 1, rotation);
1397+ draw_textured_shape(&ic_pin, ic_matrix, COLOR);
1398+
1399+ if (type == 1) {
1400+ ic_videocam_layer.rotation = -30 + t_local(anim_videocam_old_angle, anim_videocam_angle, anim_videocam_start_time, anim_videocam_duration, EaseOut);
1401+ t_y = t(beginY, 0, commonDelay + duration_const * 0.45f * beginTimeK, duration_const, EaseOut);
1402+ float value = 0;
1403+ float e = 2.71;
1404+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.45f * beginTimeK)) * 50;
1405+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * 0.4f;
1406+ t_y -= value * bounce;
1407+ if (t_y <= 1 && time_local > anim_videocam_next_time) {
1408+ anim_videocam_duration = duration_const * frand(1.0f, 1.5f) * 1.5f;
1409+ anim_videocam_old_angle = anim_videocam_angle;
1410+ anim_videocam_angle = 15 * irand(-1, 1);
1411+ anim_videocam_start_time = time_local;
1412+ anim_videocam_next_time = time_local + 1000000 + duration_const * frand(5, 8);
1413+ }
1414+ ic_videocam_layer.position = xyzMake(-68 / 2 + cloud_scroll_offset, +80 / 2 + t_y, 0);
1415+ mat4x4_layer(ic_matrix, ic_videocam_layer, 1, rotation);
1416+ draw_textured_shape(&ic_videocam, ic_matrix, COLOR);
1417+ }
1418+
1419+ if (type == 0) {
1420+ ic_pos = CPointMake(107 / 2, 78 / 2);
1421+ if (current_page == 1 && direct == 0) {
1422+ t_y = 0;
1423+ } else {
1424+ t_y = t(beginY, 0, commonDelay + duration_const * 0.3f * beginTimeK, duration_const, EaseOut);
1425+ float value = 0;
1426+ float e = 2.71;
1427+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.3f * beginTimeK)) * 50;
1428+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * 0.4f;
1429+ t_y -= value * bounce;
1430+ }
1431+ } else {
1432+ ic_pos = CPointMake(-28 / 2, -20 / 2 + 2);
1433+ t_y = t(beginY, 0, commonDelay + duration_const * 0.15f * beginTimeK, duration_const, EaseOut);
1434+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.15f * beginTimeK)) * 50;
1435+ float value = beginY * powf(2.71, -0.055f * arg * 2) * cosf(0.08f * arg) * 0.4f;
1436+ t_y -= value * bounce;
1437+ }
1438+
1439+ if (t_y <= 1 && time_local > anim_cam_next_time) {
1440+ anim_cam_duration = duration_const * frand(1.0, 1.5);
1441+ anim_cam_old_angle = anim_cam_angle;
1442+ anim_cam_old_position = anim_cam_position;
1443+ anim_cam_start_time = time_local;
1444+ anim_cam_next_time = time_local + 10000000;
1445+ int32_t r = irand(0, 1);
1446+ if (r == 0) {
1447+ anim_cam_position = CPointMake(-8 + 4, 0);
1448+ anim_cam_angle = signrand() * 10;
1449+ } else if (r == 1) {
1450+ anim_cam_position = CPointMake(4, -5);
1451+ anim_cam_angle = signrand() * 10;
1452+ } else if (r == 2) {
1453+ anim_cam_position = CPointMake(0, 0);
1454+ anim_cam_angle = 0;
1455+ }
1456+ qShot = irand(1, 2);
1457+ anim_camshot_start_time = time_local + duration_const * 0.5f;
1458+ anim_camshot_duration = duration_const * .4f;
1459+ }
1460+
1461+ ic_cam_layer.rotation = 15 + t_local(anim_cam_old_angle, anim_cam_angle, anim_cam_start_time, anim_cam_duration, EaseOut);
1462+ ic_cam_layer.position = xyzMake(
1463+ ic_pos.x + 0 * t_local(anim_cam_old_position.x, anim_cam_position.x, anim_cam_start_time, anim_cam_duration, EaseOut) + cloud_scroll_offset,
1464+ ic_pos.y + 0 * t_local(anim_cam_old_position.y, anim_cam_position.y, anim_cam_start_time, anim_cam_duration, EaseOut)
1465+ + t_y,
1466+ 0);
1467+
1468+ mat4x4_layer(ic_matrix, ic_cam_layer, 1, rotation);
1469+ draw_textured_shape(&ic_cam, ic_matrix, COLOR);
1470+
1471+ float lens_scale;
1472+ lens_scale = 1;
1473+ if (qShot >= 0 && time_local > anim_camshot_start_time) {
1474+ lens_scale = t_local(1, 0, anim_camshot_start_time, anim_camshot_duration, Sin);
1475+ if (time_local > anim_camshot_start_time + anim_camshot_duration) {
1476+ qShot--;
1477+ anim_camshot_start_time = time_local + anim_camshot_duration;
1478+ }
1479+ }
1480+ ic_cam_lens.params.scale = xyzMake(lens_scale, lens_scale, 1);
1481+ ic_cam_lens.params.position = xyzMake(0, 1.7, 0);
1482+ draw_textured_shape(&ic_cam_lens, ic_matrix, COLOR);
1483+
1484+ if (type == 0) {
1485+ ic_pos = CPointMake(70 / 2, -116 / 2);
1486+ if (current_page == 1 && direct == 0) {
1487+ t_y = 0;
1488+ } else {
1489+ t_y = t(beginY, 0, commonDelay + duration_const * .0f * beginTimeK, duration_const, EaseOut);
1490+ float value = 0;
1491+ float e = 2.71;
1492+ float arg = MAXf(0, time - (commonDelay + duration_const * .0f * beginTimeK)) * 50;
1493+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * .4f;
1494+ t_y -= value * bounce;
1495+ }
1496+ } else {
1497+ ic_pos = CPointMake(+60 / 2, 50 / 2);
1498+ t_y = t(beginY, 0, commonDelay + duration_const * 0.25f * beginTimeK, duration_const, EaseOut);
1499+
1500+ float value = 0;
1501+ float e = 2.71;
1502+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.25f * beginTimeK)) * 50;
1503+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg - (float) M_PI / 8.0f) * .4f;
1504+
1505+ t_y -= value * bounce;
1506+ }
1507+ float smile_laught = 0;
1508+ float anim_smile_fade_duration = duration_const * 2;
1509+ float anim_smile_duration = duration_const * 2;
1510+ if (anim_smile_stage == 0) {
1511+ smile_laught = t_local(0, 1, anim_smile_start_time1, anim_smile_fade_duration, Linear);
1512+ if (time_local > anim_smile_duration * 3 + anim_smile_start_time1) {
1513+ anim_smile_stage = 1;
1514+ anim_smile_start_time2 = time_local;
1515+ }
1516+ }
1517+
1518+ if (anim_smile_stage == 1) {
1519+ smile_laught = t_local(1, 0, anim_smile_start_time2, anim_smile_fade_duration, Linear);
1520+ if (time_local > anim_smile_duration + anim_smile_start_time2) {
1521+ smile_laught = 0;
1522+ anim_smile_stage = 2;
1523+ anim_smile_blink_one = 1;
1524+ anim_smile_blink_start_time = time_local + duration_const;
1525+ }
1526+ }
1527+
1528+ float y = 0;
1529+ if (anim_smile_stage < 2) {
1530+ y = sinf(time_local * (float) M_PI * 10) * 1.5f * smile_laught;
1531+ }
1532+
1533+ ic_smile_layer.position = xyzMake(ic_pos.x + cloud_scroll_offset, y + ic_pos.y + t_y, 0);
1534+ mat4x4_layer(ic_matrix, ic_smile_layer, 1, rotation);
1535+ draw_textured_shape(&ic_smile, ic_matrix, COLOR);
1536+
1537+ if (time_local > anim_smile_blink_start_time + .1) {
1538+
1539+ float blink_pause = frand(3, 6);
1540+ if (irand(0, 3) == 0) {
1541+ blink_pause = .3;
1542+ }
1543+ if (anim_smile_blink_one == 1) {
1544+ blink_pause = frand(3, 6);
1545+ }
1546+ anim_smile_blink_start_time = time_local + blink_pause;
1547+
1548+ anim_smile_blink_one = 0;
1549+ }
1550+
1551+ int32_t stop_time = 5;
1552+ float eye_scale = t_local(1, 0, anim_smile_blink_start_time, 0.1f, Sin);
1553+ ic_smile_eye.params.scale = xyzMake(1, eye_scale, 1);
1554+ if (time > stop_time) ic_smile_eye.params.scale = xyzMake(1, 1, 1);
1555+
1556+ ic_smile_eye.params.position = xyzMake(-7, -4.5f, 0);
1557+ draw_textured_shape(&ic_smile_eye, ic_matrix, COLOR);
1558+
1559+ if (anim_smile_blink_one == 1) ic_smile_eye.params.scale = xyzMake(1, 1, 1);
1560+ if (time > stop_time) ic_smile_eye.params.scale = xyzMake(1, 1, 1);
1561+ ic_smile_eye.params.position = xyzMake(7, -4.5f, 0);
1562+ draw_textured_shape(&ic_smile_eye, ic_matrix, COLOR);
1563+
1564+ if (type == 0) {
1565+ ic_pos = CPointMake(-60 / 2, 110 / 2);
1566+ if (current_page == 1 && direct == 0) {
1567+ t_y = 0;
1568+ } else {
1569+ t_y = t(beginY, 0, commonDelay + duration_const * .45f * beginTimeK, duration_const, EaseOut);
1570+
1571+ float value = 0;
1572+ float e = 2.71;
1573+ float arg = MAXf(0, time - (commonDelay + duration_const * .45f * beginTimeK)) * 50;
1574+
1575+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * .4f;
1576+
1577+ t_y -= value * bounce;
1578+ }
1579+ } else {
1580+ ic_pos = CPointMake(72 / 2, -74 / 2);
1581+ t_y = t(beginY, 0, commonDelay + duration_const * .0f * beginTimeK, duration_const, EaseOut);
1582+ float value = 0;
1583+ float e = 2.71;
1584+ float arg = MAXf(0, time - (commonDelay + duration_const * .0f * beginTimeK)) * 50;
1585+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * .4f;
1586+ t_y -= value * bounce;
1587+ }
1588+ ic_bubble_layer.position = xyzMake(ic_pos.x + cloud_scroll_offset, ic_pos.y + t_y, 0);
1589+ mat4x4_layer(ic_matrix, ic_bubble_layer, 1, rotation);
1590+ draw_textured_shape(&ic_bubble, ic_matrix, COLOR);
1591+
1592+ scale = 0.7f + 0.2f * bubble_dots_sinf(time * 10);
1593+ ic_bubble_dot.params.scale = xyzMake(scale, scale, scale);
1594+ ic_bubble_dot.params.position = xyzMake(0 - 80.5f, -9 / 2.0f, 0);
1595+ draw_textured_shape(&ic_bubble_dot, ic_matrix, LIGHT_COLOR);
1596+
1597+ scale = 0.7f + 0.2f * bubble_dots_sinf((float) -M_PI * 2 / 3 + time * 10);
1598+ if (anim_bubble_dots_stage == 0) scale = MAXf(.7, scale);
1599+ ic_bubble_dot.params.scale = xyzMake(scale, scale, scale);
1600+ ic_bubble_dot.params.position = xyzMake(0, -9 / 2.0f, 0);
1601+ draw_textured_shape(&ic_bubble_dot, ic_matrix, LIGHT_COLOR);
1602+
1603+ scale = 0.7f + 0.2f * bubble_dots_sinf((float) -M_PI * 2 / 3 * 2 + time * 10);
1604+ if (anim_bubble_dots_stage == 0) scale = MAXf(.7, scale);
1605+ ic_bubble_dot.params.scale = xyzMake(scale, scale, scale);
1606+ ic_bubble_dot.params.position = xyzMake(0 + 80.5f, -9 / 2.0f, 0);
1607+ draw_textured_shape(&ic_bubble_dot, ic_matrix, LIGHT_COLOR);
1608+
1609+ if (type == 0) {
1610+ ic_pos = CPointMake(-88 / 2 - 15, -100 / 2 + 13);
1611+ if (current_page == 1 && direct == 0) {
1612+ t_y = 0;
1613+ } else {
1614+ t_y = t(beginY, 0, commonDelay + duration_const * .1f * beginTimeK, duration_const, EaseOut);
1615+ float value = 0;
1616+ float e = 2.71;
1617+ float arg = MAXf(0, time - (commonDelay + duration_const * .1f * beginTimeK)) * 50;
1618+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * .4f;
1619+ t_y -= value * bounce;
1620+ }
1621+ } else {
1622+ ic_pos = CPointMake(+152 / 2 - 17, +66 / 2 + 14);
1623+
1624+ t_y = t(beginY, 0, commonDelay + duration_const * 0.35f * beginTimeK, duration_const, EaseOut);
1625+
1626+ float value = 0;
1627+ float e = 2.71;
1628+ float arg = MAXf(0, time - (commonDelay + duration_const * 0.35f * beginTimeK)) * 50;
1629+ value = beginY * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg) * 0.4f;
1630+
1631+ t_y -= value * bounce;
1632+ }
1633+
1634+ float pencil_x = 0;
1635+ if (anim_pencil_stage == 0) {
1636+ ic_pencil_layer.rotation = t_local(0, -5, anim_pencil_start_all_time, duration_const * 0.5f, EaseOut);
1637+
1638+ pencil_x = t_local(0, 14, anim_pencil_start_time, 1.5f * 0.85f, Linear);
1639+ if (time_local > anim_pencil_start_time + 1.5 * 0.85) {
1640+ anim_pencil_start_time = time_local;
1641+ anim_pencil_stage = 1;
1642+ }
1643+ } else if (anim_pencil_stage == 1) {
1644+ pencil_x = t_local(14, 0, anim_pencil_start_time, 1.5f * 0.15f, Linear);
1645+ if (time_local > anim_pencil_start_time + 1.5f * 0.15f) {
1646+ if (anim_pencil_period == 0) {
1647+ anim_pencil_start_all_end_time = time_local;
1648+ anim_pencil_start_time = time_local + duration_const * 1;
1649+ anim_pencil_stage = 2;
1650+ } else {
1651+ anim_pencil_period--;
1652+ anim_pencil_start_time = time_local;
1653+ anim_pencil_stage = 0;
1654+ }
1655+ }
1656+ } else if (anim_pencil_stage == 2) {
1657+ ic_pencil_layer.rotation = t_local(-5, 0, anim_pencil_start_all_end_time, duration_const * 0.5f, EaseOut);
1658+ if (time_local > anim_pencil_start_time) {
1659+ anim_pencil_start_all_time = time_local;
1660+ anim_pencil_start_time = time_local;
1661+ anim_pencil_stage = 3;
1662+ }
1663+ }
1664+
1665+ float pencil_v = (anim_pencil_stage < 2) ? sinf((float) (time_local * 2 * M_PI * 4)) * 0.8f : 0;
1666+ ic_pencil_layer.position = xyzMake(pencil_x + ic_pos.x + cloud_scroll_offset, pencil_v + ic_pos.y + t_y, 0);
1667+ mat4x4_layer(ic_matrix, ic_pencil_layer, 1, rotation);
1668+ draw_textured_shape(&ic_pencil, ic_matrix, COLOR);
1669+}
1670+
1671+void draw_safe(int32_t type, float alpha, float screw_alpha) {
1672+ float screw_distance = 53;
1673+
1674+ private_screw.params.alpha = alpha * screw_alpha;
1675+
1676+ scale = 1;
1677+ private_screw.params.scale = xyzMake(scale, scale, 1);
1678+ private_screw.params.position = xyzMake(-screw_distance, -screw_distance, 0);
1679+ draw_textured_shape(&private_screw, private_matrix, NORMAL_ONE);
1680+
1681+ private_screw.params.scale = xyzMake(scale, scale, 1);
1682+ private_screw.params.position = xyzMake(screw_distance, -screw_distance, 0);
1683+ draw_textured_shape(&private_screw, private_matrix, NORMAL_ONE);
1684+
1685+ private_screw.params.scale = xyzMake(scale, scale, 1);
1686+ private_screw.params.position = xyzMake(-screw_distance, screw_distance, 0);
1687+ draw_textured_shape(&private_screw, private_matrix, NORMAL_ONE);
1688+
1689+ private_screw.params.scale = xyzMake(scale, scale, 1);
1690+ private_screw.params.position = xyzMake(screw_distance, screw_distance, 0);
1691+ draw_textured_shape(&private_screw, private_matrix, NORMAL_ONE);
1692+}
1693+
1694+JNIEXPORT void Java_org_telegram_messenger_Intro_setBackgroundColor(JNIEnv *env, jclass class, jfloat r, jfloat g, jfloat b, jfloat a) {
1695+ background_color[0] = r;
1696+ background_color[1] = g;
1697+ background_color[2] = b;
1698+ background_color[3] = a;
1699+
1700+ cloud_cover = create_rectangle(CSizeMake(240, 100), background_color);
1701+ cloud_cover.params.anchor.y = -50;
1702+
1703+ TexturedShape was_mask = powerful_mask;
1704+ powerful_mask = create_textured_rectangle(CSizeMake(200, 200), powerful_mask_texture);
1705+ powerful_mask.params = was_mask.params;
1706+
1707+ telegram_mask = create_textured_rectangle(CSizeMake(200, 150), telegram_mask_texture);
1708+}
1709+
1710+JNIEXPORT void Java_org_telegram_messenger_Intro_onDrawFrame(JNIEnv *env, jclass class, jint deltaMs) {
1711+ if (surfaceCreated == 0) {
1712+ glClearColor(background_color[0], background_color[1], background_color[2], background_color[3]);
1713+ glClear(GL_COLOR_BUFFER_BIT);
1714+ return;
1715+ }
1716+ time_local += (float) deltaMs / 1000;
1717+
1718+ if (current_page != prev_page) {
1719+ reset_ic();
1720+ ms0_anim = date;
1721+ fps_anim = 0;
1722+ count_anim_fps = 1;
1723+ }
1724+
1725+ float knotDelayStep = 0.075f;
1726+ if (prev_page != current_page) {
1727+ for (i = 0; i < 4; i++) {
1728+ knot_delays[i] = (0.65f + knotDelayStep * i) * duration_const;
1729+ }
1730+
1731+ for (i = 0; i < 10; i++) {
1732+ int32_t j1 = irand(0, 3);
1733+ int32_t j2 = irand(0, 3);
1734+ float temp = knot_delays[j1];
1735+ knot_delays[j1] = knot_delays[j2];
1736+ knot_delays[j2] = temp;
1737+ }
1738+
1739+ if (current_page == 2) {
1740+ ic_pin_layer.rotation = -15;
1741+ ic_cam_layer.rotation = 15;
1742+ ic_smile_layer.rotation = -15;
1743+ ic_bubble_layer.rotation = -15;
1744+ }
1745+
1746+ if (current_page == 5) {
1747+ ic_pin_layer.rotation = -15;
1748+ ic_videocam_layer.rotation = -30;
1749+ ic_cam_layer.rotation = 15;
1750+ ic_smile_layer.rotation = -15;
1751+ ic_bubble_layer.rotation = -15;
1752+ }
1753+ }
1754+
1755+ // Normalize if FPS is greater than 60
1756+ fps_anim = (int)(time_local / 0.016f);
1757+ if (count_anim_fps == 1 && date - ms0_anim >= duration_const) {
1758+ count_anim_fps = 0;
1759+ }
1760+
1761+ if (date - ms0 >= 1.0f) {
1762+ ms0 = date;
1763+ }
1764+
1765+ time = date - date0;
1766+
1767+ float private_back_k = .8;
1768+
1769+ glClearColor(background_color[0], background_color[1], background_color[2], background_color[3]);
1770+ glClear(GL_COLOR_BUFFER_BIT);
1771+
1772+
1773+ if (current_page == 0) {
1774+ rglNormalDraw();
1775+
1776+ telegram_sphere.params.alpha = 1;
1777+
1778+ scale = 1;
1779+
1780+ float alpha = 1;
1781+ if (direct == 0) {
1782+ alpha = t(0, 1, 0, duration_const, Linear);
1783+
1784+ fast_body.params.alpha = 1;
1785+ fast_body.params.scale = xyzMake(scale, scale, 1);
1786+ draw_textured_shape(&fast_body, main_matrix, NORMAL);
1787+ }
1788+
1789+ telegram_sphere.params.alpha = alpha;
1790+ telegram_sphere.params.scale = xyzMake(scale, scale, 1);
1791+
1792+ telegram_plane.params.alpha = 1;
1793+
1794+ float tt = MINf(0, (float) (-M_PI * 125. / 180. + time * M_PI * 2 * 1.5));
1795+
1796+ float dx = sinf(tt) * 75;
1797+ float dy = -sinf(tt) * 60;
1798+
1799+ telegram_plane.params.position = xyzMake(dx, dy, 0);
1800+
1801+ float scale = (cosf(tt) + 1) * 0.5f;
1802+
1803+ telegram_plane.params.scale = xyzMake(cosf(tt) * scale, scale, 1);
1804+
1805+ if (tt < D2R(125)) {
1806+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1807+ }
1808+ } else if (current_page == 1) {
1809+ rglNormalDraw();
1810+ if (direct == 1) {
1811+ fast_body.params.scale = xyzMake(1, 1, 1);
1812+ fast_body.params.alpha = 1;
1813+ draw_textured_shape(&fast_body, main_matrix, NORMAL);
1814+ } else {
1815+ fast_body.params.alpha = t(0, 1, .0, duration_const, Linear);;
1816+ float scale = t(.95, 1, 0, duration_const, EaseInEaseOut);
1817+ fast_body.params.scale = xyzMake(scale, scale, 1.0f);
1818+ draw_textured_shape(&fast_body, main_matrix, NORMAL);
1819+ }
1820+ } else if (current_page == 2) {
1821+ rglNormalDraw();
1822+ if (direct == 1) {
1823+ fast_body.params.alpha = t(1.0f, .0, .0, duration_const, Linear);;
1824+ float scale = t(1, .95, 0, duration_const, EaseInEaseOut);
1825+ fast_body.params.scale = xyzMake(scale, scale, 1.0f);
1826+ draw_textured_shape(&fast_body, main_matrix, NORMAL);
1827+ }
1828+ } else if (current_page == 4) {
1829+ if (direct == 1) {
1830+ privateLayer.rotation = private_scroll_offset + t(-90, 0, 0, duration_const, EaseOut);
1831+ } else {
1832+ privateLayer.rotation = private_scroll_offset + t(90, 0, 0, duration_const * private_back_k, EaseOut);
1833+ }
1834+ mat4x4_layer(private_matrix, privateLayer, 1.0f, 0);
1835+ }
1836+
1837+ rglMaskDraw();
1838+ mask1.params.position.z = cloud_extra_mask1.params.position.z = cloud_extra_mask2.params.position.z = cloud_extra_mask3.params.position.z = cloud_extra_mask4.params.position.z = 1;
1839+
1840+ if (current_page == 0) {
1841+ if (direct == 0) {
1842+ change_rounded_rectangle(&mask1, CSizeMake(r1 * 2, r1 * 2), r1);
1843+ mask1.params.rotation = 0;
1844+ }
1845+ } else if (current_page == 1) {
1846+ if (direct == 1) {
1847+ change_rounded_rectangle(&mask1, CSizeMake(r1 * 2, r1 * 2), r1);
1848+ mask1.params.rotation = 0;
1849+ } else {
1850+ float size = t(r2 * 2, r1 * 2, 0, duration_const, EaseInEaseOut);
1851+ float round = t(30, r1, 0, duration_const, EaseInEaseOut);
1852+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1853+ free_scroll_offset = 0;
1854+ mask1.params.rotation = t(180, 0.0f, 0, duration_const, EaseInEaseOut) + free_scroll_offset;
1855+ }
1856+ } else if (current_page == 2) {
1857+ if (direct == 1) {
1858+ float size = t(r1 * 2, r2 * 2, 0, duration_const, EaseInEaseOut);
1859+ float round = t(r1, 30, 0, duration_const, EaseInEaseOut);
1860+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1861+ free_scroll_offset = scroll_offset * 5;
1862+ mask1.params.rotation = t(0, 180.0f, 0, duration_const, EaseInEaseOut) + free_scroll_offset;
1863+ } else {
1864+ free_scroll_offset = scroll_offset * 5;
1865+ float r = 316 / 4.0f;
1866+ float size = t_reversed(r2 * 2, r * 2, 0, duration_const, EaseInEaseOut);
1867+ float round = t_reversed(30, 20, 0, duration_const, EaseInEaseOut);
1868+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1869+ mask1.params.rotation = t_reversed(180.0f + free_scroll_offset, 180.0f + 90.0f, 0, duration_const, EaseInEaseOut);
1870+ }
1871+ } else if (current_page == 3) {
1872+ if (direct == 1) {
1873+ float r = 316 / 4.0f;
1874+ float size = t(r2 * 2, r * 2, 0, duration_const, EaseInEaseOut);
1875+ float round = t(30, 20, 0, duration_const, EaseInEaseOut);
1876+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1877+ mask1.params.rotation = t(180.0f + free_scroll_offset, 180.0f + 90.0f, 0, duration_const, EaseInEaseOut);
1878+ } else {
1879+ float r = 316 / 4.0f;
1880+ float size = t_reversed(r * 2, r2 * 2, 0, duration_const, EaseOut);
1881+ float round = t_reversed(20, 30, 0, duration_const, EaseOut);
1882+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1883+ mask1.params.rotation = t_reversed(180.0f + 90.0f, 180.0f + 90.0f + 90.0f, 0, duration_const, EaseOut);
1884+ mask1.params.position = xyzMake(0, 0, mask1.params.position.z);
1885+ }
1886+ } else if (current_page == 4) {
1887+ if (direct == 1) {
1888+ float r = 316 / 4.0f;
1889+ float size = t(r * 2, r2 * 2, 0, duration_const, EaseOut);
1890+ float round = t(20, 30, 0, duration_const, EaseOut);
1891+ change_rounded_rectangle(&mask1, CSizeMake(size, size), round);
1892+ mask1.params.rotation = private_scroll_offset + t(180.0f + 90.0f, 180.0f + 90.0f + 90.0f, 0, duration_const, EaseOut);
1893+ mask1.params.position = xyzMake(0, 0, mask1.params.position.z);
1894+ } else {
1895+ float k = 0;
1896+ k = 1.0f * private_back_k;
1897+ float scale = t_reversed(r2 * 2, 100, 0, duration_const * k, EaseOut);
1898+ change_rounded_rectangle(&mask1, CSizeMake(scale, scale), t_reversed(30, 50, 0, duration_const * k, EaseOut));
1899+ mask1.params.position = xyzMake(t_reversed(0, 29 / 2, 0, duration_const * k, EaseOut), t_reversed(0, -19 / 2, 0, duration_const * k, EaseOut), mask1.params.position.z);
1900+ mask1.params.rotation = private_scroll_offset + t_reversed(180.0f + 90.0f + 90.0f, 180.0f + 90.0f + 90.0f + 90.0f, 0, duration_const * k, EaseOut);
1901+
1902+ k = 1.0f * private_back_k;
1903+ int32_t sublayer2_radius = 33;
1904+ cloud_extra_mask1.params.position = xyzMake(t_reversed(0, -122 / 2, 0, duration_const * k, EaseOut), t_reversed(0, 54 / 2 - 1, 0, duration_const * k, EaseOut), cloud_extra_mask1.params.position.z);
1905+ scale = t_reversed(0, sublayer2_radius, 0, duration_const * k, EaseOut);
1906+ cloud_extra_mask1.params.scale = xyzMake(scale, scale, 1);
1907+ draw_shape(&cloud_extra_mask1, main_matrix);
1908+
1909+ k = 1.15f * private_back_k;
1910+ int32_t sublayer3_radius = 94 / 4;
1911+ cloud_extra_mask2.params.position = xyzMake(t_reversed(0, -84 / 2, 0, duration_const * k, EaseOut), t_reversed(0, -29 / 2, 0, duration_const * k, EaseOut), cloud_extra_mask2.params.position.z);
1912+ scale = t_reversed(0, sublayer3_radius, 0, duration_const * k, EaseOut);
1913+ cloud_extra_mask2.params.scale = xyzMake(scale, scale, 1);
1914+ draw_shape(&cloud_extra_mask2, main_matrix);
1915+
1916+ k = 1.3f * private_back_k;
1917+ int32_t sublayer4_radius = 124 / 4;
1918+ cloud_extra_mask3.params.position = xyzMake(t_reversed(0, 128 / 2, 0, duration_const * k, EaseOut), t_reversed(0, 56 / 2, 0, duration_const * k, EaseOut), cloud_extra_mask3.params.position.z);
1919+ scale = t_reversed(0, sublayer4_radius, 0, duration_const * k, EaseOut);
1920+ cloud_extra_mask3.params.scale = xyzMake(scale, scale, 1);
1921+ draw_shape(&cloud_extra_mask3, main_matrix);
1922+
1923+ k = 1.5f * private_back_k;
1924+ int32_t sublayer5_radius = 64;
1925+ cloud_extra_mask4.params.position = xyzMake(t_reversed(0, 0, 0, duration_const * k, EaseOut), t_reversed(0, 50, 0, duration_const * k, EaseOut), cloud_extra_mask4.params.position.z);
1926+ scale = t_reversed(0, sublayer5_radius, 0, duration_const * k, EaseOut);
1927+ cloud_extra_mask4.params.scale = xyzMake(scale, scale, 1);
1928+ draw_shape(&cloud_extra_mask4, main_matrix);
1929+ }
1930+ } else if (current_page == 5) {
1931+ float k = 0.8f;
1932+ float scale = t(r2 * 2, 100, 0, duration_const * k, EaseOut);
1933+ change_rounded_rectangle(&mask1, CSizeMake(scale, scale), t(30, 50, 0, duration_const * k, EaseOut));
1934+ mask1.params.position = xyzMake(t(0, 29 / 2, 0, duration_const * k, EaseOut), t(0, -19 / 2, 0, duration_const * k, EaseOut), mask1.params.position.z);
1935+ mask1.params.rotation = t(180.0f + 90.0f + 90.0f, 180.0f + 90.0f + 90.0f + 90.0f, 0, duration_const * k, EaseOut);
1936+
1937+ k = 1.0f;
1938+ int32_t sublayer2_radius = 33;
1939+ cloud_extra_mask1.params.position = xyzMake(t(0, -122 / 2, 0, duration_const * k, EaseOut), t(0, 54 / 2 - 1, 0, duration_const * k, EaseOut), cloud_extra_mask1.params.position.z);
1940+ scale = t(0, sublayer2_radius, 0, duration_const * k, EaseOut);
1941+ cloud_extra_mask1.params.scale = xyzMake(scale, scale, 1);
1942+ draw_shape(&cloud_extra_mask1, main_matrix);
1943+
1944+
1945+ k = 1.15;
1946+ int32_t sublayer3_radius = 94 / 4;
1947+ cloud_extra_mask2.params.position = xyzMake(t(0, -84 / 2, 0, duration_const * k, EaseOut), t(0, -29 / 2, 0, duration_const * k, EaseOut), cloud_extra_mask2.params.position.z);
1948+ scale = t(0, sublayer3_radius, 0, duration_const * k, EaseOut);
1949+ cloud_extra_mask2.params.scale = xyzMake(scale, scale, 1);
1950+ draw_shape(&cloud_extra_mask2, main_matrix);
1951+
1952+
1953+ k = 1.3;
1954+ int32_t sublayer4_radius = 124 / 4;
1955+ cloud_extra_mask3.params.position = xyzMake(t(0, 128 / 2, 0, duration_const * k, EaseOut), t(0, 56 / 2, 0, duration_const * k, EaseOut), cloud_extra_mask3.params.position.z);
1956+ scale = t(0, sublayer4_radius, 0, duration_const * k, EaseOut);
1957+ cloud_extra_mask3.params.scale = xyzMake(scale, scale, 1);
1958+ draw_shape(&cloud_extra_mask3, main_matrix);
1959+
1960+
1961+ k = 1.5f;
1962+ int32_t sublayer5_radius = 64;
1963+ cloud_extra_mask4.params.position = xyzMake(t(0, 0, 0, duration_const * k, EaseOut), t(0, 50, 0, duration_const * k, EaseOut), cloud_extra_mask4.params.position.z);
1964+ scale = t(0, sublayer5_radius, 0, duration_const * k, EaseOut);
1965+ cloud_extra_mask4.params.scale = xyzMake(scale, scale, 1);
1966+ draw_shape(&cloud_extra_mask4, main_matrix);
1967+
1968+ }
1969+ draw_shape(&mask1, main_matrix);
1970+
1971+ int32_t rr = 30;
1972+ int32_t seg = 15;
1973+ int32_t ang = 180;
1974+ rglNormalDrawThroughMask();
1975+ if (current_page == 0) {
1976+ if (direct == 0) {
1977+ glEnable(GL_BLEND);
1978+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1979+
1980+ change_segmented_square(&spiral, r1, D2R(rr + seg), D2R(speedometer_scroll_offset + calculated_speedometer_sin + t(-seg + ang, 0, 0, duration_const, EaseOut)));
1981+
1982+ spiral.params.scale = xyzMake(1, 1, 1);
1983+ spiral.params.rotation = t(180.0f, 0, 0, duration_const, EaseOut);
1984+ spiral.params.alpha = t(1, 0, 0, duration_const, Linear);
1985+ draw_textured_shape(&spiral, main_matrix, NORMAL_ONE);
1986+
1987+ fast_arrow.params.alpha = fast_arrow_shadow.params.alpha = t(1, 0, 0, duration_const, Linear);
1988+ fast_arrow.params.rotation = fast_arrow_shadow.params.rotation = t(rr, rr - 180 - 160, 0, duration_const, EaseOut) + speedometer_scroll_offset + calculated_speedometer_sin;
1989+ draw_textured_shape(&fast_arrow_shadow, main_matrix, NORMAL_ONE);
1990+ draw_textured_shape(&fast_arrow, main_matrix, NORMAL_ONE);
1991+ }
1992+ } else if (current_page == 1) {
1993+ glEnable(GL_BLEND);
1994+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1995+
1996+ speedometer_scroll_offset = scroll_offset * 25;
1997+ calculated_speedometer_sin = 0;
1998+
1999+ if (direct == 1) {
2000+
2001+ float value = 0;
2002+ float e = 2.71;
2003+
2004+ float arg = time * 50;
2005+
2006+ value = 180 - 180 * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg * 3);
2007+
2008+ float ta = t(0, 180.0f, 0, duration_const, EaseOut);
2009+
2010+ change_segmented_square(&spiral, r1, D2R(rr + seg), D2R(-seg + value + speedometer_scroll_offset));
2011+
2012+ spiral.params.scale = xyzMake(1, 1, 1);
2013+ spiral.params.rotation = ta;
2014+ spiral.params.alpha = t(0, 1, 0, duration_const, Linear);
2015+ draw_textured_shape(&spiral, main_matrix, NORMAL_ONE);
2016+
2017+ fast_arrow.params.alpha = fast_arrow_shadow.params.alpha = t(0, 1, 0, duration_const, Linear);
2018+ fast_arrow.params.rotation = fast_arrow_shadow.params.rotation = -330 + value + ta + speedometer_scroll_offset;
2019+ draw_textured_shape(&fast_arrow_shadow, main_matrix, NORMAL_ONE);
2020+ draw_textured_shape(&fast_arrow, main_matrix, NORMAL_ONE);
2021+
2022+ } else {
2023+ spiral.params.alpha = fast_arrow.params.alpha = fast_arrow_shadow.params.alpha = 1;
2024+
2025+ float value = 0;
2026+ float e = 2.71;
2027+
2028+ float arg = time * 50;
2029+
2030+ float dangle = 90;
2031+ value = 180 - 90 - (180 - 90) * powf(e, -0.055f * arg * 2) * cosf(0.08f * arg * 3);
2032+ value *= -1;
2033+
2034+ change_segmented_square(&spiral, r1, D2R(rr + seg), D2R(speedometer_scroll_offset + value + calculated_speedometer_sin + t(360, 360 - dangle - seg, 0, duration_const, EaseInEaseOut)));
2035+
2036+ float scale = t(1.18, 1, 0, duration_const, EaseInEaseOut);
2037+ spiral.params.scale = xyzMake(scale, scale, 1);
2038+ spiral.params.rotation = t(360, 180, 0, duration_const, EaseInEaseOut);
2039+ draw_textured_shape(&spiral, main_matrix, NORMAL);
2040+
2041+ fast_arrow.params.rotation = fast_arrow_shadow.params.rotation = speedometer_scroll_offset + value + calculated_speedometer_sin + t(rr + 360 + 6, rr + 360 - 180 - dangle, 0, duration_const, EaseInEaseOut);
2042+ draw_textured_shape(&fast_arrow_shadow, main_matrix, NORMAL);
2043+ draw_textured_shape(&fast_arrow, main_matrix, NORMAL);
2044+
2045+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2046+ free_bg.params.alpha = t(1, 0, 0, duration_const, Linear);
2047+ draw_shape(&free_bg, main_matrix);
2048+
2049+ draw_ic(0);
2050+ }
2051+ } else if (current_page == 2) {
2052+
2053+ glEnable(GL_BLEND);
2054+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2055+
2056+ if (direct == 1) {
2057+ spiral.params.alpha = fast_arrow.params.alpha = fast_arrow_shadow.params.alpha = 1;
2058+
2059+ change_segmented_square(&spiral, r1, D2R(rr + seg + speedometer_scroll_offset), D2R(t(-seg + ang, 360, 0, duration_const, EaseInEaseOut)));
2060+
2061+ float scale = t(1, 1.18, 0, duration_const, EaseInEaseOut);
2062+ spiral.params.scale = xyzMake(scale, scale, 1);
2063+ spiral.params.rotation = t(180, 360, 0, duration_const, EaseInEaseOut);
2064+ draw_textured_shape(&spiral, main_matrix, NORMAL);
2065+
2066+ fast_arrow.params.rotation = fast_arrow_shadow.params.rotation = speedometer_scroll_offset + t(rr, rr + 360 + 6, 0, duration_const, EaseInEaseOut);
2067+ draw_textured_shape(&fast_arrow_shadow, main_matrix, NORMAL);
2068+ draw_textured_shape(&fast_arrow, main_matrix, NORMAL);
2069+
2070+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2071+ free_bg.params.alpha = t(0, 1, 0, duration_const, Linear);
2072+ draw_shape(&free_bg, main_matrix);
2073+
2074+ draw_ic(0);
2075+ } else {
2076+ glDisable(GL_BLEND);
2077+ free_bg.params.alpha = 1;
2078+ draw_shape(&free_bg, main_matrix);
2079+
2080+ glEnable(GL_BLEND);
2081+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2082+ draw_ic(0);
2083+
2084+ powerful_bg.params.alpha = t_reversed(0, 1, 0, duration_const, Linear);
2085+ draw_shape(&powerful_bg, main_matrix);
2086+ }
2087+ ribbon1.params.rotation = 0;
2088+ ribbon2.params.rotation = 90;
2089+ ribbon3.params.rotation = 180;
2090+ ribbon4.params.rotation = 270;
2091+ } else if (current_page == 3) {
2092+ if (direct == 1) {
2093+ glDisable(GL_BLEND);
2094+ free_bg.params.alpha = 1;
2095+ draw_shape(&free_bg, main_matrix);
2096+
2097+ glEnable(GL_BLEND);
2098+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2099+ powerful_bg.params.alpha = t(0, 1, 0, duration_const, Linear);
2100+ draw_shape(&powerful_bg, main_matrix);
2101+
2102+ draw_stars();
2103+
2104+ } else {
2105+ glDisable(GL_BLEND);
2106+ private_bg.params.alpha = 1;
2107+ draw_shape(&private_bg, main_matrix);
2108+
2109+ float a = t(0, 1.0f, 0, duration_const, EaseOut);
2110+
2111+ glEnable(GL_BLEND);
2112+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2113+ powerful_bg.params.rotation = 0;
2114+ powerful_bg.params.alpha = a;
2115+ draw_shape(&powerful_bg, main_matrix);
2116+
2117+ draw_stars();
2118+ }
2119+ } else if (current_page == 4) {
2120+ if (direct == 1) {
2121+
2122+ glDisable(GL_BLEND);
2123+ powerful_bg.params.alpha = 1;
2124+ draw_shape(&powerful_bg, main_matrix);
2125+
2126+ float a = t(0, 1.0f, 0, duration_const, EaseOut);
2127+
2128+ glEnable(GL_BLEND);
2129+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2130+ private_bg.params.rotation = t(45, 0, 0, duration_const, EaseOut);
2131+ private_bg.params.alpha = a;
2132+ draw_shape(&private_bg, main_matrix);
2133+
2134+ } else {
2135+ glDisable(GL_BLEND);
2136+ cloud_bg.params.alpha = 1;
2137+ draw_shape(&cloud_bg, main_matrix);
2138+
2139+ float a = t(0, 1.0f, 0, duration_const * private_back_k, EaseOut);
2140+
2141+ glEnable(GL_BLEND);
2142+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2143+ private_bg.params.alpha = a;
2144+ draw_shape(&private_bg, main_matrix);
2145+ }
2146+ } else if (current_page == 5) {
2147+ glDisable(GL_BLEND);
2148+ private_bg.params.alpha = 1.0f;
2149+ draw_shape(&private_bg, main_matrix);
2150+ float a = t(0, 1.0f, 0, duration_const, EaseOut);
2151+
2152+ glEnable(GL_BLEND);
2153+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2154+ cloud_bg.params.alpha = a;
2155+ draw_shape(&cloud_bg, main_matrix);
2156+ if (scroll_offset > 0) {
2157+ cloud_scroll_offset = -scroll_offset * 40;
2158+ } else {
2159+ cloud_scroll_offset = -scroll_offset * 15;
2160+ }
2161+ draw_ic(1);
2162+ }
2163+
2164+ if (current_page == 0) {
2165+ rglNormalDraw();
2166+ if (direct == 0) {
2167+ telegram_sphere.params.alpha = t(0, 1, 0, duration_const * 0.8f, Linear);
2168+ scale = 1;
2169+
2170+ telegram_sphere.params.scale = xyzMake(scale, scale, 1);
2171+ draw_textured_shape(&telegram_sphere, main_matrix, NORMAL);
2172+
2173+ float tt = MINf(0, (float) (-M_PI * 125.0f / 180.0f + time * M_PI * 2 * 1.5f));
2174+ float dx = t(-75, 0, 0, 0.15f, EaseIn);
2175+ float dy = t(75, 0, 0, 0.15f, EaseIn);
2176+ telegram_plane.params.position = xyzMake(dx, dy, 0);
2177+ float scale = t(0.1f, 1, 0.03f, 0.15f, EaseOut);
2178+ telegram_plane.params.scale = xyzMake(scale, scale, 1);
2179+
2180+ if (tt < D2R(125)) {
2181+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2182+ draw_textured_shape(&telegram_plane, main_matrix, NORMAL_ONE);
2183+ draw_textured_shape(&telegram_mask, main_matrix, NORMAL);
2184+ }
2185+ }
2186+ } else if (current_page == 1) {
2187+ rglNormalDraw();
2188+ if (direct == 1) {
2189+ telegram_sphere.params.alpha = t(1, 0, 0, duration_const, Linear);
2190+ draw_textured_shape(&telegram_sphere, main_matrix, NORMAL);
2191+
2192+ double tt = time * M_PI * 2 * 1.5f;
2193+
2194+ float dx = t(0, 75, 0, 0.15f, EaseOut);
2195+ float dy = t(0, -75, 0, 0.15f, EaseOut);
2196+
2197+ telegram_plane.params.position = xyzMake(dx, dy, 0);
2198+
2199+ float scale = t(1, 0.1f, 0.03f, 0.15f, EaseOut);
2200+ telegram_plane.params.scale = xyzMake(scale, scale, 1);
2201+
2202+ if (tt < D2R(125)) {
2203+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2204+ draw_textured_shape(&telegram_plane, main_matrix, NORMAL_ONE);
2205+ draw_textured_shape(&telegram_mask, main_matrix, NORMAL);
2206+ }
2207+ }
2208+ } else if (current_page == 2) {
2209+ rglNormalDraw();
2210+
2211+ float dribbon = 87;
2212+
2213+ if (direct == 1) {
2214+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2215+
2216+ ribbonLayer.rotation = scroll_offset * 5 + t(180, 360, 0, duration_const, EaseInEaseOut);
2217+ mat4x4_layer(ribbons_layer, ribbonLayer, 1.0f, 0);
2218+
2219+ float scale;
2220+ float dur = duration_const * 0.5f;
2221+
2222+ free_knot1.params.position = xyzMake(5, -5 - 9, 0);
2223+ scale = t(0, 1, knot_delays[0], dur, EaseOut);
2224+ free_knot1.params.scale = xyzMake(scale, scale, 1);
2225+ draw_textured_shape(&free_knot1, ribbons_layer, NORMAL_ONE);
2226+
2227+ free_knot2.params.position = xyzMake(-5, -5 - 9, 0);
2228+ scale = t(0, 1, knot_delays[1], dur, EaseOut);
2229+ free_knot2.params.scale = xyzMake(-scale, scale, 1);
2230+ draw_textured_shape(&free_knot2, ribbons_layer, NORMAL_ONE);
2231+
2232+ free_knot3.params.position = xyzMake(-5, 5 - 9, 0);
2233+ scale = t(0, 1, knot_delays[2], dur, EaseOut);
2234+ free_knot3.params.scale = xyzMake(-scale, scale, 1);
2235+ draw_textured_shape(&free_knot3, ribbons_layer, NORMAL_ONE);
2236+
2237+ free_knot3.params.position = xyzMake(5, 5 - 9, 0);
2238+ scale = t(0, 1, knot_delays[3], dur, EaseOut);
2239+ free_knot3.params.scale = xyzMake(scale, scale, 1);
2240+ draw_textured_shape(&free_knot3, ribbons_layer, NORMAL_ONE);
2241+
2242+
2243+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2244+ ribbon1.params.alpha = ribbon2.params.alpha = ribbon3.params.alpha = ribbon4.params.alpha = t(0, 1, 0, dur, EaseInEaseOut);
2245+
2246+ int32_t ribbon_k = time > duration_const ? 1 : 0;
2247+
2248+ change_ribbon(&ribbon1, ribbonLength - 8.0f * ribbon_k - free_scroll_offset / 5.0f * (30 - 8 * ribbon_k));
2249+ ribbon1.params.position.x = scroll_offset * 30 * 0 + t(-dribbon, 0, 0, duration_const, EaseInEaseOut);
2250+ draw_shape(&ribbon1, ribbons_layer);
2251+
2252+ change_ribbon(&ribbon2, ribbonLength - 10.0f * ribbon_k - free_scroll_offset / 5.0f * (22 - 10 * ribbon_k));
2253+ ribbon2.params.position.y = scroll_offset * 15 + t(-9 - dribbon, -9, 0, duration_const, EaseInEaseOut);
2254+ draw_shape(&ribbon2, ribbons_layer);
2255+
2256+ ribbon3.params.position.x = t(dribbon, 0, 0, duration_const, EaseInEaseOut);;
2257+ draw_shape(&ribbon3, ribbons_layer);
2258+
2259+ ribbon4.params.position.y = t(-9 + dribbon, -9, 0, duration_const, EaseInEaseOut);;
2260+ draw_shape(&ribbon4, ribbons_layer);
2261+
2262+ ribbonLayer.anchor.y = 0;
2263+ ribbonLayer.position.y = 0;
2264+
2265+ change_ribbon(&ribbon1, ribbonLength);
2266+ change_ribbon(&ribbon2, ribbonLength);
2267+ change_ribbon(&ribbon3, ribbonLength);
2268+ change_ribbon(&ribbon4, ribbonLength);
2269+ } else {
2270+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2271+
2272+ float scale = t(1, 2, 0, duration_const, EaseIn);
2273+ powerful_mask.params.scale = xyzMake(scale, scale, 1);
2274+ draw_textured_shape(&powerful_mask, main_matrix, NORMAL_ONE);
2275+
2276+
2277+ ribbonLayer.rotation = free_scroll_offset + t_reversed(360, 360 + (45 + 30), 0, duration_const, EaseOut);
2278+ ribbonLayer.position.y = t_reversed(0, -8, 0, duration_const * 0.8f, EaseOut);
2279+ ribbonLayer.anchor.y = t_reversed(0, -9, 0, duration_const * 0.8f, EaseOut);
2280+ mat4x4_layer(ribbons_layer, ribbonLayer, 1.0f, 0);
2281+
2282+
2283+ float dur = duration_const * 0.5f;
2284+
2285+ free_knot1.params.position = xyzMake(11 / 2, -11 / 2 - 9, 0);
2286+ scale = t(0, 1, knot_delays[0], dur, EaseOut);
2287+ free_knot1.params.scale = xyzMake(scale, scale, 1);
2288+ draw_textured_shape(&free_knot1, ribbons_layer, NORMAL_ONE);
2289+
2290+ free_knot2.params.position = xyzMake(-11 / 2, -11 / 2 - 9, 0);
2291+ scale = t(0, 1, knot_delays[1], dur, EaseOut);
2292+ free_knot2.params.scale = xyzMake(-scale, scale, 1);
2293+ draw_textured_shape(&free_knot2, ribbons_layer, NORMAL_ONE);
2294+
2295+ free_knot3.params.position = xyzMake(-11 / 2, 11 / 2 - 9, 0);
2296+ scale = t(0, 1, knot_delays[2], dur, EaseOut);
2297+ free_knot3.params.scale = xyzMake(-scale, scale, 1);
2298+ draw_textured_shape(&free_knot3, ribbons_layer, NORMAL_ONE);
2299+
2300+ free_knot3.params.position = xyzMake(11 / 2, 11 / 2 - 9, 0);
2301+ scale = t(0, 1, knot_delays[3], dur, EaseOut);
2302+ free_knot3.params.scale = xyzMake(scale, scale, 1);
2303+ draw_textured_shape(&free_knot3, ribbons_layer, NORMAL_ONE);
2304+
2305+ float a1 = -25;
2306+ ribbon1.params.rotation = t_reversed(0, a1, 0, duration_const, EaseOut);
2307+ ribbon3.params.rotation = t_reversed(180, 180 + a1, 0, duration_const, EaseOut);
2308+
2309+ float a2 = 0;
2310+ ribbon2.params.rotation = t_reversed(90, 90 + a2, 0, duration_const, EaseOut);
2311+ ribbon4.params.rotation = t_reversed(270, 270 + a2, 0, duration_const, EaseOut);
2312+
2313+ float k = 0.9f;
2314+ ribbon2.params.alpha = ribbon4.params.alpha = t_reversed(1, 0, duration_const * 0.5f, duration_const * 0.1f, Linear);
2315+
2316+ int32_t ribbon_k = 0;
2317+ change_ribbon(&ribbon1, t_reversed(ribbonLength - 8.0f * ribbon_k, 0, 0, duration_const * 0.9f, Linear) - free_scroll_offset / 5.0f * (30 - 8 * ribbon_k));
2318+ ribbon1.params.position.x = 0;
2319+ draw_shape(&ribbon1, ribbons_layer);
2320+
2321+ change_ribbon(&ribbon2, t_reversed(ribbonLength - 10.0f * ribbon_k, 0, 0, duration_const * k, Linear) - free_scroll_offset / 5.0f * (22 - 10 * ribbon_k));
2322+ ribbon2.params.position.y = scroll_offset * 15 + -9;
2323+ draw_shape(&ribbon2, ribbons_layer);
2324+
2325+ change_ribbon(&ribbon3, t_reversed(ribbonLength, 0, 0, duration_const * 0.9f, Linear));
2326+ draw_shape(&ribbon3, ribbons_layer);
2327+
2328+ change_ribbon(&ribbon4, t_reversed(ribbonLength, 0, duration_const * 0.6f * 0, duration_const * k, Linear));
2329+ draw_shape(&ribbon4, ribbons_layer);
2330+
2331+ float infinityDurK = 1.3;
2332+
2333+ rglMaskDraw();
2334+
2335+ change_infinity(&infinity, t_reversed(0, 0.99, 0, duration_const * infinityDurK, EaseOut));
2336+
2337+ float rot1 = t(0, -50, duration_const * 0.5f, duration_const * 0.8f, EaseOut);
2338+ float rot2 = t(0, -30, duration_const * 0.8f, duration_const, EaseOut);
2339+ infinity.params.rotation = rot1;
2340+
2341+ infinity.params.position.z = 1;
2342+ infinity.params.position.y = -6;
2343+ infinity.params.anchor = xyzMake(52.75, 23.5f, 0);
2344+
2345+ float infinity_scale = 1.025;
2346+ infinity.params.scale = xyzMake(infinity_scale, infinity_scale, 1);
2347+ draw_shape(&infinity, main_matrix);
2348+ infinity.params.scale = xyzMake(-infinity_scale, -infinity_scale, 1);
2349+ draw_shape(&infinity, main_matrix);
2350+ rglNormalDrawThroughMask();
2351+ glEnable(GL_BLEND);
2352+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2353+ powerful_infinity_white.params.rotation = rot1 + rot2;
2354+ powerful_infinity_white.params.alpha = 1;
2355+ powerful_infinity_white.params.position.y = -6;
2356+ draw_textured_shape(&powerful_infinity_white, main_matrix, NORMAL_ONE);
2357+ }
2358+ } else if (current_page == 3) {
2359+ if (direct == 1) {
2360+ ribbon1.params.position.x = 0;
2361+ ribbon2.params.position.y = -9;
2362+ ribbon3.params.position.x = 0;
2363+ ribbon4.params.position.y = -9;
2364+ rglNormalDraw();
2365+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2366+ float scale = t(2, 1, 0, duration_const, EaseOut);
2367+ powerful_mask.params.scale = xyzMake(scale, scale, 1);
2368+ draw_textured_shape(&powerful_mask, main_matrix, NORMAL_ONE);
2369+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2370+ ribbonLayer.rotation = free_scroll_offset + t(360, 360 + (45 + 30), 0, duration_const * 0.8f, EaseOut);
2371+ ribbonLayer.position.y = t(0, -8, 0, duration_const * 0.8f, EaseOut);
2372+ ribbonLayer.anchor.y = t(0, -9, 0, duration_const * 0.8f, EaseOut);
2373+ mat4x4_layer(ribbons_layer, ribbonLayer, 1.0f, 0);
2374+
2375+ float a1 = -25;
2376+ ribbon1.params.rotation = t(0, a1, 0, duration_const, EaseOut);
2377+ ribbon3.params.rotation = t(180, 180 + a1, 0, duration_const, EaseOut);
2378+
2379+ float a2 = 0;
2380+ ribbon2.params.rotation = t(90, 90 + a2, 0, duration_const, EaseOut);
2381+ ribbon4.params.rotation = t(270, 270 + a2, 0, duration_const, EaseOut);
2382+
2383+ float k = 0.5f;
2384+ ribbon2.params.alpha = ribbon4.params.alpha = t(1, 0, duration_const * k * 0.5f, duration_const * k * 0.1f, Linear);
2385+
2386+ int32_t ribbon_k = time > duration_const ? 1 : 0;
2387+
2388+ change_ribbon(&ribbon1, t(ribbonLength - 8.0f * ribbon_k - free_scroll_offset / 5.0f * (30 - 8 * ribbon_k), 0, 0, duration_const * 0.9f, Linear));
2389+ draw_shape(&ribbon1, ribbons_layer);
2390+
2391+ change_ribbon(&ribbon2, t(ribbonLength - 10.0f * ribbon_k - free_scroll_offset / 5.0f * (22 - 10 * ribbon_k), 0, 0, duration_const * k, Linear));
2392+ draw_shape(&ribbon2, ribbons_layer);
2393+
2394+ change_ribbon(&ribbon3, t(ribbonLength, 0, 0, duration_const * 0.9f, Linear));
2395+ draw_shape(&ribbon3, ribbons_layer);
2396+
2397+ change_ribbon(&ribbon4, t(ribbonLength, 0, 0, duration_const * k, Linear));
2398+ draw_shape(&ribbon4, ribbons_layer);
2399+
2400+ float infinityDurK = 1.1f;
2401+ if (time < duration_const * infinityDurK - 0.025f) {
2402+ rglMaskDraw();
2403+
2404+ change_infinity(&infinity, t(0, 0.99f, 0, duration_const * infinityDurK, Linear));
2405+
2406+ infinity.params.rotation = 0;
2407+
2408+ infinity.params.position.z = 1;
2409+ infinity.params.position.y = -6;
2410+ infinity.params.anchor = xyzMake(52.75, 23.5f, 0);
2411+
2412+ float infinity_scale = 1.025f;
2413+ infinity.params.scale = xyzMake(infinity_scale, infinity_scale, 1);
2414+ draw_shape(&infinity, main_matrix);
2415+
2416+ infinity.params.scale = xyzMake(-infinity_scale, -infinity_scale, 1);
2417+ draw_shape(&infinity, main_matrix);
2418+
2419+ rglNormalDrawThroughMask();
2420+ glEnable(GL_BLEND);
2421+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2422+
2423+ powerful_infinity_white.params.rotation = 0;
2424+ powerful_infinity_white.params.alpha = 1;
2425+ powerful_infinity_white.params.position.y = -6;
2426+
2427+ draw_textured_shape(&powerful_infinity_white, main_matrix, NORMAL_ONE);
2428+ } else {
2429+ rglNormalDraw();
2430+
2431+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2432+ powerful_infinity.params.position.y = -6;
2433+ powerful_infinity.params.alpha = 1;
2434+ draw_textured_shape(&powerful_infinity, main_matrix, NORMAL_ONE);
2435+ }
2436+ } else {
2437+ rglNormalDraw();
2438+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2439+
2440+ float scale = t(2, 1, 0, duration_const, EaseOut);
2441+ powerful_mask.params.scale = xyzMake(scale, scale, 1);
2442+ draw_textured_shape(&powerful_mask, main_matrix, NORMAL_ONE);
2443+
2444+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2445+ scale = t(1, 2, 0, duration_const, EaseOut);
2446+ private_stroke.params.scale = xyzMake(scale, scale, 1);
2447+ private_stroke.params.rotation = t(0, -90, 0, duration_const, EaseOut);
2448+ private_stroke.params.alpha = t(1, 0, 0, duration_const, Linear);
2449+ private_stroke.params.position = xyzMake(0, t(0, -6, 0, duration_const, EaseOut), 0);
2450+ scale = t_reversed(63 * 2.0f, 63 * 2, 0, duration_const, EaseOut);
2451+ change_rounded_rectangle_stroked(&private_stroke, CSizeMake(scale, scale), scale / 2.0f);
2452+ draw_shape(&private_stroke, main_matrix);
2453+
2454+ float infinityDurK = 1.1;
2455+ if (time < duration_const * infinityDurK - 0.025f) {
2456+ rglMaskDraw();
2457+
2458+ change_infinity(&infinity, t(0, 0.99, 0, duration_const * infinityDurK, Linear));
2459+
2460+ infinity.params.rotation = 0;
2461+
2462+ infinity.params.position.z = 1;
2463+ infinity.params.position.y = -6;
2464+ infinity.params.anchor = xyzMake(52.75, 23.5f, 0);
2465+
2466+ float infinity_scale = 1.025;
2467+ infinity.params.scale = xyzMake(infinity_scale, infinity_scale, 1);
2468+ draw_shape(&infinity, main_matrix);
2469+
2470+ infinity.params.scale = xyzMake(-infinity_scale, -infinity_scale, 1);
2471+ draw_shape(&infinity, main_matrix);
2472+
2473+
2474+ rglNormalDrawThroughMask();
2475+ glEnable(GL_BLEND);
2476+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2477+
2478+ powerful_infinity_white.params.rotation = 0;
2479+ powerful_infinity_white.params.alpha = 1;
2480+ powerful_infinity_white.params.position.y = -6;
2481+
2482+ draw_textured_shape(&powerful_infinity_white, main_matrix, NORMAL_ONE);
2483+ } else {
2484+ rglNormalDraw();
2485+
2486+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2487+ powerful_infinity.params.position.y = -6;
2488+ powerful_infinity.params.alpha = 1;
2489+ draw_textured_shape(&powerful_infinity, main_matrix, NORMAL_ONE);
2490+ }
2491+ }
2492+ } else if (current_page == 4) {
2493+ private_stroke.params.scale = xyzMake(1, 1, 1);
2494+
2495+ private_scroll_offset = scroll_offset * 5;
2496+
2497+ rglNormalDraw();
2498+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2499+
2500+ scale = t(1, 2, 0, duration_const, EaseOut);
2501+ if (scale < 1.5) {
2502+ powerful_mask.params.scale = xyzMake(scale, scale, 1);
2503+ }
2504+
2505+ if (direct == 1) {
2506+ privateLayer.rotation = private_scroll_offset + t(-90, 0, 0, duration_const, EaseOut);
2507+ } else {
2508+ privateLayer.rotation = private_scroll_offset + t(90, 0, 0, duration_const * private_back_k, EaseOut);
2509+ }
2510+
2511+ mat4x4_layer(private_matrix, privateLayer, 1, 0);
2512+
2513+ if (direct == 1) {
2514+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2515+ powerful_infinity.params.position.y = -6;
2516+ powerful_infinity.params.alpha = t(1, 0, 0, duration_const * 0.25f, EaseIn);
2517+ draw_textured_shape(&powerful_infinity, main_matrix, NORMAL_ONE);
2518+ }
2519+
2520+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2521+
2522+ if (direct == 1) {
2523+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2524+ scale = t(0.5f, 1.0f, 0, duration_const, EaseOut);
2525+ private_door.params.scale = xyzMake(scale, scale, 1);
2526+ private_door.params.alpha = t(.0, 1.0f, 0, duration_const, EaseOut);
2527+ draw_textured_shape(&private_door, main_matrix, NORMAL_ONE);
2528+
2529+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2530+ private_stroke.params.rotation = private_scroll_offset;
2531+ private_stroke.params.alpha = 1;
2532+ private_stroke.params.position = xyzMake(0, 0, 0);
2533+ scale = t(63, 63 * 2, 0, duration_const, EaseOut);
2534+ change_rounded_rectangle_stroked(&private_stroke, CSizeMake(scale, scale), scale / 2.0f);
2535+ draw_shape(&private_stroke, main_matrix);
2536+
2537+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2538+ float k = .0;
2539+ scale = t(0.5f, 1.0f, duration_const * k, duration_const, EaseOut);
2540+ private_keyhole_body.params.rotation = private_scroll_offset;
2541+ private_keyhole_body.params.scale = xyzMake(scale, scale, 1);
2542+ private_keyhole_body.params.alpha = t(.0, 1.0f, duration_const * k, duration_const, EaseOut);
2543+ draw_safe(0, 1, t(0, 1, 0, duration_const, Linear));
2544+ } else {
2545+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2546+ scale = t(0.5f, 1.0f, 0, duration_const * private_back_k, EaseOut);
2547+ private_door.params.scale = xyzMake(scale, scale, 1);
2548+ private_door.params.alpha = t(.0, 1.0f, 0, duration_const * private_back_k, EaseOut);
2549+ draw_textured_shape(&private_door, main_matrix, NORMAL_ONE);
2550+
2551+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2552+ private_stroke.params.rotation = private_scroll_offset;
2553+ private_stroke.params.alpha = t(0, 1, 0, duration_const * 0.25f, Linear);
2554+ private_stroke.params.position = xyzMake(0, 0, 0);
2555+ scale = t(63, 63 * 2, 0, duration_const * private_back_k, EaseOut);
2556+ change_rounded_rectangle_stroked(&private_stroke, CSizeMake(scale, scale), scale / 2.0f);
2557+ draw_shape(&private_stroke, main_matrix);
2558+
2559+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2560+ scale = t(00.5f, 1.0, 0, duration_const * private_back_k, EaseOut);
2561+ private_keyhole_body.params.rotation = private_scroll_offset;
2562+ private_keyhole_body.params.scale = xyzMake(scale, scale, 1);
2563+ private_keyhole_body.params.alpha = t(.0, 1.0f, 0, duration_const * private_back_k, EaseOut);
2564+
2565+ if (time < duration_const * .4) {
2566+ cloud_cover.params.position.y = t_reversed(118 / 2 + 50, 118 / 2, duration_const * 0.8f * private_back_k, duration_const * private_back_k, EaseOut);
2567+ draw_shape(&cloud_cover, main_matrix);
2568+ }
2569+
2570+ draw_safe(0, t(0, 1, duration_const * private_back_k * 0.0f, duration_const * private_back_k, Linear), t(0, 1, 0, duration_const, Linear));
2571+ }
2572+ } else if (current_page == 5) {
2573+ float private_fade_k = 0.5f;
2574+
2575+ rglNormalDraw();
2576+
2577+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2578+ scale = 1;
2579+ private_door.params.scale = xyzMake(scale, scale, 1);
2580+ private_door.params.alpha = t(1, 0, 0, duration_const * private_fade_k * 0.5f, EaseOut);
2581+ draw_textured_shape(&private_door, main_matrix, NORMAL_ONE);
2582+
2583+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2584+ private_stroke.params.rotation = private_scroll_offset;
2585+ private_stroke.params.alpha = t(1, 0, 0, duration_const * private_fade_k * 0.5f, EaseOut);
2586+ scale = t(244 / 2, r2 * 2, 0, duration_const, EaseOut);
2587+ change_rounded_rectangle_stroked(&private_stroke, CSizeMake(scale, scale), scale / 2.0f);
2588+ draw_shape(&private_stroke, main_matrix);
2589+
2590+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2591+ scale = 1;
2592+ private_keyhole_body.params.rotation = private_scroll_offset;
2593+ private_keyhole_body.params.scale = xyzMake(scale, scale, 1);
2594+ private_keyhole_body.params.alpha = t(1.0, 0.0, 0, duration_const * private_fade_k * 0.5f, EaseOut);
2595+ privateLayer.rotation = private_scroll_offset;
2596+ mat4x4_layer(private_matrix, privateLayer, t(1, 0.9f, 0, duration_const * private_fade_k, EaseOut), 0);
2597+ cloud_cover.params.position.y = t(118 / 2 + 50, 118 / 2, 0, duration_const, EaseOut);
2598+ draw_shape(&cloud_cover, main_matrix);
2599+ }
2600+
2601+ prev_page = current_page;
2602+}
2603+
2604+JNIEXPORT void Java_org_telegram_messenger_Intro_setScrollOffset(JNIEnv *env, jclass class, float a_offset) {
2605+ scroll_offset = a_offset;
2606+}
2607+
2608+JNIEXPORT void Java_org_telegram_messenger_Intro_setPage(JNIEnv *env, jclass class, int32_t page) {
2609+ if (current_page == page) {
2610+ return;
2611+ } else {
2612+ prev_page = current_page;
2613+ current_page = page;
2614+ direct = current_page > prev_page ? 1 : 0;
2615+ date0 = date;
2616+ time = 0;
2617+ }
2618+}
2619+
2620+JNIEXPORT void Java_org_telegram_messenger_Intro_setDate(JNIEnv *env, jclass class, float a) {
2621+ date = a;
2622+}
2623+
2624+JNIEXPORT void Java_org_telegram_messenger_Intro_setIcTextures(JNIEnv *env, jclass class, GLuint a_ic_bubble_dot, GLuint a_ic_bubble, GLuint a_ic_cam_lens, GLuint a_ic_cam, GLuint a_ic_pencil, GLuint a_ic_pin, GLuint a_ic_smile_eye, GLuint a_ic_smile, GLuint a_ic_videocam) {
2625+ ic_bubble_dot_texture = a_ic_bubble_dot;
2626+ ic_bubble_texture = a_ic_bubble;
2627+ ic_cam_lens_texture = a_ic_cam_lens;
2628+ ic_cam_texture = a_ic_cam;
2629+ ic_pencil_texture = a_ic_pencil;
2630+ ic_pin_texture = a_ic_pin;
2631+ ic_smile_eye_texture = a_ic_smile_eye;
2632+ ic_smile_texture = a_ic_smile;
2633+ ic_videocam_texture = a_ic_videocam;
2634+}
2635+
2636+JNIEXPORT void Java_org_telegram_messenger_Intro_setTelegramTextures(JNIEnv *env, jclass class, GLuint a_telegram_sphere, GLuint a_telegram_plane, GLuint a_telegram_mask) {
2637+ telegram_sphere_texture = a_telegram_sphere;
2638+ telegram_plane_texture = a_telegram_plane;
2639+ telegram_mask_texture = a_telegram_mask;
2640+}
2641+
2642+JNIEXPORT void Java_org_telegram_messenger_Intro_setFastTextures(JNIEnv *env, jclass class, GLuint a_fast_body, GLuint a_fast_spiral, GLuint a_fast_arrow, GLuint a_fast_arrow_shadow) {
2643+ fast_spiral_texture = a_fast_spiral;
2644+ fast_body_texture = a_fast_body;
2645+ fast_arrow_shadow_texture = a_fast_arrow_shadow;
2646+ fast_arrow_texture = a_fast_arrow;
2647+}
2648+
2649+JNIEXPORT void Java_org_telegram_messenger_Intro_setFreeTextures(JNIEnv *env, jclass class, GLuint a_knot_up, GLuint a_knot_down) {
2650+ free_knot_up_texture = a_knot_up;
2651+ free_knot_down_texture = a_knot_down;
2652+}
2653+
2654+JNIEXPORT void Java_org_telegram_messenger_Intro_setPowerfulTextures(JNIEnv *env, jclass class, GLuint a_powerful_mask, GLuint a_powerful_star, GLuint a_powerful_infinity, GLuint a_powerful_infinity_white) {
2655+ powerful_mask_texture = a_powerful_mask;
2656+ powerful_star_texture = a_powerful_star;
2657+ powerful_infinity_texture = a_powerful_infinity;
2658+ powerful_infinity_white_texture = a_powerful_infinity_white;
2659+}
2660+
2661+JNIEXPORT void Java_org_telegram_messenger_Intro_setPrivateTextures(JNIEnv *env, jclass class, GLuint a_private_door, GLuint a_private_screw) {
2662+ private_door_texture = a_private_door;
2663+ private_screw_texture = a_private_screw;
2664+}
2665+
2666+JNIEXPORT void Java_org_telegram_messenger_Intro_onSurfaceCreated(JNIEnv *env, jclass class) {
2667+
2668+ ms0 = 0;
2669+ date = 1;
2670+ date0 = 0;
2671+ direct = 0;
2672+ i = 0;
2673+ current_page = 0;
2674+ prev_page = 0;
2675+ time = 0;
2676+ time_local = 0;
2677+ offset_y = 0;
2678+ ribbonLength = 86.5f;
2679+ starsFar = 500;
2680+ scroll_offset = 0;
2681+ calculated_speedometer_sin = 0;
2682+ ms0_anim = 0;
2683+ fps_anim = 0;
2684+ count_anim_fps = 0;
2685+ speedometer_scroll_offset = 0;
2686+ free_scroll_offset = 0;
2687+ private_scroll_offset = 0;
2688+ anim_pencil_start_time = 0;
2689+ anim_pencil_start_all_time = 0;
2690+ anim_pencil_start_all_end_time = 0;
2691+ anim_pencil_stage = 0;
2692+ anim_bubble_dots_stage = 0;
2693+ anim_bubble_dots_end_period = 0;
2694+ anim_videocam_start_time = 0;
2695+ anim_videocam_next_time = 0;
2696+ anim_videocam_duration = 0;
2697+ anim_videocam_angle = 0;
2698+ anim_videocam_old_angle = 0;
2699+ anim_cam_start_time = 0;
2700+ anim_cam_next_time = 0;
2701+ anim_cam_duration = 0;
2702+ anim_cam_angle = 0;
2703+ anim_cam_old_angle = 0;
2704+ qShot = 0;
2705+ anim_camshot_start_time = 0;
2706+ anim_camshot_duration = 0;
2707+ anim_smile_start_time1 = 0;
2708+ anim_smile_start_time2 = 0;
2709+ anim_smile_blink_start_time = 0;
2710+ anim_smile_blink_one = 0;
2711+ anim_smile_stage = 0;
2712+ scale = 0;
2713+ anim_pin_start_time = 0;
2714+ anim_pin_duration = 0;
2715+ anim_pencil_period = 0;
2716+ cloud_scroll_offset = 0;
2717+
2718+ setup_shaders();
2719+
2720+ vec4 start_button_col = {44 / 255.0f, 165 / 255.0f, 224 / 255.0f, 1.0f};
2721+ start_button = create_rounded_rectangle(CSizeMake(172, 44), 2, 3, start_button_col);
2722+ start_button.params.anchor.y = -22;
2723+
2724+ mask1 = create_rounded_rectangle(CSizeMake(60, 60), 0, 16, black_color);
2725+
2726+ telegram_sphere = create_textured_rectangle(CSizeMake(150, 150), telegram_sphere_texture);
2727+ telegram_mask = create_textured_rectangle(CSizeMake(200, 150), telegram_mask_texture);
2728+ telegram_plane = create_textured_rectangle(CSizeMake(82, 74), telegram_plane_texture);
2729+ telegram_plane.params.anchor = xyzMake(6, -5, 0);
2730+
2731+ fast_body = create_textured_rectangle(CSizeMake(148, 148), fast_body_texture);
2732+
2733+ fast_arrow_shadow = create_textured_rectangle(CSizeMake(164 / 2, 44 / 2), fast_arrow_shadow_texture);
2734+ fast_arrow_shadow.params.position.x = -1;
2735+ fast_arrow_shadow.params.position.y = 2;
2736+
2737+ fast_arrow = create_textured_rectangle(CSizeMake(164 / 2, 44 / 2), fast_arrow_texture);
2738+ fast_arrow.params.anchor.x = fast_arrow_shadow.params.anchor.x = -19;
2739+
2740+ int32_t ang = 180;
2741+ spiral = create_segmented_square(r1, D2R(35 + 1), D2R(35 + 1 - 10 + ang), fast_spiral_texture);
2742+
2743+ vec4 free_bg_color = {246 / 255.0f, 73 / 255.0f, 55 / 255.0f, 1};
2744+ free_bg = create_rectangle(CSizeMake(160 * 2, 160 * 2), free_bg_color);
2745+
2746+ free_knot1 = create_textured_rectangle(CSizeMake(138 / 3, 138 / 3), free_knot_up_texture);
2747+ free_knot1.params.anchor.x = -23 + 10;
2748+ free_knot1.params.anchor.y = 23 - 10;
2749+
2750+ free_knot2 = create_textured_rectangle(CSizeMake(138 / 3, 138 / 3), free_knot_up_texture);
2751+ free_knot2.params.anchor.x = -23 + 10;
2752+ free_knot2.params.anchor.y = 23 - 10;
2753+
2754+ free_knot3 = create_textured_rectangle(CSizeMake(150 / 3, 150 / 3), free_knot_down_texture);
2755+ free_knot3.params.anchor.x = -100 / 4.0f + 20 / 2.0f;
2756+ free_knot3.params.anchor.y = -100 / 4.0f + 20 / 2.0f;
2757+
2758+ free_knot4 = create_textured_rectangle(CSizeMake(150 / 3, 150 / 3), free_knot_down_texture);
2759+ free_knot4.params.anchor.x = -100 / 4.0f + 20 / 2.0f;
2760+ free_knot4.params.anchor.y = -100 / 4.0f + 20 / 2.0f;
2761+
2762+
2763+ ribbonLayer = default_layer_params();
2764+
2765+ ribbon1 = create_ribbon(ribbonLength, white_color);
2766+ ribbon1.params.layer_params = ribbonLayer;
2767+
2768+ ribbon2 = create_ribbon(ribbonLength, white_color);
2769+ ribbon2.params.rotation = 90;
2770+ ribbon2.params.layer_params = ribbonLayer;
2771+
2772+ ribbon3 = create_ribbon(ribbonLength, white_color);
2773+ ribbon3.params.rotation = 180;
2774+ ribbon3.params.layer_params = ribbonLayer;
2775+
2776+ ribbon4 = create_ribbon(ribbonLength, white_color);
2777+ ribbon4.params.rotation = 270;
2778+ ribbon4.params.layer_params = ribbonLayer;
2779+
2780+ ribbon1.params.position.y = ribbon2.params.position.y = ribbon3.params.position.y = ribbon4.params.position.y = -9;
2781+
2782+
2783+ ic_bubble_dot = create_textured_rectangle(CSizeMake(18 / 3, 18 / 3), ic_bubble_dot_texture);
2784+ ic_bubble = create_textured_rectangle(CSizeMake(102 / 3, 102 / 3), ic_bubble_texture);
2785+ ic_cam_lens = create_textured_rectangle(CSizeMake(36 / 3, 36 / 3), ic_cam_lens_texture);
2786+ ic_cam = create_textured_rectangle(CSizeMake(108 / 3, 96 / 3), ic_cam_texture);
2787+ ic_pencil = create_textured_rectangle(CSizeMake(86 / 3, 86 / 3), ic_pencil_texture);
2788+ ic_pin = create_textured_rectangle(CSizeMake(90 / 3, 120 / 3), ic_pin_texture);
2789+ ic_smile_eye = create_textured_rectangle(CSizeMake(18 / 3, 18 / 3), ic_smile_eye_texture);
2790+ ic_smile = create_textured_rectangle(CSizeMake(120 / 3, 120 / 3), ic_smile_texture);
2791+ ic_videocam = create_textured_rectangle(CSizeMake(144 / 3, 84 / 3), ic_videocam_texture);
2792+
2793+ ic_pin_layer = ic_cam_layer = ic_videocam_layer = ic_smile_layer = ic_bubble_layer = ic_pencil_layer = default_layer_params();
2794+
2795+ ic_pin_layer.anchor = xyzMake(0, 50 / 2, 0);
2796+ ic_pencil_layer.anchor = xyzMake(-30 / 2, 30 / 2, 0);
2797+
2798+ infinity = create_infinity(11.7, .0, 32, white_color);
2799+
2800+ vec4 powerful_bg_color = {47 / 255.f, 90 / 255.f, 131 / 255.f, 1};
2801+ powerful_bg = create_rectangle(CSizeMake(200, 200), powerful_bg_color);
2802+ powerful_mask = create_textured_rectangle(CSizeMake(200, 200), powerful_mask_texture);
2803+
2804+ powerful_infinity = create_textured_rectangle(CSizeMake(366 / 3, 180 / 3), powerful_infinity_texture);
2805+ powerful_infinity_white = create_textured_rectangle(CSizeMake(366 / 3, 180 / 3), powerful_infinity_white_texture);
2806+
2807+ float star_radius = 5.25;
2808+ star = create_textured_rectangle(CSizeMake(star_radius, star_radius), powerful_star_texture);
2809+ star.params.const_params.is_star = 1;
2810+ for (i = 0; i < starsCount; i++) {
2811+ stars[i] = default_params();
2812+ stars[i].position = star_create_position(-(i * 1500.0f) / starsCount);
2813+ }
2814+
2815+ privateLayer = default_layer_params();
2816+
2817+ vec4 private_bg_color = {200 / 255.f, 207 / 255.f, 212 / 255.f, 1};
2818+ private_bg = create_rectangle(CSizeMake(240, 240), private_bg_color);
2819+
2820+ private_door = create_textured_rectangle(CSizeMake(408 / 3, 408 / 3), private_door_texture);
2821+ private_keyhole_body = create_textured_rectangle(CSizeMake(216 / 3, 216 / 3), private_keyhole_body_texture);
2822+ private_screw = create_textured_rectangle(CSizeMake(30 / 3, 30 / 3), private_screw_texture);
2823+ private_stroke = create_rounded_rectangle_stroked(CSizeMake(244 / 2, 244 / 2), 21, 9, 16, white_color);
2824+
2825+ int32_t cloud_polygons_count = 64;
2826+ cloud_extra_mask1 = create_circle(1, cloud_polygons_count, black_color);
2827+ cloud_extra_mask2 = create_circle(1, cloud_polygons_count, black_color);
2828+ cloud_extra_mask3 = create_circle(1, cloud_polygons_count, black_color);
2829+ cloud_extra_mask4 = create_circle(1, cloud_polygons_count, black_color);
2830+
2831+ cloud_cover = create_rectangle(CSizeMake(240, 100), background_color);
2832+ cloud_cover.params.anchor.y = -50;
2833+
2834+ vec4 cloud_color = {42 / 255.0f, 180 / 255.0f, 247 / 255.0f, 1};
2835+ cloud_bg = create_rectangle(CSizeMake(160 * 2, 160 * 2), cloud_color);
2836+ surfaceCreated = 1;
2837+}
2838+
2839+JNIEXPORT void Java_org_telegram_messenger_Intro_onSurfaceChanged(JNIEnv *env, jclass class, int32_t a_width_px, int32_t a_height_px, float a_scale_factor, int32_t a1) {
2840+ glViewport(0, 0, a_width_px, a_height_px);
2841+ width = (int32_t) (a_width_px / a_scale_factor);
2842+ height = (int32_t) (a_height_px / a_scale_factor);
2843+ scale_factor = a_scale_factor;
2844+ mat4x4_plain(main_matrix, (int32_t) ((float) a_width_px / a_scale_factor), (int32_t) ((float) a_height_px / a_scale_factor));
2845+ offset_y = a1 * main_matrix[1][1];
2846+ set_y_offset_objects(offset_y);
2847+ y_offset_absolute = a1;
2848+ mat4x4_stars(stars_matrix, 45, 1, -1000, 0, (int32_t) ((float) a_width_px / a_scale_factor), (int32_t) ((float) a_height_px / a_scale_factor));
2849+}
TMessagesProj/jni/intro/IntroRenderer.hnew file+113
@@ -0,0 +1,113 @@
1+#ifndef TMESSAGES_INTRO_RENDERER_H
2+#define TMESSAGES_INTRO_RENDERER_H
3+
4+#include <GLES2/gl2.h>
5+
6+extern float scale_factor;
7+extern int width, height;
8+extern int y_offset_absolute;
9+
10+typedef enum {
11+ Default = 0,
12+ EaseIn = 1,
13+ EaseOut = 2,
14+ EaseInEaseOut = 3,
15+ Linear = 4,
16+ Sin = 5,
17+ EaseOutBounce,
18+ TIMING_NUM
19+} timing_type;
20+
21+typedef float vec2[2];
22+typedef float vec4[4];
23+typedef vec4 mat4x4[4];
24+
25+typedef enum {NORMAL, NORMAL_ONE, RED, BLUE, LIGHT_RED, LIGHT_BLUE} texture_program_type;
26+
27+typedef struct {
28+ float x;
29+ float y;
30+} CPoint;
31+
32+typedef struct {
33+ float width;
34+ float height;
35+} CSize;
36+
37+typedef struct {
38+ float x;
39+ float y;
40+ float z;
41+} xyz;
42+
43+typedef struct {
44+ GLuint program;
45+ GLuint a_position_location;
46+ GLuint a_texture_coordinates_location;
47+ GLint u_mvp_matrix_location;
48+ GLint u_texture_unit_location;
49+ GLint u_alpha_loaction;
50+} TextureProgram;
51+
52+typedef struct {
53+ GLuint program;
54+ GLuint a_position_location;
55+ GLint u_mvp_matrix_location;
56+ GLint u_color_location;
57+ GLint u_alpha_loaction;
58+} ColorProgram;
59+
60+typedef struct {
61+ float side_length;
62+ float start_angle;
63+ float end_angle;
64+ float angle;
65+ CSize size;
66+ float radius;
67+ float width;
68+} VarParams;
69+
70+typedef struct {
71+ GLsizeiptr datasize;
72+ int round_count;
73+ GLenum triangle_mode;
74+ int is_star;
75+} ConstParams;
76+
77+typedef struct {
78+ xyz anchor;
79+ xyz position;
80+ float rotation;
81+ xyz scale;
82+} LayerParams;
83+
84+typedef struct {
85+ xyz anchor;
86+ xyz position;
87+ float rotation;
88+ xyz scale;
89+ float alpha;
90+ VarParams var_params;
91+ ConstParams const_params;
92+ LayerParams layer_params;
93+} Params;
94+
95+typedef struct {
96+ vec4 color;
97+ CPoint *data;
98+ GLuint buffer;
99+ int num_points;
100+
101+ Params params;
102+} Shape;
103+
104+typedef struct {
105+ GLuint texture;
106+ CPoint *data;
107+ GLuint buffer;
108+ int num_points;
109+
110+ Params params;
111+} TexturedShape;
112+
113+#endif
TMessagesProj/jni/jni.cnew file+292
@@ -0,0 +1,292 @@
1+#include <stdio.h>
2+#include <string.h>
3+#include <jni.h>
4+#include <sys/types.h>
5+#include <inttypes.h>
6+#include <stdlib.h>
7+#include <openssl/aes.h>
8+#include <openssl/aes_ige.h>
9+#include <openssl/evp.h>
10+#include <unistd.h>
11+#include <dirent.h>
12+#include <sys/stat.h>
13+#include <time.h>
14+
15+int registerNativeTgNetFunctions(JavaVM *vm, JNIEnv *env);
16+int videoOnJNILoad(JavaVM *vm, JNIEnv *env);
17+int tgvoipOnJNILoad(JavaVM *vm, JNIEnv *env);
18+int ffmpegOnJNILoad(JavaVM *vm, JNIEnv *env);
19+
20+jint JNI_OnLoad(JavaVM *vm, void *reserved) {
21+ JNIEnv *env = 0;
22+ srand(time(NULL));
23+
24+ if ((*vm)->GetEnv(vm, (void **) &env, JNI_VERSION_1_6) != JNI_OK) {
25+ return -1;
26+ }
27+
28+ if (videoOnJNILoad(vm, env) != JNI_TRUE) {
29+ return -1;
30+ }
31+
32+ if (registerNativeTgNetFunctions(vm, env) != JNI_TRUE) {
33+ return -1;
34+ }
35+
36+ if (ffmpegOnJNILoad(vm, env) != JNI_TRUE) {
37+ return -1;
38+ }
39+
40+ tgvoipOnJNILoad(vm, env);
41+
42+ return JNI_VERSION_1_6;
43+}
44+
45+void JNI_OnUnload(JavaVM *vm, void *reserved) {
46+
47+}
48+
49+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesIgeEncryption(JNIEnv *env, jclass class, jobject buffer, jbyteArray key, jbyteArray iv, jboolean encrypt, jint offset, jint length) {
50+ jbyte *what = (*env)->GetDirectBufferAddress(env, buffer) + offset;
51+ unsigned char *keyBuff = (unsigned char *)(*env)->GetByteArrayElements(env, key, NULL);
52+ unsigned char *ivBuff = (unsigned char *)(*env)->GetByteArrayElements(env, iv, NULL);
53+
54+ AES_KEY akey;
55+ if (!encrypt) {
56+ AES_set_decrypt_key(keyBuff, 32 * 8, &akey);
57+ AES_ige_encrypt(what, what, length, &akey, ivBuff, AES_DECRYPT);
58+ } else {
59+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
60+ AES_ige_encrypt(what, what, length, &akey, ivBuff, AES_ENCRYPT);
61+ }
62+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
63+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, 0);
64+}
65+
66+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesIgeEncryptionByteArray(JNIEnv *env, jclass class, jbyteArray buffer, jbyteArray key, jbyteArray iv, jboolean encrypt, jint offset, jint length) {
67+ unsigned char *bufferBuff = (unsigned char *) (*env)->GetByteArrayElements(env, buffer, NULL);
68+ unsigned char *keyBuff = (unsigned char *) (*env)->GetByteArrayElements(env, key, NULL);
69+ unsigned char *ivBuff = (unsigned char *) (*env)->GetByteArrayElements(env, iv, NULL);
70+
71+ AES_KEY akey;
72+ if (!encrypt) {
73+ AES_set_decrypt_key(keyBuff, 32 * 8, &akey);
74+ AES_ige_encrypt(bufferBuff, bufferBuff, length, &akey, ivBuff, AES_DECRYPT);
75+ } else {
76+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
77+ AES_ige_encrypt(bufferBuff, bufferBuff, length, &akey, ivBuff, AES_ENCRYPT);
78+ }
79+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
80+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, 0);
81+ (*env)->ReleaseByteArrayElements(env, buffer, bufferBuff, 0);
82+}
83+
84+JNIEXPORT jint Java_org_telegram_messenger_Utilities_pbkdf2(JNIEnv *env, jclass class, jbyteArray password, jbyteArray salt, jbyteArray dst, jint iterations) {
85+ jbyte *passwordBuff = (*env)->GetByteArrayElements(env, password, NULL);
86+ size_t passwordLength = (size_t) (*env)->GetArrayLength(env, password);
87+ jbyte *saltBuff = (*env)->GetByteArrayElements(env, salt, NULL);
88+ size_t saltLength = (size_t) (*env)->GetArrayLength(env, salt);
89+ jbyte *dstBuff = (*env)->GetByteArrayElements(env, dst, NULL);
90+ size_t dstLength = (size_t) (*env)->GetArrayLength(env, dst);
91+
92+ int result = PKCS5_PBKDF2_HMAC((char *) passwordBuff, passwordLength, (uint8_t *) saltBuff, saltLength, (unsigned int) iterations, EVP_sha512(), dstLength, (uint8_t *) dstBuff);
93+
94+ (*env)->ReleaseByteArrayElements(env, password, passwordBuff, JNI_ABORT);
95+ (*env)->ReleaseByteArrayElements(env, salt, saltBuff, JNI_ABORT);
96+ (*env)->ReleaseByteArrayElements(env, dst, dstBuff, 0);
97+
98+ return result;
99+}
100+
101+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesCtrDecryption(JNIEnv *env, jclass class, jobject buffer, jbyteArray key, jbyteArray iv, jint offset, jint length) {
102+ jbyte *what = (*env)->GetDirectBufferAddress(env, buffer) + offset;
103+ unsigned char *keyBuff = (unsigned char *)(*env)->GetByteArrayElements(env, key, NULL);
104+ unsigned char *ivBuff = (unsigned char *)(*env)->GetByteArrayElements(env, iv, NULL);
105+
106+ AES_KEY akey;
107+ unsigned int num = 0;
108+ uint8_t count[16];
109+ memset(count, 0, 16);
110+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
111+ AES_ctr128_encrypt(what, what, length, &akey, ivBuff, count, &num);
112+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
113+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, JNI_ABORT);
114+}
115+
116+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesCtrDecryptionByteArray(JNIEnv *env, jclass class, jbyteArray buffer, jbyteArray key, jbyteArray iv, jint offset, jlong length, jint fileOffset) {
117+ unsigned char *bufferBuff = (unsigned char *) (*env)->GetByteArrayElements(env, buffer, NULL);
118+ unsigned char *keyBuff = (unsigned char *) (*env)->GetByteArrayElements(env, key, NULL);
119+ unsigned char *ivBuff = (unsigned char *) (*env)->GetByteArrayElements(env, iv, NULL);
120+
121+ AES_KEY akey;
122+ uint8_t count[16];
123+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
124+ unsigned int num = (unsigned int) (fileOffset % 16);
125+
126+ int o = fileOffset / 16;
127+ ivBuff[15] = (uint8_t) (o & 0xff);
128+ ivBuff[14] = (uint8_t) ((o >> 8) & 0xff);
129+ ivBuff[13] = (uint8_t) ((o >> 16) & 0xff);
130+ ivBuff[12] = (uint8_t) ((o >> 24) & 0xff);
131+ AES_encrypt(ivBuff, count, &akey);
132+
133+ o = (fileOffset + 15) / 16;
134+ ivBuff[15] = (uint8_t) (o & 0xff);
135+ ivBuff[14] = (uint8_t) ((o >> 8) & 0xff);
136+ ivBuff[13] = (uint8_t) ((o >> 16) & 0xff);
137+ ivBuff[12] = (uint8_t) ((o >> 24) & 0xff);
138+
139+ AES_ctr128_encrypt(bufferBuff + offset, bufferBuff + offset, length, &akey, ivBuff, count, &num);
140+
141+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
142+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, JNI_ABORT);
143+ (*env)->ReleaseByteArrayElements(env, buffer, bufferBuff, 0);
144+}
145+
146+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesCbcEncryptionByteArray(JNIEnv *env, jclass class, jbyteArray buffer, jbyteArray key, jbyteArray iv, jint offset, jint length, jint fileOffset, jint encrypt) {
147+ unsigned char *bufferBuff = (unsigned char *) (*env)->GetByteArrayElements(env, buffer, NULL);
148+ unsigned char *keyBuff = (unsigned char *) (*env)->GetByteArrayElements(env, key, NULL);
149+ unsigned char *ivBuff = (unsigned char *) (*env)->GetByteArrayElements(env, iv, NULL);
150+
151+ AES_KEY akey;
152+ if (encrypt) {
153+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
154+ } else {
155+ AES_set_decrypt_key(keyBuff, 32 * 8, &akey);
156+
157+ if (fileOffset != 0) {
158+ int o = (fileOffset + 15) / 16;
159+ ivBuff[15] = (uint8_t) (o & 0xff);
160+ ivBuff[14] = (uint8_t) ((o >> 8) & 0xff);
161+ ivBuff[13] = (uint8_t) ((o >> 16) & 0xff);
162+ ivBuff[12] = (uint8_t) ((o >> 24) & 0xff);
163+ }
164+ }
165+
166+ AES_cbc_encrypt(bufferBuff, bufferBuff, length, &akey, ivBuff, encrypt);
167+
168+ (*env)->ReleaseByteArrayElements(env, buffer, bufferBuff, 0);
169+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
170+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, JNI_ABORT);
171+}
172+
173+JNIEXPORT void Java_org_telegram_messenger_Utilities_aesCbcEncryption(JNIEnv *env, jclass class, jobject buffer, jbyteArray key, jbyteArray iv, jint offset, jint length, jint encrypt) {
174+ unsigned char *bufferBuff = (*env)->GetDirectBufferAddress(env, buffer) + offset;
175+ unsigned char *keyBuff = (unsigned char *) (*env)->GetByteArrayElements(env, key, NULL);
176+ unsigned char *ivBuff = (unsigned char *) (*env)->GetByteArrayElements(env, iv, NULL);
177+
178+ AES_KEY akey;
179+ if (encrypt) {
180+ AES_set_encrypt_key(keyBuff, 32 * 8, &akey);
181+ } else {
182+ AES_set_decrypt_key(keyBuff, 32 * 8, &akey);
183+ }
184+
185+ AES_cbc_encrypt(bufferBuff + offset, bufferBuff + offset, length, &akey, ivBuff, encrypt);
186+
187+ (*env)->ReleaseByteArrayElements(env, key, keyBuff, JNI_ABORT);
188+ (*env)->ReleaseByteArrayElements(env, iv, ivBuff, JNI_ABORT);
189+}
190+
191+#define LISTDIR_DOCTYPE_ALL 0
192+#define LISTDIR_DOCTYPE_OTHER_THAN_MUSIC 1
193+#define LISTDIR_DOCTYPE_MUSIC 2
194+
195+#define LISTDIR_DOCTYPE2_EMOJI 3
196+#define LISTDIR_DOCTYPE2_TEMP 4
197+#define LISTDIR_DOCTYPE2_OTHER 5
198+
199+int64_t listdir(const char *fileName, int32_t mode, int32_t docType, int64_t time, uint8_t subdirs) {
200+ int64_t value = 0;
201+ DIR *dir;
202+ struct stat attrib;
203+ if ((dir = opendir(fileName)) != NULL) {
204+ char buff[4096];
205+ struct dirent *entry;
206+ while ((entry = readdir(dir)) != NULL) {
207+ char *name = entry->d_name;
208+ size_t len = strlen(name);
209+ if (name[0] == '.') {
210+ continue;
211+ }
212+ if (docType > 0 && len > 4) {
213+ int isMusic = (
214+ name[len - 4] == '.' && (
215+ ((name[len - 3] == 'm' || name[len - 3] == 'M') && (name[len - 2] == 'p' || name[len - 2] == 'P') && (name[len - 1] == '3')) || // mp3
216+ ((name[len - 3] == 'm' || name[len - 3] == 'M') && (name[len - 2] == '4') && (name[len - 1] == 'a' || name[len - 1] == 'A')) // m4a
217+ ));
218+ int isEmoji = (
219+ name[len - 4] == '.' && (name[len - 3] == 't' || name[len - 3] == 'T') && (name[len - 2] == 'g' || name[len - 2] == 'G') && (name[len - 1] == 's' || name[len - 1] == 'S') || // tgs
220+ len > 5 && name[len - 5] == '.' && (name[len - 4] == 'w' || name[len - 4] == 'W') && (name[len - 3] == 'e' || name[len - 3] == 'E') && (name[len - 2] == 'b' || name[len - 2] == 'B') && (name[len - 1] == 'm' || name[len - 1] == 'M') // webm
221+ );
222+ int isTemp = (
223+ name[len - 4] == '.' && (name[len - 3] == 't' || name[len - 3] == 'T') && (name[len - 2] == 'm' || name[len - 2] == 'M') && (name[len - 1] == 'p' || name[len - 1] == 'P') || // tmp
224+ len > 5 && name[len - 5] == '.' && (name[len - 4] == 't' || name[len - 4] == 'T') && (name[len - 3] == 'e' || name[len - 3] == 'E') && (name[len - 2] == 'm' || name[len - 2] == 'M') && (name[len - 1] == 'p' || name[len - 1] == 'P') || // temp
225+ len > 8 && name[len - 8] == '.' && (name[len - 7] == 'p' || name[len - 7] == 'P') && (name[len - 6] == 'r' || name[len - 6] == 'R') && (name[len - 5] == 'e' || name[len - 5] == 'E') && (name[len - 4] == 'l' || name[len - 4] == 'L') && (name[len - 3] == 'o' || name[len - 3] == 'O') && (name[len - 2] == 'a' || name[len - 2] == 'A') && (name[len - 1] == 'd' || name[len - 1] == 'D') // preload
226+ );
227+ if (
228+ isMusic && docType == LISTDIR_DOCTYPE_OTHER_THAN_MUSIC ||
229+ !isMusic && docType == LISTDIR_DOCTYPE_MUSIC ||
230+ isEmoji && docType == LISTDIR_DOCTYPE2_OTHER ||
231+ !isEmoji && docType == LISTDIR_DOCTYPE2_EMOJI ||
232+ isTemp && docType == LISTDIR_DOCTYPE2_OTHER ||
233+ !isTemp && docType == LISTDIR_DOCTYPE2_TEMP
234+ ) {
235+ continue;
236+ }
237+ }
238+ strncpy(buff, fileName, 4095);
239+ strncat(buff, "/", 4095);
240+ strncat(buff, entry->d_name, 4095);
241+ if (entry->d_type == DT_DIR) {
242+ if (subdirs) {
243+ value += listdir(buff, mode, docType, time, subdirs);
244+ }
245+ } else {
246+ int rc = stat(buff, &attrib);
247+ if (mode == 0) {
248+ value += rc == 0 ? attrib.st_size : 0;
249+ } else if (mode == 1) {
250+ if (attrib.st_atim.tv_sec != 0) {
251+ if (attrib.st_atim.tv_sec < time) {
252+ remove(buff);
253+ }
254+ } else {
255+ if (attrib.st_mtim.tv_sec < time) {
256+ remove(buff);
257+ }
258+ }
259+ }
260+ }
261+ }
262+ closedir(dir);
263+ }
264+ return value;
265+}
266+
267+JNIEXPORT jlong Java_org_telegram_messenger_Utilities_getDirSize(JNIEnv *env, jclass class, jstring path, jint docType, jboolean subdirs) {
268+ const char *fileName = (*env)->GetStringUTFChars(env, path, NULL);
269+ jlong value = listdir(fileName, 0, docType, 0, subdirs);
270+ (*env)->ReleaseStringUTFChars(env, path, fileName);
271+ return value;
272+}
273+
274+JNIEXPORT jlong Java_org_telegram_messenger_Utilities_getLastUsageFileTime(JNIEnv *env, jclass class, jstring path) {
275+ const char *fileName = (*env)->GetStringUTFChars(env, path, NULL);
276+ struct stat attrib;
277+ stat(fileName, &attrib);
278+ jlong value;
279+ if (attrib.st_atim.tv_sec > 316000000) {
280+ value = attrib.st_atim.tv_sec;
281+ } else {
282+ value = attrib.st_mtim.tv_sec;
283+ }
284+ (*env)->ReleaseStringUTFChars(env, path, fileName);
285+ return value;
286+}
287+
288+JNIEXPORT void Java_org_telegram_messenger_Utilities_clearDir(JNIEnv *env, jclass class, jstring path, jint docType, jlong time, jboolean subdirs) {
289+ const char *fileName = (*env)->GetStringUTFChars(env, path, NULL);
290+ listdir(fileName, 1, docType, time, subdirs);
291+ (*env)->ReleaseStringUTFChars(env, path, fileName);
292+}
TMessagesProj/jni/libwebpnew file+1

Submodule changed.

TMessagesProj/jni/lottie.cppnew file+260
@@ -0,0 +1,260 @@
1+#include <jni.h>
2+#include <android/bitmap.h>
3+#include <tlottie.h>
4+#include <zlib.h>
5+
6+#include <algorithm>
7+#include <cstdint>
8+#include <cstdio>
9+#include <string>
10+#include <vector>
11+
12+namespace {
13+
14+constexpr float kDefaultCurveTolerance = 0.125f;
15+
16+struct LayerColorReplacements {
17+ // The C ABI borrows these UTF-8 buffers during tlottie_new_with_options.
18+ std::vector<std::string> prefixes;
19+ std::vector<TLottieLayerColorReplacement> values;
20+};
21+
22+static uint32_t toTlottieFitz(jint modifier) {
23+ switch (modifier) {
24+ case 12: return TLOTTIE_FITZ_TYPE_12;
25+ case 3: return TLOTTIE_FITZ_TYPE_3;
26+ case 4: return TLOTTIE_FITZ_TYPE_4;
27+ case 5: return TLOTTIE_FITZ_TYPE_5;
28+ case 6: return TLOTTIE_FITZ_TYPE_6;
29+ default: return TLOTTIE_FITZ_NONE;
30+ }
31+}
32+
33+static std::string normalizePrefix(std::string prefix) {
34+ if (prefix.size() >= 3 && prefix.compare(prefix.size() - 3, 3, ".**") == 0) {
35+ prefix.resize(prefix.size() - 3);
36+ } else if (prefix.size() >= 2 && prefix.compare(prefix.size() - 2, 2, "**") == 0) {
37+ prefix.resize(prefix.size() - 2);
38+ }
39+ return prefix;
40+}
41+
42+static LayerColorReplacements readLayerColors(JNIEnv *env, jobjectArray names, jintArray colors) {
43+ LayerColorReplacements result;
44+ if (names == nullptr || colors == nullptr) {
45+ return result;
46+ }
47+ const jsize count = std::min(env->GetArrayLength(names), env->GetArrayLength(colors));
48+ jint *values = env->GetIntArrayElements(colors, nullptr);
49+ if (values == nullptr) {
50+ return result;
51+ }
52+ // Reserving is important: moving an SSO string later could invalidate the
53+ // pointer already stored in the corresponding C replacement descriptor.
54+ result.prefixes.reserve(static_cast<size_t>(count));
55+ result.values.reserve(static_cast<size_t>(count));
56+ for (jsize i = 0; i < count; ++i) {
57+ auto name = static_cast<jstring>(env->GetObjectArrayElement(names, i));
58+ if (name != nullptr) {
59+ const char *chars = env->GetStringUTFChars(name, nullptr);
60+ if (chars != nullptr) {
61+ result.prefixes.push_back(normalizePrefix(chars));
62+ const std::string &prefix = result.prefixes.back();
63+ result.values.push_back({reinterpret_cast<const uint8_t *>(prefix.data()),
64+ prefix.size(), static_cast<uint32_t>(values[i])});
65+ env->ReleaseStringUTFChars(name, chars);
66+ }
67+ env->DeleteLocalRef(name);
68+ }
69+ }
70+ env->ReleaseIntArrayElements(colors, values, JNI_ABORT);
71+ return result;
72+}
73+
74+static std::vector<TLottieColorReplacement> readColorReplacements(JNIEnv *env, jintArray replacements) {
75+ std::vector<TLottieColorReplacement> result;
76+ if (replacements == nullptr) {
77+ return result;
78+ }
79+ jint *values = env->GetIntArrayElements(replacements, nullptr);
80+ if (values == nullptr) {
81+ return result;
82+ }
83+ const jsize count = env->GetArrayLength(replacements);
84+ result.reserve(static_cast<size_t>(count / 2));
85+ for (jsize i = 0; i + 1 < count; i += 2) {
86+ // Android colors are 0xAARRGGBB. tlottie replacement matching is RGB-only;
87+ // keep the standard RRGGBB byte order and discard the Java alpha byte.
88+ result.push_back({static_cast<uint32_t>(values[i]) & 0x00ffffffu,
89+ static_cast<uint32_t>(values[i + 1]) & 0x00ffffffu});
90+ }
91+ env->ReleaseIntArrayElements(replacements, values, JNI_ABORT);
92+ return result;
93+}
94+
95+static bool readFile(const char *path, std::string &out) {
96+ gzFile file = gzopen(path, "rb");
97+ if (file == nullptr) {
98+ return false;
99+ }
100+ char buffer[16 * 1024];
101+ int read;
102+ while ((read = gzread(file, buffer, sizeof(buffer))) > 0) {
103+ out.append(buffer, static_cast<size_t>(read));
104+ }
105+ const bool ok = read == 0;
106+ gzclose(file);
107+ return ok && !out.empty();
108+}
109+
110+static TLottieInstance *createInstance(JNIEnv *env, const char *json, size_t jsonLength,
111+ jobjectArray layerNames, jintArray layerValues,
112+ jintArray colorReplacement, jint fitzModifier) {
113+ const LayerColorReplacements layerReplacements =
114+ readLayerColors(env, layerNames, layerValues);
115+ const std::vector<TLottieColorReplacement> colorReplacements =
116+ readColorReplacements(env, colorReplacement);
117+ return tlottie_new_with_options(
118+ reinterpret_cast<const uint8_t *>(json), jsonLength, toTlottieFitz(fitzModifier),
119+ layerReplacements.values.data(), layerReplacements.values.size(),
120+ colorReplacements.data(), colorReplacements.size(), TlottieChannelOrder::TLOTTIE_CHANNEL_RGBA);
121+}
122+
123+static bool writeMetadata(JNIEnv *env, jintArray data, TLottieInstance *instance) {
124+ const uint32_t frameCount = tlottie_frame_count(instance);
125+ const int32_t fps = static_cast<int32_t>(tlottie_frame_rate(instance));
126+ if (fps <= 0 || fps > 60 || frameCount > 600) {
127+ return false;
128+ }
129+ if (data == nullptr || env->GetArrayLength(data) < 3) {
130+ return true;
131+ }
132+ const jint values[3] = {static_cast<jint>(frameCount), fps, 0};
133+ env->SetIntArrayRegion(data, 0, 3, values);
134+ return true;
135+}
136+
137+} // namespace
138+
139+extern "C" {
140+
141+JNIEXPORT jlong JNICALL Java_org_telegram_ui_Components_RLottieNative_nCreate(
142+ JNIEnv *env, jclass, jstring src, jstring json, jintArray data,
143+ jintArray colorReplacement, jint fitzModifier,
144+ jobjectArray layerNames, jintArray layerColors) {
145+ std::string input;
146+ if (json != nullptr) {
147+ const char *chars = env->GetStringUTFChars(json, nullptr);
148+ if (chars != nullptr) {
149+ input.assign(chars, static_cast<size_t>(env->GetStringUTFLength(json)));
150+ env->ReleaseStringUTFChars(json, chars);
151+ }
152+ } else if (src != nullptr) {
153+ const char *path = env->GetStringUTFChars(src, nullptr);
154+ if (path != nullptr) {
155+ readFile(path, input);
156+ env->ReleaseStringUTFChars(src, path);
157+ }
158+ }
159+ TLottieInstance *instance = input.empty() ? nullptr : createInstance(env, input.data(), input.size(),
160+ layerNames, layerColors, colorReplacement, fitzModifier);
161+ if (instance == nullptr) return 0;
162+ if (!writeMetadata(env, data, instance)) {
163+ tlottie_drop(instance);
164+ return 0;
165+ }
166+ return reinterpret_cast<jlong>(instance);
167+}
168+
169+JNIEXPORT jlong JNICALL Java_org_telegram_ui_Components_RLottieNative_nCreateWithJson(
170+ JNIEnv *env, jclass, jstring json, jintArray data, jintArray colorReplacement,
171+ jobjectArray layerNames, jintArray layerColors) {
172+ if (json == nullptr) return 0;
173+ const char *chars = env->GetStringUTFChars(json, nullptr);
174+ if (chars == nullptr) return 0;
175+ TLottieInstance *instance = createInstance(env, chars, static_cast<size_t>(env->GetStringUTFLength(json)),
176+ layerNames, layerColors, colorReplacement, 0);
177+ env->ReleaseStringUTFChars(json, chars);
178+ if (instance == nullptr) return 0;
179+ if (!writeMetadata(env, data, instance)) {
180+ tlottie_drop(instance);
181+ return 0;
182+ }
183+ return reinterpret_cast<jlong>(instance);
184+}
185+
186+JNIEXPORT void JNICALL Java_org_telegram_ui_Components_RLottieNative_nDestroy(JNIEnv *, jclass, jlong ptr) {
187+ tlottie_drop(reinterpret_cast<TLottieInstance *>(ptr));
188+}
189+
190+JNIEXPORT jint JNICALL Java_org_telegram_ui_Components_RLottieNative_nGetFrame(
191+ JNIEnv *env, jclass, jlong ptr, jint frame, jobject bitmap, jboolean clear) {
192+ if (ptr == 0 || bitmap == nullptr) return 0;
193+ auto *instance = reinterpret_cast<TLottieInstance *>(ptr);
194+ AndroidBitmapInfo bitmapInfo;
195+ if (AndroidBitmap_getInfo(env, bitmap, &bitmapInfo) != ANDROID_BITMAP_RESULT_SUCCESS ||
196+ (bitmapInfo.format != ANDROID_BITMAP_FORMAT_RGBA_8888 &&
197+ bitmapInfo.format != ANDROID_BITMAP_FORMAT_A_8)) return 0;
198+ void *rawPixels = nullptr;
199+ if (AndroidBitmap_lockPixels(env, bitmap, &rawPixels) < 0) return 0;
200+ const size_t count = static_cast<size_t>(bitmapInfo.width) * bitmapInfo.height;
201+ int32_t result;
202+ if (bitmapInfo.format == ANDROID_BITMAP_FORMAT_A_8) {
203+ std::vector<uint8_t> temporary;
204+ auto *alpha = static_cast<uint8_t *>(rawPixels);
205+ if (bitmapInfo.stride != bitmapInfo.width) {
206+ temporary.resize(count);
207+ alpha = temporary.data();
208+ if (!clear) {
209+ const auto *source = static_cast<const uint8_t *>(rawPixels);
210+ for (uint32_t y = 0; y < bitmapInfo.height; ++y) {
211+ std::copy_n(source + static_cast<size_t>(y) * bitmapInfo.stride,
212+ bitmapInfo.width,
213+ alpha + static_cast<size_t>(y) * bitmapInfo.width);
214+ }
215+ }
216+ }
217+ result = tlottie_render_alpha8_with_options(instance, static_cast<float>(frame),
218+ bitmapInfo.width, bitmapInfo.height, alpha, count, 1,
219+ kDefaultCurveTolerance, clear ? 1 : 0);
220+ if (result == TLOTTIE_OK && !temporary.empty()) {
221+ auto *destination = static_cast<uint8_t *>(rawPixels);
222+ for (uint32_t y = 0; y < bitmapInfo.height; ++y) {
223+ std::copy_n(alpha + static_cast<size_t>(y) * bitmapInfo.width, bitmapInfo.width,
224+ destination + static_cast<size_t>(y) * bitmapInfo.stride);
225+ }
226+ }
227+ } else {
228+ std::vector<uint32_t> temporary;
229+ auto *pixels = static_cast<uint32_t *>(rawPixels);
230+ if (bitmapInfo.stride != bitmapInfo.width * sizeof(uint32_t)) {
231+ temporary.resize(count);
232+ pixels = temporary.data();
233+ if (!clear) {
234+ const auto *source = static_cast<const uint8_t *>(rawPixels);
235+ for (uint32_t y = 0; y < bitmapInfo.height; ++y) {
236+ std::copy_n(
237+ reinterpret_cast<const uint32_t *>(
238+ source + static_cast<size_t>(y) * bitmapInfo.stride),
239+ bitmapInfo.width,
240+ pixels + static_cast<size_t>(y) * bitmapInfo.width);
241+ }
242+ }
243+ }
244+ result = tlottie_render_with_options(instance, static_cast<float>(frame),
245+ bitmapInfo.width, bitmapInfo.height, pixels, count, 1,
246+ kDefaultCurveTolerance, clear ? 1 : 0);
247+ if (result == TLOTTIE_OK) {
248+ if (!temporary.empty()) {
249+ auto *destination = static_cast<uint8_t *>(rawPixels);
250+ for (uint32_t y = 0; y < bitmapInfo.height; ++y) {
251+ std::copy_n(pixels + static_cast<size_t>(y) * bitmapInfo.width, bitmapInfo.width,
252+ reinterpret_cast<uint32_t *>(destination + static_cast<size_t>(y) * bitmapInfo.stride));
253+ }
254+ }
255+ }
256+ }
257+ AndroidBitmap_unlockPixels(env, bitmap);
258+ return result == TLOTTIE_OK ? frame : -5;
259+}
260+}
TMessagesProj/jni/openssl/aes_ige.cnew file+324
@@ -0,0 +1,324 @@
1+/* crypto/aes/aes_ige.c -*- mode:C; c-file-style: "eay" -*- */
2+/* ====================================================================
3+ * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
4+ *
5+ * Redistribution and use in source and binary forms, with or without
6+ * modification, are permitted provided that the following conditions
7+ * are met:
8+ *
9+ * 1. Redistributions of source code must retain the above copyright
10+ * notice, this list of conditions and the following disclaimer.
11+ *
12+ * 2. Redistributions in binary form must reproduce the above copyright
13+ * notice, this list of conditions and the following disclaimer in
14+ * the documentation and/or other materials provided with the
15+ * distribution.
16+ *
17+ * 3. All advertising materials mentioning features or use of this
18+ * software must display the following acknowledgment:
19+ * "This product includes software developed by the OpenSSL Project
20+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21+ *
22+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23+ * endorse or promote products derived from this software without
24+ * prior written permission. For written permission, please contact
25+ * openssl-core@openssl.org.
26+ *
27+ * 5. Products derived from this software may not be called "OpenSSL"
28+ * nor may "OpenSSL" appear in their names without prior written
29+ * permission of the OpenSSL Project.
30+ *
31+ * 6. Redistributions of any form whatsoever must retain the following
32+ * acknowledgment:
33+ * "This product includes software developed by the OpenSSL Project
34+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35+ *
36+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
40+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47+ * OF THE POSSIBILITY OF SUCH DAMAGE.
48+ * ====================================================================
49+ *
50+ */
51+
52+#include <openssl/aes.h>
53+#include <openssl/aes_ige.h>
54+#include <assert.h>
55+#include <memory.h>
56+#include <string.h>
57+
58+#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long))
59+typedef struct {
60+ unsigned long data[N_WORDS];
61+} aes_block_t;
62+
63+/* XXX: probably some better way to do this */
64+#if defined(__i386__) || defined(__x86_64__)
65+#define UNALIGNED_MEMOPS_ARE_FAST 1
66+#else
67+#define UNALIGNED_MEMOPS_ARE_FAST 0
68+#endif
69+
70+#if UNALIGNED_MEMOPS_ARE_FAST
71+#define load_block(d, s) (d) = *(const aes_block_t *)(s)
72+#define store_block(d, s) *(aes_block_t *)(d) = (s)
73+#else
74+#define load_block(d, s) memcpy((d).data, (s), AES_BLOCK_SIZE)
75+#define store_block(d, s) memcpy((d), (s).data, AES_BLOCK_SIZE)
76+#endif
77+
78+/* N.B. The IV for this mode is _twice_ the block size */
79+
80+void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
81+ size_t length, const AES_KEY *key,
82+ unsigned char *ivec, const int enc)
83+ {
84+ size_t n;
85+ size_t len = length;
86+
87+ assert(in && out && key && ivec);
88+ assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
89+ assert((length%AES_BLOCK_SIZE) == 0);
90+
91+ len = length / AES_BLOCK_SIZE;
92+
93+ if (AES_ENCRYPT == enc)
94+ {
95+ if (in != out &&
96+ (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
97+ {
98+ aes_block_t *ivp = (aes_block_t *)ivec;
99+ aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
100+
101+ while (len)
102+ {
103+ aes_block_t *inp = (aes_block_t *)in;
104+ aes_block_t *outp = (aes_block_t *)out;
105+
106+ for(n=0 ; n < N_WORDS; ++n)
107+ outp->data[n] = inp->data[n] ^ ivp->data[n];
108+ AES_encrypt((unsigned char *)outp->data, (unsigned char *)outp->data, key);
109+ for(n=0 ; n < N_WORDS; ++n)
110+ outp->data[n] ^= iv2p->data[n];
111+ ivp = outp;
112+ iv2p = inp;
113+ --len;
114+ in += AES_BLOCK_SIZE;
115+ out += AES_BLOCK_SIZE;
116+ }
117+ memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
118+ memcpy(ivec + AES_BLOCK_SIZE, iv2p->data, AES_BLOCK_SIZE);
119+ }
120+ else
121+ {
122+ aes_block_t tmp, tmp2;
123+ aes_block_t iv;
124+ aes_block_t iv2;
125+
126+ load_block(iv, ivec);
127+ load_block(iv2, ivec + AES_BLOCK_SIZE);
128+
129+ while (len)
130+ {
131+ load_block(tmp, in);
132+ for(n=0 ; n < N_WORDS; ++n)
133+ tmp2.data[n] = tmp.data[n] ^ iv.data[n];
134+ AES_encrypt((unsigned char *)tmp2.data, (unsigned char *)tmp2.data, key);
135+ for(n=0 ; n < N_WORDS; ++n)
136+ tmp2.data[n] ^= iv2.data[n];
137+ store_block(out, tmp2);
138+ iv = tmp2;
139+ iv2 = tmp;
140+ --len;
141+ in += AES_BLOCK_SIZE;
142+ out += AES_BLOCK_SIZE;
143+ }
144+ memcpy(ivec, iv.data, AES_BLOCK_SIZE);
145+ memcpy(ivec + AES_BLOCK_SIZE, iv2.data, AES_BLOCK_SIZE);
146+ }
147+ }
148+ else
149+ {
150+ if (in != out &&
151+ (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
152+ {
153+ aes_block_t *ivp = (aes_block_t *)ivec;
154+ aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
155+
156+ while (len)
157+ {
158+ aes_block_t tmp;
159+ aes_block_t *inp = (aes_block_t *)in;
160+ aes_block_t *outp = (aes_block_t *)out;
161+
162+ for(n=0 ; n < N_WORDS; ++n)
163+ tmp.data[n] = inp->data[n] ^ iv2p->data[n];
164+ AES_decrypt((unsigned char *)tmp.data, (unsigned char *)outp->data, key);
165+ for(n=0 ; n < N_WORDS; ++n)
166+ outp->data[n] ^= ivp->data[n];
167+ ivp = inp;
168+ iv2p = outp;
169+ --len;
170+ in += AES_BLOCK_SIZE;
171+ out += AES_BLOCK_SIZE;
172+ }
173+ memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
174+ memcpy(ivec + AES_BLOCK_SIZE, iv2p->data, AES_BLOCK_SIZE);
175+ }
176+ else
177+ {
178+ aes_block_t tmp, tmp2;
179+ aes_block_t iv;
180+ aes_block_t iv2;
181+
182+ load_block(iv, ivec);
183+ load_block(iv2, ivec + AES_BLOCK_SIZE);
184+
185+ while (len)
186+ {
187+ load_block(tmp, in);
188+ tmp2 = tmp;
189+ for(n=0 ; n < N_WORDS; ++n)
190+ tmp.data[n] ^= iv2.data[n];
191+ AES_decrypt((unsigned char *)tmp.data, (unsigned char *)tmp.data, key);
192+ for(n=0 ; n < N_WORDS; ++n)
193+ tmp.data[n] ^= iv.data[n];
194+ store_block(out, tmp);
195+ iv = tmp2;
196+ iv2 = tmp;
197+ --len;
198+ in += AES_BLOCK_SIZE;
199+ out += AES_BLOCK_SIZE;
200+ }
201+ memcpy(ivec, iv.data, AES_BLOCK_SIZE);
202+ memcpy(ivec + AES_BLOCK_SIZE, iv2.data, AES_BLOCK_SIZE);
203+ }
204+ }
205+ }
206+
207+/*
208+ * Note that its effectively impossible to do biIGE in anything other
209+ * than a single pass, so no provision is made for chaining.
210+ */
211+
212+/* N.B. The IV for this mode is _four times_ the block size */
213+
214+void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
215+ size_t length, const AES_KEY *key,
216+ const AES_KEY *key2, const unsigned char *ivec,
217+ const int enc)
218+ {
219+ size_t n;
220+ size_t len = length;
221+ unsigned char tmp[AES_BLOCK_SIZE];
222+ unsigned char tmp2[AES_BLOCK_SIZE];
223+ unsigned char tmp3[AES_BLOCK_SIZE];
224+ unsigned char prev[AES_BLOCK_SIZE];
225+ const unsigned char *iv;
226+ const unsigned char *iv2;
227+
228+ assert(in && out && key && ivec);
229+ assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
230+ assert((length%AES_BLOCK_SIZE) == 0);
231+
232+ if (AES_ENCRYPT == enc)
233+ {
234+ /* XXX: Do a separate case for when in != out (strictly should
235+ check for overlap, too) */
236+
237+ /* First the forward pass */
238+ iv = ivec;
239+ iv2 = ivec + AES_BLOCK_SIZE;
240+ while (len >= AES_BLOCK_SIZE)
241+ {
242+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
243+ out[n] = in[n] ^ iv[n];
244+ AES_encrypt(out, out, key);
245+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
246+ out[n] ^= iv2[n];
247+ iv = out;
248+ memcpy(prev, in, AES_BLOCK_SIZE);
249+ iv2 = prev;
250+ len -= AES_BLOCK_SIZE;
251+ in += AES_BLOCK_SIZE;
252+ out += AES_BLOCK_SIZE;
253+ }
254+
255+ /* And now backwards */
256+ iv = ivec + AES_BLOCK_SIZE*2;
257+ iv2 = ivec + AES_BLOCK_SIZE*3;
258+ len = length;
259+ while(len >= AES_BLOCK_SIZE)
260+ {
261+ out -= AES_BLOCK_SIZE;
262+ /* XXX: reduce copies by alternating between buffers */
263+ memcpy(tmp, out, AES_BLOCK_SIZE);
264+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
265+ out[n] ^= iv[n];
266+ /* hexdump(stdout, "out ^ iv", out, AES_BLOCK_SIZE); */
267+ AES_encrypt(out, out, key);
268+ /* hexdump(stdout,"enc", out, AES_BLOCK_SIZE); */
269+ /* hexdump(stdout,"iv2", iv2, AES_BLOCK_SIZE); */
270+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
271+ out[n] ^= iv2[n];
272+ /* hexdump(stdout,"out", out, AES_BLOCK_SIZE); */
273+ iv = out;
274+ memcpy(prev, tmp, AES_BLOCK_SIZE);
275+ iv2 = prev;
276+ len -= AES_BLOCK_SIZE;
277+ }
278+ }
279+ else
280+ {
281+ /* First backwards */
282+ iv = ivec + AES_BLOCK_SIZE*2;
283+ iv2 = ivec + AES_BLOCK_SIZE*3;
284+ in += length;
285+ out += length;
286+ while (len >= AES_BLOCK_SIZE)
287+ {
288+ in -= AES_BLOCK_SIZE;
289+ out -= AES_BLOCK_SIZE;
290+ memcpy(tmp, in, AES_BLOCK_SIZE);
291+ memcpy(tmp2, in, AES_BLOCK_SIZE);
292+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
293+ tmp[n] ^= iv2[n];
294+ AES_decrypt(tmp, out, key);
295+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
296+ out[n] ^= iv[n];
297+ memcpy(tmp3, tmp2, AES_BLOCK_SIZE);
298+ iv = tmp3;
299+ iv2 = out;
300+ len -= AES_BLOCK_SIZE;
301+ }
302+
303+ /* And now forwards */
304+ iv = ivec;
305+ iv2 = ivec + AES_BLOCK_SIZE;
306+ len = length;
307+ while (len >= AES_BLOCK_SIZE)
308+ {
309+ memcpy(tmp, out, AES_BLOCK_SIZE);
310+ memcpy(tmp2, out, AES_BLOCK_SIZE);
311+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
312+ tmp[n] ^= iv2[n];
313+ AES_decrypt(tmp, out, key);
314+ for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
315+ out[n] ^= iv[n];
316+ memcpy(tmp3, tmp2, AES_BLOCK_SIZE);
317+ iv = tmp3;
318+ iv2 = out;
319+ len -= AES_BLOCK_SIZE;
320+ in += AES_BLOCK_SIZE;
321+ out += AES_BLOCK_SIZE;
322+ }
323+ }
324+ }
TMessagesProj/jni/openssl/include/openssl/aes_ige.hnew file+37
@@ -0,0 +1,37 @@
1+// Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
2+//
3+// Licensed under the Apache License, Version 2.0 (the "License");
4+// you may not use this file except in compliance with the License.
5+// You may obtain a copy of the License at
6+//
7+// https://www.apache.org/licenses/LICENSE-2.0
8+//
9+// Unless required by applicable law or agreed to in writing, software
10+// distributed under the License is distributed on an "AS IS" BASIS,
11+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+// See the License for the specific language governing permissions and
13+// limitations under the License.
14+
15+#ifndef OPENSSL_HEADER_AES_IGE_H
16+#define OPENSSL_HEADER_AES_IGE_H
17+
18+#include <openssl/base.h> // IWYU pragma: export
19+#include <openssl/aes.h>
20+
21+#if defined(__cplusplus)
22+extern "C" {
23+#endif
24+
25+OPENSSL_EXPORT void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
26+ size_t length, const AES_KEY *key,
27+ unsigned char *ivec, const int enc);
28+OPENSSL_EXPORT void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
29+ size_t length, const AES_KEY *key,
30+ const AES_KEY *key2, const unsigned char *ivec,
31+ const int enc);
32+
33+#if defined(__cplusplus)
34+} // extern C
35+#endif
36+
37+#endif // OPENSSL_HEADER_AES_IGE_H
TMessagesProj/jni/prebuild/build_all.shnew file+48
@@ -0,0 +1,48 @@
1+#!/usr/bin/env bash
2+# Clean all prebuilt archives and build every bundled static library in order.
3+
4+set -Eeuo pipefail
5+
6+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+source "$SCRIPT_DIR/common.sh"
8+
9+print_common_config
10+
11+BUILD_ENV_FILE="$SCRIPT_DIR/build_env.txt"
12+write_build_environment "$BUILD_ENV_FILE"
13+
14+echo
15+echo "==> Removing previous outputs"
16+echo " $LIB_DIR"
17+echo " $INCLUDE_DIR"
18+echo " $PKGCONFIG_DIR"
19+rm -rf "$LIB_DIR" "$INCLUDE_DIR" "$PKGCONFIG_DIR"
20+mkdir -p "$LIB_DIR" "$INCLUDE_DIR" "$PKGCONFIG_DIR"
21+
22+build_scripts=(
23+ build_boringssl.sh
24+ build_openh264.sh
25+ build_opus.sh
26+ build_libvpx.sh
27+ build_dav1d.sh
28+ build_ffmpeg.sh
29+ build_tlottie.sh
30+ build_tdlib.sh
31+ build_wamr.sh
32+)
33+
34+for script in "${build_scripts[@]}"; do
35+ echo
36+ echo "============================================================"
37+ echo "==> Running $script"
38+ echo "============================================================"
39+ "$SCRIPT_DIR/$script"
40+done
41+
42+echo
43+echo "All prebuilt libraries were built successfully into: $LIB_DIR"
44+echo "Generated/ABI-dependent headers: $INCLUDE_DIR"
45+echo "Build environment: $BUILD_ENV_FILE"
46+if [[ -d "$PKGCONFIG_DIR" ]]; then
47+ echo "WARNING: temporary pkg-config directory still exists: $PKGCONFIG_DIR" >&2
48+fi
TMessagesProj/jni/prebuild/build_boringssl.shnew file+71
@@ -0,0 +1,71 @@
1+#!/usr/bin/env bash
2+# Compile static BoringSSL libraries for Android into lib/<abi>/.
3+
4+set -Eeuo pipefail
5+
6+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+# shellcheck source=common.sh
8+source "$SCRIPT_DIR/common.sh"
9+
10+BORINGSSL_SRC="${BORINGSSL_SOURCE_DIR:-$SCRIPT_DIR/../third_party/boringssl}"
11+BUILD_DIR="$SCRIPT_DIR/build/boringssl"
12+
13+require_ndk
14+require_cmake_ninja
15+
16+[[ -f "$BORINGSSL_SRC/CMakeLists.txt" ]] || {
17+ echo "ERROR: BoringSSL source tree not found: $BORINGSSL_SRC" >&2
18+ echo " Set BORINGSSL_SOURCE_DIR if the source tree is elsewhere." >&2
19+ exit 1
20+}
21+
22+echo "Using $("$CMAKE_BIN" --version | head -n1)"
23+echo "Using Ninja: $NINJA_BIN"
24+echo "Using NDK: $ANDROID_NDK_HOME"
25+
26+rm -rf "$BUILD_DIR"
27+mkdir -p "$BUILD_DIR"
28+
29+for abi in $ABIS; do
30+ abi_build_dir="$BUILD_DIR/$abi"
31+ abi_out="$(abi_output_dir "$abi")"
32+
33+ echo
34+ echo "==> Configuring BoringSSL for $abi (API=$API)"
35+
36+ rm -rf "$abi_build_dir"
37+
38+ "$CMAKE_BIN" \
39+ -S "$BORINGSSL_SRC" \
40+ -B "$abi_build_dir" \
41+ -GNinja \
42+ -DCMAKE_MAKE_PROGRAM="$NINJA_BIN" \
43+ -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
44+ -DANDROID_ABI="$abi" \
45+ -DANDROID_PLATFORM="android-$API" \
46+ -DCMAKE_BUILD_TYPE=Release \
47+ -DCMAKE_C_FLAGS="$CMAKE_REPRO_C_FLAGS" \
48+ -DCMAKE_CXX_FLAGS="$CMAKE_REPRO_CXX_FLAGS" \
49+ -DBUILD_SHARED_LIBS=OFF
50+
51+ echo "==> Building BoringSSL for $abi"
52+ "$CMAKE_BIN" --build "$abi_build_dir" --target crypto ssl --parallel "$JOBS"
53+
54+ crypto_lib="$abi_build_dir/crypto/libcrypto.a"
55+ ssl_lib="$abi_build_dir/ssl/libssl.a"
56+
57+ [[ -f "$crypto_lib" ]] || { echo "ERROR: libcrypto.a was not produced for $abi" >&2; exit 1; }
58+ [[ -f "$ssl_lib" ]] || { echo "ERROR: libssl.a was not produced for $abi" >&2; exit 1; }
59+
60+ copy_archive "$crypto_lib" "$abi_out/libcrypto.a"
61+ copy_archive "$ssl_lib" "$abi_out/libssl.a"
62+ finalize_archive "$abi_out/libcrypto.a"
63+ finalize_archive "$abi_out/libssl.a"
64+ echo "==> $abi_out/libcrypto.a"
65+ echo "==> $abi_out/libssl.a"
66+done
67+
68+rm -rf "$BUILD_DIR"
69+
70+echo
71+echo "BoringSSL static build completed."
TMessagesProj/jni/prebuild/build_dav1d.shnew file+312
@@ -0,0 +1,312 @@
1+#!/usr/bin/env bash
2+# Build static dav1d for Android with the exact configuration previously used
3+# by build_ffmpeg_libvpx_dav1d_android_ndk27_merged.sh.
4+#
5+# Output:
6+# jni/prebuild/lib/<ABI>/libdav1d.a
7+#
8+# Public source headers remain canonical. Only generated or ABI-dependent
9+# installed headers are copied to jni/prebuild/include/<ABI>/ as an overlay.
10+
11+set -Eeuo pipefail
12+
13+export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-946684800}"
14+export TZ=UTC
15+export LC_ALL=C
16+export LANG=C
17+export PYTHONHASHSEED=0
18+export ZERO_AR_DATE=1
19+umask 022
20+
21+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
22+source "$SCRIPT_DIR/common.sh"
23+
24+# Keep build flags byte-for-byte equivalent to the merged media script instead
25+# of inheriting common.sh's generic CFLAGS/CXXFLAGS.
26+unset CFLAGS CXXFLAGS
27+
28+require_ndk
29+require_command meson
30+require_command python3
31+
32+# Meson determines the object ordering passed to the static archiver. Different
33+# Meson versions can therefore produce byte-different libdav1d.a archives even
34+# when every .o is identical. Set MESON_VERSION to enforce the same version on
35+# all build hosts, e.g. MESON_VERSION=1.9.0.
36+MESON_VERSION="${MESON_VERSION:-}"
37+DETECTED_MESON_VERSION="$(meson --version | head -n 1)"
38+if [[ -n "$MESON_VERSION" && "$DETECTED_MESON_VERSION" != "$MESON_VERSION" ]]; then
39+ echo "ERROR: Meson $MESON_VERSION is required for reproducible dav1d builds" >&2
40+ echo " Found: $DETECTED_MESON_VERSION ($(command -v meson))" >&2
41+ exit 1
42+fi
43+require_command pkg-config
44+[[ -n "$NINJA_BIN" && -x "$NINJA_BIN" ]] || {
45+ echo "ERROR: ninja is required" >&2
46+ exit 1
47+}
48+
49+PROJECT_ROOT="$JNI_DIR"
50+DAV1D_SOURCE_DIR="${DAV1D_SOURCE_DIR:-$JNI_DIR/third_party/dav1d}"
51+BUILD_ROOT="${DAV1D_BUILD_ROOT:-$SCRIPT_DIR/build/dav1d}"
52+WORK_DIR="$BUILD_ROOT/work"
53+INSTALL_DIR="$BUILD_ROOT/install"
54+
55+UNWIND_TABLES="${UNWIND_TABLES:-0}"
56+FRAME_POINTERS="${FRAME_POINTERS:-0}"
57+FUNCTION_SECTIONS="${FUNCTION_SECTIONS:-1}"
58+ADDRSIG="${ADDRSIG:-1}"
59+HIDDEN_VISIBILITY="${HIDDEN_VISIBILITY:-0}"
60+
61+error() { echo "ERROR: $*" >&2; }
62+
63+require_bool() {
64+ local name="$1" value="$2"
65+ if [[ "$value" != "0" && "$value" != "1" ]]; then
66+ error "$name must be 0 or 1, got: $value"
67+ exit 1
68+ fi
69+}
70+for name in UNWIND_TABLES FRAME_POINTERS FUNCTION_SECTIONS ADDRSIG HIDDEN_VISIBILITY; do
71+ require_bool "$name" "${!name}"
72+done
73+
74+[[ -f "$DAV1D_SOURCE_DIR/meson.build" ]] || {
75+ error "dav1d sources were not found in: $DAV1D_SOURCE_DIR"
76+ exit 1
77+}
78+DAV1D_SOURCE_DIR="$(cd "$DAV1D_SOURCE_DIR" && pwd)"
79+
80+check_x86_assembler() {
81+ local abi="$1"
82+ if [[ "$abi" == "x86" || "$abi" == "x86_64" ]]; then
83+ if ! command -v nasm >/dev/null 2>&1 && ! command -v yasm >/dev/null 2>&1; then
84+ error "NASM or Yasm is required for $abi."
85+ return 1
86+ fi
87+ fi
88+}
89+
90+COMMON_CFLAGS_BASE=""
91+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$PROJECT_ROOT=/src"
92+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$PROJECT_ROOT=/src"
93+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$PROJECT_ROOT=/src"
94+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$BUILD_ROOT=/build"
95+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$BUILD_ROOT=/build"
96+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$BUILD_ROOT=/build"
97+COMMON_CFLAGS_BASE+=" -fdebug-compilation-dir=."
98+[[ "$FUNCTION_SECTIONS" == "1" ]] && COMMON_CFLAGS_BASE+=" -ffunction-sections -fdata-sections"
99+[[ "$HIDDEN_VISIBILITY" == "1" ]] && COMMON_CFLAGS_BASE+=" -fvisibility=hidden"
100+[[ "$UNWIND_TABLES" == "0" ]] && COMMON_CFLAGS_BASE+=" -fno-asynchronous-unwind-tables -fno-unwind-tables"
101+if [[ "$FRAME_POINTERS" == "1" ]]; then
102+ COMMON_CFLAGS_BASE+=" -fno-omit-frame-pointer"
103+else
104+ COMMON_CFLAGS_BASE+=" -fomit-frame-pointer"
105+fi
106+COMMON_CFLAGS_BASE+=" -g0 -fno-ident"
107+COMMON_CFLAGS_BASE="${COMMON_CFLAGS_BASE# }"
108+COMMON_CFLAGS="$COMMON_CFLAGS_BASE"
109+[[ "$ADDRSIG" == "1" ]] && COMMON_CFLAGS+=" -faddrsig"
110+
111+write_dav1d_cross_file() {
112+ local abi="$1" file="$2"
113+ local clang_target cpu_family cpu extra_c_args cc shared_c_args flag
114+
115+ case "$abi" in
116+ armeabi-v7a)
117+ clang_target="armv7a-linux-androideabi${API}"
118+ cpu_family="arm"
119+ cpu="armv7-a"
120+ extra_c_args="'-march=armv7-a', '-mthumb', '-mfpu=neon', '-mfloat-abi=softfp'"
121+ ;;
122+ arm64-v8a)
123+ clang_target="aarch64-linux-android${API}"
124+ cpu_family="aarch64"
125+ cpu="armv8-a"
126+ extra_c_args="'-march=armv8-a'"
127+ ;;
128+ x86)
129+ clang_target="i686-linux-android${API}"
130+ cpu_family="x86"
131+ cpu="i686"
132+ extra_c_args="'-march=i686', '-msse3', '-mfpmath=sse'"
133+ ;;
134+ x86_64)
135+ clang_target="x86_64-linux-android${API}"
136+ cpu_family="x86_64"
137+ cpu="x86_64"
138+ extra_c_args="'-march=x86-64', '-msse4.1'"
139+ ;;
140+ *) error "Unsupported ABI for dav1d: $abi"; return 1 ;;
141+ esac
142+
143+ cc="$NDK_TOOLCHAIN/bin/${clang_target}-clang"
144+ [[ -x "$cc" ]] || { error "dav1d compiler was not found: $cc"; return 1; }
145+
146+ shared_c_args=""
147+ for flag in $COMMON_CFLAGS; do
148+ shared_c_args+=", '$flag'"
149+ done
150+
151+ cat > "$file" <<CROSS
152+[binaries]
153+c = '$cc'
154+ar = '$NDK_TOOLCHAIN/bin/llvm-ar'
155+strip = '$NDK_TOOLCHAIN/bin/llvm-strip'
156+ranlib = '$NDK_TOOLCHAIN/bin/llvm-ranlib'
157+nm = '$NDK_TOOLCHAIN/bin/llvm-nm'
158+objcopy = '$NDK_TOOLCHAIN/bin/llvm-objcopy'
159+pkg-config = 'pkg-config'
160+
161+[host_machine]
162+system = 'android'
163+cpu_family = '$cpu_family'
164+cpu = '$cpu'
165+endian = 'little'
166+
167+[properties]
168+needs_exe_wrapper = true
169+
170+[built-in options]
171+c_args = [$extra_c_args, '-fPIC'$shared_c_args]
172+c_link_args = ['-Wl,--gc-sections']
173+CROSS
174+}
175+
176+verify_dav1d_archive() {
177+ local abi="$1" library="$2"
178+ [[ -f "$library" ]] || { error "Missing dav1d archive for $abi: $library"; return 1; }
179+ if ! "$NDK_TOOLCHAIN/bin/llvm-nm" -g --defined-only "$library" \
180+ | awk '$NF == "dav1d_open" { found = 1 } END { exit found ? 0 : 1 }';
181+ then
182+ error "dav1d_open was not found in $library"
183+ return 1
184+ fi
185+}
186+
187+
188+copy_generated_header_overlay() {
189+ local abi="$1"
190+ local installed_root="$2/include"
191+ local destination_root
192+ destination_root="$(abi_include_dir "$abi")"
193+
194+ local installed relative source destination copied=0
195+ while IFS= read -r -d '' installed; do
196+ relative="${installed#$installed_root/}"
197+ source="$DAV1D_SOURCE_DIR/include/$relative"
198+ if [[ -f "$source" ]] && cmp -s "$source" "$installed"; then
199+ continue
200+ fi
201+ destination="$destination_root/$relative"
202+ mkdir -p "$(dirname "$destination")"
203+ cp -f "$installed" "$destination"
204+ chmod 0644 "$destination"
205+ copied=$((copied + 1))
206+ echo "==> generated/ABI header: $destination"
207+ done < <(find "$installed_root/dav1d" -type f -name '*.h' -print0)
208+
209+ if [[ "$copied" == "0" ]]; then
210+ echo "==> dav1d $abi: no generated/ABI-dependent public headers"
211+ fi
212+}
213+
214+
215+install_pkgconfig_metadata() {
216+ local abi="$1" prefix="$2"
217+ local source_pc="$prefix/lib/pkgconfig/dav1d.pc"
218+ local destination_dir destination overlay source_include
219+ destination_dir="$(abi_pkgconfig_dir "$abi")"
220+ destination="$destination_dir/dav1d.pc"
221+ overlay="$(abi_include_dir "$abi")"
222+ source_include="$DAV1D_SOURCE_DIR/include"
223+
224+ [[ -f "$source_pc" ]] || { error "Missing dav1d pkg-config file: $source_pc"; return 1; }
225+ mkdir -p "$destination_dir"
226+ awk -v libdir="$(abi_output_dir "$abi")" -v includedir="$source_include" -v overlay="$overlay" '
227+ /^prefix=/ { print "prefix=" libdir; next }
228+ /^libdir=/ { print "libdir=" libdir; next }
229+ /^includedir=/ { print "includedir=" includedir; next }
230+ /^Cflags:/ { print "Cflags: -I" overlay " -I" includedir; next }
231+ { print }
232+ ' "$source_pc" > "$destination"
233+ chmod 0644 "$destination"
234+ echo "==> $destination"
235+}
236+
237+build_dav1d_for_abi() {
238+ local abi="$1" prefix build_dir cross_file destination
239+ check_x86_assembler "$abi"
240+
241+ prefix="$INSTALL_DIR/$abi"
242+ build_dir="$WORK_DIR/$abi"
243+ cross_file="$WORK_DIR/crossfiles/$abi.ini"
244+
245+ rm -rf "$build_dir" "$prefix"
246+ mkdir -p "$build_dir" "$prefix" "$(dirname "$cross_file")"
247+ write_dav1d_cross_file "$abi" "$cross_file"
248+
249+ echo
250+ echo "========== dav1d: $abi, API $API =========="
251+
252+ # Make SDK-provided Ninja visible to Meson on macOS without changing the
253+ # selected backend or any compilation parameter.
254+ local meson_path="$(dirname "$NINJA_BIN"):$PATH"
255+ if ! env PATH="$meson_path" meson setup "$build_dir" "$DAV1D_SOURCE_DIR" \
256+ --cross-file "$cross_file" \
257+ --prefix "$prefix" \
258+ --libdir lib \
259+ --buildtype release \
260+ --default-library static \
261+ -Db_ndebug=true \
262+ -Db_lto=false \
263+ -Denable_tools=false \
264+ -Denable_examples=false \
265+ -Denable_tests=false \
266+ -Denable_docs=false \
267+ -Denable_asm=true;
268+ then
269+ error "dav1d configure failed for $abi."
270+ return 1
271+ fi
272+
273+ if ! "$NINJA_BIN" -C "$build_dir" -j "$JOBS" 2>&1 | tee "$build_dir/build.log"; then
274+ error "dav1d build failed for $abi. Log: $build_dir/build.log"
275+ return 1
276+ fi
277+ if ! "$NINJA_BIN" -C "$build_dir" install 2>&1 | tee "$build_dir/install.log"; then
278+ error "dav1d install failed for $abi. Log: $build_dir/install.log"
279+ return 1
280+ fi
281+
282+ verify_dav1d_archive "$abi" "$prefix/lib/libdav1d.a"
283+ copy_generated_header_overlay "$abi" "$prefix"
284+ install_pkgconfig_metadata "$abi" "$prefix"
285+ [[ -f "$prefix/include/dav1d/dav1d.h" ]] || { error "Missing dav1d headers for $abi"; return 1; }
286+ [[ -f "$prefix/lib/pkgconfig/dav1d.pc" ]] || { error "Missing dav1d.pc for $abi"; return 1; }
287+
288+ destination="$(abi_output_dir "$abi")/libdav1d.a"
289+ copy_archive "$prefix/lib/libdav1d.a" "$destination"
290+ echo "==> $destination"
291+}
292+
293+for abi in $ABIS; do rm -rf "$(abi_include_dir "$abi")/dav1d"; done
294+
295+print_common_config
296+echo "dav1d source: $DAV1D_SOURCE_DIR"
297+echo "Meson: $DETECTED_MESON_VERSION ($(command -v meson))"
298+if [[ -z "$MESON_VERSION" ]]; then
299+ echo "WARNING: MESON_VERSION is not pinned; use the same Meson version on every host for byte-reproducible libdav1d.a"
300+fi
301+echo "dav1d build root: $BUILD_ROOT"
302+echo "dav1d flags: $COMMON_CFLAGS"
303+
304+rm -rf "$BUILD_ROOT"
305+mkdir -p "$WORK_DIR" "$INSTALL_DIR"
306+for abi in $ABIS; do
307+ build_dav1d_for_abi "$abi"
308+done
309+rm -rf "$BUILD_ROOT"
310+
311+echo
312+echo "dav1d static build completed."
TMessagesProj/jni/prebuild/build_ffmpeg.shnew file+468
@@ -0,0 +1,468 @@
1+#!/usr/bin/env bash
2+# Build static FFmpeg libraries for Android using prebuilt libvpx, dav1d and Opus.
3+# Configuration is kept equivalent to build_ffmpeg_libvpx_dav1d_android_ndk27_merged.sh.
4+#
5+# Inputs:
6+# jni/prebuild/lib/<ABI>/libvpx.a
7+# jni/prebuild/lib/<ABI>/libdav1d.a
8+# jni/prebuild/lib/<ABI>/libopus.a
9+# jni/prebuild/pkgconfig/<ABI>/{vpx,dav1d}.pc
10+# source headers from jni/third_party/{libvpx,dav1d,xiph/opus,ffmpeg}
11+# generated/ABI headers overlay from jni/prebuild/include/<ABI>
12+#
13+# Output:
14+# jni/prebuild/lib/<ABI>/libavcodec.a
15+# jni/prebuild/lib/<ABI>/libavformat.a
16+# jni/prebuild/lib/<ABI>/libavutil.a
17+# jni/prebuild/lib/<ABI>/libswscale.a
18+# jni/prebuild/lib/<ABI>/libswresample.a
19+# generated/ABI-dependent FFmpeg public headers under jni/prebuild/include/<ABI>/
20+
21+set -Eeuo pipefail
22+
23+export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-946684800}"
24+export TZ=UTC
25+export LC_ALL=C
26+export LANG=C
27+export PYTHONHASHSEED=0
28+export ZERO_AR_DATE=1
29+umask 022
30+
31+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
32+source "$SCRIPT_DIR/common.sh"
33+
34+# The merged media build supplied its own exact flags to FFmpeg configure.
35+unset CFLAGS CXXFLAGS
36+
37+require_ndk
38+require_command make
39+require_command pkg-config
40+
41+PROJECT_ROOT="$JNI_DIR"
42+FFMPEG_SOURCE_DIR="${FFMPEG_SOURCE_DIR:-$JNI_DIR/third_party/ffmpeg}"
43+LIBVPX_SOURCE_DIR="${LIBVPX_SOURCE_DIR:-$JNI_DIR/third_party/libvpx}"
44+DAV1D_SOURCE_DIR="${DAV1D_SOURCE_DIR:-$JNI_DIR/third_party/dav1d}"
45+OPUS_SOURCE_DIR="${OPUS_SOURCE_DIR:-$JNI_DIR/third_party/xiph/opus}"
46+BUILD_ROOT="${FFMPEG_BUILD_ROOT:-$SCRIPT_DIR/build/ffmpeg}"
47+WORK_DIR="$BUILD_ROOT/work"
48+INSTALL_DIR="$BUILD_ROOT/install"
49+
50+ENABLE_SMALL="${ENABLE_SMALL:-1}"
51+FFMPEG_OPTFLAGS="${FFMPEG_OPTFLAGS:-}"
52+FFMPEG_LIBVPX_VP8="${FFMPEG_LIBVPX_VP8:-1}"
53+FFMPEG_PARSERS="${FFMPEG_PARSERS:-1}"
54+
55+UNWIND_TABLES="${UNWIND_TABLES:-0}"
56+FRAME_POINTERS="${FRAME_POINTERS:-0}"
57+FUNCTION_SECTIONS="${FUNCTION_SECTIONS:-1}"
58+ADDRSIG="${ADDRSIG:-1}"
59+HIDDEN_VISIBILITY="${HIDDEN_VISIBILITY:-0}"
60+
61+FFMPEG_RUNTIME_CPUDETECT="${FFMPEG_RUNTIME_CPUDETECT:-on}"
62+FFMPEG_MMX="${FFMPEG_MMX:-auto}"
63+FFMPEG_MMXEXT="${FFMPEG_MMXEXT:-auto}"
64+FFMPEG_SSE="${FFMPEG_SSE:-auto}"
65+FFMPEG_SSE2="${FFMPEG_SSE2:-auto}"
66+FFMPEG_SSE3="${FFMPEG_SSE3:-auto}"
67+FFMPEG_SSSE3="${FFMPEG_SSSE3:-auto}"
68+FFMPEG_SSE4="${FFMPEG_SSE4:-auto}"
69+FFMPEG_SSE42="${FFMPEG_SSE42:-auto}"
70+FFMPEG_AVX="${FFMPEG_AVX:-off}"
71+FFMPEG_AVX2="${FFMPEG_AVX2:-auto}"
72+FFMPEG_AVX512="${FFMPEG_AVX512:-auto}"
73+FFMPEG_FMA3="${FFMPEG_FMA3:-auto}"
74+FFMPEG_FMA4="${FFMPEG_FMA4:-auto}"
75+FFMPEG_BMI1="${FFMPEG_BMI1:-auto}"
76+FFMPEG_BMI2="${FFMPEG_BMI2:-auto}"
77+FFMPEG_X86_64_MMX="${FFMPEG_X86_64_MMX:-off}"
78+FFMPEG_X86_64_INLINE_ASM="${FFMPEG_X86_64_INLINE_ASM:-off}"
79+FFMPEG_X86_64_X86ASM="${FFMPEG_X86_64_X86ASM:-auto}"
80+FFMPEG_X86_MMX="${FFMPEG_X86_MMX:-off}"
81+FFMPEG_X86_INLINE_ASM="${FFMPEG_X86_INLINE_ASM:-off}"
82+FFMPEG_X86_X86ASM="${FFMPEG_X86_X86ASM:-off}"
83+FFMPEG_X86_64_EXTRA_ISA_CFLAGS="${FFMPEG_X86_64_EXTRA_ISA_CFLAGS:-}"
84+FFMPEG_X86_EXTRA_ISA_CFLAGS="${FFMPEG_X86_EXTRA_ISA_CFLAGS:-}"
85+
86+error() { echo "ERROR: $*" >&2; }
87+
88+require_bool() {
89+ local name="$1" value="$2"
90+ if [[ "$value" != "0" && "$value" != "1" ]]; then
91+ error "$name must be 0 or 1, got: $value"
92+ exit 1
93+ fi
94+}
95+
96+require_toggle() {
97+ local name="$1" value="$2"
98+ case "$value" in
99+ auto|on|off) ;;
100+ *) error "$name must be auto, on or off, got: $value"; exit 1 ;;
101+ esac
102+}
103+
104+# Bash 3.2 compatible; configure_args is dynamically scoped by build_ffmpeg_for_abi.
105+append_configure_toggle() {
106+ local feature="$1" value="$2"
107+ case "$value" in
108+ auto) ;;
109+ on) configure_args+=("--enable-$feature") ;;
110+ off) configure_args+=("--disable-$feature") ;;
111+ esac
112+}
113+
114+for name in ENABLE_SMALL FFMPEG_LIBVPX_VP8 FFMPEG_PARSERS UNWIND_TABLES FRAME_POINTERS FUNCTION_SECTIONS ADDRSIG HIDDEN_VISIBILITY; do
115+ require_bool "$name" "${!name}"
116+done
117+for name in \
118+ FFMPEG_RUNTIME_CPUDETECT FFMPEG_MMX FFMPEG_MMXEXT FFMPEG_SSE \
119+ FFMPEG_SSE2 FFMPEG_SSE3 FFMPEG_SSSE3 FFMPEG_SSE4 FFMPEG_SSE42 \
120+ FFMPEG_AVX FFMPEG_AVX2 FFMPEG_AVX512 FFMPEG_FMA3 FFMPEG_FMA4 \
121+ FFMPEG_BMI1 FFMPEG_BMI2 FFMPEG_X86_64_MMX FFMPEG_X86_64_INLINE_ASM \
122+ FFMPEG_X86_64_X86ASM FFMPEG_X86_MMX FFMPEG_X86_INLINE_ASM FFMPEG_X86_X86ASM
123+do
124+ require_toggle "$name" "${!name}"
125+done
126+
127+[[ -x "$FFMPEG_SOURCE_DIR/configure" ]] || { error "FFmpeg sources were not found in: $FFMPEG_SOURCE_DIR"; exit 1; }
128+[[ -d "$LIBVPX_SOURCE_DIR/vpx" ]] || { error "libvpx headers were not found in: $LIBVPX_SOURCE_DIR/vpx"; exit 1; }
129+[[ -f "$DAV1D_SOURCE_DIR/include/dav1d/dav1d.h" ]] || { error "dav1d headers were not found in: $DAV1D_SOURCE_DIR/include"; exit 1; }
130+[[ -f "$OPUS_SOURCE_DIR/include/opus_multistream.h" ]] || { error "Opus headers were not found in: $OPUS_SOURCE_DIR/include"; exit 1; }
131+FFMPEG_SOURCE_DIR="$(cd "$FFMPEG_SOURCE_DIR" && pwd)"
132+LIBVPX_SOURCE_DIR="$(cd "$LIBVPX_SOURCE_DIR" && pwd)"
133+DAV1D_SOURCE_DIR="$(cd "$DAV1D_SOURCE_DIR" && pwd)"
134+OPUS_SOURCE_DIR="$(cd "$OPUS_SOURCE_DIR" && pwd)"
135+
136+check_x86_assembler() {
137+ local abi="$1"
138+ if [[ "$abi" == "x86" || "$abi" == "x86_64" ]]; then
139+ if ! command -v nasm >/dev/null 2>&1 && ! command -v yasm >/dev/null 2>&1; then
140+ error "NASM or Yasm is required for $abi."
141+ return 1
142+ fi
143+ fi
144+}
145+
146+COMMON_CFLAGS_BASE=""
147+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$PROJECT_ROOT=/src"
148+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$PROJECT_ROOT=/src"
149+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$PROJECT_ROOT=/src"
150+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$BUILD_ROOT=/build"
151+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$BUILD_ROOT=/build"
152+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$BUILD_ROOT=/build"
153+COMMON_CFLAGS_BASE+=" -fdebug-compilation-dir=."
154+[[ "$FUNCTION_SECTIONS" == "1" ]] && COMMON_CFLAGS_BASE+=" -ffunction-sections -fdata-sections"
155+[[ "$HIDDEN_VISIBILITY" == "1" ]] && COMMON_CFLAGS_BASE+=" -fvisibility=hidden"
156+[[ "$UNWIND_TABLES" == "0" ]] && COMMON_CFLAGS_BASE+=" -fno-asynchronous-unwind-tables -fno-unwind-tables"
157+if [[ "$FRAME_POINTERS" == "1" ]]; then
158+ COMMON_CFLAGS_BASE+=" -fno-omit-frame-pointer"
159+else
160+ COMMON_CFLAGS_BASE+=" -fomit-frame-pointer"
161+fi
162+COMMON_CFLAGS_BASE+=" -g0 -fno-ident"
163+COMMON_CFLAGS_BASE="${COMMON_CFLAGS_BASE# }"
164+COMMON_CFLAGS="$COMMON_CFLAGS_BASE"
165+[[ "$ADDRSIG" == "1" ]] && COMMON_CFLAGS+=" -faddrsig"
166+
167+write_opus_pkgconfig() {
168+ local abi="$1" destination_dir="$2"
169+ local opus_prefix opus_headers
170+ opus_prefix="$(abi_output_dir "$abi")"
171+ opus_headers="$OPUS_SOURCE_DIR/include"
172+ mkdir -p "$destination_dir"
173+ cat > "$destination_dir/opus.pc" <<PC
174+libdir=$opus_prefix
175+includedir=$opus_headers
176+Name: Opus
177+Description: Opus IETF audio codec (prebuilt static)
178+Version: 1.6.1
179+Libs: -L\${libdir} -lopus
180+Libs.private: -lm
181+Cflags: -I\${includedir}
182+PC
183+}
184+
185+copy_generated_header_overlay() {
186+ local abi="$1" prefix="$2"
187+ local installed_root="$prefix/include"
188+ local destination_root
189+ destination_root="$(abi_include_dir "$abi")"
190+
191+ local installed relative source destination copied=0
192+ while IFS= read -r -d '' installed; do
193+ relative="${installed#$installed_root/}"
194+ source="$FFMPEG_SOURCE_DIR/$relative"
195+ if [[ -f "$source" ]] && cmp -s "$source" "$installed"; then
196+ continue
197+ fi
198+ destination="$destination_root/$relative"
199+ mkdir -p "$(dirname "$destination")"
200+ cp -f "$installed" "$destination"
201+ chmod 0644 "$destination"
202+ copied=$((copied + 1))
203+ echo "==> generated/ABI header: $destination"
204+ done < <(find "$installed_root" -type f -name '*.h' -print0)
205+
206+ if [[ "$copied" == "0" ]]; then
207+ echo "==> FFmpeg $abi: no generated/ABI-dependent public headers"
208+ fi
209+}
210+
211+build_ffmpeg_for_abi() {
212+ local abi="$1"
213+ local arch target cpu extra_cflags prefix build_dir cc cxx
214+ local vpx_archive dav1d_archive opus_archive dependency_pc_dir opus_pc_dir overlay
215+ local components_header enabled_av1_decoders component library destination
216+ local -a configure_env=()
217+ local -a configure_args=()
218+ local -a required_components=()
219+
220+ case "$abi" in
221+ arm64-v8a)
222+ arch="aarch64"; target="aarch64-linux-android"; cpu="armv8-a"; extra_cflags="-march=armv8-a"
223+ ;;
224+ armeabi-v7a)
225+ arch="arm"; target="armv7a-linux-androideabi"; cpu="armv7-a"; extra_cflags="-march=armv7-a -mfloat-abi=softfp -mfpu=neon"
226+ ;;
227+ x86_64)
228+ arch="x86_64"; target="x86_64-linux-android"; cpu="x86-64"
229+ extra_cflags="-march=x86-64${FFMPEG_X86_64_EXTRA_ISA_CFLAGS:+ $FFMPEG_X86_64_EXTRA_ISA_CFLAGS}"
230+ ;;
231+ x86)
232+ arch="x86"; target="i686-linux-android"; cpu="i686"
233+ extra_cflags="-march=i686${FFMPEG_X86_EXTRA_ISA_CFLAGS:+ $FFMPEG_X86_EXTRA_ISA_CFLAGS}"
234+ ;;
235+ *) error "Unsupported ABI: $abi"; return 1 ;;
236+ esac
237+
238+ check_x86_assembler "$abi"
239+
240+ vpx_archive="$(abi_output_dir "$abi")/libvpx.a"
241+ dav1d_archive="$(abi_output_dir "$abi")/libdav1d.a"
242+ opus_archive="$(abi_output_dir "$abi")/libopus.a"
243+ dependency_pc_dir="$(abi_pkgconfig_dir "$abi")"
244+ overlay="$(abi_include_dir "$abi")"
245+ opus_pc_dir="$WORK_DIR/opus-pkgconfig/$abi"
246+
247+ [[ -f "$vpx_archive" ]] || { error "Missing libvpx for $abi: $vpx_archive (run build_libvpx.sh first)"; return 1; }
248+ [[ -f "$dav1d_archive" ]] || { error "Missing dav1d for $abi: $dav1d_archive (run build_dav1d.sh first)"; return 1; }
249+ [[ -f "$opus_archive" ]] || { error "Missing Opus for $abi: $opus_archive (run build_opus.sh first)"; return 1; }
250+ [[ -f "$dependency_pc_dir/vpx.pc" ]] || { error "Missing vpx.pc for $abi: $dependency_pc_dir/vpx.pc"; return 1; }
251+ [[ -f "$dependency_pc_dir/dav1d.pc" ]] || { error "Missing dav1d.pc for $abi: $dependency_pc_dir/dav1d.pc"; return 1; }
252+
253+ write_opus_pkgconfig "$abi" "$opus_pc_dir"
254+
255+ prefix="$INSTALL_DIR/$abi"
256+ build_dir="$WORK_DIR/$abi"
257+ cc="$NDK_TOOLCHAIN/bin/${target}${API}-clang"
258+ cxx="$NDK_TOOLCHAIN/bin/${target}${API}-clang++"
259+ rm -rf "$build_dir" "$prefix"
260+ mkdir -p "$build_dir" "$prefix"
261+
262+ configure_env=(
263+ "PKG_CONFIG_PATH=$dependency_pc_dir:$opus_pc_dir${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
264+ "PKG_CONFIG_LIBDIR=$dependency_pc_dir:$opus_pc_dir"
265+ "ARFLAGS=rcD"
266+ )
267+
268+ configure_args=(
269+ --prefix="$prefix"
270+ --target-os=android
271+ --arch="$arch"
272+ --cpu="$cpu"
273+ --enable-cross-compile
274+ --cc="$cc"
275+ --cxx="$cxx"
276+ --ar="$NDK_TOOLCHAIN/bin/llvm-ar"
277+ --nm="$NDK_TOOLCHAIN/bin/llvm-nm"
278+ --ranlib="$NDK_TOOLCHAIN/bin/llvm-ranlib"
279+ --strip="$NDK_TOOLCHAIN/bin/llvm-strip"
280+ --sysroot="$NDK_TOOLCHAIN/sysroot"
281+ --enable-pic
282+ --enable-static
283+ --disable-shared
284+ --enable-optimizations
285+ --enable-pthreads
286+ --disable-doc
287+ --disable-debug
288+ --disable-programs
289+ --disable-avdevice
290+ --disable-avfilter
291+ --disable-network
292+ --disable-autodetect
293+ --disable-everything
294+ --enable-avcodec
295+ --enable-avformat
296+ --enable-avutil
297+ --enable-swscale
298+ --enable-swresample
299+ --enable-protocol=file
300+ --enable-decoder=h264
301+ --enable-decoder=hevc
302+ --enable-decoder=mpeg4
303+ --enable-decoder=mjpeg
304+ --enable-decoder=gif
305+ --enable-decoder=alac
306+ --enable-decoder=libopus
307+ --enable-decoder=mp3
308+ --enable-decoder=aac
309+ --enable-decoder=flac
310+ --enable-demuxer=mov
311+ --enable-demuxer=gif
312+ --enable-demuxer=ogg
313+ --enable-demuxer=matroska
314+ --enable-demuxer=mp3
315+ --enable-demuxer=aac
316+ --enable-muxer=matroska
317+ --enable-bsf=vp9_superframe
318+ --enable-bsf=vp9_raw_reorder
319+ --enable-libvpx
320+ --enable-libdav1d
321+ --enable-libopus
322+ --enable-decoder=libdav1d
323+ --enable-decoder=libvpx_vp9
324+ --enable-encoder=libvpx_vp9
325+ --pkg-config-flags=--static
326+ --disable-zlib
327+ "--extra-cflags=-fPIC -DANDROID $extra_cflags${COMMON_CFLAGS:+ $COMMON_CFLAGS} -I$overlay -I$LIBVPX_SOURCE_DIR -I$DAV1D_SOURCE_DIR/include -I$OPUS_SOURCE_DIR/include"
328+ "--extra-ldflags=-Wl,-Bsymbolic -L$(abi_output_dir "$abi")"
329+ "--extra-libs=-ldav1d -lvpx -lopus -lm -ldl"
330+ )
331+
332+ [[ -n "$FFMPEG_OPTFLAGS" ]] && configure_args+=("--optflags=$FFMPEG_OPTFLAGS")
333+
334+ if [[ "$FFMPEG_PARSERS" == "1" ]]; then
335+ configure_args+=(
336+ --enable-parser=h264 --enable-parser=hevc --enable-parser=mpeg4video
337+ --enable-parser=mpegaudio --enable-parser=aac --enable-parser=opus
338+ --enable-parser=av1 --enable-parser=gif
339+ )
340+ fi
341+ if [[ "$FFMPEG_LIBVPX_VP8" == "1" ]]; then
342+ configure_args+=(--enable-decoder=libvpx_vp8 --enable-encoder=libvpx_vp8)
343+ fi
344+
345+ if [[ "$abi" == "x86" || "$abi" == "x86_64" ]]; then
346+ append_configure_toggle runtime-cpudetect "$FFMPEG_RUNTIME_CPUDETECT"
347+ append_configure_toggle mmx "$FFMPEG_MMX"
348+ append_configure_toggle mmxext "$FFMPEG_MMXEXT"
349+ append_configure_toggle sse "$FFMPEG_SSE"
350+ append_configure_toggle sse2 "$FFMPEG_SSE2"
351+ append_configure_toggle sse3 "$FFMPEG_SSE3"
352+ append_configure_toggle ssse3 "$FFMPEG_SSSE3"
353+ append_configure_toggle sse4 "$FFMPEG_SSE4"
354+ append_configure_toggle sse42 "$FFMPEG_SSE42"
355+ append_configure_toggle avx "$FFMPEG_AVX"
356+ append_configure_toggle avx2 "$FFMPEG_AVX2"
357+ append_configure_toggle avx512 "$FFMPEG_AVX512"
358+ append_configure_toggle fma3 "$FFMPEG_FMA3"
359+ append_configure_toggle fma4 "$FFMPEG_FMA4"
360+ append_configure_toggle bmi1 "$FFMPEG_BMI1"
361+ append_configure_toggle bmi2 "$FFMPEG_BMI2"
362+ fi
363+
364+ [[ "$ENABLE_SMALL" == "1" ]] && configure_args+=(--enable-small)
365+ case "$abi" in
366+ armeabi-v7a) configure_args+=(--enable-neon) ;;
367+ x86_64)
368+ append_configure_toggle mmx "$FFMPEG_X86_64_MMX"
369+ append_configure_toggle inline-asm "$FFMPEG_X86_64_INLINE_ASM"
370+ append_configure_toggle x86asm "$FFMPEG_X86_64_X86ASM"
371+ ;;
372+ x86)
373+ append_configure_toggle mmx "$FFMPEG_X86_MMX"
374+ append_configure_toggle inline-asm "$FFMPEG_X86_INLINE_ASM"
375+ append_configure_toggle x86asm "$FFMPEG_X86_X86ASM"
376+ ;;
377+ esac
378+
379+ echo
380+ echo "========== FFmpeg: $abi, API $API =========="
381+ pushd "$build_dir" >/dev/null
382+ if ! env "${configure_env[@]}" "$FFMPEG_SOURCE_DIR/configure" "${configure_args[@]}"; then
383+ error "FFmpeg configure failed for $abi. Log: $build_dir/ffbuild/config.log"
384+ popd >/dev/null
385+ return 1
386+ fi
387+
388+ # FFmpeg embeds the literal configure command in every library through
389+ # FFMPEG_CONFIGURATION. Normalize only that diagnostic macro so Linux and
390+ # macOS don't differ merely because --cc/--sysroot/--prefix contain host
391+ # paths. The actual configure/compiler invocation is unchanged.
392+ normalize_generated_metadata_lines "$build_dir/config.h" "#define FFMPEG_CONFIGURATION " || {
393+ popd >/dev/null
394+ return 1
395+ }
396+
397+ components_header="$build_dir/config_components.h"
398+ [[ -f "$components_header" ]] || components_header="$build_dir/config.h"
399+ required_components=(CONFIG_LIBDAV1D_DECODER CONFIG_LIBVPX_VP9_DECODER CONFIG_LIBVPX_VP9_ENCODER CONFIG_LIBOPUS_DECODER)
400+ if [[ "$FFMPEG_LIBVPX_VP8" == "1" ]]; then
401+ required_components+=(CONFIG_LIBVPX_VP8_DECODER CONFIG_LIBVPX_VP8_ENCODER)
402+ fi
403+ for component in "${required_components[@]}"; do
404+ if ! grep -Eq "^#define[[:space:]]+$component[[:space:]]+1$" "$components_header"; then
405+ error "FFmpeg component is disabled for $abi: $component"
406+ popd >/dev/null
407+ return 1
408+ fi
409+ done
410+ for component in CONFIG_VP8_DECODER CONFIG_VP9_DECODER CONFIG_AV1_DECODER; do
411+ if ! grep -Eq "^#define[[:space:]]+$component[[:space:]]+0$" "$components_header"; then
412+ error "Built-in FFmpeg decoder is unexpectedly enabled for $abi: $component"
413+ popd >/dev/null
414+ return 1
415+ fi
416+ done
417+ enabled_av1_decoders="$(awk '/^#define[[:space:]]+CONFIG_.*(AV1|DAV1D).*_DECODER[[:space:]]+1$/ { print $2 }' "$components_header" | LC_ALL=C sort)"
418+ if [[ "$enabled_av1_decoders" != "CONFIG_LIBDAV1D_DECODER" ]]; then
419+ error "Unexpected enabled AV1 decoders for $abi: ${enabled_av1_decoders:-<none>}"
420+ popd >/dev/null
421+ return 1
422+ fi
423+
424+ if ! make -j"$JOBS" 2>&1 | tee "$build_dir/build.log"; then
425+ error "FFmpeg build failed for $abi. Log: $build_dir/build.log"
426+ popd >/dev/null
427+ return 1
428+ fi
429+ if ! make install 2>&1 | tee "$build_dir/install.log"; then
430+ error "FFmpeg install failed for $abi. Log: $build_dir/install.log"
431+ popd >/dev/null
432+ return 1
433+ fi
434+ popd >/dev/null
435+
436+ copy_generated_header_overlay "$abi" "$prefix"
437+
438+ for library in libavcodec.a libavformat.a libavutil.a libswscale.a libswresample.a; do
439+ [[ -f "$prefix/lib/$library" ]] || { error "Missing FFmpeg library for $abi: $prefix/lib/$library"; return 1; }
440+ destination="$(abi_output_dir "$abi")/$library"
441+ copy_archive "$prefix/lib/$library" "$destination"
442+ echo "==> $destination"
443+ done
444+}
445+
446+for abi in $ABIS; do
447+ overlay="$(abi_include_dir "$abi")"
448+ rm -rf "$overlay/libavcodec" "$overlay/libavformat" "$overlay/libavutil" "$overlay/libswscale" "$overlay/libswresample"
449+done
450+
451+print_common_config
452+echo "FFmpeg source: $FFMPEG_SOURCE_DIR"
453+echo "FFmpeg build root: $BUILD_ROOT"
454+echo "FFmpeg flags: $COMMON_CFLAGS"
455+
456+rm -rf "$BUILD_ROOT"
457+mkdir -p "$WORK_DIR" "$INSTALL_DIR"
458+for abi in $ABIS; do
459+ build_ffmpeg_for_abi "$abi"
460+done
461+rm -rf "$BUILD_ROOT"
462+
463+echo
464+echo "==> Removing temporary pkg-config metadata"
465+rm -rf "$PKGCONFIG_DIR"
466+
467+echo
468+echo "FFmpeg static build completed."
TMessagesProj/jni/prebuild/build_libvpx.shnew file+389
@@ -0,0 +1,389 @@
1+#!/usr/bin/env bash
2+# Build static libvpx for Android with the exact configuration previously used
3+# by build_ffmpeg_libvpx_dav1d_android_ndk27_merged.sh.
4+#
5+# Output:
6+# jni/prebuild/lib/<ABI>/libvpx.a
7+#
8+# Public source headers remain canonical. Only generated or ABI-dependent
9+# installed headers are copied to jni/prebuild/include/<ABI>/ as an overlay.
10+
11+set -Eeuo pipefail
12+
13+# Preserve the merged build's reproducibility environment before common.sh sets
14+# its generic defaults.
15+export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-946684800}"
16+export TZ=UTC
17+export LC_ALL=C
18+export LANG=C
19+export PYTHONHASHSEED=0
20+export ZERO_AR_DATE=1
21+umask 022
22+
23+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
24+source "$SCRIPT_DIR/common.sh"
25+
26+# common.sh exports generic CFLAGS for the other prebuild scripts. libvpx must
27+# receive exactly the flags from the merged media build through --extra-cflags.
28+unset CFLAGS CXXFLAGS
29+
30+require_ndk
31+require_command make
32+
33+PROJECT_ROOT="$JNI_DIR"
34+LIBVPX_SOURCE_DIR="${LIBVPX_SOURCE_DIR:-$JNI_DIR/third_party/libvpx}"
35+BUILD_ROOT="${LIBVPX_BUILD_ROOT:-$SCRIPT_DIR/build/libvpx}"
36+WORK_DIR="$BUILD_ROOT/work"
37+INSTALL_DIR="$BUILD_ROOT/install"
38+
39+LIBVPX_REALTIME_ONLY="${LIBVPX_REALTIME_ONLY:-1}"
40+LIBVPX_SMALL="${LIBVPX_SMALL:-1}"
41+LIBVPX_BETTER_HW_COMPATIBILITY="${LIBVPX_BETTER_HW_COMPATIBILITY:-1}"
42+LIBVPX_WEBM_IO="${LIBVPX_WEBM_IO:-0}"
43+LIBVPX_RUNTIME_CPU_DETECT="${LIBVPX_RUNTIME_CPU_DETECT:-auto}"
44+LIBVPX_ARM_EXTENSIONS="${LIBVPX_ARM_EXTENSIONS:-0}"
45+LIBVPX_SIZE_LIMIT="${LIBVPX_SIZE_LIMIT:-4096x4096}"
46+
47+UNWIND_TABLES="${UNWIND_TABLES:-0}"
48+FRAME_POINTERS="${FRAME_POINTERS:-0}"
49+FUNCTION_SECTIONS="${FUNCTION_SECTIONS:-1}"
50+ADDRSIG="${ADDRSIG:-1}"
51+LIBVPX_ADDRSIG="${LIBVPX_ADDRSIG:-0}"
52+HIDDEN_VISIBILITY="${HIDDEN_VISIBILITY:-0}"
53+
54+error() { echo "ERROR: $*" >&2; }
55+
56+require_bool() {
57+ local name="$1" value="$2"
58+ if [[ "$value" != "0" && "$value" != "1" ]]; then
59+ error "$name must be 0 or 1, got: $value"
60+ exit 1
61+ fi
62+}
63+
64+for name in \
65+ LIBVPX_REALTIME_ONLY LIBVPX_SMALL LIBVPX_BETTER_HW_COMPATIBILITY \
66+ LIBVPX_WEBM_IO LIBVPX_ARM_EXTENSIONS UNWIND_TABLES FRAME_POINTERS \
67+ FUNCTION_SECTIONS ADDRSIG LIBVPX_ADDRSIG HIDDEN_VISIBILITY
68+do
69+ require_bool "$name" "${!name}"
70+done
71+case "$LIBVPX_RUNTIME_CPU_DETECT" in
72+ auto|on|off) ;;
73+ *) error "LIBVPX_RUNTIME_CPU_DETECT must be auto, on or off"; exit 1 ;;
74+esac
75+
76+[[ -x "$LIBVPX_SOURCE_DIR/configure" ]] || {
77+ error "libvpx sources were not found in: $LIBVPX_SOURCE_DIR"
78+ exit 1
79+}
80+LIBVPX_SOURCE_DIR="$(cd "$LIBVPX_SOURCE_DIR" && pwd)"
81+
82+check_x86_assembler() {
83+ local abi="$1"
84+ if [[ "$abi" == "x86" || "$abi" == "x86_64" ]]; then
85+ if ! command -v nasm >/dev/null 2>&1 && ! command -v yasm >/dev/null 2>&1; then
86+ error "NASM or Yasm is required for $abi."
87+ return 1
88+ fi
89+ fi
90+}
91+
92+libvpx_has_option() {
93+ grep -qE "^[[:space:]]*$1[[:space:]]*$" "$LIBVPX_SOURCE_DIR/configure"
94+}
95+
96+# Bash 3.2 compatible: mutates the dynamically-scoped local vpx_args array in
97+# build_libvpx_for_abi, avoiding `local -n` which is unavailable on macOS Bash.
98+libvpx_toggle() {
99+ local option="$1" enable="$2"
100+ libvpx_has_option "$option" || return 0
101+ if [[ "$enable" == "1" ]]; then
102+ vpx_args+=("--enable-${option//_/-}")
103+ else
104+ vpx_args+=("--disable-${option//_/-}")
105+ fi
106+}
107+
108+COMMON_CFLAGS_BASE=""
109+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$PROJECT_ROOT=/src"
110+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$PROJECT_ROOT=/src"
111+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$PROJECT_ROOT=/src"
112+COMMON_CFLAGS_BASE+=" -ffile-prefix-map=$BUILD_ROOT=/build"
113+COMMON_CFLAGS_BASE+=" -fdebug-prefix-map=$BUILD_ROOT=/build"
114+COMMON_CFLAGS_BASE+=" -fmacro-prefix-map=$BUILD_ROOT=/build"
115+COMMON_CFLAGS_BASE+=" -fdebug-compilation-dir=."
116+[[ "$FUNCTION_SECTIONS" == "1" ]] && COMMON_CFLAGS_BASE+=" -ffunction-sections -fdata-sections"
117+[[ "$HIDDEN_VISIBILITY" == "1" ]] && COMMON_CFLAGS_BASE+=" -fvisibility=hidden"
118+[[ "$UNWIND_TABLES" == "0" ]] && COMMON_CFLAGS_BASE+=" -fno-asynchronous-unwind-tables -fno-unwind-tables"
119+if [[ "$FRAME_POINTERS" == "1" ]]; then
120+ COMMON_CFLAGS_BASE+=" -fno-omit-frame-pointer"
121+else
122+ COMMON_CFLAGS_BASE+=" -fomit-frame-pointer"
123+fi
124+COMMON_CFLAGS_BASE+=" -g0 -fno-ident"
125+COMMON_CFLAGS_BASE="${COMMON_CFLAGS_BASE# }"
126+
127+LIBVPX_COMMON_CFLAGS="$COMMON_CFLAGS_BASE"
128+LIBVPX_SKIP_STRIP=0
129+if [[ "$ADDRSIG" == "1" && "$LIBVPX_ADDRSIG" == "1" ]]; then
130+ LIBVPX_COMMON_CFLAGS+=" -faddrsig"
131+ LIBVPX_SKIP_STRIP=1
132+fi
133+
134+
135+copy_generated_header_overlay() {
136+ local abi="$1"
137+ local installed_root="$2/include"
138+ local destination_root
139+ destination_root="$(abi_include_dir "$abi")"
140+
141+ local installed relative source destination copied=0
142+ while IFS= read -r -d '' installed; do
143+ relative="${installed#$installed_root/}"
144+ source="$LIBVPX_SOURCE_DIR/$relative"
145+ if [[ -f "$source" ]] && cmp -s "$source" "$installed"; then
146+ continue
147+ fi
148+ destination="$destination_root/$relative"
149+ mkdir -p "$(dirname "$destination")"
150+ cp -f "$installed" "$destination"
151+ chmod 0644 "$destination"
152+ copied=$((copied + 1))
153+ echo "==> generated/ABI header: $destination"
154+ done < <(find "$installed_root/vpx" -type f -name '*.h' -print0)
155+
156+ if [[ "$copied" == "0" ]]; then
157+ echo "==> libvpx $abi: no generated/ABI-dependent public headers"
158+ fi
159+}
160+
161+
162+install_pkgconfig_metadata() {
163+ local abi="$1" prefix="$2"
164+ local source_pc="$prefix/lib/pkgconfig/vpx.pc"
165+ local destination_dir destination overlay
166+ destination_dir="$(abi_pkgconfig_dir "$abi")"
167+ destination="$destination_dir/vpx.pc"
168+ overlay="$(abi_include_dir "$abi")"
169+
170+ [[ -f "$source_pc" ]] || { error "Missing libvpx pkg-config file: $source_pc"; return 1; }
171+ mkdir -p "$destination_dir"
172+ awk -v libdir="$(abi_output_dir "$abi")" -v includedir="$LIBVPX_SOURCE_DIR" -v overlay="$overlay" '
173+ /^prefix=/ { print "prefix=" libdir; next }
174+ /^exec_prefix=/ { print "exec_prefix=" libdir; next }
175+ /^libdir=/ { print "libdir=" libdir; next }
176+ /^includedir=/ { print "includedir=" includedir; next }
177+ /^Cflags:/ { print "Cflags: -I" overlay " -I" includedir; next }
178+ { print }
179+ ' "$source_pc" > "$destination"
180+ chmod 0644 "$destination"
181+ echo "==> $destination"
182+}
183+
184+build_libvpx_for_abi() {
185+ local abi="$1"
186+ local target vpx_target extra_cflags runtime_cpu_detect prefix build_dir cc cxx symbol
187+ local -a configure_env=()
188+ local -a vpx_args=()
189+
190+ case "$abi" in
191+ arm64-v8a)
192+ target="aarch64-linux-android"
193+ vpx_target="arm64-android-gcc"
194+ extra_cflags="-O3 -fPIC -march=armv8-a"
195+ ;;
196+ armeabi-v7a)
197+ target="armv7a-linux-androideabi"
198+ vpx_target="armv7-android-gcc"
199+ extra_cflags="-O3 -fPIC -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
200+ ;;
201+ x86_64)
202+ target="x86_64-linux-android"
203+ vpx_target="x86_64-android-gcc"
204+ extra_cflags="-O3 -fPIC -march=x86-64"
205+ ;;
206+ x86)
207+ target="i686-linux-android"
208+ vpx_target="x86-android-gcc"
209+ extra_cflags="-O3 -fPIC -march=i686 -mssse3 -mfpmath=sse"
210+ ;;
211+ *) error "Unsupported ABI: $abi"; return 1 ;;
212+ esac
213+
214+ extra_cflags="$extra_cflags${LIBVPX_COMMON_CFLAGS:+ $LIBVPX_COMMON_CFLAGS}"
215+ check_x86_assembler "$abi"
216+
217+ prefix="$INSTALL_DIR/$abi"
218+ build_dir="$WORK_DIR/$abi"
219+ cc="$NDK_TOOLCHAIN/bin/${target}${API}-clang"
220+ cxx="$NDK_TOOLCHAIN/bin/${target}${API}-clang++"
221+
222+ rm -rf "$build_dir" "$prefix"
223+ mkdir -p "$build_dir" "$prefix"
224+
225+ echo
226+ echo "========== libvpx: $abi, API $API =========="
227+
228+ configure_env=(
229+ "CC=$cc"
230+ "CXX=$cxx"
231+ "LD=$cc"
232+ "AR=$NDK_TOOLCHAIN/bin/llvm-ar"
233+ "ARFLAGS=crsD"
234+ "NM=$NDK_TOOLCHAIN/bin/llvm-nm"
235+ "STRIP=$NDK_TOOLCHAIN/bin/llvm-strip"
236+ "READELF=$LLVM_READELF_BIN"
237+ )
238+ if [[ "$abi" == "arm64-v8a" || "$abi" == "armeabi-v7a" ]]; then
239+ configure_env+=("AS=$cc")
240+ fi
241+
242+ vpx_args=(
243+ --target="$vpx_target"
244+ --prefix="$prefix"
245+ --disable-shared
246+ --enable-static
247+ --enable-pic
248+ --enable-optimizations
249+ --enable-multithread
250+ --disable-examples
251+ --disable-tools
252+ --disable-docs
253+ --disable-unit-tests
254+ --disable-install-bins
255+ --disable-install-docs
256+ --disable-debug
257+ --enable-vp8
258+ --enable-vp9
259+ --enable-vp8-decoder
260+ --enable-vp8-encoder
261+ --enable-vp9-decoder
262+ --enable-vp9-encoder
263+ )
264+
265+ runtime_cpu_detect="$LIBVPX_RUNTIME_CPU_DETECT"
266+ if [[ "$runtime_cpu_detect" == "auto" ]]; then
267+ case "$abi" in
268+ x86|x86_64) runtime_cpu_detect="on" ;;
269+ *) runtime_cpu_detect="off" ;;
270+ esac
271+ fi
272+ if [[ "$runtime_cpu_detect" == "on" ]]; then
273+ vpx_args+=(--enable-runtime-cpu-detect)
274+ else
275+ vpx_args+=(--disable-runtime-cpu-detect)
276+ fi
277+
278+ libvpx_toggle realtime_only "$LIBVPX_REALTIME_ONLY"
279+ libvpx_toggle small "$LIBVPX_SMALL"
280+ libvpx_toggle better_hw_compatibility "$LIBVPX_BETTER_HW_COMPATIBILITY"
281+ libvpx_toggle webm_io "$LIBVPX_WEBM_IO"
282+
283+ case "$abi" in
284+ armeabi-v7a)
285+ libvpx_toggle neon_asm 0
286+ ;;
287+ arm64-v8a)
288+ libvpx_toggle neon_asm 0
289+ libvpx_toggle neon_dotprod "$LIBVPX_ARM_EXTENSIONS"
290+ libvpx_toggle neon_i8mm "$LIBVPX_ARM_EXTENSIONS"
291+ libvpx_toggle sve "$LIBVPX_ARM_EXTENSIONS"
292+ libvpx_toggle sve2 "$LIBVPX_ARM_EXTENSIONS"
293+ ;;
294+ esac
295+
296+ [[ -n "$LIBVPX_SIZE_LIMIT" ]] && vpx_args+=(--size-limit="$LIBVPX_SIZE_LIMIT")
297+ vpx_args+=(--extra-cflags="$extra_cflags" --log="$build_dir/config.log")
298+
299+ local tool_shim_dir="$build_dir/tool-shims"
300+ mkdir -p "$tool_shim_dir"
301+ cat > "$tool_shim_dir/readelf" <<EOF
302+#!/bin/sh
303+exec "$LLVM_READELF_BIN" "\$@"
304+EOF
305+ chmod +x "$tool_shim_dir/readelf"
306+
307+ pushd "$build_dir" >/dev/null
308+ if ! env -u AS -u ASFLAGS \
309+ "PATH=$tool_shim_dir:$PATH" \
310+ "${configure_env[@]}" \
311+ "$LIBVPX_SOURCE_DIR/configure" "${vpx_args[@]}";
312+ then
313+ error "libvpx configure failed for $abi. Log: $build_dir/config.log"
314+ popd >/dev/null
315+ return 1
316+ fi
317+
318+ # libvpx embeds its full configure command in vpx_codec_build_config().
319+ # Normalize host/check-out paths in that diagnostic string only; configure
320+ # itself and all compiler arguments above remain untouched.
321+ local vpx_config_c
322+ vpx_config_c="$(find "$build_dir" -type f -name vpx_config.c -print -quit)"
323+ [[ -n "$vpx_config_c" ]] || {
324+ error "Generated vpx_config.c was not found for $abi"
325+ popd >/dev/null
326+ return 1
327+ }
328+ normalize_generated_metadata_lines "$vpx_config_c" "--target=" || {
329+ popd >/dev/null
330+ return 1
331+ }
332+
333+ if [[ "$LIBVPX_SKIP_STRIP" == "1" && -f "$build_dir/config.mk" ]]; then
334+ if grep -q '^HAVE_GNU_STRIP=' "$build_dir/config.mk"; then
335+ sed -i.bak 's/^HAVE_GNU_STRIP=.*/HAVE_GNU_STRIP=no/' "$build_dir/config.mk"
336+ rm -f "$build_dir/config.mk.bak"
337+ else
338+ echo 'HAVE_GNU_STRIP=no' >> "$build_dir/config.mk"
339+ fi
340+ fi
341+
342+ if ! make -j"$JOBS" 2>&1 | tee "$build_dir/build.log"; then
343+ error "libvpx build failed for $abi. Log: $build_dir/build.log"
344+ popd >/dev/null
345+ return 1
346+ fi
347+ if ! make install 2>&1 | tee "$build_dir/install.log"; then
348+ error "libvpx install failed for $abi. Log: $build_dir/install.log"
349+ popd >/dev/null
350+ return 1
351+ fi
352+ popd >/dev/null
353+
354+ [[ -f "$prefix/lib/libvpx.a" ]] || { error "Missing $prefix/lib/libvpx.a"; return 1; }
355+ [[ -d "$prefix/include/vpx" ]] || { error "Missing $prefix/include/vpx"; return 1; }
356+
357+ copy_generated_header_overlay "$abi" "$prefix"
358+ install_pkgconfig_metadata "$abi" "$prefix"
359+
360+ for symbol in vpx_codec_vp8_cx vpx_codec_vp8_dx vpx_codec_vp9_cx vpx_codec_vp9_dx; do
361+ if ! "$NDK_TOOLCHAIN/bin/llvm-nm" -g --defined-only "$prefix/lib/libvpx.a" \
362+ | grep -E "[[:space:]]${symbol}$" >/dev/null;
363+ then
364+ error "Missing libvpx symbol for $abi: $symbol"
365+ return 1
366+ fi
367+ done
368+
369+ local destination="$(abi_output_dir "$abi")/libvpx.a"
370+ copy_archive "$prefix/lib/libvpx.a" "$destination"
371+ echo "==> $destination"
372+}
373+
374+for abi in $ABIS; do rm -rf "$(abi_include_dir "$abi")/vpx"; done
375+
376+print_common_config
377+echo "libvpx source: $LIBVPX_SOURCE_DIR"
378+echo "libvpx build root: $BUILD_ROOT"
379+echo "libvpx flags: $LIBVPX_COMMON_CFLAGS"
380+
381+rm -rf "$BUILD_ROOT"
382+mkdir -p "$WORK_DIR" "$INSTALL_DIR"
383+for abi in $ABIS; do
384+ build_libvpx_for_abi "$abi"
385+done
386+rm -rf "$BUILD_ROOT"
387+
388+echo
389+echo "libvpx static build completed."
TMessagesProj/jni/prebuild/build_openh264.shnew file+81
@@ -0,0 +1,81 @@
1+#!/usr/bin/env bash
2+# Compile static OpenH264 libraries for Android into lib/<abi>/.
3+
4+set -Eeuo pipefail
5+
6+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+source "$SCRIPT_DIR/common.sh"
8+
9+OPENH264_SRC="${OPENH264_SOURCE_DIR:-$SCRIPT_DIR/../third_party/openh264}"
10+BUILD_DIR="$SCRIPT_DIR/build/openh264"
11+
12+require_ndk
13+require_command make
14+
15+[[ -f "$OPENH264_SRC/Makefile" ]] || {
16+ echo "ERROR: OpenH264 Makefile not found: $OPENH264_SRC/Makefile" >&2
17+ echo " Set OPENH264_SOURCE_DIR if the source tree is elsewhere." >&2
18+ exit 1
19+}
20+
21+if [[ " $ABIS " == *" x86 "* || " $ABIS " == *" x86_64 "* ]]; then
22+ require_command nasm
23+fi
24+
25+abi_to_arch() {
26+ case "$1" in
27+ armeabi-v7a) echo arm ;;
28+ arm64-v8a) echo arm64 ;;
29+ x86) echo x86 ;;
30+ x86_64) echo x86_64 ;;
31+ *) echo "ERROR: unsupported ABI: $1" >&2; return 1 ;;
32+ esac
33+}
34+
35+copy_source_tree() {
36+ local dst="$1"
37+ rm -rf "$dst"
38+ mkdir -p "$dst"
39+ cp -R "$OPENH264_SRC/." "$dst/"
40+}
41+
42+rm -rf "$BUILD_DIR"
43+mkdir -p "$BUILD_DIR"
44+
45+for abi in $ABIS; do
46+ arch="$(abi_to_arch "$abi")"
47+ work_src="$BUILD_DIR/$abi"
48+ abi_out="$(abi_output_dir "$abi")"
49+
50+ echo
51+ echo "==> Building OpenH264 for $abi (ARCH=$arch, API=$API)"
52+
53+ copy_source_tree "$work_src"
54+
55+ make -C "$work_src" \
56+ -j"$JOBS" \
57+ V=No \
58+ OS=android \
59+ ARCH="$arch" \
60+ NDKROOT="$ANDROID_NDK_HOME" \
61+ TARGET="android-$API" \
62+ NDKLEVEL="$API" \
63+ BUILDTYPE=Release \
64+ CFLAGS_OPT="-O3 $REPRODUCIBLE_PATH_FLAGS $PREBUILD_OBJECT_FLAGS" \
65+ ENABLEPIC=Yes \
66+ libopenh264.a
67+
68+ [[ -f "$work_src/libopenh264.a" ]] || {
69+ echo "ERROR: build succeeded but libopenh264.a was not produced for $abi" >&2
70+ exit 1
71+ }
72+
73+ copy_archive "$work_src/libopenh264.a" "$abi_out/libopenh264.a"
74+ finalize_archive "$abi_out/libopenh264.a"
75+ echo "==> $abi_out/libopenh264.a"
76+done
77+
78+rm -rf "$BUILD_DIR"
79+
80+echo
81+echo "OpenH264 static build completed."
TMessagesProj/jni/prebuild/build_opus.shnew file+218
@@ -0,0 +1,218 @@
1+#!/usr/bin/env bash
2+# Build static libopus for Android.
3+#
4+# Expected layout:
5+#
6+# jni/
7+# third_party/
8+# xiph/
9+# opus/
10+# prebuild/
11+# build_opus.sh
12+#
13+# Result:
14+#
15+# jni/prebuild/lib/arm64-v8a/libopus.a
16+# jni/prebuild/lib/armeabi-v7a/libopus.a
17+# jni/prebuild/lib/x86_64/libopus.a
18+# jni/prebuild/lib/x86/libopus.a
19+#
20+# build_opus/ is used as temporary workspace and is removed after a successful
21+# build. Sources are never copied.
22+#
23+# Why an explicit source list instead of opus's own CMake:
24+# for the FIXED_POINT ARM path, opus's CMake defines
25+# OPUS_ARM_MAY_HAVE_NEON / OPUS_ARM_PRESUME_NEON, which make the code reference
26+# celt_pitch_xcorr_neon -- a symbol provided only by celt/arm/celt_pitch_xcorr_arm.s.
27+# Instead, this build enables only the NEON intrinsic sources/macros, avoiding
28+# the asm-only symbol while still retaining NEON acceleration.
29+#
30+# Optional environment overrides:
31+# OPUS_SOURCE_DIR=/path/to/opus
32+# ANDROID_NDK_HOME=/path/to/ndk
33+# ANDROID_SDK_ROOT=/path/to/sdk
34+# NDK_VERSION=27.2.12479018
35+# API=21
36+# ABIS="arm64-v8a armeabi-v7a x86_64 x86"
37+# JOBS=16
38+
39+set -Eeuo pipefail
40+
41+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
42+source "$SCRIPT_DIR/common.sh"
43+
44+OPUS_SRC="${OPUS_SOURCE_DIR:-$SCRIPT_DIR/../third_party/xiph/opus}"
45+BUILD_DIR="$SCRIPT_DIR/build/opus"
46+GEN_DIR="$BUILD_DIR/cmake"
47+
48+require_ndk
49+require_cmake_ninja
50+require_command awk
51+
52+# Extract a make-style:
53+#
54+# VAR = a \
55+# b \
56+# c
57+#
58+# list from one of Opus's *.mk files.
59+mkvar() {
60+ awk -v v="$2" '
61+ $0 ~ "^"v"[ \t]*=" {
62+ f=1
63+ sub("^"v"[ \t]*=[ \t]*","")
64+ }
65+ f {
66+ cont = sub(/\\[ \t]*$/,"")
67+ gsub(/^[ \t]+|[ \t]+$/,"")
68+ if ($0 != "") print $0
69+ if (!cont) exit
70+ }
71+ ' "$1"
72+}
73+
74+# Convert newline-separated relative source paths into a semicolon-separated
75+# list of absolute paths suitable for passing to CMake.
76+to_cmake_list() {
77+ local out="" f
78+ while IFS= read -r f; do
79+ [ -n "$f" ] && out="$out;$OPUS_SRC/$f"
80+ done
81+ echo "${out#;}"
82+}
83+
84+OPUS_MK="$OPUS_SRC/opus_sources.mk"
85+CELT_MK="$OPUS_SRC/celt_sources.mk"
86+SILK_MK="$OPUS_SRC/silk_sources.mk"
87+
88+for m in "$OPUS_MK" "$CELT_MK" "$SILK_MK"; do
89+ [ -f "$m" ] || {
90+ echo "ERROR: missing $m" >&2
91+ echo " Set OPUS_SOURCE_DIR if the source tree is elsewhere." >&2
92+ exit 1
93+ }
94+done
95+
96+BASE_LIST="$({
97+ mkvar "$OPUS_MK" OPUS_SOURCES
98+ mkvar "$OPUS_MK" OPUS_SOURCES_FLOAT
99+ mkvar "$CELT_MK" CELT_SOURCES
100+ mkvar "$SILK_MK" SILK_SOURCES
101+ mkvar "$SILK_MK" SILK_SOURCES_FIXED
102+} | to_cmake_list)"
103+
104+NEON_LIST="$({
105+ mkvar "$CELT_MK" CELT_SOURCES_ARM_NEON_INTR
106+ mkvar "$SILK_MK" SILK_SOURCES_ARM_NEON_INTR
107+ mkvar "$SILK_MK" SILK_SOURCES_FIXED_ARM_NEON_INTR
108+} | to_cmake_list)"
109+
110+INCLUDES="$OPUS_SRC;$OPUS_SRC/include;$OPUS_SRC/celt;$OPUS_SRC/silk;$OPUS_SRC/silk/fixed"
111+
112+BASE_DEFS="OPUS_BUILD;FIXED_POINT;USE_ALLOCA;restrict=;LOCALE_NOT_USED;HAVE_LRINT;HAVE_LRINTF"
113+
114+# Enable only intrinsic NEON support: no plain NEON macros, no RTCD and no
115+# hand-written ARM assembly dependency.
116+NEON_DEFS="OPUS_ARM_MAY_HAVE_NEON_INTR;OPUS_ARM_PRESUME_NEON_INTR"
117+
118+rm -rf "$BUILD_DIR"
119+mkdir -p "$GEN_DIR"
120+
121+cat > "$GEN_DIR/CMakeLists.txt" <<'CMAKE'
122+cmake_minimum_required(VERSION 3.18)
123+
124+project(opus_static C)
125+
126+add_library(opus STATIC ${OPUS_SOURCES})
127+
128+set_target_properties(opus PROPERTIES
129+ POSITION_INDEPENDENT_CODE ON
130+)
131+
132+target_compile_definitions(opus PRIVATE
133+ ${OPUS_DEFS}
134+)
135+
136+target_include_directories(opus PRIVATE
137+ ${OPUS_INCLUDES}
138+)
139+
140+target_compile_options(opus PRIVATE
141+ -std=c11
142+ -Oz
143+ -g0
144+ -ffast-math
145+ -funroll-loops
146+ -fno-strict-aliasing
147+ -fno-math-errno
148+ -ffunction-sections
149+ -fdata-sections
150+ -fvisibility=hidden
151+ -w
152+)
153+CMAKE
154+
155+for abi in $ABIS; do
156+ ABI_BUILD="$BUILD_DIR/$abi"
157+ ABI_OUT="$(abi_output_dir "$abi")"
158+
159+ srcs="$BASE_LIST"
160+ defs="$BASE_DEFS"
161+ extra=()
162+
163+ case "$abi" in
164+ arm64-v8a)
165+ srcs="$BASE_LIST;$NEON_LIST"
166+ defs="$BASE_DEFS;$NEON_DEFS"
167+ ;;
168+ armeabi-v7a)
169+ srcs="$BASE_LIST;$NEON_LIST"
170+ defs="$BASE_DEFS;$NEON_DEFS"
171+ extra+=(-DANDROID_ARM_NEON=ON)
172+ ;;
173+ x86|x86_64)
174+ ;;
175+ *)
176+ echo "ERROR: unsupported ABI: $abi" >&2
177+ exit 1
178+ ;;
179+ esac
180+
181+ echo
182+ echo "==> Building Opus for $abi (API=$API)"
183+
184+ "$CMAKE_BIN" \
185+ -S "$GEN_DIR" \
186+ -B "$ABI_BUILD" \
187+ -G Ninja \
188+ -DCMAKE_MAKE_PROGRAM="$NINJA_BIN" \
189+ -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
190+ -DCMAKE_BUILD_TYPE=Release \
191+ -DCMAKE_C_FLAGS="$CMAKE_REPRO_C_FLAGS" \
192+ -DANDROID_ABI="$abi" \
193+ -DANDROID_PLATFORM="android-$API" \
194+ ${extra[@]+"${extra[@]}"} \
195+ -DOPUS_SOURCES="$srcs" \
196+ -DOPUS_DEFS="$defs" \
197+ -DOPUS_INCLUDES="$INCLUDES"
198+
199+ "$CMAKE_BIN" --build "$ABI_BUILD" --parallel "$JOBS"
200+
201+ [ -f "$ABI_BUILD/libopus.a" ] || {
202+ echo "ERROR: libopus.a was not produced for $abi" >&2
203+ exit 1
204+ }
205+
206+ copy_archive "$ABI_BUILD/libopus.a" "$ABI_OUT/libopus.a"
207+ finalize_archive "$ABI_OUT/libopus.a"
208+
209+ echo "==> $ABI_OUT/libopus.a"
210+done
211+
212+rm -rf "$BUILD_DIR"
213+
214+echo
215+echo "Opus static build completed."
216+for abi in $ABIS; do
217+ echo " $LIB_DIR/$abi/libopus.a"
218+done
TMessagesProj/jni/prebuild/build_tdlib.shnew file+101
@@ -0,0 +1,101 @@
1+#!/usr/bin/env bash
2+# Compile TDLib static libraries for Android into lib/<abi>/.
3+# Requires BoringSSL archives in the same lib/<abi>/ directories.
4+
5+set -Eeuo pipefail
6+
7+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8+source "$SCRIPT_DIR/common.sh"
9+
10+TD_SRC="${TD_SOURCE_DIR:-$SCRIPT_DIR/../td}"
11+BORINGSSL_SRC="${BORINGSSL_SOURCE_DIR:-$SCRIPT_DIR/../third_party/boringssl}"
12+BUILD_DIR="$SCRIPT_DIR/build/tdlib"
13+
14+require_ndk
15+require_cmake_ninja
16+
17+[[ -f "$TD_SRC/CMakeLists.txt" ]] || {
18+ echo "ERROR: TDLib source tree not found: $TD_SRC" >&2
19+ echo " Set TD_SOURCE_DIR if TDLib is elsewhere." >&2
20+ exit 1
21+}
22+
23+[[ -f "$BORINGSSL_SRC/include/openssl/ssl.h" ]] || {
24+ echo "ERROR: BoringSSL headers not found: $BORINGSSL_SRC/include" >&2
25+ echo " Set BORINGSSL_SOURCE_DIR if BoringSSL is elsewhere." >&2
26+ exit 1
27+}
28+
29+find_archive() {
30+ local root="$1"
31+ local name="$2"
32+ find "$root" -type f -name "$name" -print -quit
33+}
34+
35+rm -rf "$BUILD_DIR"
36+mkdir -p "$BUILD_DIR"
37+
38+NATIVE_BUILD="$BUILD_DIR/native"
39+echo "==> Generating TDLib source files"
40+
41+"$CMAKE_BIN" \
42+ -S "$TD_SRC" \
43+ -B "$NATIVE_BUILD" \
44+ -G Ninja \
45+ -DCMAKE_MAKE_PROGRAM="$NINJA_BIN" \
46+ -DCMAKE_BUILD_TYPE=Release \
47+ -DCMAKE_C_FLAGS="$CMAKE_REPRO_C_FLAGS" \
48+ -DCMAKE_CXX_FLAGS="$CMAKE_REPRO_CXX_FLAGS" \
49+ -DTD_GENERATE_SOURCE_FILES=ON
50+
51+"$CMAKE_BIN" --build "$NATIVE_BUILD" --parallel "$JOBS"
52+
53+for abi in $ABIS; do
54+ ABI_DIR="$(abi_output_dir "$abi")"
55+ ABI_BUILD="$BUILD_DIR/$abi"
56+ SSL_LIB="$ABI_DIR/libssl.a"
57+ CRYPTO_LIB="$ABI_DIR/libcrypto.a"
58+
59+ [[ -f "$SSL_LIB" ]] || { echo "ERROR: BoringSSL library not found: $SSL_LIB" >&2; exit 1; }
60+ [[ -f "$CRYPTO_LIB" ]] || { echo "ERROR: BoringSSL library not found: $CRYPTO_LIB" >&2; exit 1; }
61+
62+ echo
63+ echo "==> Building TDLib for $abi (API=$API)"
64+
65+ "$CMAKE_BIN" \
66+ -S "$TD_SRC" \
67+ -B "$ABI_BUILD" \
68+ -G Ninja \
69+ -DCMAKE_MAKE_PROGRAM="$NINJA_BIN" \
70+ -DCMAKE_BUILD_TYPE=Release \
71+ -DCMAKE_C_FLAGS="$CMAKE_REPRO_C_FLAGS" \
72+ -DCMAKE_CXX_FLAGS="$CMAKE_REPRO_CXX_FLAGS" \
73+ -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
74+ -DANDROID_ABI="$abi" \
75+ -DANDROID_PLATFORM="android-$API" \
76+ -DANDROID_STL=c++_static \
77+ -DOPENSSL_INCLUDE_DIR="$BORINGSSL_SRC/include" \
78+ -DOPENSSL_SSL_LIBRARY="$SSL_LIB" \
79+ -DOPENSSL_CRYPTO_LIBRARY="$CRYPTO_LIB"
80+
81+ "$CMAKE_BIN" --build "$ABI_BUILD" --target tde2e tdutils --parallel "$JOBS"
82+
83+ TDE2E_LIB="$(find_archive "$ABI_BUILD" libtde2e.a)"
84+ TDUTILS_LIB="$(find_archive "$ABI_BUILD" libtdutils.a)"
85+
86+ [[ -n "$TDE2E_LIB" ]] || { echo "ERROR: libtde2e.a was not produced for $abi" >&2; exit 1; }
87+ [[ -n "$TDUTILS_LIB" ]] || { echo "ERROR: libtdutils.a was not produced for $abi" >&2; exit 1; }
88+
89+ copy_archive "$TDE2E_LIB" "$ABI_DIR/libtde2e.a"
90+ copy_archive "$TDUTILS_LIB" "$ABI_DIR/libtdutils.a"
91+ finalize_archive "$ABI_DIR/libtde2e.a"
92+ finalize_archive "$ABI_DIR/libtdutils.a"
93+
94+ echo "==> $ABI_DIR/libtde2e.a"
95+ echo "==> $ABI_DIR/libtdutils.a"
96+done
97+
98+rm -rf "$BUILD_DIR"
99+
100+echo
101+echo "TDLib static build completed."
TMessagesProj/jni/prebuild/build_tlottie.shnew file+172
@@ -0,0 +1,172 @@
1+#!/usr/bin/env bash
2+
3+set -Eeuo pipefail
4+
5+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+source "$SCRIPT_DIR/common.sh"
7+script_dir="$SCRIPT_DIR"
8+tlottie_dir=${TLOTTIE_SOURCE_DIR:-"$SCRIPT_DIR/../tlottie"}
9+tlottie_dir=$(CDPATH= cd -- "$tlottie_dir" && pwd)
10+manifest="$tlottie_dir/Cargo.toml"
11+profile=release-nostd
12+features=cpu,no-std,c-api
13+
14+if [ ! -f "$manifest" ]; then
15+ echo "error: tlottie Cargo.toml not found at $manifest" >&2
16+ echo "set TLOTTIE_SOURCE_DIR if the source is not next to tlottie_lib" >&2
17+ exit 1
18+fi
19+
20+rustup_toolchain=
21+if command -v rustup >/dev/null 2>&1; then
22+ rustup_toolchain=${TLOTTIE_RUST_TOOLCHAIN:-stable}
23+fi
24+
25+run_cargo() {
26+ if [ -n "$rustup_toolchain" ]; then
27+ rustup run "$rustup_toolchain" cargo "$@"
28+ else
29+ cargo "$@"
30+ fi
31+}
32+
33+run_rustc() {
34+ if [ -n "$rustup_toolchain" ]; then
35+ rustup run "$rustup_toolchain" rustc "$@"
36+ else
37+ rustc "$@"
38+ fi
39+}
40+
41+# Cargo otherwise resolves rustc through PATH. That can mix a rustup Cargo with
42+# a Homebrew/system rustc whose sysroot does not contain the checked targets.
43+if [ -n "$rustup_toolchain" ]; then
44+ RUSTC=$(rustup which --toolchain "$rustup_toolchain" rustc)
45+else
46+ RUSTC=$(command -v rustc)
47+fi
48+export RUSTC
49+
50+if [ -n "$rustup_toolchain" ]; then
51+ missing_targets=
52+ for target in \
53+ aarch64-linux-android \
54+ armv7-linux-androideabi \
55+ i686-linux-android \
56+ x86_64-linux-android
57+ do
58+ if ! rustup target list --toolchain "$rustup_toolchain" --installed | grep -qx "$target"; then
59+ missing_targets="$missing_targets $target"
60+ fi
61+ done
62+ if [ -n "$missing_targets" ]; then
63+ echo "error: Rust Android targets are not installed:$missing_targets" >&2
64+ echo "install them with: rustup target add --toolchain $rustup_toolchain$missing_targets" >&2
65+ exit 1
66+ fi
67+fi
68+
69+target_dir=${CARGO_TARGET_DIR:-"$tlottie_dir/target/no-std-android"}
70+mkdir -p "$target_dir"
71+target_dir=$(CDPATH= cd -- "$target_dir" && pwd)
72+export CARGO_TARGET_DIR="$target_dir"
73+
74+# rustc records source, dependency, sysroot, and OUT_DIR paths in object files.
75+# Give every machine the same virtual paths so those details do not make the
76+# resulting static archives depend on the checkout location or user account.
77+rust_sysroot=$(run_rustc --print sysroot)
78+cargo_home=${CARGO_HOME:-}
79+if [ -z "$cargo_home" ]; then
80+ cargo_home=$(dirname -- "$(dirname -- "$(command -v cargo)")")
81+ if [ -d "$cargo_home/registry" ]; then
82+ :
83+ elif [ -n "${HOME:-}" ] && [ -d "$HOME/.cargo" ]; then
84+ cargo_home="$HOME/.cargo"
85+ else
86+ cargo_home=
87+ fi
88+fi
89+
90+# Do not inherit per-machine compiler flags. CARGO_ENCODED_RUSTFLAGS takes
91+# precedence over RUSTFLAGS and, unlike RUSTFLAGS, safely supports spaces in
92+# paths. Its separator is ASCII unit separator (0x1f).
93+unset RUSTFLAGS
94+CARGO_ENCODED_RUSTFLAGS=
95+append_rustflag() {
96+ if [ -n "$CARGO_ENCODED_RUSTFLAGS" ]; then
97+ CARGO_ENCODED_RUSTFLAGS="$CARGO_ENCODED_RUSTFLAGS$(printf '\037')"
98+ fi
99+ CARGO_ENCODED_RUSTFLAGS="$CARGO_ENCODED_RUSTFLAGS$1"
100+}
101+append_rustflag "--remap-path-prefix=$tlottie_dir=/tlottie"
102+append_rustflag "--remap-path-prefix=$target_dir=/tlottie-target"
103+append_rustflag "--remap-path-prefix=$rust_sysroot=/rust-sysroot"
104+append_rustflag "-Cdebuginfo=0"
105+if [ -n "$cargo_home" ]; then
106+ cargo_home=$(CDPATH= cd -- "$cargo_home" && pwd)
107+ append_rustflag "--remap-path-prefix=$cargo_home=/cargo-home"
108+fi
109+export CARGO_ENCODED_RUSTFLAGS
110+export CARGO_INCREMENTAL=0
111+export SOURCE_DATE_EPOCH=1
112+export TZ=UTC
113+export LC_ALL=C
114+
115+echo "Building tlottie Android archives"
116+echo " source: $tlottie_dir"
117+echo " rustc: $(run_rustc --version)"
118+echo " profile: $profile"
119+echo " features: $features"
120+echo " target dir: $target_dir"
121+
122+temporary_archive=
123+cleanup() {
124+ if [ -n "$temporary_archive" ] && [ -f "$temporary_archive" ]; then
125+ unlink "$temporary_archive"
126+ fi
127+}
128+trap cleanup EXIT HUP INT TERM
129+
130+for abi in $ABIS; do
131+ case "$abi" in
132+ arm64-v8a) rust_target=aarch64-linux-android ;;
133+ armeabi-v7a) rust_target=armv7-linux-androideabi ;;
134+ x86) rust_target=i686-linux-android ;;
135+ x86_64) rust_target=x86_64-linux-android ;;
136+ *) echo "error: unsupported ABI: $abi" >&2; exit 1 ;;
137+ esac
138+
139+ destination="$(abi_output_dir "$abi")/libtlottie.a"
140+
141+ echo "Building $abi ($rust_target)"
142+ run_cargo rustc \
143+ --manifest-path "$manifest" \
144+ --locked \
145+ --profile "$profile" \
146+ --target "$rust_target" \
147+ --lib \
148+ --no-default-features \
149+ --features "$features" \
150+ --crate-type staticlib \
151+ -- \
152+ -C metadata=tlottie-staticlib
153+
154+ artifact="$target_dir/$rust_target/$profile/libtlottie.a"
155+ if [ ! -f "$artifact" ]; then
156+ echo "error: Cargo did not emit $artifact" >&2
157+ exit 1
158+ fi
159+
160+ mkdir -p "$(dirname "$destination")"
161+ temporary_archive=$(mktemp "$(dirname "$destination")/.libtlottie.a.XXXXXX")
162+ cp "$artifact" "$temporary_archive"
163+ chmod 0644 "$temporary_archive"
164+ mv -f "$temporary_archive" "$destination"
165+ temporary_archive=
166+ finalize_archive "$destination"
167+
168+ bytes=$(wc -c < "$destination" | tr -d ' ')
169+ echo "Wrote $destination ($bytes bytes)"
170+done
171+
172+echo "All tlottie Android archives are ready."
TMessagesProj/jni/prebuild/build_wamr.shnew file+95
@@ -0,0 +1,95 @@
1+#!/usr/bin/env bash
2+set -euo pipefail
3+
4+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+source "$SCRIPT_DIR/common.sh"
6+
7+WAMR_SRC="${WAMR_SOURCE_DIR:-$SCRIPT_DIR/../third_party/wamr}"
8+BUILD_ROOT="${WAMR_BUILD_ROOT:-$SCRIPT_DIR/build/wamr}"
9+
10+require_ndk
11+require_cmake_ninja
12+
13+if [[ ! -f "$WAMR_SRC/CMakeLists.txt" ]]; then
14+ echo "ERROR: WAMR source tree not found: $WAMR_SRC" >&2
15+ exit 1
16+fi
17+
18+android_target_for_abi() {
19+ case "$1" in
20+ arm64-v8a)
21+ printf '%s\n' "AARCH64"
22+ ;;
23+ armeabi-v7a)
24+ printf '%s\n' "ARM"
25+ ;;
26+ x86_64)
27+ printf '%s\n' "X86_64"
28+ ;;
29+ x86)
30+ printf '%s\n' "X86_32"
31+ ;;
32+ *)
33+ echo "Unsupported ABI: $1" >&2
34+ return 1
35+ ;;
36+ esac
37+}
38+
39+mkdir -p "$BUILD_ROOT"
40+
41+for abi in $ABIS; do
42+ echo
43+ echo "==> Building WAMR for $abi"
44+
45+ build_dir="$BUILD_ROOT/$abi"
46+ out_dir="$(abi_output_dir "$abi")"
47+ target="$(android_target_for_abi "$abi")"
48+
49+ rm -rf "$build_dir"
50+ mkdir -p "$build_dir" "$out_dir"
51+
52+ "$CMAKE_BIN" \
53+ -S "$WAMR_SRC" \
54+ -B "$build_dir" \
55+ -G Ninja \
56+ -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" \
57+ -DANDROID_ABI="$abi" \
58+ -DANDROID_PLATFORM="android-$API" \
59+ -DANDROID_STL=c++_static \
60+ -DCMAKE_BUILD_TYPE=Release \
61+ -DBUILD_SHARED_LIBS=OFF \
62+ -DWAMR_BUILD_PLATFORM=android \
63+ -DWAMR_BUILD_TARGET="$target" \
64+ -DWAMR_BUILD_INTERP=1 \
65+ -DWAMR_BUILD_FAST_INTERP=1 \
66+ -DWAMR_BUILD_AOT=1 \
67+ -DWAMR_BUILD_JIT=0 \
68+ -DWAMR_BUILD_FAST_JIT=0 \
69+ -DWAMR_BUILD_LIBC_BUILTIN=1 \
70+ -DWAMR_BUILD_LIBC_WASI=1 \
71+ -DWAMR_BUILD_LIB_PTHREAD=0 \
72+ -DWAMR_BUILD_LIB_WASI_THREADS=0
73+
74+ "$CMAKE_BIN" --build "$build_dir" --target vmlib --parallel "$JOBS"
75+
76+ archive="$build_dir/libiwasm.a"
77+ if [[ ! -f "$archive" ]]; then
78+ archive="$(find "$build_dir" -type f -name 'libiwasm.a' -print -quit)"
79+ fi
80+
81+ if [[ -z "${archive:-}" || ! -f "$archive" ]]; then
82+ echo "ERROR: libiwasm.a was not produced for $abi" >&2
83+ exit 1
84+ fi
85+
86+ destination="$out_dir/libiwasm.a"
87+ copy_archive "$archive" "$destination"
88+ finalize_archive "$destination"
89+
90+ echo " -> $destination"
91+done
92+
93+echo
94+echo "WAMR build completed."
95+
TMessagesProj/jni/prebuild/common.shnew file+424
@@ -0,0 +1,424 @@
1+#!/usr/bin/env bash
2+# Shared configuration and portable helpers for Android prebuild scripts.
3+
4+if [[ -n "${PREBUILD_COMMON_LOADED:-}" ]]; then
5+ return 0 2>/dev/null || exit 0
6+fi
7+PREBUILD_COMMON_LOADED=1
8+
9+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10+JNI_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
11+LIB_DIR="${LIB_DIR:-$SCRIPT_DIR/lib}"
12+INCLUDE_DIR="${INCLUDE_DIR:-$SCRIPT_DIR/include}"
13+PKGCONFIG_DIR="${PKGCONFIG_DIR:-$SCRIPT_DIR/pkgconfig}"
14+
15+NDK_VERSION="${NDK_VERSION:-27.2.12479018}"
16+API="${API:-21}"
17+ABIS="${ABIS:-arm64-v8a armeabi-v7a x86_64 x86}"
18+
19+host_os="$(uname -s)"
20+case "$host_os" in
21+ Darwin)
22+ DEFAULT_ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
23+ ;;
24+ Linux)
25+ DEFAULT_ANDROID_SDK_ROOT="$HOME/Android/Sdk"
26+ ;;
27+ *)
28+ echo "ERROR: unsupported host OS: $host_os" >&2
29+ return 1 2>/dev/null || exit 1
30+ ;;
31+esac
32+
33+ANDROID_SDK_ROOT="${ANDROID_SDK_ROOT:-$DEFAULT_ANDROID_SDK_ROOT}"
34+ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-$ANDROID_SDK_ROOT/ndk/$NDK_VERSION}"
35+TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake"
36+
37+# Resolve the host-specific LLVM prebuilt directory once for scripts that call
38+# the NDK compilers directly (libvpx/dav1d/FFmpeg).
39+case "$host_os" in
40+ Darwin)
41+ case "$(uname -m)" in
42+ arm64)
43+ if [[ -d "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-arm64" ]]; then
44+ NDK_HOST_TAG="darwin-arm64"
45+ else
46+ NDK_HOST_TAG="darwin-x86_64"
47+ fi
48+ ;;
49+ x86_64) NDK_HOST_TAG="darwin-x86_64" ;;
50+ *)
51+ echo "ERROR: unsupported macOS host architecture: $(uname -m)" >&2
52+ return 1 2>/dev/null || exit 1
53+ ;;
54+ esac
55+ ;;
56+ Linux)
57+ case "$(uname -m)" in
58+ x86_64) NDK_HOST_TAG="linux-x86_64" ;;
59+ aarch64|arm64) NDK_HOST_TAG="linux-aarch64" ;;
60+ *)
61+ echo "ERROR: unsupported Linux host architecture: $(uname -m)" >&2
62+ return 1 2>/dev/null || exit 1
63+ ;;
64+ esac
65+ ;;
66+esac
67+NDK_TOOLCHAIN="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$NDK_HOST_TAG"
68+
69+# Make C/C++ outputs independent from the absolute checkout path. Clang may
70+# otherwise embed /Users/... on macOS and /home/... on Linux into object files
71+# through __FILE__, diagnostics/debug metadata and other compiler-generated data.
72+#
73+# Map both the project JNI tree and Android NDK to stable virtual locations on
74+# every host. This removes differences such as /Users/... vs /home/... not only
75+# for project sources, but also for NDK headers/sysroot paths recorded by Clang.
76+REPRODUCIBLE_SOURCE_ROOT="${REPRODUCIBLE_SOURCE_ROOT:-/jni}"
77+REPRODUCIBLE_NDK_ROOT="${REPRODUCIBLE_NDK_ROOT:-/android-ndk}"
78+
79+REPRODUCIBLE_PATH_FLAGS="-ffile-prefix-map=$JNI_DIR=$REPRODUCIBLE_SOURCE_ROOT -fdebug-prefix-map=$JNI_DIR=$REPRODUCIBLE_SOURCE_ROOT -fmacro-prefix-map=$JNI_DIR=$REPRODUCIBLE_SOURCE_ROOT -ffile-prefix-map=$ANDROID_NDK_HOME=$REPRODUCIBLE_NDK_ROOT -fdebug-prefix-map=$ANDROID_NDK_HOME=$REPRODUCIBLE_NDK_ROOT -fmacro-prefix-map=$ANDROID_NDK_HOME=$REPRODUCIBLE_NDK_ROOT"
80+
81+# Produce final static-library objects directly. Avoid post-build strip/objcopy,
82+# which can invalidate SHT_LLVM_ADDRSIG used by LLD --icf=safe.
83+PREBUILD_OBJECT_FLAGS="-g0 -fno-ident"
84+
85+# Preserve caller-provided flags while appending the reproducibility flags.
86+CFLAGS="${CFLAGS:+$CFLAGS }$REPRODUCIBLE_PATH_FLAGS $PREBUILD_OBJECT_FLAGS"
87+CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$REPRODUCIBLE_PATH_FLAGS $PREBUILD_OBJECT_FLAGS"
88+export CFLAGS CXXFLAGS
89+
90+# Pass these explicitly to CMake projects. Some projects/cache setups do not
91+# reliably preserve environment CFLAGS/CXXFLAGS across configure steps.
92+CMAKE_REPRO_C_FLAGS="$CFLAGS"
93+CMAKE_REPRO_CXX_FLAGS="$CXXFLAGS"
94+
95+# Normalize environment data that can otherwise leak into generated files or
96+# archives. Individual build systems are free to ignore SOURCE_DATE_EPOCH, but
97+# exporting it is harmless and makes supported tools deterministic.
98+export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-1}"
99+export TZ="${TZ:-UTC}"
100+export LC_ALL="${LC_ALL:-C}"
101+
102+if [[ -z "${JOBS:-}" ]]; then
103+ if command -v nproc >/dev/null 2>&1; then
104+ JOBS="$(nproc)"
105+ elif command -v sysctl >/dev/null 2>&1; then
106+ JOBS="$(sysctl -n hw.logicalcpu 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 8)"
107+ else
108+ JOBS=8
109+ fi
110+fi
111+
112+# Convert a dotted Android SDK CMake directory name into a numeric key so the
113+# newest installed version can be selected without GNU sort -V (not on macOS).
114+version_key() {
115+ local version="$1"
116+ awk -v version="$version" 'BEGIN {
117+ n = split(version, parts, ".")
118+ for (i = 1; i <= 6; ++i) {
119+ value = (i <= n ? parts[i] + 0 : 0)
120+ printf "%09d", value
121+ }
122+ }'
123+}
124+
125+find_latest_sdk_tool() {
126+ local tool_name="$1"
127+ local cmake_root="$ANDROID_SDK_ROOT/cmake"
128+ local dir version key best_key="" best_tool=""
129+
130+ [[ -d "$cmake_root" ]] || return 1
131+
132+ for dir in "$cmake_root"/*; do
133+ [[ -d "$dir" ]] || continue
134+ [[ -x "$dir/bin/$tool_name" ]] || continue
135+
136+ version="$(basename "$dir")"
137+ key="$(version_key "$version")"
138+ if [[ -z "$best_key" || "$key" > "$best_key" ]]; then
139+ best_key="$key"
140+ best_tool="$dir/bin/$tool_name"
141+ fi
142+ done
143+
144+ [[ -n "$best_tool" ]] || return 1
145+ printf '%s\n' "$best_tool"
146+}
147+
148+resolve_tool() {
149+ local override="$1"
150+ local tool_name="$2"
151+ local path_tool=""
152+ local sdk_tool=""
153+
154+ if [[ -n "$override" ]]; then
155+ printf '%s\n' "$override"
156+ return 0
157+ fi
158+
159+ path_tool="$(command -v "$tool_name" 2>/dev/null || true)"
160+ if [[ -n "$path_tool" ]]; then
161+ printf '%s\n' "$path_tool"
162+ return 0
163+ fi
164+
165+ sdk_tool="$(find_latest_sdk_tool "$tool_name" 2>/dev/null || true)"
166+ if [[ -n "$sdk_tool" ]]; then
167+ printf '%s\n' "$sdk_tool"
168+ return 0
169+ fi
170+
171+ return 1
172+}
173+
174+CMAKE_BIN="$(resolve_tool "${CMAKE_BIN:-}" cmake || true)"
175+NINJA_BIN="$(resolve_tool "${NINJA_BIN:-}" ninja || true)"
176+
177+require_command() {
178+ local command_name="$1"
179+ command -v "$command_name" >/dev/null 2>&1 || {
180+ echo "ERROR: $command_name is required" >&2
181+ return 1
182+ }
183+}
184+
185+require_cmake_ninja() {
186+ [[ -n "$CMAKE_BIN" && -x "$CMAKE_BIN" ]] || {
187+ echo "ERROR: cmake is required" >&2
188+ echo " Install it, add it to PATH, or install CMake from Android SDK Manager." >&2
189+ echo " Android SDK searched at: $ANDROID_SDK_ROOT" >&2
190+ return 1
191+ }
192+ [[ -n "$NINJA_BIN" && -x "$NINJA_BIN" ]] || {
193+ echo "ERROR: ninja is required" >&2
194+ echo " Install it, add it to PATH, or install CMake from Android SDK Manager." >&2
195+ echo " Android SDK searched at: $ANDROID_SDK_ROOT" >&2
196+ return 1
197+ }
198+}
199+
200+require_ndk() {
201+ [[ -f "$TOOLCHAIN_FILE" ]] || {
202+ echo "ERROR: Android NDK not found: $ANDROID_NDK_HOME" >&2
203+ echo " Set ANDROID_NDK_HOME, ANDROID_SDK_ROOT, or NDK_VERSION." >&2
204+ return 1
205+ }
206+}
207+
208+find_ndk_tool() {
209+ local tool_name="$1"
210+ local candidate
211+
212+ for candidate in "$ANDROID_NDK_HOME"/toolchains/llvm/prebuilt/*/bin/"$tool_name"; do
213+ [[ -x "$candidate" ]] || continue
214+ printf '%s\n' "$candidate"
215+ return 0
216+ done
217+
218+ return 1
219+}
220+
221+LLVM_STRIP_BIN="${LLVM_STRIP_BIN:-$(find_ndk_tool llvm-strip || true)}"
222+LLVM_OBJCOPY_BIN="${LLVM_OBJCOPY_BIN:-$(find_ndk_tool llvm-objcopy || true)}"
223+LLVM_READELF_BIN="${LLVM_READELF_BIN:-$(find_ndk_tool llvm-readelf || true)}"
224+
225+require_llvm_strip() {
226+ [[ -n "$LLVM_STRIP_BIN" && -x "$LLVM_STRIP_BIN" ]] || {
227+ echo "ERROR: llvm-strip was not found in Android NDK: $ANDROID_NDK_HOME" >&2
228+ return 1
229+ }
230+}
231+
232+require_llvm_objcopy() {
233+ [[ -n "$LLVM_OBJCOPY_BIN" && -x "$LLVM_OBJCOPY_BIN" ]] || {
234+ echo "ERROR: llvm-objcopy was not found in Android NDK: $ANDROID_NDK_HOME" >&2
235+ return 1
236+ }
237+}
238+
239+strip_archive_debug() {
240+ local archive="$1"
241+ [[ -f "$archive" ]] || {
242+ echo "ERROR: archive not found for stripping: $archive" >&2
243+ return 1
244+ }
245+ require_llvm_strip
246+ "$LLVM_STRIP_BIN" --strip-debug "$archive"
247+}
248+
249+normalize_archive() {
250+ local archive="$1"
251+ local temporary="${archive}.normalized.$$"
252+
253+ [[ -f "$archive" ]] || {
254+ echo "ERROR: archive not found for normalization: $archive" >&2
255+ return 1
256+ }
257+
258+ require_llvm_objcopy
259+ rm -f "$temporary"
260+
261+ # llvm-objcopy understands GNU/LLVM archives directly, so archive member
262+ # ordering and duplicate member names are preserved. Removing .comment
263+ # eliminates host-Clang build metadata (+/-bolt, +/-mlgo) without touching
264+ # code, relocations, or symbols required by the final linker.
265+ if ! "$LLVM_OBJCOPY_BIN" --remove-section=.comment "$archive" "$temporary"; then
266+ rm -f "$temporary"
267+ return 1
268+ fi
269+
270+ chmod 0644 "$temporary"
271+ mv -f "$temporary" "$archive"
272+}
273+
274+finalize_archive() {
275+ local archive="$1"
276+ strip_archive_debug "$archive"
277+ normalize_archive "$archive"
278+}
279+
280+abi_output_dir() {
281+ printf '%s/%s\n' "$LIB_DIR" "$1"
282+}
283+
284+abi_include_dir() {
285+ printf '%s/%s\n' "$INCLUDE_DIR" "$1"
286+}
287+
288+abi_pkgconfig_dir() {
289+ printf '%s/%s\n' "$PKGCONFIG_DIR" "$1"
290+}
291+
292+copy_archive() {
293+ local source="$1"
294+ local destination="$2"
295+ mkdir -p "$(dirname "$destination")"
296+ cp "$source" "$destination"
297+ chmod 0644 "$destination"
298+}
299+
300+# Rewrite host-specific absolute paths only inside generated diagnostic/build
301+# metadata. This does not change the real paths passed to compilers/linkers.
302+normalize_host_paths_in_string() {
303+ local value="$1"
304+
305+ # Replace the full host-specific LLVM prebuilt path before the NDK root so
306+ # linux-x86_64 / darwin-x86_64 cannot leak into embedded config strings.
307+ value="${value//$NDK_TOOLCHAIN/$REPRODUCIBLE_NDK_ROOT/toolchain}"
308+ value="${value//$ANDROID_NDK_HOME/$REPRODUCIBLE_NDK_ROOT}"
309+ value="${value//$JNI_DIR/$REPRODUCIBLE_SOURCE_ROOT}"
310+
311+ printf '%s' "$value"
312+}
313+
314+# Normalize only lines containing MARKER. Useful for generated files where the
315+# build configuration is embedded as a runtime diagnostic string.
316+normalize_generated_metadata_lines() {
317+ local file="$1"
318+ local marker="$2"
319+ local temporary line normalized found=0
320+
321+ [[ -f "$file" ]] || {
322+ echo "ERROR: generated metadata file not found: $file" >&2
323+ return 1
324+ }
325+
326+ temporary="$(mktemp "${file}.normalized.XXXXXX")"
327+ while IFS= read -r line || [[ -n "$line" ]]; do
328+ if [[ "$line" == *"$marker"* ]]; then
329+ normalized="$(normalize_host_paths_in_string "$line")"
330+ printf '%s\n' "$normalized" >> "$temporary"
331+ found=1
332+ else
333+ printf '%s\n' "$line" >> "$temporary"
334+ fi
335+ done < "$file"
336+
337+ if [[ "$found" != "1" ]]; then
338+ rm -f "$temporary"
339+ echo "ERROR: metadata marker '$marker' was not found in: $file" >&2
340+ return 1
341+ fi
342+
343+ chmod --reference="$file" "$temporary" 2>/dev/null || chmod 0644 "$temporary"
344+ mv -f "$temporary" "$file"
345+}
346+
347+
348+command_version_line() {
349+ local label="$1"
350+ local command_name="$2"
351+ shift 2
352+
353+ local command_path
354+ command_path="$(command -v "$command_name" 2>/dev/null || true)"
355+ if [[ -z "$command_path" ]]; then
356+ printf '%-16s %s\n' "$label" '<not installed>'
357+ return 0
358+ fi
359+
360+ local version
361+ version="$($command_name "$@" 2>&1 | head -n 1 || true)"
362+ printf '%-16s %s | %s\n' "$label" "$version" "$command_path"
363+}
364+
365+write_build_environment() {
366+ local destination="${1:-$SCRIPT_DIR/build/env.txt}"
367+ local clang_bin="$NDK_TOOLCHAIN/bin/clang"
368+
369+ mkdir -p "$(dirname "$destination")"
370+ {
371+ echo "Build environment"
372+ echo "Generated: $(date -u '+%Y-%m-%dT%H:%M:%SZ')"
373+ echo "Host OS: $host_os"
374+ echo "Host arch: $(uname -m)"
375+ echo "ABIs: $ABIS"
376+ echo "API: $API"
377+ echo "Jobs: $JOBS"
378+ echo "Android SDK: $ANDROID_SDK_ROOT"
379+ echo "Android NDK: $ANDROID_NDK_HOME"
380+ echo "NDK version: $NDK_VERSION"
381+ echo "NDK host tag: $NDK_HOST_TAG"
382+ if [[ -x "$clang_bin" ]]; then
383+ printf '%-16s %s | %s\n' "Clang" "$("$clang_bin" --version 2>&1 | head -n 1)" "$clang_bin"
384+ fi
385+ if [[ -n "$CMAKE_BIN" && -x "$CMAKE_BIN" ]]; then
386+ printf '%-16s %s | %s\n' "CMake" "$("$CMAKE_BIN" --version 2>&1 | head -n 1)" "$CMAKE_BIN"
387+ fi
388+ if [[ -n "$NINJA_BIN" && -x "$NINJA_BIN" ]]; then
389+ printf '%-16s %s | %s\n' "Ninja" "$("$NINJA_BIN" --version 2>&1 | head -n 1)" "$NINJA_BIN"
390+ fi
391+ command_version_line "Make" make --version
392+ command_version_line "NASM" nasm -v
393+ command_version_line "Yasm" yasm --version
394+ command_version_line "Meson" meson --version
395+ command_version_line "pkg-config" pkg-config --version
396+ command_version_line "gperf" gperf --version
397+ command_version_line "Python" python3 --version
398+ command_version_line "Rust" rustc --version
399+ command_version_line "Cargo" cargo --version
400+ command_version_line "Go" go version
401+ command_version_line "Perl" perl -v
402+ echo "SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:-}"
403+ echo "TZ: ${TZ:-}"
404+ echo "LC_ALL: ${LC_ALL:-}"
405+ } > "$destination"
406+
407+ echo "Build environment saved: $destination"
408+}
409+
410+print_common_config() {
411+ echo "Host: $host_os"
412+ echo "Jobs: $JOBS"
413+ echo "ABIs: $ABIS"
414+ echo "Library output: $LIB_DIR"
415+ echo "Generated header output: $INCLUDE_DIR"
416+ echo "Pkg-config output: $PKGCONFIG_DIR"
417+ echo "Reproducible source root: $REPRODUCIBLE_SOURCE_ROOT"
418+ echo "Reproducible NDK root: $REPRODUCIBLE_NDK_ROOT"
419+ [[ -n "$CMAKE_BIN" ]] && echo "CMake: $CMAKE_BIN"
420+ [[ -n "$NINJA_BIN" ]] && echo "Ninja: $NINJA_BIN"
421+ [[ -n "$LLVM_STRIP_BIN" ]] && echo "llvm-strip: $LLVM_STRIP_BIN"
422+ [[ -n "$LLVM_OBJCOPY_BIN" ]] && echo "llvm-objcopy: $LLVM_OBJCOPY_BIN"
423+ [[ -n "$LLVM_READELF_BIN" ]] && echo "llvm-readelf: $LLVM_READELF_BIN"
424+}
TMessagesProj/jni/prebuild/lib/arm64-v8a/libiwasm.anew file

Binary file not shown.

TMessagesProj/jni/prebuild/lib/armeabi-v7a/libiwasm.anew file

Binary file not shown.

TMessagesProj/jni/prebuild/lib/x86/libiwasm.anew file

Binary file not shown.

TMessagesProj/jni/prebuild/lib/x86_64/libiwasm.anew file

Binary file not shown.

TMessagesProj/jni/prepare.pynew file+413

This diff is too big to show here.

TMessagesProj/jni/secureid_ocr.cppnew file+640

This diff is too big to show here.

TMessagesProj/jni/sqlite/sqlite3.c+241687

This diff is too big to show here.

TMessagesProj/jni/sqlite/sqlite3.h+12836

This diff is too big to show here.

TMessagesProj/jni/td+1

This diff is too big to show here.

TMessagesProj/jni/tde2e/bridge.cpp+411

This diff is too big to show here.

TMessagesProj/jni/tests.cpp+30

This diff is too big to show here.

TMessagesProj/jni/tgnet/ApiScheme.cpp+2035

This diff is too big to show here.

TMessagesProj/jni/tgnet/ApiScheme.h+1007

This diff is too big to show here.

TMessagesProj/jni/tgnet/BuffersStorage.cpp+123

This diff is too big to show here.

TMessagesProj/jni/tgnet/BuffersStorage.h+38

This diff is too big to show here.

TMessagesProj/jni/tgnet/ByteArray.cpp+71

This diff is too big to show here.

TMessagesProj/jni/tgnet/ByteArray.h+31

This diff is too big to show here.

TMessagesProj/jni/tgnet/ByteStream.cpp+86

This diff is too big to show here.

TMessagesProj/jni/tgnet/ByteStream.h+32

This diff is too big to show here.

TMessagesProj/jni/tgnet/Config.cpp+131

This diff is too big to show here.

TMessagesProj/jni/tgnet/Config.h+29

This diff is too big to show here.

TMessagesProj/jni/tgnet/Connection.cpp+808

This diff is too big to show here.

TMessagesProj/jni/tgnet/Connection.h+124

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionSession.cpp+114

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionSession.h+45

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionSocket.cpp+1322

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionSocket.h+144

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionsManager.cpp+4130

This diff is too big to show here.

TMessagesProj/jni/tgnet/ConnectionsManager.h+297

This diff is too big to show here.

TMessagesProj/jni/tgnet/Datacenter.cpp+1585

This diff is too big to show here.

TMessagesProj/jni/tgnet/Datacenter.h+154

This diff is too big to show here.

TMessagesProj/jni/tgnet/Defines.h+207

This diff is too big to show here.

TMessagesProj/jni/tgnet/EventObject.cpp+50

This diff is too big to show here.

TMessagesProj/jni/tgnet/EventObject.h+26

This diff is too big to show here.

TMessagesProj/jni/tgnet/FileLog.cpp+212

This diff is too big to show here.

TMessagesProj/jni/tgnet/FileLog.h+42

This diff is too big to show here.

TMessagesProj/jni/tgnet/Handshake.cpp+1074

This diff is too big to show here.

TMessagesProj/jni/tgnet/Handshake.h+73

This diff is too big to show here.

TMessagesProj/jni/tgnet/MTProtoScheme.cpp+1191

This diff is too big to show here.

TMessagesProj/jni/tgnet/MTProtoScheme.h+923

This diff is too big to show here.

TMessagesProj/jni/tgnet/NativeByteBuffer.cpp+710

This diff is too big to show here.

TMessagesProj/jni/tgnet/NativeByteBuffer.h+107

This diff is too big to show here.

TMessagesProj/jni/tgnet/ProxyCheckInfo.cpp+21

This diff is too big to show here.

TMessagesProj/jni/tgnet/ProxyCheckInfo.h+41

This diff is too big to show here.

TMessagesProj/jni/tgnet/Request.cpp+93

This diff is too big to show here.

TMessagesProj/jni/tgnet/Request.h+83

This diff is too big to show here.

TMessagesProj/jni/tgnet/TLObject.cpp+38

This diff is too big to show here.

TMessagesProj/jni/tgnet/TLObject.h+30

This diff is too big to show here.

TMessagesProj/jni/tgnet/TLSHello.cpp+389

This diff is too big to show here.

TMessagesProj/jni/tgnet/TLSHello.h+61

This diff is too big to show here.

TMessagesProj/jni/tgnet/Timer.cpp+62

This diff is too big to show here.

TMessagesProj/jni/tgnet/Timer.h+41

This diff is too big to show here.

TMessagesProj/jni/third_party/absl+1

This diff is too big to show here.

TMessagesProj/jni/third_party/boringssl+1

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/Android.mk+104

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/breakpad_googletest_includes.h+57

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/client_info.h+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_client.cc+105

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_client.h+65

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_server.cc+330

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/crash_generation/crash_generation_server.h+135

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/data/linux-gate-amd.sym+3

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/data/linux-gate-intel.sym+3

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/mapping_info.h+61

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/seccomp_unwinder.cc+154

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/seccomp_unwinder.h+50

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/thread_info.cc+299

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/thread_info.h+91

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc+253

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler.cc+743

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler.h+278

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/exception_handler_unittest.cc+1195

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/minidump_descriptor.cc+100

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/handler/minidump_descriptor.h+161

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/log/log.cc+48

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/log/log.h+41

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer.cc+423

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer.h+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc+164

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/cpu_set.h+144

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/cpu_set_unittest.cc+164

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/directory_reader.h+106

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/directory_reader_unittest.cc+78

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/line_reader.h+131

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/line_reader_unittest.cc+169

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc+257

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper.h+123

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc+118

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper.cc+475

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper.h+189

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc+94

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc+349

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.h+92

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc+463

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer.cc+1373

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer.h+124

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc+756

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc+66

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.h+49

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h+130

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc+199

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/linux/sender/google_crash_report_sender.cc+104

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer-inl.h+97

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer.cc+284

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer.h+272

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/client/minidump_file_writer_unittest.cc+179

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/breakpad_getcontext.S+489

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/breakpad_getcontext_unittest.cc+186

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/elf.h+168

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/sgidefs.h+41

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/stab.h+100

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/sys/procfs.h+124

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/sys/signal.h+35

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/include/ucontext.h+56

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/testing/include/wchar.h+76

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/testing/mkdtemp.h+110

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/testing/pthread_fixes.h+99

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/android/ucontext_constants.h+144

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/basictypes.h+58

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/byte_cursor.h+265

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/byte_cursor_unittest.cc+776

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/common.gyp+243

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/convert_UTF.c+554

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/convert_UTF.h+164

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader-inl.h+175

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader.cc+245

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader.h+310

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/bytereader_unittest.cc+697

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/cfi_assembler.cc+198

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/cfi_assembler.h+269

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler.cc+198

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler.h+363

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2diehandler_unittest.cc+524

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2enums.h+650

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader.cc+2344

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader.h+1050

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_cfi_unittest.cc+2452

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_die_unittest.cc+484

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/dwarf2reader_test_common.h+149

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/functioninfo.cc+231

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/functioninfo.h+188

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/line_state_machine.h+61

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf/types.h+55

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module.cc+295

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module.h+202

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cfi_to_module_unittest.cc+306

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module.cc+1073

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module.h+318

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_cu_to_module_unittest.cc+1779

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module.cc+143

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module.h+188

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/dwarf_line_to_module_unittest.cc+391

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/language.cc+83

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/language.h+88

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/crc32.cc+70

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/crc32.h+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols.cc+976

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols.h+80

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/dump_symbols_unittest.cc+172

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/eintr_wrapper.h+58

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump.cc+179

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump.h+148

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_core_dump_unittest.cc+256

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_gnu_compat.h+46

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module.cc+178

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module.h+58

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elf_symbols_to_module_unittest.cc+370

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils-inl.h+74

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils.cc+194

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/elfutils.h+118

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id.cc+191

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id.h+78

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/file_id_unittest.cc+263

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader.cc+202

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader.h+107

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/google_crashdump_uploader_test.cc+170

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/guid_creator.cc+104

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/guid_creator.h+48

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/http_upload.cc+216

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/http_upload.h+88

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/ignore_ret.h+40

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/libcurl_wrapper.cc+241

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/libcurl_wrapper.h+93

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support.cc+237

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support.h+96

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/linux_libc_support_unittest.cc+213

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file.cc+118

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file.h+87

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/memory_mapped_file_unittest.cc+208

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink.cc+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink.h+65

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/safe_readlink_unittest.cc+89

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf.cc+261

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf.h+195

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/synth_elf_unittest.cc+413

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/auto_testfile.h+124

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/crash_generator.cc+322

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/linux/tests/crash_generator.h+117

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/md5.cc+251

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/md5.h+27

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/memory.h+212

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/memory_range.h+145

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/memory_range_unittest.cc+193

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/memory_unittest.cc+97

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/minidump_type_helper.h+56

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/module.cc+319

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/module.h+336

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/module_unittest.cc+546

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/scoped_ptr.h+404

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary.cc+45

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary.h+260

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/simple_string_dictionary_unittest.cc+308

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/dump_symbols.cc+681

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/dump_symbols.h+49

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/file_id.cc+197

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/file_id.h+66

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/guid_creator.cc+84

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/guid_creator.h+50

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/solaris/message_output.h+54

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader.cc+315

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader.h+326

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_reader_unittest.cc+611

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module.cc+197

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module.h+143

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/stabs_to_module_unittest.cc+258

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/string_conversion.cc+155

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/string_conversion.h+68

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/symbol_data.h+42

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/test_assembler.cc+359

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/test_assembler.h+484

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/test_assembler_unittest.cc+1662

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/testdata/func-line-pairing.h+676

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/unordered.h+62

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/common/using_std_string.h+65

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/config.h.in+76

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/breakpad_types.h+86

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_amd64.h+235

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_arm.h+151

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_arm64.h+140

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_mips.h+160

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_ppc.h+163

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_ppc64.h+129

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_sparc.h+158

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_cpu_x86.h+174

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_linux.h+87

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_mac.h+205

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_ps3.h+67

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_solaris.h+94

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_exception_win32.h+2261

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_format.h+972

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/common/minidump_size.h+107

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/basic_source_line_resolver.h+144

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/call_stack.h+77

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/code_module.h+94

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/code_modules.h+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/dump_context.h+112

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/dump_object.h+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/exploitability.h+73

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/fast_source_line_resolver.h+100

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/memory_region.h+79

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/microdump.h+126

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/microdump_processor.h+63

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/minidump.h+1030

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/minidump_processor.h+141

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/process_result.h+66

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/process_state.h+189

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/source_line_resolver_base.h+128

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/source_line_resolver_interface.h+117

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame.h+144

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame_cpu.h+405

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stack_frame_symbolizer.h+108

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/stackwalker.h+235

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/symbol_supplier.h+99

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/google_breakpad/processor/system_info.h+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/address_map-inl.h+93

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/address_map.h+85

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/address_map_unittest.cc+196

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_module.h+109

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_modules.cc+128

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_code_modules.h+88

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver.cc+609

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver_types.h+177

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/basic_source_line_resolver_unittest.cc+680

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/binarystream.cc+124

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/binarystream.h+92

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/binarystream_unittest.cc+432

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/call_stack.cc+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info-inl.h+119

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info.cc+186

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info.h+275

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/cfi_frame_info_unittest.cc+546

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map-inl.h+197

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map.h+150

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/contained_range_map_unittest.cc+263

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86.cc+241

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86.h+127

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/disassembler_x86_unittest.cc+233

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/dump_context.cc+614

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/dump_object.cc+39

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability.cc+110

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_linux.cc+86

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_linux.h+55

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_unittest.cc+117

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_win.cc+287

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/exploitability_win.h+55

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver.cc+275

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver_types.h+185

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/fast_source_line_resolver_unittest.cc+489

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/linked_ptr.h+193

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/logging.cc+115

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/logging.h+186

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers-inl.h+266

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers.h+168

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/map_serializers_unittest.cc+386

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump.cc+306

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_processor.cc+100

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_processor_unittest.cc+197

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk.cc+151

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_machine_readable_test+43

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_test+43

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/microdump_stackwalk_test_vars+1

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump.cc+4631

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_dump.cc+213

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_dump_test+36

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_processor.cc+1536

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_processor_unittest.cc+644

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk.cc+162

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk_machine_readable_test+37

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_stackwalk_test+37

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/minidump_unittest.cc+1266

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/module_comparer.cc+302

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/module_comparer.h+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/module_factory.h+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/module_serializer.cc+207

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/module_serializer.h+127

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper.cc+56

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper.h+53

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/pathname_stripper_unittest.cc+87

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator-inl.h+363

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator.h+179

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/postfix_evaluator_unittest.cc+403

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/process_state.cc+69

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/processor.gyp+183

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/processor_tools.gypi+57

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/range_map-inl.h+220

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/range_map.h+132

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/range_map_unittest.cc+552

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/simple_serializer-inl.h+260

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/simple_serializer.h+63

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/simple_symbol_supplier.cc+204

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/simple_symbol_supplier.h+140

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/source_line_resolver_base.cc+341

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/source_line_resolver_base_types.h+158

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stack_frame_cpu.cc+79

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stack_frame_symbolizer.cc+138

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalk_common.cc+929

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalk_common.h+49

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker.cc+295

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list.cc+92

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list.h+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_address_list_unittest.cc+197

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64.cc+307

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64.h+108

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_amd64_unittest.cc+699

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm.cc+296

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm.h+107

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64.cc+278

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64.h+104

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm64_unittest.cc+880

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_arm_unittest.cc+974

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips.cc+300

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips.h+85

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_mips_unittest.cc+697

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc.cc+146

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc.h+79

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc64.cc+137

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_ppc64.h+77

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_selftest.cc+433

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_selftest_sol.s+111

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_sparc.cc+139

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_sparc.h+78

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_unittest_utils.h+211

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86.cc+672

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86.h+117

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/stackwalker_x86_unittest.cc+2128

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map-inl.h+71

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map.h+78

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_address_map_unittest.cc+236

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map-inl.h+92

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map.h+96

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_contained_range_map_unittest.cc+320

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_map-inl.h+176

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_map.h+144

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_map_iterator-inl.h+147

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_map_iterator.h+112

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_map_unittest.cc+386

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map-inl.h+130

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map.h+106

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/static_range_map_unittest.cc+421

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/symbolic_constants_win.cc+6417

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/symbolic_constants_win.h+50

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump.cc+391

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump.h+372

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump_unittest.cc+336

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/synth_minidump_unittest_data.h+418

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/tokenize.cc+79

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/tokenize.h+63

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/processor/windows_frame_info.h+209

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/COPYING+22

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curl.h+1936

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlbuild.h+202

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlrules.h+249

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/curlver.h+70

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/easy.h+103

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/mprintf.h+82

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/multi.h+346

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/stdcheaders.h+34

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/typecheck-gcc.h+551

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/curl/types.h+1

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/libglog.pc.in+10

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/commandlineflags.h+132

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/googleinit.h+51

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/base/mutex.h+325

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/config.h.in+165

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/config_for_unittests.h+66

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle.cc+1307

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle.h+84

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.cc+142

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.sh+95

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/demangle_unittest.txt+137

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/log_severity.h+84

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/logging.h.in+1506

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/raw_logging.h.in+185

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/stl_logging.h.in+154

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/glog/vlog_is_on.h.in+129

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/googletest.h+604

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging.cc+1808

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striplog_test.sh+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest10.cc+35

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest2.cc+35

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_striptest_main.cc+68

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_unittest.cc+1210

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/logging_unittest.err+305

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/mock-log.h+155

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/mock-log_test.cc+106

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/raw_logging.cc+172

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler.cc+350

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler_unittest.cc+97

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/signalhandler_unittest.sh+131

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace.h+60

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_generic-inl.h+59

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_libunwind-inl.h+87

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_powerpc-inl.h+130

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_unittest.cc+157

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_x86-inl.h+139

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stacktrace_x86_64-inl.h+105

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/stl_logging_unittest.cc+191

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize.cc+681

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize.h+116

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/symbolize_unittest.cc+365

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities.cc+346

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities.h+226

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/utilities_unittest.cc+54

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/vlog_is_on.cc+249

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/config.h+136

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/log_severity.h+88

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/logging.h+1510

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/raw_logging.h+189

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/stl_logging.h+158

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/glog/vlog_is_on.h+133

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/port.cc+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/port.h+149

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/glog/src/windows/preprocess.sh+118

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/Makefile.am+43

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/TODO+43

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_implicit.c+422

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_implicit.h+13

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_insn.c+623

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_insn.h+506

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_invariant.c+313

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_invariant.h+11

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_modrm.c+310

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_modrm.h+13

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_opcode_tables.c+2939

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_opcode_tables.h+57

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_operand.c+425

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_operand.h+11

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_reg.c+234

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_reg.h+41

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_settings.c+13

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/ia32_settings.h+27

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/libdis.h+836

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/libdisasm.gyp+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/qword.h+14

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/Makefile+70

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/README+128

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/libdisasm.i+508

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/libdisasm_oop.i+1114

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/perl/Makefile-swig+65

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/perl/Makefile.PL+7

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/python/Makefile-swig+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/ruby/Makefile-swig+68

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/ruby/extconf.rb+4

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/swig/tcl/Makefile-swig+63

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_disasm.c+210

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_format.c+1430

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_imm.c+70

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_imm.h+18

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_insn.c+182

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_misc.c+71

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_operand_list.c+191

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/libdisasm/x86_operand_list.h+8

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/linux/include/gflags/gflags.h+533

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/linux/include/gflags/gflags_completions.h+121

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/linux/lib/gflags/libgflags.a

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/linux/lib/glog/libglog.a

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/lss/linux_syscall_support.h+4029

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/Makefile.am+363

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/SEBS+240

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.cc+80

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.h+142

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.cc+1357

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.h+318

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc+1452

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc+158

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc+258

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h+99

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc+361

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h+103

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc+210

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h+85

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc+139

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h+167

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc+611

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc+122

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc+347

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h+159

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc+1933

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h+170

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc+277

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h+102

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc+121

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc+382

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h+103

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc+334

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h+118

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc+453

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h+104

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto+113

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc+1281

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.cc+459

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.h+303

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer_unittest.cc+600

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.cc+243

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.h+84

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc+537

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.h+121

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.cc+216

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.h+77

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.cc+137

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.h+108

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.cc+428

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.h+101

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.cc+128

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.h+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.cc+478

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.h+213

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.cc+1287

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.h+109

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.cc+884

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.h+134

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc+122

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc+719

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h+121

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.cc+444

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.h+113

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.cc+610

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.h+120

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/main.cc+61

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.cc+231

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.h+113

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/package_info.h+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.cc+1473

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.h+434

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser_unittest.cc+2122

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.cc+163

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.h+73

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc+1082

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.h+790

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.proto+145

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.cc+1006

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.h+156

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc+116

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.cc+460

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.h+108

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/test_plugin.cc+51

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh+91

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.cc+218

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.h+93

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.cc+4497

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.h+1367

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.cc+7708

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.h+5223

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.proto+538

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.cc+541

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.h+366

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database_unittest.cc+748

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_unittest.cc+4034

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.cc+558

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.h+136

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message_unittest.cc+162

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.cc+1464

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.h+904

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_heavy.cc+457

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_unittest.cc+642

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc+1228

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.h+424

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc+384

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.cc+55

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.h+82

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.cc+839

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.h+1102

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_inl.h+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_unittest.cc+1131

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.cc+335

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.h+207

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh+44

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/package_info.h+54

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.cc+199

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.h+136

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer_unittest.cc+261

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.cc+694

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.h+313

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer_unittest.cc+766

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.cc+48

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.h+238

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc+470

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h+357

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc+393

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h+340

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc+850

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/lite_unittest.cc+112

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message.cc+318

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message.h+692

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.cc+334

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.h+239

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/message_unittest.cc+281

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/package_info.h+64

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.cc+262

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.h+80

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops_unittest.cc+405

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.cc+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.h+1295

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field_unittest.cc+1086

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/service.cc+46

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/service.h+291

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.cc+377

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.h+1211

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common_unittest.cc+357

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/hash.h+220

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/map-util.h+119

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.cc+88

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.h+123

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once_unittest.cc+253

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/stl_util-inl.h+121

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid.cc+536

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc+40

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.cc+1173

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.h+457

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil_unittest.cc+83

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.cc+134

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.h+170

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.cc+2854

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.h+174

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.cc+1502

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.h+101

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_message

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_packed_fields_message

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt+116

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt+116

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.cc+176

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.h+83

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.cc+254

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.h+98

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgunzip.cc+73

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgzip.cc+79

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.cc+1285

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.h+285

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/text_format_unittest.cc+1141

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest.proto+630

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_custom_options.proto+366

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto+50

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_empty.proto+37

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto+1046

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import.proto+61

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import_lite.proto+49

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite.proto+312

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto+43

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_mset.proto+72

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_no_generic_services.proto+52

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_optimize_for.proto+61

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.cc+204

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.h+268

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set_unittest.cc+512

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.cc+1069

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.h+304

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.cc+359

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.h+620

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite_inl.h+774

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_unittest.cc+905

This diff is too big to show here.

TMessagesProj/jni/third_party/breakpad/src/third_party/protobuf/protobuf/src/solaris/libstdc++.la+51

This diff is too big to show here.

TMessagesProj/jni/third_party/dav1d+1

This diff is too big to show here.

TMessagesProj/jni/third_party/ffmpeg+1

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/CHANGES+227

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/LIBSRTP_VERSION+1

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/LICENSE+35

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/README.chromium+15

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/README.md+487

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/cipher/aes_gcm_ossl.c+578

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/cipher/aes_icm_ossl.c+538

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/cipher/cipher.c+677

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/cipher/null_cipher.c+151

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/hash/auth.c+185

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/hash/hmac_ossl.c+271

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/hash/null_auth.c+166

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/aes.h+83

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_gcm_ossl.h+62

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_icm.h+62

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/aes_icm_ossl.h+61

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/alloc.h+76

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/auth.h+173

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/cipher.h+248

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/cipher_types.h+81

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/config.h+30

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/crypto_kernel.h+215

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/crypto_types.h+116

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/datatypes.h+379

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/err.h+134

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/integers.h+146

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/key.h+88

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/null_auth.h+73

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/null_cipher.h+57

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/rdb.h+125

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/rdbx.h+209

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/include/stat.h+66

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/kernel/alloc.c+99

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/kernel/crypto_kernel.c+559

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/kernel/err.c+106

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/kernel/key.c+120

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/math/datatypes.c+488

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/math/stat.c+211

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/replay/rdb.c+135

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/replay/rdbx.c+384

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/replay/ut_sim.c+101

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/test/cipher_driver.c+608

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/test/datatypes_driver.c+228

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/crypto/test/kernel_driver.c+125

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/config.h+30

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/ekt.h+181

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/getopt_s.h+67

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/srtp.h+1759

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/srtp_priv.h+280

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/include/ut_sim.h+83

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/srtp/ekt.c+281

This diff is too big to show here.

TMessagesProj/jni/third_party/libsrtp/srtp/srtp.c+4732

This diff is too big to show here.

TMessagesProj/jni/third_party/libvpx+1

This diff is too big to show here.

TMessagesProj/jni/third_party/libyuv+1

This diff is too big to show here.

TMessagesProj/jni/third_party/openh264+1

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/LICENSE+45

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/OWNERS+4

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/README.chromium+41

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/README.md+69

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/README.txt+379

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/pffft_fuzzer.cc+85

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/pffft_unittest.cc+196

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/src/fftpack.c+3112

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/src/fftpack.h+799

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/src/pffft.c+1881

This diff is too big to show here.

TMessagesProj/jni/third_party/pffft/src/pffft.h+198

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/BUILD.gn+17

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/COPYING+31

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/README.chromium+29

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/src/rnn_activations.h+102

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/src/rnn_vad_weights.cc+401

This diff is too big to show here.

TMessagesProj/jni/third_party/rnnoise/src/rnn_vad_weights.h+37

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp.h+666

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_asconf.c+3517

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_asconf.h+94

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_auth.c+2302

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_auth.h+213

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_bsd_addr.c+990

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_bsd_addr.h+72

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_callout.c+249

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_callout.h+119

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_cc_functions.c+2493

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_constants.h+1070

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_crc32.c+831

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_crc32.h+56

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_header.h+595

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_indata.c+5800

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_indata.h+121

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_input.c+6411

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_input.h+66

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_lock_userspace.h+248

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_os.h+89

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_os_userspace.h+1144

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_output.c+15035

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_output.h+240

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_pcb.c+8078

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_pcb.h+882

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_peeloff.c+302

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_peeloff.h+70

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_process_lock.h+692

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sha1.c+347

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sha1.h+94

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_ss_functions.c+1126

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_structs.h+1288

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sysctl.c+1625

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_sysctl.h+627

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_timer.c+1641

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_timer.h+103

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_uio.h+1352

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_userspace.c+444

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_usrreq.c+9039

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctp_var.h+443

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctputil.c+8710

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet/sctputil.h+417

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet6/sctp6_usrreq.c+1851

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/netinet6/sctp6_var.h+81

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_atomic.h+315

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_environment.c+384

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_environment.h+123

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_inpcb.h+373

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_ip6_var.h+124

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_ip_icmp.h+225

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_malloc.h+203

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_mbuf.c+1557

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_mbuf.h+407

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_queue.h+639

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_recv_thread.c+1566

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_recv_thread.h+34

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_route.h+130

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_socket.c+3584

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_socketvar.h+527

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/user_uma.h+96

This diff is too big to show here.

TMessagesProj/jni/third_party/usrsctplib/usrsctp.h+1321

This diff is too big to show here.

TMessagesProj/jni/third_party/wamr+1

This diff is too big to show here.

TMessagesProj/jni/third_party/xiph/ogg+1

This diff is too big to show here.

TMessagesProj/jni/third_party/xiph/opus+1

This diff is too big to show here.

TMessagesProj/jni/third_party/xiph/opusfile+1

This diff is too big to show here.

TMessagesProj/jni/tlottie+1

This diff is too big to show here.

TMessagesProj/jni/utilities.cpp+56

This diff is too big to show here.

TMessagesProj/jni/voip/CMakeLists.txt+1727

This diff is too big to show here.

TMessagesProj/jni/voip/ReferenceCoreEmbedded.cpp+5228

This diff is too big to show here.

TMessagesProj/jni/voip/org_telegram_messenger_voip_Instance.cpp+1401

This diff is too big to show here.

TMessagesProj/jni/voip/org_telegram_messenger_voip_Instance.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/AUTHORS+1

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/COPYING+31

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/README+21

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/include/rnnoise.h+114

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/_kiss_fft_guts.h+182

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/arch.h+261

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/celt_lpc.c+279

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/celt_lpc.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/common.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/denoise.c+646

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/kiss_fft.c+601

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/kiss_fft.h+203

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/opus_types.h+159

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/pitch.c+526

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/pitch.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/rnn.c+178

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/rnn.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/rnn_data.c+11051

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/rnn_data.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/rnn_reader.c+168

This diff is too big to show here.

TMessagesProj/jni/voip/rnnoise/src/tansig_table.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/AudioDeviceHelper.cpp+142

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/AudioDeviceHelper.h+17

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/AudioFrame.h+17

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/ChannelManager.cpp+161

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/ChannelManager.h+95

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/CodecSelectHelper.cpp+303

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/CodecSelectHelper.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/CryptoHelper.cpp+61

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/CryptoHelper.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/DirectConnectionChannel.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/EncryptedConnection.cpp+808

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/EncryptedConnection.h+113

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FakeAudioDeviceModule.cpp+257

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FakeAudioDeviceModule.h+55

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.cpp+173

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FieldTrialsConfig.cpp+7

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/FieldTrialsConfig.h+12

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Instance.cpp+66

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Instance.h+293

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/InstanceImpl.cpp+202

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/InstanceImpl.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/LogSinkImpl.cpp+71

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/LogSinkImpl.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Manager.cpp+465

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Manager.h+94

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/MediaManager.cpp+1173

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/MediaManager.h+195

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Message.cpp+406

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Message.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/NetworkManager.cpp+397

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/NetworkManager.h+123

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/PlatformContext.h+15

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/SctpDataChannelProviderInterfaceImpl.cpp+160

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/SctpDataChannelProviderInterfaceImpl.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/StaticThreads.cpp+144

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/StaticThreads.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/Stats.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/ThreadLocalObject.cpp+1

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/ThreadLocalObject.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/TurnCustomizerImpl.cpp+21

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/TurnCustomizerImpl.h+19

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/VideoCaptureInterface.cpp+15

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/VideoCaptureInterface.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/VideoCaptureInterfaceImpl.cpp+227

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/VideoCaptureInterfaceImpl.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/VideoCapturerInterface.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSource.cpp+68

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSource.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp+461

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp+65

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceManager.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AVIOContextImpl.cpp+64

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AVIOContextImpl.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.cpp+181

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartInternal.cpp+404

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartInternal.h+65

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp+138

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPartPersistentDecoder.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupAudioCapturePostProcessor.cpp+198

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupAudioCapturePostProcessor.h+91

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformer.cpp+574

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformer.h+156

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupFrameTransformerTest.cpp+255

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupInstanceCustomImpl.cpp+3949

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupInstanceCustomImpl.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupInstanceImpl.h+239

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupInstanceReferenceImpl.cpp+2538

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupInstanceReferenceImpl.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayload.h+78

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayloadInternal.cpp+373

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupJoinPayloadInternal.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupNetworkManager.cpp+680

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/GroupNetworkManager.h+134

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRenderer.cpp+53

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRenderer.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/StreamingAudioRendererTest.cpp+125

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/StreamingMediaContext.cpp+1106

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/StreamingMediaContext.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/VideoStreamingPart.cpp+925

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/group/VideoStreamingPart.h+78

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/PlatformInterface.h+364

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/AndroidContext.cpp+61

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/AndroidContext.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/AndroidInterface.cpp+167

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/AndroidInterface.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/VideoCameraCapturer.cpp+62

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/VideoCameraCapturer.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/VideoCapturerInterfaceImpl.cpp+31

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/android/VideoCapturerInterfaceImpl.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/AudioDeviceModuleIOS.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/AudioDeviceModuleMacos.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomExternalCapturer.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomExternalCapturer.mm+90

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomSimulcastEncoderAdapter.cpp+1017

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/CustomSimulcastEncoderAdapter.h+201

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinFFMpeg.h+13

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinFFMpeg.mm+45

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinInterface.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinInterface.mm+158

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinVideoSource.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DarwinVideoSource.mm+165

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopCaptureSourceViewMac.h+55

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopCaptureSourceViewMac.mm+207

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopSharingCapturer.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/DesktopSharingCapturer.mm+117

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/ExtractCVPixelBuffer.h+12

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/ExtractCVPixelBuffer.mm+14

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265+Private.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCCodecSpecificInfoH265.mm+27

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCH265ProfileLevelId.h+16

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/RTCH265ProfileLevelId.mm+18

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueue.h+19

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueue.m+124

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueueLocalObject.h+19

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/SQueueLocalObject.m+40

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIOCapturer.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIOCapturer.m+45

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIODevice.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGCMIODevice.mm+193

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCCVPixelBuffer.h+15

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCCVPixelBuffer.mm+28

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm+116

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm+172

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH264.h+18

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH264.mm+292

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH265.h+23

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoDecoderH265.mm+359

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH264.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH264.mm+852

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH265.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/TGRTCVideoEncoderH265.mm+624

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCMIOCapture.h+18

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCMIOCapture.mm+237

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturer.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturer.mm+941

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturerMac.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCameraCapturerMac.mm+725

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCaptureView.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCaptureView.mm+264

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCapturerInterfaceImpl.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoCapturerInterfaceImpl.mm+480

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalView.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalView.mm+459

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalViewMac.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoMetalViewMac.mm+503

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferView.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferView.mm+786

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferViewMac.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/VideoSampleBufferViewMac.mm+427

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/h264_encoder_impl.cpp+349

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/h264_encoder_impl.h+81

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/h265_nalu_rewriter.cc+406

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/h265_nalu_rewriter.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/CallAudioTone.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession+Configuration.mm+184

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession+Private.h+95

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession.h+266

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSession.mm+1000

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSessionConfiguration.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCAudioSessionConfiguration.mm+137

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCNativeAudioSessionDelegateAdapter.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/RTCNativeAudioSessionDelegateAdapter.mm+89

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_ios.h+329

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_ios.mm+1210

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_module_ios.h+161

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_audio_device_module_ios.mm+756

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_voice_processing_audio_unit.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/iOS/tgcalls_voice_processing_audio_unit.mm+544

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLI420Renderer.h+17

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLI420Renderer.mm+111

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer+Private.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMTLRenderer.mm+647

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMetalContextHolder.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/macOS/TGRTCMetalContextHolder.m+136

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_decoder_factory.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_decoder_factory.mm+126

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_encoder_factory.h+61

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/darwin/objc_video_encoder_factory.mm+240

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/fake/FakeInterface.cpp+172

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/fake/FakeInterface.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/DesktopInterface.cpp+56

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/DesktopInterface.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCameraCapturer.cpp+253

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCameraCapturer.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerInterfaceImpl.cpp+145

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerInterfaceImpl.h+55

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerTrackSource.cpp+19

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/tdesktop/VideoCapturerTrackSource.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpContext.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpScreenCapturer.cpp+397

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/platform/uwp/UwpScreenCapturer.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/third-party/json11.cpp+791

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/third-party/json11.hpp+232

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/utils/gzip.cpp+183

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/utils/gzip.h+16

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ContentNegotiation.cpp+649

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ContentNegotiation.h+100

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/CustomDcSctpSocket.cpp+1827

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/CustomDcSctpSocket.h+301

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/CustomParameters.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/DirectNetworkingImpl.cpp+600

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/DirectNetworkingImpl.h+120

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ExternalSignalingConnection.cpp+30

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ExternalSignalingConnection.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceNetworking.h+173

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2CompatImpl.cpp+1733

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2CompatImpl.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2Impl.cpp+2412

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2Impl.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2ReferenceImpl.cpp+2054

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/InstanceV2ReferenceImpl.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransport.cpp+338

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransport.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/MtProtoIceTransportTest.cpp+471

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/NativeNetworkingImpl.cpp+1062

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/NativeNetworkingImpl.h+143

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/RawTcpSocket.cpp+111

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/RawTcpSocket.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ReflectorPort.cpp+965

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ReflectorPort.h+256

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ReflectorRelayPortFactory.cpp+82

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/ReflectorRelayPortFactory.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/Signaling.cpp+988

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/Signaling.h+196

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingConnection.cpp+8

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingConnection.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingEncryption.cpp+22

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingEncryption.h+24

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingSctpConnection.cpp+234

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingSctpConnection.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingTranslator.cpp+271

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2/SignalingTranslator.h+70

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2_4_0_0/Signaling_4_0_0.cpp+703

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2_4_0_0/Signaling_4_0_0.h+106

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CLAUDE.md+157

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreABI.h+240

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreBackend.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreHost.cpp+1794

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CallCoreHost.h+176

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CoreBase64.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CoreFactory.h+24

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CoreGzip.cpp+46

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/CoreGzip.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/EmbeddedCoreModule.h+21

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/HostCompressionService.cpp+44

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/InstanceV2PumpImpl.cpp+148

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/InstanceV2PumpImpl.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/NativeCoreBackend.cpp+33

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/NativeCoreBackend.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/ReferenceCallCore.cpp+663

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/ReferenceCallCore.h+111

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/SignalingFraming.cpp+61

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/SignalingFraming.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/VariantCallCore.cpp+234

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/VariantCallCore.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/WamrCoreBackend.cpp+223

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/WamrCoreBackend.h+63

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/reference_core_factory.cpp+14

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/variant_core_factory.cpp+15

This diff is too big to show here.

TMessagesProj/jni/voip/tgcalls/v2wasm/wasm_module_entry.cpp+61

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64.cc+123

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64_check.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_arm64_unittest.cc+24

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_benchmark.cc+104

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_capi_unittest.c+66

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_extend_unittests.h+112

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_internal.h+23

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_portable.cc+351

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_portable_unittest.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_prefetch.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_prefetch_unittest.cc+9

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_read_le.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_read_le_unittest.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_round_up.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_round_up_unittest.cc+84

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42.cc+256

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42_check.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_sse42_unittest.cc+24

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_test_main.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/crc32c_unittest.cc+129

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/include/crc32c/crc32c.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/crc32c/src/include/crc32c/crc32c_config.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/LICENSE+27

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/checkdiscard_proguard.flags+12

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/core.cc+255

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/core.h+125

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/generate_jni/JniInit_jni.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/generate_jni/JniUtil_jni.h+63

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/AccessedByNative.java+17

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNative.java+28

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNativeForTesting.java+26

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CalledByNativeUnchecked.java+29

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/CheckDiscard.java+25

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/JNINamespace.java+20

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/JniStaticTestMocker.java+15

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeClassQualifiedName.java+25

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeLibraryLoadedStatus.java+44

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/java/src/org/jni_zero/NativeMethods.java+20

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/jni_export.h+24

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/jni_int_wrapper.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/jni_zero_helper.h+117

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/logging.cc+76

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/logging.h+90

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/proguard.flags+14

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/proguard_for_test.flags+7

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/scoped_java_ref.cc+93

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/scoped_java_ref.h+534

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Arrays_jni.h+4578

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Collection_jni.h+385

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/system_jni/List_jni.h+994

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/jni_zero/system_jni/Map_jni.h+950

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/ChangeLog+253

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/LICENSE+53

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/README+57

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/README.chromium+40

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/buffer.c+552

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/config.h+266

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/devpoll.c+416

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/epoll.c+376

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/epoll_sub.c+52

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evbuffer.c+453

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evdns.3+322

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evdns.c+3196

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evdns.h+528

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event-config.h+281

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event-internal.h+101

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event.3+624

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event.c+998

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event.h+1212

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event_rpcgen.py+1423

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/event_tagging.c+441

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evhttp.h+375

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evport.c+517

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evrpc-internal.h+87

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evrpc.c+656

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evrpc.h+486

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evsignal.h+52

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evutil.c+283

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/evutil.h+186

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/http-internal.h+153

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/http.c+2883

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/kqueue.c+432

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/log.c+185

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/log.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/min_heap.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/poll.c+378

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/select.c+363

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/signal.c+376

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/stamp-h.in+1

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/strlcpy-internal.h+21

This diff is too big to show here.

TMessagesProj/jni/voip/third_party/libevent/strlcpy.c+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/OWNERS+14

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/README.md+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/adaptation/BUILD.gn+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/adaptation/DEPS+7

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/adaptation/resource.cc+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/adaptation/resource.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/array_view.h+334

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/array_view_unittest.cc+630

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/async_dns_resolver.h+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/BUILD.gn+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/audio_frame.cc+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/audio_frame.h+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/audio_frame_processor.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/audio_mixer.h+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/channel_layout.cc+282

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/channel_layout.h+165

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_config.cc+278

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_config.h+250

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_factory.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_canceller3_factory.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_control.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_detector_creator.cc+21

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/echo_detector_creator.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/test/BUILD.gn+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/test/audio_frame_unittest.cc+136

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio/test/echo_canceller3_config_unittest.cc+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/BUILD.gn+147

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/BUILD.gn+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_decoder_L16.cc+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_decoder_L16.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_encoder_L16.cc+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/L16/audio_encoder_L16.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_codec_pair_id.cc+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_codec_pair_id.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder.cc+169

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder.h+195

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder_factory.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_decoder_factory_template.h+145

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder.cc+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder.h+269

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder_factory.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_encoder_factory_template.h+163

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_format.cc+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/audio_format.h+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_decoder_factory.cc+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_decoder_factory.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_encoder_factory.cc+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/builtin_audio_encoder_factory.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/BUILD.gn+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_decoder_g711.cc+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_decoder_g711.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_encoder_g711.cc+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g711/audio_encoder_g711.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/BUILD.gn+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_decoder_g722.cc+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_decoder_g722.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722.cc+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/g722/audio_encoder_g722_config.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/BUILD.gn+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/BUILD.gn+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus_config.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_opus.cc+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_decoder_opus.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus.cc+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.cc+107

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus.cc+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.cc+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_decoder_factory.cc+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_decoder_factory.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_encoder_factory.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/opus_audio_encoder_factory.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/BUILD.gn+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc+222

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc+224

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_options.cc+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/audio_options.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/call/audio_sink.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/call/bitrate_allocation.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/call/transport.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/call/transport.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/candidate.cc+219

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/candidate.h+255

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/candidate_unittest.cc+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/create_peerconnection_factory.cc+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/create_peerconnection_factory.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/crypto/BUILD.gn+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/crypto/crypto_options.cc+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/crypto/crypto_options.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/crypto/frame_decryptor_interface.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/crypto/frame_encryptor_interface.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/data_channel_interface.cc+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/data_channel_interface.h+227

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/dtls_transport_interface.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/dtls_transport_interface.h+124

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/dtmf_sender_interface.h+125

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/enable_media.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/enable_media.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/enable_media_with_defaults.cc+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/enable_media_with_defaults.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/BUILD.gn+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/OWNERS+15

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/environment.h+148

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/environment_factory.cc+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/environment_factory.h+148

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/environment/environment_unittest.cc+275

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/fec_controller.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/fec_controller_override.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials.cc+107

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials_registry.cc+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials_registry.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials_unittest.cc+152

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/field_trials_view.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/frame_transformer_factory.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/frame_transformer_factory.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/frame_transformer_interface.h+125

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/function_view.h+130

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/function_view_unittest.cc+176

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/g3doc/index.md+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/g3doc/threading_design.md+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/ice_transport_factory.cc+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/ice_transport_factory.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/ice_transport_interface.h+137

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/jsep.cc+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/jsep.h+254

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/jsep_ice_candidate.cc+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/jsep_ice_candidate.h+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/jsep_session_description.h+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/legacy_stats_types.cc+879

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/legacy_stats_types.h+478

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/location.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/make_ref_counted.h+120

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/media_stream_interface.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/media_stream_interface.h+376

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/media_stream_track.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/media_types.cc+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/media_types.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/metronome/BUILD.gn+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/metronome/metronome.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/metronome/test/BUILD.gn+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/metronome/test/fake_metronome.cc+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/metronome/test/fake_metronome.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/BUILD.gn+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/DEPS+14

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/custom_neteq_factory.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/custom_neteq_factory.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/default_neteq_controller_factory.cc+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/default_neteq_controller_factory.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/neteq.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/neteq.h+314

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/neteq_controller.h+189

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/neteq_controller_factory.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/neteq_factory.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer.cc+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer.h+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/neteq/tick_timer_unittest.cc+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/network_state_predictor.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/notifier.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/numerics/BUILD.gn+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/numerics/DEPS+6

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter.cc+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter.h+132

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/numerics/samples_stats_counter_unittest.cc+222

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/packet_socket_factory.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/peer_connection_interface.cc+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/peer_connection_interface.h+1717

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/priority.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/ref_count.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/ref_counted_base.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_error.cc+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_error.h+332

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_error_unittest.cc+235

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/BUILD.gn+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event.cc+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event.h+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log.cc+21

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log/rtc_event_log_factory_interface.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file.cc+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtc_event_log_output_file_unittest.cc+168

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_headers.cc+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_headers.h+179

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_packet_info.cc+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_packet_info.h+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_packet_info_unittest.cc+218

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_packet_infos.h+131

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_packet_infos_unittest.cc+113

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_parameters.cc+306

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_parameters.h+665

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_parameters_unittest.cc+303

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_receiver_interface.cc+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_receiver_interface.h+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_sender_interface.cc+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_sender_interface.h+118

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_direction.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_interface.cc+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/rtp_transceiver_interface.h+176

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/scoped_refptr.h+227

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/scoped_refptr_unittest.cc+111

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/sctp_transport_interface.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/sctp_transport_interface.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/sequence_checker.h+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/sequence_checker_unittest.cc+231

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/set_local_description_observer_interface.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/set_remote_description_observer_interface.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/attribute.h+94

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats.h+195

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats_collector_callback.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/rtc_stats_report.h+137

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/stats/rtcstats_objects.h+484

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_gcd.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_libevent.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_stdlib.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_stdlib_or_libevent_experiment.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_unittest.cc+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/default_task_queue_factory_win.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag.cc+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag.h+179

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/pending_task_safety_flag_unittest.cc+199

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_base.cc+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_base.h+198

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_factory.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_test.cc+354

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/task_queue_test.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/test/BUILD.gn+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/task_queue/test/mock_task_queue_base.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/DEPS+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/OWNERS+5

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/audio_quality_analyzer_interface.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/audioproc_float.cc+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/audioproc_float.h+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/compile_all_headers.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_frame_generator.cc+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_frame_generator.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_network_emulation_manager.cc+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_network_emulation_manager.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_peer_connection_quality_test_frame_generator.cc+103

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_peer_connection_quality_test_frame_generator.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_peerconnection_quality_test_fixture.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_peerconnection_quality_test_fixture.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_simulcast_test_fixture.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_simulcast_test_fixture.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_time_controller.cc+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_time_controller.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_time_controller_unittest.cc+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_video_quality_test_fixture.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_video_quality_test_fixture.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_videocodec_test_fixture.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/create_videocodec_test_fixture.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/fake_frame_decryptor.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/fake_frame_decryptor.h+70

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/fake_frame_encryptor.cc+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/fake_frame_encryptor.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/frame_generator_interface.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/frame_generator_interface.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/BUILD.gn+281

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/DEPS+14

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter.cc+146

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/chrome_perf_dashboard_metrics_exporter_test.cc+248

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/global_metrics_logger_and_exporter_test.cc+131

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metric.cc+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metric.h+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator.cc+132

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_accumulator_test.cc+315

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_exporter.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger.cc+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger.h+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_logger_test.cc+326

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter.cc+166

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/metrics_set_proto_file_exporter_test.cc+172

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter.cc+157

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/print_result_proxy_metrics_exporter_test.cc+177

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/proto/metric.proto+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter.cc+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/metrics/stdout_metrics_exporter_test.cc+211

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_async_dns_resolver.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_audio_mixer.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_audio_sink.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_data_channel.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_dtmf_sender.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_encoder_selector.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_fec_controller_override.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_frame_decryptor.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_frame_encryptor.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_frame_transformer.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_media_stream_interface.h+134

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_packet_socket_factory.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_peer_connection_factory_interface.h+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_peerconnectioninterface.h+217

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_rtp_transceiver.h+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_rtpreceiver.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_rtpsender.h+78

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_session_description_interface.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_audio_frame.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_frame.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_transformable_video_frame.h+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_bitrate_allocator.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_bitrate_allocator_factory.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_decoder.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_decoder_factory.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_encoder.h+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_encoder_factory.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/mock_video_track.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator.cc+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator.h+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator_factory.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/neteq_simulator_factory.h+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/BUILD.gn+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/DEPS+7

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/create_cross_traffic.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/create_cross_traffic.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/cross_traffic.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/network_emulation_interfaces.cc+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation/network_emulation_interfaces.h+311

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation_manager.cc+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/network_emulation_manager.h+361

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/BUILD.gn+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/DEPS+13

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/media_configuration.cc+312

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/media_configuration.h+476

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/media_quality_test_params.h+187

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/peer_configurer.cc+281

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/pclf/peer_configurer.h+210

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/peer_network_dependencies.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/peerconnection_quality_test_fixture.h+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/peerconnection_quality_test_fixture_unittest.cc+142

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/simulated_network.h+139

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/simulcast_test_fixture.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/stats_observer_interface.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/test_dependency_factory.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/test_dependency_factory.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/time_controller.cc+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/time_controller.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/track_id_stream_info_map.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/BUILD.gn+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/DEPS+6

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/function_video_decoder_factory.h+70

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/function_video_encoder_factory.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/test_video_track_source.cc+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/test_video_track_source.h+97

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video/video_frame_writer.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video_quality_analyzer_interface.h+185

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/video_quality_test_fixture.h+143

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_fixture.h+178

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_stats.cc+121

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/test/videocodec_test_stats.h+157

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/bandwidth_estimation_settings.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/bitrate_settings.cc+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/bitrate_settings.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/data_channel_transport_interface.h+125

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/enums.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/field_trial_based_config.cc+18

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/field_trial_based_config.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/goog_cc_factory.cc+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/goog_cc_factory.h+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/network_control.h+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/network_types.cc+106

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/network_types.h+284

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/rtp/BUILD.gn+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/rtp/dependency_descriptor.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/rtp/dependency_descriptor.h+150

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/rtp/rtp_source.h+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/sctp_transport_factory_interface.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/stun.cc+1525

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/stun.h+808

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/stun_unittest.cc+1870

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/test/create_feedback_generator.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/test/create_feedback_generator.h+21

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/test/feedback_generator_interface.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/transport/test/mock_network_control.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/turn_customizer.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/uma_metrics.h+184

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/OWNERS+1

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_rate.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_rate.h+155

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_rate_unittest.cc+197

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_size.cc+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_size.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/data_size_unittest.cc+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/frequency.cc+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/frequency.h+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/frequency_unittest.cc+161

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/time_delta.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/time_delta.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/time_delta_unittest.cc+237

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/timestamp.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/timestamp.h+139

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/units/timestamp_unittest.cc+163

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/OWNERS+5

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/builtin_video_bitrate_allocator_factory.cc+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/builtin_video_bitrate_allocator_factory.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/color_space.cc+263

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/color_space.h+181

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/encoded_frame.cc+134

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/encoded_frame.h+106

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/encoded_image.cc+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/encoded_image.h+267

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/frame_buffer.cc+280

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/frame_buffer.h+106

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/frame_buffer_unittest.cc+393

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/hdr_metadata.cc+21

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/hdr_metadata.h+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i010_buffer.cc+213

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i010_buffer.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i210_buffer.cc+211

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i210_buffer.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i410_buffer.cc+221

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i410_buffer.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i420_buffer.cc+232

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i420_buffer.h+118

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i422_buffer.cc+237

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i422_buffer.h+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i444_buffer.cc+211

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/i444_buffer.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/nv12_buffer.cc+155

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/nv12_buffer.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/recordable_encoded_frame.h+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/render_resolution.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/resolution.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler.cc+344

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/rtp_video_frame_assembler_unittests.cc+586

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/BUILD.gn+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/color_space_unittest.cc+83

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/i210_buffer_unittest.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/i410_buffer_unittest.cc+120

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/i422_buffer_unittest.cc+128

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/i444_buffer_unittest.cc+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/mock_recordable_encoded_frame.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/nv12_buffer_unittest.cc+119

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/video_adaptation_counters_unittest.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/video_bitrate_allocation_unittest.cc+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/test/video_frame_matchers.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_counters.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_counters.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_adaptation_reason.h+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocation.cc+185

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocation.h+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_bitrate_allocator_factory.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_codec_constants.h+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_codec_type.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_content_type.cc+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_content_type.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame.cc+334

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame.h+331

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_buffer.cc+242

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_buffer.h+325

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata.cc+174

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata.h+127

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_metadata_unittest.cc+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_frame_type.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_layers_allocation.h+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_rotation.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_sink_interface.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_source_interface.cc+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_source_interface.h+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_stream_encoder_settings.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_timing.cc+122

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video/video_timing.h+150

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/OWNERS+4

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/av1_profile.cc+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/av1_profile.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/bitstream_parser.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_decoder_factory.cc+23

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_decoder_factory.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_encoder_factory.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/builtin_video_encoder_factory.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/h264_profile_level_id.cc+257

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/h264_profile_level_id.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/h265_profile_tier_level.cc+248

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/h265_profile_tier_level.h+109

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode.cc+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode.h+111

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode_helper.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/scalability_mode_helper.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/sdp_video_format.cc+209

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/sdp_video_format.h+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/simulcast_stream.cc+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/simulcast_stream.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/spatial_layer.cc+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/spatial_layer.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/BUILD.gn+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/builtin_video_encoder_factory_unittest.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/h264_profile_level_id_unittest.cc+171

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/h265_profile_tier_level_unittest.cc+248

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/sdp_video_format_unittest.cc+155

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_decoder_factory_template_tests.cc+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc+309

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_encoder_factory_template_tests.cc+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc+1144

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_codec.cc+219

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_codec.h+246

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder.cc+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder.h+147

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory.cc+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template.h+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_dav1d_adapter.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_libvpx_vp8_adapter.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_libvpx_vp9_adapter.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_factory_template_open_h264_adapter.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc+300

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder.cc+348

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder.h+430

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory.h+127

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template.h+145

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc+548

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/video_encoder_software_fallback_wrapper.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_buffer_controller.h+192

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_config.cc+78

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_frame_config.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers.cc+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers.h+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers_factory.cc+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp8_temporal_layers_factory.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp9_profile.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_codecs/vp9_profile.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_track_source_constraints.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/video_track_source_proxy_factory.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/test/compile_all_headers.cc+14

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/test/mock_voip_engine.h+124

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/test/voip_engine_factory_unittest.cc+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_base.h+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_codec.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_dtmf.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_engine.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_engine_factory.cc+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_engine_factory.h+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_network.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_statistics.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/voip/voip_volume_control.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/webrtc_key_value_config.h+17

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/api/wrapping_async_dns_resolver.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/OWNERS+5

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_level.cc+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_level.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_receive_stream.cc+475

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_receive_stream.h+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_send_stream.cc+891

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_send_stream.h+225

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_state.cc+212

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_state.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_transport_impl.cc+285

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/audio_transport_impl.h+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_receive.cc+1135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_receive.h+194

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_receive_frame_transformer_delegate.cc+167

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_receive_frame_transformer_delegate.h+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_send.cc+908

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_send.h+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_send_frame_transformer_delegate.cc+213

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/channel_send_frame_transformer_delegate.h+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/conversion.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/mock_voe_channel_proxy.h+188

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/remix_resample.cc+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/remix_resample.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/audio_frame_operations.cc+294

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/audio_frame_operations.h+107

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixer.cc+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixer.h+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixing_matrix.cc+333

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/utility/channel_mixing_matrix.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_channel.cc+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_channel.h+131

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_egress.cc+190

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_egress.h+158

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_ingress.cc+290

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/audio_ingress.h+145

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/voip_core.cc+500

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/audio/voip/voip_core.h+174

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/OWNERS+8

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/adaptation_constraint.cc+17

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/adaptation_constraint.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/broadcast_resource_listener.cc+122

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/broadcast_resource_listener.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/degradation_preference_provider.cc+14

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/degradation_preference_provider.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/encoder_settings.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/encoder_settings.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor.cc+378

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor.h+167

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor_interface.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/resource_adaptation_processor_interface.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_source_restrictions.cc+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_source_restrictions.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_adapter.cc+753

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_adapter.h+271

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state.cc+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state_provider.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/adaptation/video_stream_input_state_provider.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_receive_stream.cc+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_receive_stream.h+207

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_send_stream.cc+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_send_stream.h+201

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_sender.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_state.cc+18

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/audio_state.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/bitrate_allocator.cc+593

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/bitrate_allocator.h+170

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/call.cc+1424

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/call.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/call_config.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/call_config.h+83

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/create_call.cc+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/create_call.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/degraded_call.cc+380

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/degraded_call.h+202

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/fake_network_pipe.cc+382

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/fake_network_pipe.h+230

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream.cc+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream.h+79

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream_impl.cc+201

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/flexfec_receive_stream_impl.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/packet_receiver.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/receive_stream.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/receive_time_calculator.cc+120

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/receive_time_calculator.h+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_bitrate_configurator.cc+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_bitrate_configurator.h+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_config.cc+203

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_config.h+175

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_demuxer.cc+452

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_demuxer.h+221

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_packet_sink_interface.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_payload_params.cc+795

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_payload_params.h+134

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller.h+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_stream_receiver_controller_interface.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_config.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send.cc+761

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send.h+218

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_factory.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_factory_interface.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_transport_controller_send_interface.h+171

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_video_sender.cc+986

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_video_sender.h+218

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtp_video_sender_interface.h+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtx_receive_stream.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/rtx_receive_stream.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/simulated_network.cc+276

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/simulated_network.h+134

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/simulated_packet_receiver.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/syncable.cc+17

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/syncable.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/version.cc+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/version.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/video_receive_stream.cc+168

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/video_receive_stream.h+328

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/video_send_stream.cc+127

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/call/video_send_stream.h+260

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/audio_converter.cc+219

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/audio_converter.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/audio_util.cc+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/channel_buffer.cc+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/channel_buffer.h+215

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_avx2.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_avx2.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_c.cc+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_c.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_factory.cc+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_factory.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_neon.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_neon.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_sse.cc+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/fir_filter_sse.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/include/audio_util.h+214

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/mocks/mock_smoothing_filter.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/real_fourier.cc+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/real_fourier.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/real_fourier_ooura.cc+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/real_fourier_ooura.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/include/push_resampler.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/include/resampler.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_resampler.cc+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_sinc_resampler.cc+102

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/push_sinc_resampler.h+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/resampler.cc+923

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler.cc+363

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler.h+181

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_avx2.cc+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_neon.cc+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinc_resampler_sse.cc+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.cc+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/ring_buffer.c+232

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/ring_buffer.h+79

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c+103

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/auto_correlation.c+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse.c+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S+119

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_bit_reverse_mips.c+176

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft.c+299

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft_mips.c+328

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/complex_fft_tables.h+132

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/copy_set_operations.c+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation.c+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation_mips.c+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/cross_correlation_neon.c+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/division_operations.c+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/dot_product_with_scale.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/dot_product_with_scale.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast.c+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast_mips.c+169

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/downsample_fast_neon.c+217

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/energy.c+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar.c+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S+218

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ar_fast_q12_mips.c+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/get_hanning_window.c+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/get_scaling_square.c+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/ilbc_specific_functions.c+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/real_fft.h+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/signal_processing_library.h+1635

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl.h+155

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h+138

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/include/spl_inl_mips.h+204

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/levinson_durbin.c+249

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations.c+256

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations_mips.c+375

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/min_max_operations_neon.c+333

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/randomization_functions.c+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/real_fft.c+102

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample.c+505

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_48khz.c+186

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2.c+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_internal.c+689

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_internal.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_by_2_mips.c+292

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/resample_fractional.c+239

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_init.c+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_inl.c+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/spl_sqrt.c+194

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/splitting_filter.c+211

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/vector_scaling_operations.c+165

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/signal_processing/vector_scaling_operations_mips.c+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/smoothing_filter.cc+147

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/smoothing_filter.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/LICENSE+8

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/README.chromium+13

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc+548

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc+1245

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc+351

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc+439

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_256/fft4g.cc+866

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/ooura/fft_size_256/fft4g.h+21

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/LICENSE+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/README.chromium+12

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_mips.c+207

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/include/vad.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/include/webrtc_vad.h+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/mock/mock_vad.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad.cc+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_core.c+685

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_core.h+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_filterbank.c+329

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_filterbank.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_gmm.c+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_gmm.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_sp.c+176

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/vad_sp.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/vad/webrtc_vad.c+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/wav_file.cc+290

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/wav_file.h+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/wav_header.cc+435

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/wav_header.h+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/window_generator.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_audio/window_generator.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_types.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/OWNERS+4

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/bitrate_adjuster.cc+159

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/frame_counts.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/frame_rate_estimator.cc+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/frame_rate_estimator.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/framerate_controller.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/framerate_controller.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/generic_frame_info.cc+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/generic_frame_descriptor/generic_frame_info.h+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/OWNERS+1

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/h264_bitstream_parser.cc+299

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/h264_bitstream_parser.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/h264_common.cc+116

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/h264_common.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/pps_parser.cc+160

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/pps_parser.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/sps_parser.cc+227

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/sps_parser.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/sps_vui_rewriter.cc+611

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h264/sps_vui_rewriter.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_bitstream_parser.cc+401

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_bitstream_parser.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_common.cc+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_common.h+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_inline.cc+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_inline.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_pps_parser.cc+217

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_pps_parser.h+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_sps_parser.cc+408

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_sps_parser.h+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_vps_parser.cc+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/h265_vps_parser.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/legacy_bit_buffer.cc+227

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/h265/legacy_bit_buffer.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/include/bitrate_adjuster.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/include/quality_limitation_reason.h+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/include/video_frame_buffer.h+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/include/video_frame_buffer_pool.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/libyuv/include/webrtc_libyuv.h+166

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/libyuv/webrtc_libyuv.cc+461

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/video_frame_buffer.cc+388

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/common_video/video_frame_buffer_pool.cc+343

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/experiments/registered_field_trials.h+303

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/dependency_descriptor_encoder_decoder.cc+221

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/dependency_descriptor_encoder_decoder.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/bit_writer.cc+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/bit_writer.h+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/blob_encoding.cc+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/blob_encoding.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/delta_encoding.cc+839

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/delta_encoding.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/optional_blob_encoding.cc+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/optional_blob_encoding.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_common.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_common.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc+806

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc+1964

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.h+168

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_v3.cc+164

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_v3.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/var_int.cc+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/encoder/var_int.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.cc+137

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/logged_rtp_rtcp.h+261

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_alr_state.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_alr_state.h+78

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h+78

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_playout.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_playout.h+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_begin_log.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_begin_log.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h+136

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_definition.h+152

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_transport_state.cc+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_writable_state.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_end_log.cc+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_end_log.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding.cc+299

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding.h+179

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc+399

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h+214

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_extraction.cc+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_field_extraction.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_frame_decoded.cc+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_frame_decoded.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_ack_received.cc+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_ack_received.h+118

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_received.cc+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_received.h+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_sent.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.cc+65

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h+143

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_log_parse_status.h+153

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_neteq_set_minimum_delay.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_neteq_set_minimum_delay.h+70

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_cluster_created.cc+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.h+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.cc+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.h+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_remote_estimate.h+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_route_change.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_route_change.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.cc+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h+97

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log_factory.cc+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/fake_rtc_event_log_factory.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/ice_logger.cc+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/ice_logger.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/output/rtc_event_log_output_file.h+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log.pb.cc+8235

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log.pb.h+8906

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log2.pb.cc+16384

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log2.pb.h+20923

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc+331

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_impl.h+123

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc+3646

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_log_parser.h+947

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor.cc+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor.h+181

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_event_processor_order.h+442

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_stream_config.cc+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/logging/rtc_event_log/rtc_stream_config.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/OWNERS+13

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/adapted_video_track_source.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/adapted_video_track_source.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/audio_source.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/codec.cc+522

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/codec.h+230

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_frame_source.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_frame_source.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_media_engine.cc+705

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_media_engine.h+876

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_network_interface.h+232

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_rtp.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_rtp.h+301

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_video_renderer.cc+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/fake_video_renderer.h+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_channel.h+1006

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_channel_impl.cc+303

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_channel_impl.h+181

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_config.h+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_constants.cc+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_constants.h+170

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_engine.cc+291

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/media_engine.h+239

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/rid_description.cc+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/rid_description.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/rtp_utils.cc+401

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/rtp_utils.h+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/sdp_video_format_utils.cc+180

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/sdp_video_format_utils.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/stream_params.cc+240

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/stream_params.h+321

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/test_utils.cc+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/test_utils.h+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/turn_utils.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/turn_utils.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_adapter.cc+470

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_adapter.h+172

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_broadcaster.cc+214

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_broadcaster.h+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_common.cc+97

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_common.h+224

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_source_base.cc+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/base/video_source_base.h+83

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/adm_helpers.cc+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/adm_helpers.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_video_codec_factory.cc+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_video_codec_factory.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_call.cc+763

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_call.h+518

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_video_engine.cc+304

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/fake_webrtc_video_engine.h+144

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/internal_decoder_factory.cc+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/internal_decoder_factory.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/internal_encoder_factory.cc+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/internal_encoder_factory.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/multiplex_codec_factory.cc+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/multiplex_codec_factory.h+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/null_webrtc_video_engine.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/payload_type_mapper.cc+160

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/payload_type_mapper.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/simulcast_encoder_adapter.cc+995

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/simulcast_encoder_adapter.h+200

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_media_engine.cc+185

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_media_engine.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_video_engine.cc+3930

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_video_engine.h+901

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_voice_engine.cc+2714

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/engine/webrtc_voice_engine.h+516

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/OWNERS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/dcsctp_transport.cc+668

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/dcsctp_transport.h+141

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_factory.cc+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_factory.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/media/sctp/sctp_transport_internal.h+150

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/async_audio_processing/async_audio_processing.cc+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/async_audio_processing/async_audio_processing.h+109

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/OWNERS+4

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receive_test.cc+161

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receive_test.h+97

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver.cc+358

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver.h+245

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_receiver_unittest.cc+412

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing.cc+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_remixing_unittest.cc+191

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_resampler.cc+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_resampler.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_send_test.cc+169

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/acm_send_test.h+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/audio_coding_module.cc+532

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest.cc+1264

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics.cc+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/acm2/call_statistics_unittest.cc+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_coding.gni+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_config.cc+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc+171

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc+304

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc+236

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.cc+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/config.proto+196

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller.cc+19

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc+452

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h+124

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc+483

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump.proto+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc+160

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.cc+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.h+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer.cc+78

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc+240

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc+113

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc+489

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.cc+201

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc+444

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller_v2_unittest.cc+121

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/parse_ana_dump.py+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve.h+118

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc+632

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/audio_decoder.h+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/audio_encoder.h+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc+164

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc+178

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc+322

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc+520

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc+252

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc+436

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h+128

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/g711_interface.c+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/g711_interface.h+136

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g711/test/testG711.cc+168

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc+156

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/g722_interface.c+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/g722_interface.h+174

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/g722/test/testG722.cc+155

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c+82

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.c+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc+151

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.c+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/bw_expand.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c+405

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.c+115

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_search_core.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.c+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.c+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/chebyshev.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.c+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/complexityMeasures.m+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/constants.c+667

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/constants.h+95

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.c+83

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/create_augmented_vec.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode.c+261

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c+185

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/defines.h+225

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c+309

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/encode.c+517

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/encode.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.c+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/energy_inverse.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.c+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enh_upsample.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer.c+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c+382

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.c+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/filtered_cb_vecs.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.c+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_dequant.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.c+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/gain_quant.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.c+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c+84

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.c+111

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_input.c+90

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_input.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_output.c+91

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/hp_output.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c+288

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc.h+251

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/ilbc_unittest.cc+140

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.c+40

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_dec.h+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.c+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/index_conv_enc.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c+98

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate.c+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.c+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/interpolate_samples.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.c+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_check.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.c+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_dec.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.c+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_interpolate_to_poly_enc.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.c+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_lsp.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.c+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsf_to_poly.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.c+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/lsp_to_lsf.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/my_corr.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.c+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.c+253

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/pack_bits.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.c+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsf.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.c+159

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/poly_to_lsp.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/refiner.c+141

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/refiner.h+44

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c+133

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.c+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_dequant.h+34

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.c+49

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/simple_lsf_quant.h+37

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth.c+212

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.c+56

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/smooth_out_data.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.c+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/sort_sq.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/split_vq.c+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/split_vq.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_construct.c+116

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_construct.h+38

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_search.c+121

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/state_search.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.c+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/swap_bytes.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/empty.cc

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c+238

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c+215

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c+343

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.c+241

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/unpack_bits.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq3.c+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq3.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq4.c+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/vq4.h+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.c+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/window32_w32.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c+142

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t_impl.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h+225

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/bandwidth_info.h+24

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/empty.cc

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/include/isacfix.h+486

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines.c+122

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c+401

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c+413

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_encoder_isacfix.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c+1021

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.h+128

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h+212

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c+221

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c+805

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c+635

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c+2056

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h+177

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c+249

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding_neon.c+217

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c+415

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.h+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.c+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c+297

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c+242

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c+278

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters.c+112

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_mips.c+365

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_neon.c+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c+173

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/isac_fix_type.h+106

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c+1230

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c+321

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_armv7.S+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_mips.c+329

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_neon.c+195

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c+949

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h+69

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_mips.c+237

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c+1281

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c+435

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_mips.c+193

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c+248

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_armv6.S+143

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_mips.c+133

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c+306

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h+211

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c+193

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h+97

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h+345

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c+214

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_mips.c+1294

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_neon.c+479

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/include/isac.h+617

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.c+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c+291

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c+303

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/audio_decoder_isac.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac.cc+20

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c+1013

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h+165

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h+223

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c+111

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/decode.c+303

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/decode_bwe.c+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c+1260

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c+706

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h+246

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c+2066

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h+347

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.c+195

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.h+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/filterbanks.c+114

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/intialize.c+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c+2307

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_float_type.h+100

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_vad.c+409

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/isac_vad.h+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lattice.c+219

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c+496

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c+136

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c+158

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c+247

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.c+601

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.h+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c+695

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.c+388

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.h+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c+277

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h+116

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/settings.h+196

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c+139

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h+79

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h+448

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/source/transform.c+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/util/utility.c+179

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/isac/main/util/utility.h+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc+179

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/DEPS+5

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_coder_opus_common.cc+52

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_coder_opus_common.h+89

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.cc+182

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h+74

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc+148

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.cc+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc+366

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.h+92

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_unittest.cc+156

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc+824

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h+184

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc+914

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_bandwidth_unittest.cc+152

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc+248

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_inst.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_interface.cc+880

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_interface.h+547

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_speed_test.cc+147

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc+979

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/BUILD.gn+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer.cc+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc+111

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker.cc+215

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker.h+127

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/blocker_unittest.cc+293

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform.cc+100

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform.h+175

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/opus/test/lapped_transform_unittest.cc+203

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc+39

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.h+22

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc+279

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h+102

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc+658

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h+93

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/include/audio_coding_module.h+146

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h+137

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/accelerate.cc+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/accelerate.h+79

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc+526

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc+221

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector.h+138

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_multi_vector_unittest.cc+323

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector.cc+380

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector.h+172

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/audio_vector_unittest.cc+384

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise.cc+300

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise.h+138

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/background_noise_unittest.cc+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter.h+54

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/buffer_level_filter_unittest.cc+116

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise.cc+129

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise.h+72

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/comfort_noise_unittest.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/cross_correlation.cc+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/cross_correlation.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic.cc+469

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic.h+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decision_logic_unittest.cc+204

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database.cc+285

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database.h+204

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc+227

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/default_neteq_factory.cc+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/default_neteq_factory.h+41

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager.cc+207

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager.h+121

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc+246

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper.cc+373

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper.h+161

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dsp_helper_unittest.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc+242

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_buffer_unittest.cc+297

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc+215

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc+180

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand.cc+888

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand.h+153

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_uma_logger.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_uma_logger.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/expand_unittest.cc+203

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/g3doc/index.md+102

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram.cc+149

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/histogram_unittest.cc+73

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge.cc+385

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge.h+101

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/merge_unittest.cc+121

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h+29

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h+35

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h+33

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_expand.h+60

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_histogram.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_neteq_controller.h+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_packet_arrival_history.h+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/mock/mock_statistics_calculator.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker.cc+246

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker.h+206

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/nack_tracker_unittest.cc+552

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc+321

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl.cc+2133

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl.h+405

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc+1915

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc+346

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc+424

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_unittest.cc+1007

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/neteq_unittest.proto+31

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal.cc+194

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/normal_unittest.cc+147

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet.cc+36

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet.h+128

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history.cc+132

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_arrival_history_unittest.cc+171

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer.cc+275

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer.h+144

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/packet_buffer_unittest.cc+644

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/preemptive_expand.cc+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/preemptive_expand.h+85

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector.cc+63

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/random_vector_unittest.cc+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter.cc+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/red_payload_splitter_unittest.cc+389

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer.cc+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/reorder_optimizer_unittest.cc+70

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator.cc+395

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator.h+210

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/statistics_calculator_unittest.cc+206

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer.cc+118

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer.h+110

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/sync_buffer_unittest.cc+174

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/delay_tool/parse_delay_file.m+201

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/delay_tool/plot_neteq_delay.m+197

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_decoding_test.cc+423

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_decoding_test.h+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc+81

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc+80

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_performance_unittest.cc+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/neteq_speed_test.cc+58

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/result_sink.cc+108

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/test/result_sink.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch.cc+216

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch.h+113

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/time_stretch_unittest.cc+124

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc+87

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler.h+67

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc+324

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/DEPS+3

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/README.md+17

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h+64

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_loop.cc+61

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_loop.h+57

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_sink.cc+26

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/audio_sink.h+70

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc+94

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h+75

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc+122

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h+77

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/initial_packet_inserter_neteq_input.cc+88

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/initial_packet_inserter_neteq_input.h+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file.cc+96

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc+307

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.h+76

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_event_log_input.cc+167

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_event_log_input.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_input.cc+105

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_input.h+135

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc+128

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc+482

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h+176

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc+126

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.h+53

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtp_dump_input.cc+109

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtp_dump_input.h+32

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc+406

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay_test.sh+183

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_getter.cc+139

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_getter.h+106

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc+113

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_stats_plotter.h+47

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test.cc+341

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test.h+129

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test_factory.cc+354

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/neteq_test_factory.h+172

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h+51

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h+46

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet.cc+133

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet.h+104

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_source.cc+25

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_source.h+43

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/packet_unittest.cc+226

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc+48

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h+55

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc+166

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_encode.cc+354

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc+99

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h+68

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_generator.cc+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h+83

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtp_jitter.cc+148

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc+45

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer.cc+71

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_coding/neteq/underrun_optimizer_unittest.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/OWNERS+2

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_player.cc+216

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_player.h+141

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_recorder.cc+205

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_recorder.h+124

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_wrapper.cc+499

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/aaudio_wrapper.h+127

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_common.h+28

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_device_template.h+441

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_manager.cc+318

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_manager.h+225

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_merged_screen_record_jni.cc+283

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_merged_screen_record_jni.h+169

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_record_jni.cc+280

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_record_jni.h+168

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_screen_record_jni.cc+278

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_screen_record_jni.h+167

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_track_jni.cc+296

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/audio_track_jni.h+161

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/build_info.cc+59

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/build_info.h+86

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/ensure_initialized.cc+42

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/ensure_initialized.h+17

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_common.cc+103

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_common.h+62

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_player.cc+434

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_player.h+195

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_recorder.cc+431

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/android/opensles_recorder.h+193

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_buffer.cc+539

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_buffer.h+253

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_config.h+30

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_data_observer.cc+373

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_generic.cc+66

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_generic.h+145

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_impl.cc+986

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_impl.h+191

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_name.cc+27

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/audio_device_name.h+50

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/audio_device_dummy.cc+226

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/audio_device_dummy.h+117

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device.cc+508

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device.h+163

This diff is too big to show here.

TMessagesProj/jni/voip/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc+62

This diff is too big to show here.